báo cáo dtht

23
0 6 / 1 1 / 2 0 2 2 1 ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINH ĐẠI HỌC CÔNG NGHỆ THÔNG TIN --------- ĐẶC TẢ HÌNH THỨC GVHD: Hầu Nguyễn Thành Nam Ngày 20 tháng 05 năm 2013 Nhóm thực hiện: Trần Đức Yên 10520203 Lê Tuấn Anh 10520211 Tô Hồng Phong 10520411 CHƯƠNG 3: PREDICATE LOGIC

Upload: tran-yen

Post on 13-Jun-2015

104 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Báo cáo dtht

04

/13

/20

23

1

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

ĐẶC TẢ HÌNH THỨCĐẶC TẢ HÌNH THỨC

GVHD: Hầu Nguyễn Thành Nam

Ngày 20 tháng 05 năm 2013

Nhóm thực hiện:• Trần Đức Yên 10520203• Lê Tuấn Anh 10520211• Tô Hồng Phong 10520411

CHƯƠNG 3: PREDICATE LOGIC

Page 2: Báo cáo dtht

04

/13

/20

23

2

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.1 Predicate calculus

3.2 Quantiers and declarations

3.3 Substitution

3.4 Universal introduction and elimination

3.5 Existential introduction and elimination

3.6 Satisfaction and validity

CONTENTS PRESENTATION

Page 3: Báo cáo dtht

04

/13

/20

23

3

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

In this chapter we introduce another part of our logical language. The language of propositions introduced in the previous chapter allows us to make state-ments about specic objects, but it does not allow us to make statements such as “Every cloud has a silver lining”. These are known as universal statements, since they describe properties that must be satised by every object in some universe of discourse

Example 3.1 The following are examples of universal statements: Each student must hand in course work

Example 3.2The following are examples of existential statements: I heard it from one of your friends

Page 4: Báo cáo dtht

04

/13

/20

23

4

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.1 Predicate calculus

We require a language that reveals the internal structure of our propositional statements, a language that allows us to take them apart and apply them to objects without proper names. The language we require is the language of predicate calculus .

We could say that a predicate is a proposition with a gap for an object of some kind.

For example, the statement “_ > 5” is a predicate.

“0 > 5” A proposition that happens to be false.

“x > 5” There is anx, which is a natural number, such that x > 5

Page 5: Báo cáo dtht

04

/13

/20

23

5

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.1 Predicate calculus

Example: Let Friends stand for the set of all your friends, and let x told y mean that x has told y.

Example: Let Student stand for the set of all students, and let Submit(x) mean that x must hand in course work.� �

Page 6: Báo cáo dtht

04

/13

/20

23

6

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.2 Quantiers and declarations

Page 7: Báo cáo dtht

04

/13

/20

23

7

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.2 Quantiers and declarations

As may be seen from the following equivalences :

There exists an x in a satisfying p, such that q

For all x in a satisfying p, q holds

Page 8: Báo cáo dtht

04

/13

/20

23

8

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

We can change the name of a bound variable without changing the meaning of the quantied expression, as long as we avoid the names of any other variables that appear.

3.2 Quantiers and declarations

This statement is false: there is no greatest natural number

This statement is true; the meaning has changed

Page 9: Báo cáo dtht

04

/13

/20

23

9

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.2 Quantiers and declarations

Example : The quantied predicate

Page 10: Báo cáo dtht

04

/13

/20

23

10

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.3 Substitution

We write p[y/x] to denote the predicate that results from substituting y � �for each free occurrence of x in predicate p; this new operator binds moretightly than any other. The expression y need not be another variable; it can be any expression whose possible values match those of x.

Example:

Page 11: Báo cáo dtht

04

/13

/20

23

11

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.3 Substitution

We write p[t/x] [u/y] to denote the predicate p[t/x] with the expression � �� � � �u systematically substituted for free occurrences of the variable y

We write p[t,u/x,y] to denote the result of simultaneously � �substituting t for x and u for y in predicate p. In general, this is different from the multiplesubstitution p[t/x][u/y]� �� �

Page 12: Báo cáo dtht

04

/13

/20

23

12

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.3 Substitution

If the major operator in an expression is not a quantier, then the effect of substitution is easy to explain:

In every case, substitution distributes through the propositional operators.

Page 13: Báo cáo dtht

04

/13

/20

23

13

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.4 Universal introduction and elimination

If the major operator in an expression is not a quantier, then the effect of substitution is easy to explain:

In every case, substitution distributes through the propositional operators.

Page 14: Báo cáo dtht

04

/13

/20

23

14

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.4 Universal introduction and elimination

Where x a means that x is a member of set a

Page 15: Báo cáo dtht

04

/13

/20

23

15

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.4 Universal introduction and elimination

The constraint part of a universal quantication may be treated as the an-tecedent of an implication. From a conjunction, one may conclude either of the conjuncts; by analogy, from a universally quantied predicate, one may conclude that the predicate holds for any value in the range.

Page 16: Báo cáo dtht

04

/13

/20

23

16

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.4 Universal introduction and elimination

The full form requires the equivalent of implication elimination, to demon-strate that the expression chosen satises the constraint:

A special case of the last rule takes t as x:

Page 17: Báo cáo dtht

04

/13

/20

23

17

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.4 Universal introduction and elimination

Now this subtree is finished, since we can use conjunction elimination to con-nect top and bottom. The right-hand subtree is symmetric with the left.

Page 18: Báo cáo dtht

04

/13

/20

23

18

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.5 Existential introduction and elimination

The existential quantication true if and only if there is some x in set a such that p and q are true. Of course, this object does not have to be called x; it can be any expression t such that t has a value in a and the following predicate is true:

That is, given that we are talking about t not x, both the constraint and the quantied predicate should hold. To introduce an existential quantier, we must show that a suitable expres-siont exists: we must provide an example

As before, the expression means that t is a member of set a

Page 19: Báo cáo dtht

04

/13

/20

23

19

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.5 Existential introduction and elimination

If, in the course of a proof, we have established that andx ≥ 0, then we may apply the special case of existential-introduction and con-clude that

Elimination of the existential quantier is a more difficult affair. The pred-icate states that there is some object x in a for whichs is true. If x appears free in p then simply removing the quantier leaves us with an un-justied statement about a free variable x. We cannot, in general, conclude p from . To use the information contained in p, we must complete anyreasoning that involves x before eliminating the quantier.

Page 20: Báo cáo dtht

04

/13

/20

23

20

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.5 Existential introduction and elimination

Suppose that we assume only that and that p holds of x. If we are then able to derive a predicate r that does not involve x, and we know that there is some x in a for which p is true, then we may safely concluder.

Page 21: Báo cáo dtht

04

/13

/20

23

21

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.6 Satisfaction and validity

A predicate with free variables or “spaces” is neither true nor false; it cannot be assigned a truth value until values are chosen for these variables or the spaces are filled. Some predicates will become true whatever values are chosen: these are said to be valid predicates.

Example : If n denotes a natural number, then the predicate

is valid: it will be true whichever value is chosen from the list 0, 1, 2, 3, …. A predicate that is true for some, but not necessarily all, choices of values is said to be satisable.

Page 22: Báo cáo dtht

04

/13

/20

23

22

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------

3.6 Satisfaction and validity

Example : If n denotes a natural number, then the predicate

is satisable. There are natural numbers greater than or equal to 5.

A predicate that is false for all choices is said to be unsatisable. Valid, satisfi-able, and unsatisable predicates are the analogues of tautologies, contingen-cies, and contradictions in the language of propositions.

Page 23: Báo cáo dtht

04

/13

/20

23

23

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINHĐẠI HỌC CÔNG NGHỆ THÔNG TIN

---------