Predicates and Quantifiers
Predicates and Quantifiers
Discrete Mathematics
Predicates and Quantifiers
Predicates
Propositional logic is not enough to express the meaning of all statements in mathematics
and natural language.
Examples:
Is “𝑥 > 1” True or False?
Predicate Logic
• Variables: 𝑥, 𝑦, 𝑧, etc.
• Predicates: 𝑃(𝑥), 𝑄(𝑥), etc.
• Quantifiers: Universal and Existential.
• Connectives from propositional logic carry over to predicate logic.
A predicate 𝑃(𝑥) is a declarative sentence whose truth value depends on one or more
variables.
1
Page 2 of 5
Quantifiers
We need quantifiers to express the meaning of English words including all and some:
Examples:
1. Let 𝑃(𝑥): “𝑥 > −𝑥” with the domain of all positive real numbers.
Find the truth value of ∀𝑥 𝑃(𝑥).
2. Let 𝑃(𝑥): “𝑥 > −𝑥” with the domain of all real numbers. Find the
truth value of ∀𝑥 𝑃(𝑥).
The truth value of ∃𝑥 𝑃(𝑥) and ∀𝑥 𝑃(𝑥) depends BOTH on the propositional function
𝑃(𝑥) and on the domain 𝑈.
Quantifiers
2
Page 3 of 5
Example: Suppose the domain of the propositional function 𝑃(𝑥): 𝑥2 ≤ 𝑥 consists of {1, 2,
3}. Write out each of the following propositions using conjunction or disjunction and
determine its truth value.
1. ∀𝑥 𝑃(𝑥) 2. ∃𝑥 𝑃(𝑥)
Precedence of Quantifiers
The quantifiers ∀ and ∃ have higher precedence than all the logical operators.
Example: ∀𝑥 𝑃(𝑥) ∨ 𝑄(𝑥) means (∀𝑥 𝑃(𝑥)) ∨ 𝑄(𝑥). ∀𝑥 (𝑃(𝑥) ∨ 𝑄(𝑥)) means something
different.
Negating Quantifiers
De Morgan laws for quantifiers (the rules for negating quantifiers) are:
Example: Express each of these statements using quantifiers. Then form a negation of the
statement, so that no negation is left of a quantifier. Next, express the negation in simple
English.
1
Page 4 of 5
Examples: Translate the statements into the logical symbols. Let 𝑥 be in set of all students
in this class.
1. Someone in your class can speak Hindi.
2. Everyone in your class is friendly.
3. There is a student in your class who was not born in California.
Example: Translate the following sentence into predicate logic and give its
negation: “Every student in this class has taken a course in Java.” Solution:
2
Page 5 of 5
Solution 2: But if U is all people, also define a propositional function S(x) denoting “x
is a student in this class” and translate as