• No results found

Negation of Quantifiers

N/A
N/A
Protected

Academic year: 2020

Share "Negation of Quantifiers"

Copied!
56
0
0

Loading.... (view fulltext now)

Full text

(1)

Discrete Structures

Predicate Logic 2

Dr. Muhammad Humayoun

Assistant Professor

COMSATS Institute of Computer Science, Lahore. mhumayoun@ciitlahore.edu.pk

https://sites.google.com/a/ciitlahore.edu.pk/dstruct/

(2)

Negation of Quantifiers

¬∀𝑥 𝑃 𝑥 ≡ ∃¬𝑃 𝑥

¬∃𝑥 𝑃 𝑥 ≡ ∀¬𝑃 𝑥

¬∀𝑥 (𝑃 𝑥 ∧ 𝑄 𝑥 ) ≡

???

(3)

Negation of Quantifiers

¬∀𝑥 𝑃 𝑥 ≡ ∃¬𝑃 𝑥

¬∃𝑥 𝑃 𝑥 ≡ ∀¬𝑃 𝑥

¬∀𝑥 (𝑃 𝑥 ∧ 𝑄 𝑥 ) ≡

???

(4)

Negation of Quantifiers

¬∀𝑥 𝑃 𝑥 ≡ ∃¬𝑃 𝑥

¬∃𝑥 𝑃 𝑥 ≡ ∀¬𝑃 𝑥

¬∀𝑥 (𝑃 𝑥 ∧ 𝑄 𝑥 ) ≡

???

(5)

Exercise

B(x): “x is a baby”

ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

Babies are ignorant.

(6)

Exercise

B(x): “x is a baby”

ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

Babies are ignorant. (Ambiguous)

All/Some babies are ignorant

(7)

Exercise

B(x): “x is a baby”

ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

Babies are ignorant. (Ambiguous)

All babies are ignorant

• ∀𝒙 (𝑩 𝒙 → 𝒊𝒈𝒏𝒐𝒓𝒂𝒏𝒕 𝒙 )

(8)

Exercise

professor(x): “x is a professor”

ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

No professors are ignorant.

• It is not the case that there exists an x such that x is a professor and x is ignorant.

• ¬∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑖𝑔𝑛𝑜𝑟𝑎𝑛𝑡 𝑥 )

• It is not the case that all professors are ignorant.

(9)

Exercise

professor(x): “x is a professor”

ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

No professors are ignorant.

[There is no such professor who is ignorant]

• [It is not the case that there is an x such that x is a professor and x is ignorant.]

• ¬∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑖𝑔𝑛𝑜𝑟𝑎𝑛𝑡 𝑥 )

• It is not the case that all professors are ignorant.

(10)

Exercise

professor(x): “x is a professor”

ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

No professors are ignorant.

[There is no such professor who is ignorant]

• [It is not the case that there is an x such that x is a professor and x is ignorant.]

• ¬∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑖𝑔𝑛𝑜𝑟𝑎𝑛𝑡 𝑥 )

professors are ignorant.

(11)

Exercise

professor(x): “x is a professor”

ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

No professors are ignorant.

[There is no such professor who is ignorant]

• [It is not the case that there is an x such that x is a professor and x is ignorant.]

• ¬∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑖𝑔𝑛𝑜𝑟𝑎𝑛𝑡 𝑥 ) • All professors are not ignorant

(12)

Exercise

professor(x): “x is a professor”

ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

No professors are ignorant.

• ¬∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑖𝑔𝑛𝑜𝑟𝑎𝑛𝑡 𝑥 )

All (and all of them) professors are not ignorant.

• ∀𝑥 𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 → ¬𝑖𝑔𝑛𝑜𝑟𝑎𝑛𝑡 𝑥

(13)

Exercise

professor(x): “x is a professor” ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

All ignorant people are vain.

• For all people x, if x is ignorant then x is vain. • ∀𝑥(𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 )

• It is logically equivalent to ¬[¬(∀𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 ) ]

• ≡ ¬[¬(∀𝑥 ¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∨ 𝑣𝑎𝑖𝑛 𝑥 ]

• ≡ ¬ ∃𝑥 ¬¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥

• ≡ ¬ ∃𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥

(14)

Exercise

professor(x): “x is a professor” ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

All ignorant people are vain.

• For all people x, if x is ignorant then x is vain.

• ∀𝑥(𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 )

• It is logically equivalent to ¬[¬(∀𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 ) ]

• ≡ ¬[¬(∀𝑥 ¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∨ 𝑣𝑎𝑖𝑛 𝑥 ]

• ≡ ¬ ∃𝑥 ¬¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥

• ≡ ¬ ∃𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥

(15)

Exercise

professor(x): “x is a professor” ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

All ignorant people are vain.

• For all people x, if x is ignorant then x is vain.

• ∀𝑥(𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 )

• It is logically equivalent to ¬[¬(∀𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 ) ]

• ≡ ¬[¬(∀𝑥 ¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∨ 𝑣𝑎𝑖𝑛 𝑥 ]

• ≡ ¬ ∃𝑥 ¬¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥

• ≡ ¬ ∃𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥

(16)

Exercise

professor(x): “x is a professor” ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

All ignorant people are vain.

• For all people x, if x is ignorant then x is vain.

• ∀𝑥(𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 )

• It is logically equivalent to ¬[¬(∀𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 ) ]

• ≡ ¬[¬(∀𝑥 ¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∨ 𝑣𝑎𝑖𝑛 𝑥 ]

• ≡ ¬ ∃𝑥 ¬¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥

• ≡ ¬ ∃𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥

(17)

Exercise

professor(x): “x is a professor” ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

All ignorant people are vain.

• For all people x, if x is ignorant then x is vain.

• ∀𝑥(𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 )

• It is logically equivalent to ¬[¬(∀𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 ) ]

• ≡ ¬[¬(∀𝑥 ¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∨ 𝑣𝑎𝑖𝑛 𝑥 ]

• ≡ ¬ ∃𝑥 ¬¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥

• ≡ ¬ ∃𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥

(18)

Exercise

professor(x): “x is a professor” ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

No professors are vain

• It is not the case that there is an x such that x is professor and x is vain.

• ¬[∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑣𝑎𝑖𝑛(𝑥))]

• [∀𝑥(¬𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∨ ¬𝑣𝑎𝑖𝑛(𝑥))]

• ∀𝑥 𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 → ¬𝑣𝑎𝑖𝑛 𝑥

For all people x, if x is a professor then x not vain.

(19)

Exercise

professor(x): “x is a professor” ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

No professors are vain

• It is not the case that there is an x such that x is professor and x is vain.

• ¬[∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑣𝑎𝑖𝑛(𝑥))]

• [∀𝑥(¬𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∨ ¬𝑣𝑎𝑖𝑛(𝑥))]

• ∀𝑥 𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 → ¬𝑣𝑎𝑖𝑛 𝑥

For all people x, if x is a professor then x not vain.

(20)

Exercise

professor(x): “x is a professor” ignorant(x): “x is ignorant”

vain(x): “x is vain”

Universe: The set of all people.

No professors are vain

• It is not the case that there is an x such that x is professor and x is vain.

• ¬[∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑣𝑎𝑖𝑛(𝑥))]

• [∀𝑥(¬𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∨ ¬𝑣𝑎𝑖𝑛(𝑥))]

• ∀𝑥 𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 → ¬𝑣𝑎𝑖𝑛 𝑥

For all people x, if x is a professor then x not vain.

(21)

Precedence of Quantifiers

The quantifiers

and

have higher

precedence then all logical operators from

propositional calculus.

e.g.

∀𝒙 (𝑷 𝒙 ∨ 𝑸 𝒙 )

is the disjunction

of

∀𝒙 𝑷 𝒙

and

∀𝒙 𝑸(𝒙)

.

(22)

Quantifiers with Restricted Domain

• ∀𝑥 𝑥2 > 0

– ∀ 𝑥 < 0 𝑥2 > 0

– ≡ ∀𝑥 (𝑥 < 0) → (𝑥2> 0)

• ∀𝑦 𝑦3 ≠ 0

– ∀ 𝑦 ≠ 0 𝑦3 ≠ 0

– ≡ ∀ 𝑦 ≠ 0 → 𝑦3 ≠ 0

• ∃𝑧 (𝑧2 = 2)

– ∃𝑧 > 0 (𝑧2 = 2)

– ≡ ∃𝑧(𝑧 > 0 → 𝑧2 = 2)

(23)

Quantifiers with Restricted Domain

• ∀𝑥 𝑥2 > 0

– ∀ 𝑥 < 0 𝑥2 > 0

– ≡ ∀𝑥 (𝑥 < 0) → (𝑥2> 0)

• ∀𝑦 𝑦3 ≠ 0

– ∀ 𝑦 ≠ 0 𝑦3 ≠ 0

– ≡ ∀ 𝑦 ≠ 0 → 𝑦3 ≠ 0

• ∃𝑧 (𝑧2 = 2)

– ∃𝑧 > 0 (𝑧2 = 2)

– ≡ ∃𝑧(𝑧 > 0 → 𝑧2 = 2)

(24)

Quantifiers with Restricted Domain

• ∀𝑥 𝑥2 > 0

– ∀ 𝑥 < 0 𝑥2 > 0

– ≡ ∀𝑥 (𝑥 < 0) → (𝑥2> 0)

• ∀𝑦 𝑦3 ≠ 0

– ∀ 𝑦 ≠ 0 𝑦3 ≠ 0

– ≡ ∀ 𝑦 ≠ 0 → 𝑦3 ≠ 0

• ∃𝑧 (𝑧2 = 2)

– ∃𝑧 > 0 (𝑧2 = 2)

– ≡ ∃𝑧(𝑧 > 0 → 𝑧2 = 2)

(25)

Quantifiers with Restricted Domain

• ∀𝑥 𝑥2 > 0

– ∀ 𝑥 < 0 𝑥2 > 0

– ≡ ∀𝑥 (𝑥 < 0) → (𝑥2> 0)

• ∀𝑦 𝑦3 ≠ 0

– ∀ 𝑦 ≠ 0 𝑦3 ≠ 0

– ≡ ∀ 𝑦 ≠ 0 → 𝑦3 ≠ 0

• ∃𝑧 (𝑧2 = 2)

– ∃𝑧 > 0 (𝑧2 = 2)

– ≡ ∃𝑧(𝑧 > 0 → 𝑧2 = 2)

(26)

Nested Quantifiers

∀𝑥∃𝑦 𝑃(𝑥, 𝑦)

 “For all 𝑥, there exists a 𝑦 such that 𝑃(𝑥, 𝑦)”.

 Example:

 ∀𝑥∃𝑦 (𝑥 + 𝑦 = 0) where 𝑥 and 𝑦 are integers

(27)

Nested Quantifiers

 ∀𝑥∃𝑦 𝑃(𝑥, 𝑦)

 “For all 𝑥, there exists a 𝑦 such that 𝑃(𝑥, 𝑦)”.

 Example:

 ∀𝑥∃𝑦 (𝑥 + 𝑦 = 0) where 𝑥 and 𝑦 are integers

 𝑥𝑦 𝑃(𝑥, 𝑦)

 There exists an x such that for all 𝑦, 𝑃(𝑥, 𝑦) is true”

 Example: 𝑥𝑦 (𝑥 × 𝑦 = 0)

∀𝑥∀𝑦∀𝑧 𝑥 + 𝑦 + 𝑧 = 𝑥 + 𝑦 + 𝑧

THINK QUANTIFICATION AS LOOPS

(28)

Meanings of multiple quantifiers

Suppose 𝑷(𝒙, 𝒚) = “x likes y.”

Domain of x: {St1, St2}; Domain of y: {DS, Calculus}

• 𝒙𝒚 𝑷(𝒙, 𝒚)

– 𝑃(𝑥, 𝑦) true for all x, y pairs. • 𝒙𝒚 𝑷(𝒙, 𝒚)

– 𝑃(𝑥, 𝑦) true for at least one x, y pair. • 𝒙𝒚 𝑷(𝒙, 𝒚)

– For every value of x we can find a (possibly different) y so that P(x,y) is true.

• 𝒙𝒚 𝑷(𝒙, 𝒚)

(29)

Meanings of multiple quantifiers

Suppose 𝑷(𝒙, 𝒚) = “x likes y.”

Domain of x: {St1, St2}; Domain of y: {DS, Calculus}

• 𝒙𝒚 𝑷(𝒙, 𝒚)

– 𝑃(𝑥, 𝑦) true for all x, y pairs.

• 𝒙𝒚 𝑷(𝒙, 𝒚)

– 𝑃(𝑥, 𝑦) true for at least one x, y pair. • 𝒙𝒚 𝑷(𝒙, 𝒚)

– For every value of x we can find a (possibly different) y so that P(x,y) is true.

• 𝒙𝒚 𝑷(𝒙, 𝒚)

(30)

Meanings of multiple quantifiers

Suppose 𝑷(𝒙, 𝒚) = “x likes y.”

Domain of x: {St1, St2}; Domain of y: {DS, Calculus}

• 𝒙𝒚 𝑷(𝒙, 𝒚)

– 𝑃(𝑥, 𝑦) true for all x, y pairs.

• 𝒙𝒚 𝑷(𝒙, 𝒚)

– 𝑃(𝑥, 𝑦) true for at least one x, y pair.

• 𝒙𝒚 𝑷(𝒙, 𝒚)

– For every value of x we can find a (possibly different) y so that P(x,y) is true.

• 𝒙𝒚 𝑷(𝒙, 𝒚)

(31)

Meanings of multiple quantifiers

Suppose 𝑷(𝒙, 𝒚) = “x likes y.”

Domain of x: {St1, St2}; Domain of y: {DS, Calculus}

• 𝒙𝒚 𝑷(𝒙, 𝒚)

– 𝑃(𝑥, 𝑦) true for all x, y pairs.

• 𝒙𝒚 𝑷(𝒙, 𝒚)

– 𝑃(𝑥, 𝑦) true for at least one x, y pair.

• 𝒙𝒚 𝑷(𝒙, 𝒚)

– For every value of x we can find a (possibly different) y so that P(x,y) is true.

• 𝒙𝒚 𝑷(𝒙, 𝒚)

(32)

• Quantification order is not commutative

𝒙𝒚 𝑷 𝒙, 𝒚 ≠ 𝒙𝒚 𝑷(𝒙, 𝒚)

(33)

Example

𝑄 (𝑥 , 𝑦, 𝑧): x + y = z

Domain: Real numbers

• ∀𝑥∀𝑦∃𝑧 𝑄(𝑥, 𝑦, 𝑧) True/False???

• For all real numbers x and for all real numbers y there is a real number z such that 𝑥 + 𝑦 = 𝑧.

• True

• ∃𝑧∀𝑥∀𝑦 𝑄(𝑥, 𝑦, 𝑧) True/False???

• There is a real number z such that for all real

numbers x and for all real numbers y it is true that

𝑥 + 𝑦 = 𝑧.

• False

(34)

Example

𝑄 (𝑥 , 𝑦, 𝑧): x + y = z

Domain: Real numbers

• ∀𝑥∀𝑦∃𝑧 𝑄(𝑥, 𝑦, 𝑧) True/False???

• For all real numbers x and for all real numbers y there is a real number z such that 𝑥 + 𝑦 = 𝑧.

True

• ∃𝑧∀𝑥∀𝑦 𝑄(𝑥, 𝑦, 𝑧) True/False???

• There is a real number z such that for all real

numbers x and for all real numbers y it is true that

𝑥 + 𝑦 = 𝑧.

• False

(35)

Example

𝑄 (𝑥 , 𝑦, 𝑧): x + y = z

Domain: Real numbers

• ∀𝑥∀𝑦∃𝑧 𝑄(𝑥, 𝑦, 𝑧) True/False???

• For all real numbers x and for all real numbers y there is a real number z such that 𝑥 + 𝑦 = 𝑧.

True

• ∃𝑧∀𝑥∀𝑦 𝑄(𝑥, 𝑦, 𝑧) True/False???

• There is a real number z such that for all real

numbers x and for all real numbers y it is true that 𝑥 + 𝑦 = 𝑧.

• False

(36)

Example

𝑄 (𝑥 , 𝑦, 𝑧): x + y = z

Domain: Real numbers

• ∀𝑥∀𝑦∃𝑧 𝑄(𝑥, 𝑦, 𝑧) True/False???

• For all real numbers x and for all real numbers y there is a real number z such that 𝑥 + 𝑦 = 𝑧.

True

• ∃𝑧∀𝑥∀𝑦 𝑄(𝑥, 𝑦, 𝑧) True/False???

• There is a real number z such that for all real

numbers x and for all real numbers y it is true that 𝑥 + 𝑦 = 𝑧.

False

(37)

From Nested Quantifiers to English

• F (a, b): “a and b are friends”

• Domain: All students in COMSATS.

∃𝑥∀𝑦∀𝑧 𝐹 𝑥, 𝑦 ∧ 𝐹 𝑥, 𝑧 ∧ 𝑦 ≠ 𝑧 → ¬𝐹 𝑦, 𝑧

• There is a student x such that for all students y and all

students z other than y, if x and y are friends and x and z are friends, then y and z are not friends.

• There is a student none of whose friends are also

friends with each other.

(38)

From Nested Quantifiers to English

• F (a, b): “a and b are friends”

• Domain: All students in COMSATS.

∃𝑥∀𝑦∀𝑧 𝐹 𝑥, 𝑦 ∧ 𝐹 𝑥, 𝑧 ∧ 𝑦 ≠ 𝑧 → ¬𝐹 𝑦, 𝑧

• There is a student x such that for all students y and all students z other than y, if x and y are friends and x and z are friends, then y and z are not friends.

• There is a student none of whose friends are also friends with each other.

(39)

From English to Nested Quantifiers

"If a person is female and is a parent, then this person is someone's mother“

• For every person x , if person x is female and person x is a parent, then there exists a person y such that person x is the mother of person y.“

– F(x): “x is female”

– P(x): “x is a parent“

– M(x, y) : “x is the mother of y”

• ∀𝑥[(𝑃 𝑥 ∧ 𝐹(𝑥)) → ∃𝑦𝑀 𝑥, 𝑦 ]

• ∀𝑥∃𝑦[(𝑃 𝑥 ∧ 𝐹(𝑥)) → 𝑀 𝑥, 𝑦 ]

(40)

From English to Nested Quantifiers

"If a person is female and is a parent, then this person is someone's mother“

• For every person x , if person x is female and person x is a parent, then there exists a person y such that person x is the mother of person y.“

– F(x): “x is female”

– P(x): “x is a parent“

– M(x, y) : “x is the mother of y”

• ∀𝑥[(𝑃 𝑥 ∧ 𝐹(𝑥)) → ∃𝑦𝑀 𝑥, 𝑦 ]

• ∀𝑥∃𝑦[(𝑃 𝑥 ∧ 𝐹(𝑥)) → 𝑀 𝑥, 𝑦 ]

(41)

The sum of two positive integers is always positive.

• ∀𝑥 ∀𝑦 [ 𝑥 > 0 ∧ 𝑦 > 0 → 𝑥 + 𝑦 > 0 ]

• ∀𝑥 ∀𝑦 [𝑝𝑜𝑠 𝑥 ∧ 𝑝𝑜𝑠 𝑦 → 𝑝𝑜𝑠 𝑥 + 𝑦 ]

• What is domain above? • Integers

If domain is “+ve integers”

• ∀𝑥 ∀𝑦 𝑥 + 𝑦 > 0

(42)

The sum of two positive integers is always positive.

• ∀𝑥 ∀𝑦 [ 𝑥 > 0 ∧ 𝑦 > 0 → 𝑥 + 𝑦 > 0 ] • ∀𝑥 ∀𝑦 [𝑝𝑜𝑠 𝑥 ∧ 𝑝𝑜𝑠 𝑦 → 𝑝𝑜𝑠 𝑥 + 𝑦 ] • What is domain above?

• Integers

If domain is “+ve integers”

• ∀𝑥 ∀𝑦 𝑥 + 𝑦 > 0

(43)

The sum of two positive integers is always positive.

• ∀𝑥 ∀𝑦 [ 𝑥 > 0 ∧ 𝑦 > 0 → 𝑥 + 𝑦 > 0 ] • ∀𝑥 ∀𝑦 [𝑝𝑜𝑠 𝑥 ∧ 𝑝𝑜𝑠 𝑦 → 𝑝𝑜𝑠 𝑥 + 𝑦 ] • What is domain above?

• Integers

If domain is “+ve integers”

• ∀𝑥 ∀𝑦 𝑥 + 𝑦 > 0

(44)

Everyone has exactly one best friend

• For every person x , person x has exactly one best friend.

• ∀𝑥 [person x has exactly one best friend]

B(x,y): “x has best friend y”

∀𝑥∃𝑦[ 𝐵 𝑥, 𝑦 ]

• Exactly one best friend ????

• ∀𝒙∃𝒚[𝑩 𝒙, 𝒚 ∧ ∀𝒛 𝒚 ≠ 𝒛 → ¬𝑩(𝒙, 𝒛 ]

• ∀𝑥∃𝑦∀𝑧[𝐵 𝑥, 𝑦 ∧ 𝑦 ≠ 𝑧 → ¬𝐵(𝑥, 𝑧 ]

(45)

Everyone has exactly one best friend

• For every person x , person x has exactly one best friend.

• ∀𝑥 [person x has exactly one best friend]

B(x,y): “x has best friend y”

∀𝑥∃𝑦[ 𝐵 𝑥, 𝑦 ]

• Exactly one best friend ????

• ∀𝒙∃𝒚[𝑩 𝒙, 𝒚 ∧ ∀𝒛 𝒚 ≠ 𝒛 → ¬𝑩(𝒙, 𝒛 ]

• ∀𝑥∃𝑦∀𝑧[𝐵 𝑥, 𝑦 ∧ 𝑦 ≠ 𝑧 → ¬𝐵(𝑥, 𝑧 ]

(46)

Everyone has exactly one best friend

• For every person x , person x has exactly one best friend.

• ∀𝑥 [person x has exactly one best friend] • B(x,y): “x has best friend y”

∀𝑥∃𝑦[ 𝐵 𝑥, 𝑦 ]

• Exactly one best friend ????

• ∀𝒙∃𝒚[𝑩 𝒙, 𝒚 ∧ ∀𝒛 𝒚 ≠ 𝒛 → ¬𝑩(𝒙, 𝒛 ]

• ∀𝑥∃𝑦∀𝑧[𝐵 𝑥, 𝑦 ∧ 𝑦 ≠ 𝑧 → ¬𝐵(𝑥, 𝑧 ]

(47)

Everyone has exactly one best friend

• For every person x , person x has exactly one best friend.

• ∀𝑥 [person x has exactly one best friend] • B(x,y): “x has best friend y”

∀𝑥∃𝑦[ 𝐵 𝑥, 𝑦 ]

• Exactly one best friend ????

• ∀𝒙∃𝒚[𝑩 𝒙, 𝒚 ∧ ∀𝒛 𝒚 ≠ 𝒛 → ¬𝑩(𝒙, 𝒛 ]

• ∀𝑥∃𝑦∀𝑧[𝐵 𝑥, 𝑦 ∧ 𝑦 ≠ 𝑧 → ¬𝐵(𝑥, 𝑧 ]

(48)

Everyone has exactly one best friend

• For every person x , person x has exactly one best friend.

• ∀𝑥 [person x has exactly one best friend] • B(x,y): “x has best friend y”

∀𝑥∃𝑦[ 𝐵 𝑥, 𝑦 ]

• Exactly one best friend ????

• ∀𝒙∃𝒚[𝑩 𝒙, 𝒚 ∧ ∀𝒛 𝒚 ≠ 𝒛 → ¬𝑩(𝒙, 𝒛 ]

• ∀𝑥∃𝑦∀𝑧[𝐵 𝑥, 𝑦 ∧ 𝑦 ≠ 𝑧 → ¬𝐵(𝑥, 𝑧 ]

(49)

Everyone has exactly one best friend

• For every person x , person x has exactly one best friend.

• ∀𝑥 [person x has exactly one best friend] • B(x,y): “x has best friend y”

∀𝑥∃𝑦[ 𝐵 𝑥, 𝑦 ]

• Exactly one best friend ????

• ∀𝒙∃𝒚[𝑩 𝒙, 𝒚 ∧ ∀𝒛 𝒚 ≠ 𝒛 → ¬𝑩(𝒙, 𝒛 ] • ∀𝑥∃𝑦∀𝑧[𝐵 𝑥, 𝑦 ∧ 𝑦 ≠ 𝑧 → ¬𝐵(𝑥, 𝑧 ]

(50)

There is a woman who has taken a flight on every airline in the world.

• Domains: people airlines flights • W(x): x is a woman

• F(x, f): x has taken flight f

• A(f, a): flight f belongs to airline a

• ∃𝒙[𝑾 𝒙 → ∀𝒂∃𝒇 𝑨 𝒇, 𝒂 ∧ 𝑭 𝒙, 𝒇 ]

• ∃𝑥∀𝑎∃𝑓[𝑊 𝑥 → 𝐴 𝑓, 𝑎 ∧ 𝐹 𝑥, 𝑓 ]

(51)

There is a woman who has taken a flight on every airline in the world.

• Domains: woman airlines flights • P(w, f): Woman w has taken flight f

• Q(f, a): flight f belongs to airline a

• ∃𝒙[𝑾 𝒙 → ∀𝒂∃𝒇 𝑨 𝒇, 𝒂 ∧ 𝑭 𝒙, 𝒇 ]

• ∃𝑥∀𝑎∃𝑓[𝑊 𝑥 → 𝐴 𝑓, 𝑎 ∧ 𝐹 𝑥, 𝑓 ]

(52)

There is a woman who has taken a flight on every airline in the world.

• Domains: woman airlines flights • P(w, f): Woman w has taken flight f

• Q(f, a): flight f belongs to airline a

• ∃𝒘∀𝒂∃𝒇[ 𝑷 𝒘, 𝒇 ∧ 𝑸 𝒇, 𝒂 ]

(53)

There is a woman who has taken a flight on every airline in the world.

• Domains: woman airlines flights

• R(w, f, a): Woman w has taken flight f on airline a

• ∃𝒘∀𝒂∃𝒇[𝑸(𝒘, 𝒇, 𝒂]

(54)

Bound and free variables

A variable is bound if it is known or quantified. Otherwise, it is free.

Examples:

P(x) x is free

P(5) x is bound to 5

x P(x) x is bound by quantifier

Reminder: in a proposition, all variables must be bound.

(55)

Negating Nested Quantifiers

• ¬[ ∃𝒘∀𝒂∃𝒇 𝑷 𝒘, 𝒇 ∧ 𝑸 𝒇, 𝒂 ]

• ∀𝒘∃𝒂∀𝒇 ¬ 𝑷 𝒘, 𝒇 ∨ ¬𝑸 𝒇, 𝒂

(56)

Do Exercises

References

Related documents

The focus of STEM in middle school classrooms is often limited to only science and mathematics [8]. However, the study of engineering is an excellent way to incorporate

In programmable automation, the production equipment is designed with the capability to change the sequence of operations to accommodate different

This second edition of the FIDIC Users’ Guide has been extended to include the Conditions of Contract for Plant and Design-Build, known as the 1999 Yellow Book.. It also reviews

Generally, there are two primary legal approaches to internet contract enforcement: The United States model that relies on basic notice requirements to establish and

Significant, positive coefficients denote that the respective sector (commercial banking, investment banking, life insurance or property-casualty insurance) experienced

Based on this chart, try to schedule practice time during your peak energy hours, and schedule grunt work, naps, chores, or exercise for those times when you don’t have the energy

In contrast, genes encoding fungal cell wall polysaccharide modifying enzymes were expressed in both fruiting bodies and vegetative mycelium in the compost, but different gene sets

Still thinking of the last full week of work, record the total number of two-way trips (leaving work and then returning) that you made during work hours which were at least