cse 20: discrete mathematics · predicates apredicate isalogicalstatementinvolvingvariables:...

33
CSE 20: Discrete Mathematics Daniele Micciancio Spring 2018 Daniele Micciancio CSE 20: Discrete Mathematics

Upload: others

Post on 22-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

CSE 20: Discrete Mathematics

Daniele Micciancio

Spring 2018

Daniele Micciancio CSE 20: Discrete Mathematics

Page 2: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Summary

So far:

Propositional Logic: and, or, not, impliesReasoning: Truth tables, Equivalences, Proofs.

Today:

Predicate LogicExtend language with “every”, “some”, etc.Translating between English and Formal logicCarrying out proofsReading: Chap. 1.4, 1.5.

Daniele Micciancio CSE 20: Discrete Mathematics

Page 3: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

A classic example

Is the following deduction logically correct?

All men are mortalSocrates is a manTherefore, Socrates is mortal

(A) Yes; (B) No; (C) Not enough information; (D) I don’t know

The answer is (A), but we still do not have the tools to formallyjustify it.

Daniele Micciancio CSE 20: Discrete Mathematics

Page 4: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

A classic example

Is the following deduction logically correct?

All men are mortalSocrates is a manTherefore, Socrates is mortal

(A) Yes; (B) No; (C) Not enough information; (D) I don’t know

The answer is (A), but we still do not have the tools to formallyjustify it.

Daniele Micciancio CSE 20: Discrete Mathematics

Page 5: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Next question

Is the following deduction logically correct?

All men are mortalSocrates is mortalTherefore, all man are Socrates

What about

All professors are grey at nightI am grey at nightTherefore I am a professor

Notes:

No propositional logic connectives. Atomic propositions.

To study this type of deductions we need to extend thelanguage of propositional logic.

Daniele Micciancio CSE 20: Discrete Mathematics

Page 6: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Next question

Is the following deduction logically correct?

All men are mortalSocrates is mortalTherefore, all man are Socrates

What about

All professors are grey at nightI am grey at nightTherefore I am a professor

Notes:

No propositional logic connectives. Atomic propositions.

To study this type of deductions we need to extend thelanguage of propositional logic.

Daniele Micciancio CSE 20: Discrete Mathematics

Page 7: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Next question

Is the following deduction logically correct?

All men are mortalSocrates is mortalTherefore, all man are Socrates

What about

All professors are grey at nightI am grey at nightTherefore I am a professor

Notes:

No propositional logic connectives. Atomic propositions.

To study this type of deductions we need to extend thelanguage of propositional logic.

Daniele Micciancio CSE 20: Discrete Mathematics

Page 8: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Predicates

A predicate is a logical statement involving variables:

P(x) = “x < 100”Q(x,y,z) = “x + y = z”R(x,y) = “There are x students enrolled in class y”

Replacing the variable with concrete value yields propositions, whichmay be true or false:

P(33) = “33<100”Q(1,2,4) = “1 + 2 = 4”R(120,CSE12) = “There are 120 students enrolled in CSE12”

Predicates may be called “unary”, “binary”, n-ary, etc. dependingon how many variables they have.

Daniele Micciancio CSE 20: Discrete Mathematics

Page 9: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Predicates

A predicate is a logical statement involving variables:

P(x) = “x < 100”Q(x,y,z) = “x + y = z”R(x,y) = “There are x students enrolled in class y”

Replacing the variable with concrete value yields propositions, whichmay be true or false:

P(33) = “33<100”Q(1,2,4) = “1 + 2 = 4”R(120,CSE12) = “There are 120 students enrolled in CSE12”

Predicates may be called “unary”, “binary”, n-ary, etc. dependingon how many variables they have.

Daniele Micciancio CSE 20: Discrete Mathematics

Page 10: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Evaluating Predicates

Course Enrollment

CSE10 122CSE20 78CSE71 47

Q(x , y) = “There are at least x students enrolled in class y”R(y , z) = “Class y has smaller enrollment than class zP(x , y , z) = Q(x , y) ∧ R(z , y)

What is the truth value of

Q(90, CSE20)

(A) True; (B) False; (C) Undefined (Not a proposition)

B: There are less than 90 students in CSE20

Daniele Micciancio CSE 20: Discrete Mathematics

Page 11: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Evaluating Predicates

Course Enrollment

CSE10 122CSE20 78CSE71 47

Q(x , y) = “There are at least x students enrolled in class y”R(y , z) = “Class y has smaller enrollment than class zP(x , y , z) = Q(x , y) ∧ R(z , y)

What is the truth value of

Q(90, CSE20)

(A) True; (B) False; (C) Undefined (Not a proposition)

B: There are less than 90 students in CSE20

Daniele Micciancio CSE 20: Discrete Mathematics

Page 12: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Evaluating Predicates

Course Enrollment

CSE10 122CSE20 78CSE71 47

Q(x , y) = “There are at least x students enrolled in class y”R(y , z) = “Class y has smaller enrollment than class zP(x , y , z) = Q(x , y) ∧ R(z , y)

What is the truth value of

Q(90, CSE20)

(A) True; (B) False; (C) Undefined (Not a proposition)

B: There are less than 90 students in CSE20

Daniele Micciancio CSE 20: Discrete Mathematics

Page 13: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Evaluating Predicates

Course Enrollment

CSE10 122CSE20 78CSE71 47

Q(x , y) = “There are at least x students enrolled in class y”R(y , z) = “Class y has smaller enrollment than class zP(x , y , z) = Q(x , y) ∧ R(z , y)

What is the truth value of

P(90, CSE20, CSE71)

(A) True; (B) False; (C) Undefined (Not a proposition)

Daniele Micciancio CSE 20: Discrete Mathematics

Page 14: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Evaluating Predicates

Course Enrollment

CSE10 122CSE20 78CSE71 47

Q(x , y) = “There are at least x students enrolled in class y”R(y , z) = “Class y has smaller enrollment than class zP(x , y , z) = Q(x , y) ∧ R(y , z)

For what values of x , y , z , is the following predicate true?

P(x , y , z)→ Q(x , z)

(A) Always true; (B) Never true; (C) Depends on x , y , z

A: class z is larger than class y, and class y has at least x students

Daniele Micciancio CSE 20: Discrete Mathematics

Page 15: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Evaluating Predicates

Course Enrollment

CSE10 122CSE20 78CSE71 47

Q(x , y) = “There are at least x students enrolled in class y”R(y , z) = “Class y has smaller enrollment than class zP(x , y , z) = Q(x , y) ∧ R(y , z)

For what values of x , y , z , is the following predicate true?

P(x , y , z)→ Q(x , z)

(A) Always true; (B) Never true; (C) Depends on x , y , z

A: class z is larger than class y, and class y has at least x students

Daniele Micciancio CSE 20: Discrete Mathematics

Page 16: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Universal quantifier (for all)

P(x) = (x > 5)→ (x2 > 25)Q(x) = (x < 5)→ (x2 < 25)

∀x , P(x) = “For all (integers) x , P(x) is true.”

∀x , Q(x) = “For all (integers) x , Q(x) is true.”

Think of ∀ as an upside-down “A” (for “All”)May also be written ∀x .P(x), or ∀xP(x)∀x .P(x) and ∀x .Q(x) are logical statements (either true orfalse)∀x .P(x) is equivalent to ∀y .P(y). (The variable name doesnot matter.)

Are ∀x .P(x) and ∀x .Q(x) true or false?

(A) T T ; (B) T F ; (C) F T ; (D) F F

B: True and False

Daniele Micciancio CSE 20: Discrete Mathematics

Page 17: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Universal quantifier (for all)

P(x) = (x > 5)→ (x2 > 25)Q(x) = (x < 5)→ (x2 < 25)

∀x , P(x) = “For all (integers) x , P(x) is true.”

∀x , Q(x) = “For all (integers) x , Q(x) is true.”

Think of ∀ as an upside-down “A” (for “All”)May also be written ∀x .P(x), or ∀xP(x)∀x .P(x) and ∀x .Q(x) are logical statements (either true orfalse)∀x .P(x) is equivalent to ∀y .P(y). (The variable name doesnot matter.)

Are ∀x .P(x) and ∀x .Q(x) true or false?

(A) T T ; (B) T F ; (C) F T ; (D) F F

B: True and False

Daniele Micciancio CSE 20: Discrete Mathematics

Page 18: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Universal quantifier (for all)

P(x) = (x > 5)→ (x2 > 25)Q(x) = (x < 5)→ (x2 < 25)

∀x , P(x) = “For all (integers) x , P(x) is true.”

∀x , Q(x) = “For all (integers) x , Q(x) is true.”

Think of ∀ as an upside-down “A” (for “All”)May also be written ∀x .P(x), or ∀xP(x)∀x .P(x) and ∀x .Q(x) are logical statements (either true orfalse)∀x .P(x) is equivalent to ∀y .P(y). (The variable name doesnot matter.)

Are ∀x .P(x) and ∀x .Q(x) true or false?

(A) T T ; (B) T F ; (C) F T ; (D) F F

B: True and False

Daniele Micciancio CSE 20: Discrete Mathematics

Page 19: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Existential quantifier (there exists)

P(x) = (x > 5)→ (x2 > 25)Q(x) = (x < 5)→ (x2 < 25)

∃x , P(x) = “For some (integers) x , P(x) is true.”

∃x , Q(x) = “For some (integers) x , Q(x) is true.”

Think of ∃ as an “E” (for “Exists”) written backwardMay also be written ∃x .P(x), or ∃xP(x)∃x .P(x) and ∃x .Q(x) are logical statements (either true orfalse)∃x .P(x) is equivalent to ∃y .P(y). (The variable name doesnot matter.)

Are ∃x .P(x) and ∃x .Q(x) true or false?

(A) T T ; (B) T F ; (C) F T ; (D) F F

A: True and True

Daniele Micciancio CSE 20: Discrete Mathematics

Page 20: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Existential quantifier (there exists)

P(x) = (x > 5)→ (x2 > 25)Q(x) = (x < 5)→ (x2 < 25)

∃x , P(x) = “For some (integers) x , P(x) is true.”

∃x , Q(x) = “For some (integers) x , Q(x) is true.”

Think of ∃ as an “E” (for “Exists”) written backwardMay also be written ∃x .P(x), or ∃xP(x)∃x .P(x) and ∃x .Q(x) are logical statements (either true orfalse)∃x .P(x) is equivalent to ∃y .P(y). (The variable name doesnot matter.)

Are ∃x .P(x) and ∃x .Q(x) true or false?

(A) T T ; (B) T F ; (C) F T ; (D) F F

A: True and True

Daniele Micciancio CSE 20: Discrete Mathematics

Page 21: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Existential quantifier (there exists)

P(x) = (x > 5)→ (x2 > 25)Q(x) = (x < 5)→ (x2 < 25)

∃x , P(x) = “For some (integers) x , P(x) is true.”

∃x , Q(x) = “For some (integers) x , Q(x) is true.”

Think of ∃ as an “E” (for “Exists”) written backwardMay also be written ∃x .P(x), or ∃xP(x)∃x .P(x) and ∃x .Q(x) are logical statements (either true orfalse)∃x .P(x) is equivalent to ∃y .P(y). (The variable name doesnot matter.)

Are ∃x .P(x) and ∃x .Q(x) true or false?

(A) T T ; (B) T F ; (C) F T ; (D) F F

A: True and True

Daniele Micciancio CSE 20: Discrete Mathematics

Page 22: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Tautologies in Predicate calculus

(∀x .(Q(x) ∧ P(x)))→ (∀y .Q(y))(∃x .(P(x)→ Q(x))) ∧ (∀x .P(x))→ ∃x .Q(x)(∃x .(P(x) ∨ Q(x)))↔ (∃x .P(x)) ∨ (∃x .Q(x))

For what direction the following implication holds?

(∀x .(P(x) ∨ Q(x))) [↔???] (∀x .P(x)) ∨ (∀x .Q(x))

(A) ↔ (B) Only →; (C) Only ← ; (D) Neither direction

Answer: C

Why? Let x be an integer values variable, and let

P(x)=“x is an even integer”Q(x)=“x is an odd integer”

How would you read the quantified statements in English?

Daniele Micciancio CSE 20: Discrete Mathematics

Page 23: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Tautologies in Predicate calculus

(∀x .(Q(x) ∧ P(x)))→ (∀y .Q(y))(∃x .(P(x)→ Q(x))) ∧ (∀x .P(x))→ ∃x .Q(x)(∃x .(P(x) ∨ Q(x)))↔ (∃x .P(x)) ∨ (∃x .Q(x))

For what direction the following implication holds?

(∀x .(P(x) ∨ Q(x))) [↔???] (∀x .P(x)) ∨ (∀x .Q(x))

(A) ↔ (B) Only →; (C) Only ← ; (D) Neither direction

Answer: C

Why? Let x be an integer values variable, and let

P(x)=“x is an even integer”Q(x)=“x is an odd integer”

How would you read the quantified statements in English?

Daniele Micciancio CSE 20: Discrete Mathematics

Page 24: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Tautologies in Predicate calculus

(∀x .(Q(x) ∧ P(x)))→ (∀y .Q(y))(∃x .(P(x)→ Q(x))) ∧ (∀x .P(x))→ ∃x .Q(x)(∃x .(P(x) ∨ Q(x)))↔ (∃x .P(x)) ∨ (∃x .Q(x))

For what direction the following implication holds?

(∀x .(P(x) ∨ Q(x))) [↔???] (∀x .P(x)) ∨ (∀x .Q(x))

(A) ↔ (B) Only →; (C) Only ← ; (D) Neither direction

Answer: C

Why? Let x be an integer values variable, and let

P(x)=“x is an even integer”Q(x)=“x is an odd integer”

How would you read the quantified statements in English?

Daniele Micciancio CSE 20: Discrete Mathematics

Page 25: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Quantifying over Finite Domains

Assume variable x ranges over a finite set {1, 2, 3}.

∀x .P(x) ⇐⇒ P(1) ∧ P(2) ∧ P(3)

∃x .P(x) ⇐⇒ P(1) ∨ P(2) ∨ P(3)

Most logic rules about ∀ and ∃ can be understood in terms of ∧and ∨.

De Morgan:

¬(∀x .P(x))

⇐⇒ ¬(P(1) ∧ P(2) ∧ P(3))

⇐⇒ (¬P(1) ∨ ¬P(2) ∨ ¬P(3))

⇐⇒ ∃x .¬P(x)

Daniele Micciancio CSE 20: Discrete Mathematics

Page 26: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Negating quantifiers

¬∀x .P(x) ≡ ∃x .¬P(x)

It is not true that P(x) holds for every xThere is some x for which P(x) is not true

¬∃x .P(x) ≡ ∀x .¬P(x)

It is not true that P(x) holds for some xP(x) is false for every x .

Daniele Micciancio CSE 20: Discrete Mathematics

Page 27: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Proving and disproving quantified statements

∀x .P(x)

Prove: Need to show P(x) for an arbitrary xDisprove: Enough to show that ¬P(x) for some specific x ofour choice

∃x .P(x)

Prove: Enough to show P(x) is true for some specific x of ourchoiceDisprove: Need to show that P(x) is false for an arbitrary x

Daniele Micciancio CSE 20: Discrete Mathematics

Page 28: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Nested quantifiers

Let’s talk about integer numbers. (Variables x , y , z range over Z).

“For every integer x , there is always some bigger integer y .

∀x .∃y .y > x

Note:

Q(x , y) = (y > x) is a binary predicateP(x) = ∃y .Q(x , y) is a unary predicate∀x .P(x) ≡ ∀x .∃y .Q(x , y) is a proposition

Is the statement ∀x .∃y .Q(x , y) true or false?

(A) True; (B) False; (C) It depends on the value of x

Daniele Micciancio CSE 20: Discrete Mathematics

Page 29: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Nested quantifiers

Let’s talk about integer numbers. (Variables x , y , z range over Z).

“For every integer x , there is always some bigger integer y .

∀x .∃y .y > x

Note:

Q(x , y) = (y > x) is a binary predicateP(x) = ∃y .Q(x , y) is a unary predicate∀x .P(x) ≡ ∀x .∃y .Q(x , y) is a proposition

Is the statement ∀x .∃y .Q(x , y) true or false?

(A) True; (B) False; (C) It depends on the value of x

Daniele Micciancio CSE 20: Discrete Mathematics

Page 30: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Nested quantifiers

Let’s talk about integer numbers. (Variables x , y , z range over Z).

“For every integer x , there is always some bigger integer y .

∀x .∃y .y > x

Note:

Q(x , y) = (y > x) is a binary predicateP(x) = ∃y .Q(x , y) is a unary predicate∀x .P(x) ≡ ∀x .∃y .Q(x , y) is a proposition

Is the statement ∀x .∃y .Q(x , y) true or false?

(A) True; (B) False; (C) It depends on the value of x

Daniele Micciancio CSE 20: Discrete Mathematics

Page 31: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Order of quantification

Let’s talk about integer numbers. (Variables x , y , z range over Z).

“For every integer x , there is always some bigger integer y .

∀x .∃y .y > x .

What happen if we swap the order of quantifiers?

∃y .∀x .y > x .

Are the two logical statements equivalent?Is the new statement true or false?How would you read the last statement in English?

“There is an integer y which is bigger than any (other) integer x .

Daniele Micciancio CSE 20: Discrete Mathematics

Page 32: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Order of quantification

Let’s talk about integer numbers. (Variables x , y , z range over Z).

“For every integer x , there is always some bigger integer y .

∀x .∃y .y > x .

What happen if we swap the order of quantifiers?

∃y .∀x .y > x .

Are the two logical statements equivalent?Is the new statement true or false?How would you read the last statement in English?

“There is an integer y which is bigger than any (other) integer x .

Daniele Micciancio CSE 20: Discrete Mathematics

Page 33: CSE 20: Discrete Mathematics · Predicates Apredicate isalogicalstatementinvolvingvariables: P(x)=“x < 100” Q(x,y,z)=“x +y = z” R(x,y)=“Therearex studentsenrolledinclassy

Scope and Precedence

Textbook: ∀,∃ have the highest “precedence”:

∃x .(∀x .P(x) ∧ Q(x))

⇐⇒ ∃x .((∀x .P(x)) ∧ Q(x))

⇐⇒ (∀x .P(x)) ∧ (∃x .Q(x))

This is unusual. Most texts let ∀x and ∃x extend their scope as faras possible, unless limited with parentheses.

∃x .(∀x .P(x) ∧ Q(x))

⇐⇒ ∃x .(∀x .(P(x) ∧ Q(x)))

⇐⇒ (∀x .(P(x) ∧ Q(x)))

Daniele Micciancio CSE 20: Discrete Mathematics