04 - Predicate Logic - Predicates
04 - Predicate Logic - Predicates
Phyela Mbewe
LIS Department
University of Zambia
February 2023
Overview
▪ predicates
➢ meaning
➢ domain
▪ Quantifiers
➢ Universal quantifier
➢ Existential quantifier
➢ Quantifier negation
➢ Logical equivalence for quantifiers
ICT 2021 2
Predicate
▪ A predicate
➢ a function, takes a variable as an argument(input) and returns true or
false as output (based on the input)
For example:
Suppose P(x): x + 1 = 5 is a predicate
▪ Difference
➢ a proposition is not a function, it is a statement which either true or
false. It cannot include a variable
ICT 2021 3
Predicate & Proposition Difference
➢ a proposition is not a function, it is a statement which either true or
false. It cannot include a variable
For example:
ICT 2021 5
Predicate Example (2 variables)
▪ 𝑷 𝒙, 𝒚 ∶ "𝒙 − 𝟓 = 𝒚" is a predicate
1. 𝑃 9, 3
True
2. 𝑃 11, 4 False
3. 𝑃 22, −10 Unknown
4. 𝑃 11, 10 False
note: number 3 is not a proposition (it is unknown since -10 is not in the domain
of all positive integers), pay attention to the domain when solving predicate problems
ICT 2021 7
Universal quantifier
▪ The symbol ∀ is called the universal quantifier
➢ it is read as “for all”
➢ means 𝑃(𝑥) is true for all possible 𝑥 values in the given domain (universe)
For example:
𝑷 𝒙 ∶ "𝒙 > 𝟏“
𝑩 𝒙 ∶ 𝒙 − 𝟐>𝟎
and Q 𝒙 ∶ "𝒙 𝒊𝒔 𝒑𝒐𝒔𝒊𝒕𝒊𝒗𝒆“
for domain {2,3,4}
For example:
Exercise:
Given that:
𝑷 𝒙 ∶ "𝒙 > 𝟏“
𝑩 𝒙 ∶ 𝒙 − 𝟐>𝟎
and Q 𝒙 ∶ "𝒙 𝒊𝒔 𝒑𝒐𝒔𝒊𝒕𝒊𝒗𝒆“
for domain {3,4,5}
2. ∃𝒙 𝑩 𝒙 ∧𝑸 𝒙
ICT 2021 11
Quantifier negation
▪ The symbol ¬ (negation operator)
➢ indicates the inverse of a given predicate
➢ or, indicates the inverse of a quantifier (∀ 𝑜𝑟 ∃)
Meaning:
∀ 𝒙 𝑷(𝒙) means “all students are ICT students”
∃ 𝒙 𝑷(𝒙) means “there exists a student that is an ICT student”
Meaning:
∃𝒙(𝑷 𝒙 ∧𝑸 𝒙 )
means “there exists a student that is an ICT student and has a good CA”
¬∃ 𝒙 ( 𝑷 𝒙 ∧ 𝑸 𝒙 )
means “there is no student that is an ICT student and has a good CA”
∀𝒙(𝑷 𝒙 → 𝑸 𝒙 )
means “all students that are ICT students have a good CA”
(for all students, if the student is an ICT student, then the student has a good CA)
ICT 2021 13
Logical equivalence for quantifiers
¬∀𝒙 𝑷 𝒙
means “not all students are ICT students”
∃ 𝒙 ¬𝑷 𝒙
means “there is(exists) a student who is not an ICT student”
ICT 2021 14
Logical equivalence for quantifiers [2]
▪ De Morgan’s Law for quantifiers states that:
¬∀𝒙 𝑷 𝒙 ≡ ∃ 𝒙 ¬𝑷 𝒙
¬∃𝒙 𝑷 𝒙 ≡ ∀ 𝒙 ¬𝑷 𝒙
ICT 2021 15
De Morgan’s Law for quantifiers (example 2)
𝑃 𝑥 ∶ "𝑥 ℎ𝑎𝑠 𝑎 𝐶𝐴 𝑏𝑒𝑙𝑜𝑤 10“
for domain: all students
¬∃𝒙 𝑷 𝒙 ≡ ∀ 𝒙 ¬𝑷 𝒙
¬∃𝒙 𝑷 𝒙
means “there is no student that has a CA below 10”
∀𝒙 ¬𝑷 𝒙
means “all the students have a CA not below 10”
or “all the students have a CA which is not below 10”
Note:
ICT 2021these 2 propositions have the same logical meaning 16
Exercise
P 𝑥 : “𝑥 is a comedian”
Q 𝑥 : “𝑥 is funny”
for domain: all people
a) ∀𝑥 𝑃 𝑥 ∨ 𝑄 𝑥
b) ∀𝑥 𝑃 𝑥 → 𝑄 𝑥
c) ¬∃𝑥 ( 𝑃 𝑥 ∧ ¬𝑄 𝑥 )
ICT 2021 17