lecture 8 predicate logic tf4233 mathematical logic semester 2, 2006/2007 dr. rolly intan &...

Post on 18-Jan-2016

212 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lecture 8 Predicate Logic

TF4233 Mathematical LogicSemester 2, 2006/2007

Dr. Rolly Intan & Cherry Ballangan, MAITInformatics Department, Petra Christian University

TF4233 Math. Logic Petra Christian University 2

Content

1. Predicate Logic

2. Quantifier

3. Translation Examples

TF4233 Math. Logic Petra Christian University 3

1. Predicate Logic

“x is greater than 5”

(the universe is real numbers)

Is it a proposition ??

TF4233 Math. Logic Petra Christian University 4

Are these propositions?

4 is greater than 5. 8 is greater than 5. For all x, x is greater than 5. There is x such that x is greater than 5.

(the universe is real numbers)

1. Predicate Logic

TF4233 Math. Logic Petra Christian University 5

Predicate logic is…

1. Predicate Logic

P(x) : “x is greater than 5”(the universe is real numbers)

Subject: xPredicate: “is greater than 5”

P(4) : “4 is greater than 5” P(8) : “8 is greater than 5” x P(x) : “For all x, x is greater 5” x P(x) : “There is x such that x is greater than 5”

TF4233 Math. Logic Petra Christian University 6

2. Quantifier

Universal Quantifier

• “For all”, “For any”, “For every”

Existential Quantifier

• “There exists”, “Some”

TF4233 Math. Logic Petra Christian University 7

Example

clever(x) : “x is clever”(universe: students)

x clever(x) : “All students are clever” x clever(x) : “Some students are clever” x clever(x) : “Not all students are clever” x clever(x) : “No students is clever”

2. Quantifier

TF4233 Math. Logic Petra Christian University 8

Negation

x P(x) x P(x) x P(x) x P(x)

Example NOT ALL students are clever

• SOME students are NOT clever

NO students is clever• ALL students are NOT clever

2. Quantifier

TF4233 Math. Logic Petra Christian University 9

For more than one variable

The order of the quantifiers is important! Example:

• Let P(x, y) : ”x + y = 0” (universal: Real)x y P(x, y)

y x P(x, y)

• Let P(x, y, z): “x + y = z” x y z P(x, y, z)

z x y P(x, y, z)

2. Quantifier

TF4233 Math. Logic Petra Christian University 10

Laws 1 x ( A(x) B(x) ) (x) A(x) (x) B(x) x (A(x) B(x)) (x)A(x)(x)B(x) (x)A(x) (x)A(x) (x)A(x) (x)A(x) (x)A(x)(x)B(x) x(A(x)B(x)) (x)(A(x)B(x)) (x)A(x)(x)B(x) x(AB(x)) A(x)B(x)

2. Quantifier

TF4233 Math. Logic Petra Christian University 11

Laws 2

x(AB(x)) A(x)B(x)

(x)(A(x)B) (x)(A(x)B)

(x)A(x)B (x)(A(x)B)

A(x)B(x) (x)(AB(x))

A(x)B(x) (x)(AB(x))

xP(x) P(c), for any c element univ.

P(c ) xP(x)

2. Quantifier

TF4233 Math. Logic Petra Christian University 12

3. Translation Example

Translate into predicate logic: i) “All lions are fierce.” ii) ”Some lions do not drink coffee.” iii) “Some fierce creature don’t drink

coffee.”

Example 1

TF4233 Math. Logic Petra Christian University 13

3. Translation Example

Example 1 Answer

TF4233 Math. Logic Petra Christian University 14

3. Translation Example

Example 2

i). “All Hummingbirds are richly colored.”

ii). “No large birds live on honey.”iii). “Birds that do not live on honey are

dull in color.”iv). “Hummingbirds are small.”

TF4233 Math. Logic Petra Christian University 15

3. Translation Example

Example 2 Answer

TF4233 Math. Logic Petra Christian University 16

Exercises

Translate the following statements into predicate logic:

• All students in this class have studied Calculus.

• No students in this class have studied Discrete Mathematics.

If P(x) means “x + 1 > x” (the universe is real number), determine the truth value of the following statements: xP(x)

xP(x)

TF4233 Math. Logic Petra Christian University 17

Exercises

Negate the following statements: x |x| = x

x x2 = x

• All students live in dormitories

• All math majors are males

• Some students are 25 years or older

• If there is a riot then someone is killed

• It is daylight and all the people have arisen

top related