0% found this document useful (0 votes)
56 views56 pages

Discrete Structures: Predicate Logic 2

The document discusses negation of quantifiers and provides examples of translating English statements to predicate logic statements using quantifiers. Specifically, it discusses: - The translations of ¬∀x Px and ¬∃x Px - Provides exercises translating statements about babies, professors, ignorant and vain people to predicate logic using quantifiers like ∀, ∃, →, etc.

Uploaded by

Muhammad Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views56 pages

Discrete Structures: Predicate Logic 2

The document discusses negation of quantifiers and provides examples of translating English statements to predicate logic statements using quantifiers. Specifically, it discusses: - The translations of ¬∀x Px and ¬∃x Px - Provides exercises translating statements about babies, professors, ignorant and vain people to predicate logic using quantifiers like ∀, ∃, →, etc.

Uploaded by

Muhammad Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Discrete Structures

Predicate Logic 2
Prof. Mohsin Riaz

1
Negation of Quantifiers
• ¬∀𝑥 𝑃 𝑥 ≡ ∃¬𝑃 𝑥
• ¬∃𝑥 𝑃 𝑥 ≡ ∀¬𝑃 𝑥

• ¬∀𝑥 (𝑃 𝑥 ∧ 𝑄 𝑥 ) ≡ ???

2
Negation of Quantifiers
• ¬∀𝑥 𝑃 𝑥 ≡ ∃¬𝑃 𝑥
• ¬∃𝑥 𝑃 𝑥 ≡ ∀¬𝑃 𝑥

• ¬∀𝑥 (𝑃 𝑥 ∧ 𝑄 𝑥 ) ≡ ???

3
Negation of Quantifiers
• ¬∀𝑥 𝑃 𝑥 ≡ ∃¬𝑃 𝑥
• ¬∃𝑥 𝑃 𝑥 ≡ ∀¬𝑃 𝑥

• ¬∀𝑥 (𝑃 𝑥 ∧ 𝑄 𝑥 ) ≡ ???

4
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.

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. (Ambiguous)


• All/Some 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 babies are ignorant
• ∀𝒙 (𝑩 𝒙 → 𝒊𝒈𝒏𝒐𝒓𝒂𝒏𝒕 𝒙 )

7
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.
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.
• [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.
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.]
• ¬∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑖𝑔𝑛𝑜𝑟𝑎𝑛𝑡 𝑥 )
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.]
• ¬∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑖𝑔𝑛𝑜𝑟𝑎𝑛𝑡 𝑥 )
• All professors are not 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.


• ¬∃𝑥(𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 𝑥 ∧ 𝑖𝑔𝑛𝑜𝑟𝑎𝑛𝑡 𝑥 )
• All (and all of them) 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.

• All ignorant people are vain.


• For all people x, if x is ignorant then x is vain.
• ∀𝑥(𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 )
• It is logically equivalent to ¬[¬(∀𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 ) ]
• ≡ ¬[¬(∀𝑥 ¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∨ 𝑣𝑎𝑖𝑛 𝑥 ]
• ≡ ¬ ∃𝑥 ¬¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥
• ≡ ¬ ∃𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥
• There is no such person x such that he is ignorant and not vain.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 ¬[¬(∀𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 ) ]
• ≡ ¬[¬(∀𝑥 ¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∨ 𝑣𝑎𝑖𝑛 𝑥 ]
• ≡ ¬ ∃𝑥 ¬¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥
• ≡ ¬ ∃𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥
• There is no such person x such that he is ignorant and not vain.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 ¬[¬(∀𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 ) ]
• ≡ ¬[¬(∀𝑥 ¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∨ 𝑣𝑎𝑖𝑛 𝑥 ]
• ≡ ¬ ∃𝑥 ¬¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥
• ≡ ¬ ∃𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥
• There is no such person x such that he is ignorant and not vain.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 ¬[¬(∀𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 ) ]
• ≡ ¬[¬(∀𝑥 ¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∨ 𝑣𝑎𝑖𝑛 𝑥 ]
• ≡ ¬ ∃𝑥 ¬¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥
• ≡ ¬ ∃𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥
• There is no such person x such that he is ignorant and not vain.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 ¬[¬(∀𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 → 𝑣𝑎𝑖𝑛 𝑥 ) ]
• ≡ ¬[¬(∀𝑥 ¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∨ 𝑣𝑎𝑖𝑛 𝑥 ]
• ≡ ¬ ∃𝑥 ¬¬𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥 Useful
• ≡ ¬ ∃𝑥 𝑖𝑔𝑜𝑟𝑎𝑛𝑡 𝑥 ∧ ¬𝑣𝑎𝑖𝑛 𝑥
• There is no such person x such that he is ignorant and not vain.17
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.
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
Precedence of Quantifiers
• The quantifiers ∀ and ∃ have higher
precedence then all logical operators from
propositional calculus.
• e.g. ∀𝒙 (𝑷 𝒙 ∨ 𝑸 𝒙 ) is the disjunction
of ∀𝒙 𝑷 𝒙 and ∀𝒙 𝑸(𝒙).

21
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)
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
Nested Quantifiers
∀𝑥∃𝑦 𝑃(𝑥, 𝑦)
 “For all 𝑥, there exists a 𝑦 such that 𝑃(𝑥, 𝑦)”.
 Example:
 ∀𝑥∃𝑦 (𝑥 + 𝑦 = 0) where 𝑥 and 𝑦 are integers

26
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
27
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.
• 𝒙𝒚 𝑷(𝒙, 𝒚)
– There is at least one x for which P(x,y) is always true.
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.
• 𝒙𝒚 𝑷(𝒙, 𝒚)
– There is at least one x for which P(x,y) is always 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.
• 𝒙𝒚 𝑷(𝒙, 𝒚)
– There is at least one x for which P(x,y) is always 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.
• 𝒙𝒚 𝑷(𝒙, 𝒚)
– There is at least one x for which P(x,y) is always true.
31
• Quantification order is not commutative
𝒙𝒚 𝑷 𝒙, 𝒚 ≠ 𝒙𝒚 𝑷(𝒙, 𝒚)

32
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
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
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.
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 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”
• ∀𝑥[(𝑃 𝑥 ∧ 𝐹(𝑥)) → ∃𝑦𝑀 𝑥, 𝑦 ]
• ∀𝑥∃𝑦[(𝑃 𝑥 ∧ 𝐹(𝑥)) → 𝑀 𝑥, 𝑦 ]
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
• The sum of two positive integers is always
positive.
• ∀𝑥 ∀𝑦 [ 𝑥 > 0 ∧ 𝑦 > 0 → 𝑥 + 𝑦 > 0 ]
• ∀𝑥 ∀𝑦 [𝑝𝑜𝑠 𝑥 ∧ 𝑝𝑜𝑠 𝑦 → 𝑝𝑜𝑠 𝑥 + 𝑦 ]
• What is domain above?
• Integers
• If domain is “+ve integers”
• ∀𝑥 ∀𝑦 𝑥 + 𝑦 > 0

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
• 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 ????

• ∀𝒙∃𝒚[𝑩 𝒙, 𝒚 ∧ ∀𝒛 𝒚 ≠ 𝒛 → ¬𝑩(𝒙, 𝒛 ]
• ∀𝑥∃𝑦∀𝑧[𝐵 𝑥, 𝑦 ∧ 𝑦 ≠ 𝑧 → ¬𝐵(𝑥, 𝑧 ]
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
• 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

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

• ∃𝑥∀𝑎∃𝑓[𝑊 𝑥 → 𝐴 𝑓, 𝑎 ∧ 𝐹 𝑥, 𝑓 ]
50
• 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

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

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

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
• R(w, f, a): Woman w has taken flight f on airline a

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

53
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.
54
Negating Nested Quantifiers
• ¬[ ∃𝒘∀𝒂∃𝒇 𝑷 𝒘, 𝒇 ∧ 𝑸 𝒇, 𝒂 ]

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

55
Do Exercises

56

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy