Loading lessons...
Predicates, Quantifiers & Predicate Logic
Predicates, Quantifiers & Predicate Logic
Propositional logic cannot express "every student has taken some maths course". Predicate logic adds variables, predicates and quantifiers.
1. Predicates
A predicate P(x) is a statement containing variables that becomes a proposition once values are substituted.
- P(x): x > 3. P(4) is T, P(2) is F.
- Q(x, y): x = y + 3 is a 2-place predicate. Q(5, 2) is T.
- "Green and Miller played bridge against Thomson and Smith" → 4-place predicate B(G, M, T, S).
The set of allowed values is the universe of discourse (domain).
2. Quantifiers
| Quantifier | Symbol | Meaning | True when | False when |
|---|---|---|---|---|
| Universal | ∀x P(x) | P(x) for every x | P(x) is T for all x | some x makes P(x) F (a counter-example) |
| Existential | ∃x P(x) | P(x) for some x | at least one x makes P(x) T | P(x) is F for every x |
Over a finite domain {x₁, …, xₙ}: ∀x P(x) ≡ P(x₁) ∧ … ∧ P(xₙ) and ∃x P(x) ≡ P(x₁) ∨ … ∨ P(xₙ).
3. Translating English
| Sentence | Symbolic form |
|---|---|
| All monkeys have tails. | ∀x (M(x) → T(x)) |
| Some monkeys have no tails. | ∃x (M(x) ∧ ¬T(x)) |
| No one is ambitious. | ∀x (P(x) → ¬A(x)) |
| Some people who trust others are rewarded. | ∃x (P(x) ∧ T(x) ∧ R(x)) |
| Not all roads lead to Delhi. | ¬∀x (R(x) → L(x)) |
| If everyone is good then John is good. | ∀x G(x) → G(John) |
| There is a student in this class who owns a PC. | ∃x P(x) |
| Every student has taken at least one maths course. | ∀x ∃y T(x, y) |
∀ goes with →, ∃ goes with ∧. ∀x (M(x) ∧ T(x)) would say "everything is a monkey with a tail" - wrong. ∃x (M(x) → T(x)) is true as soon as some non-monkey exists-also wrong.
4. Negating Quantifiers (De Morgan for quantifiers)
Negating quantified statements
- ¬(All students are good) ≡ Some student is not good.
- ¬∀x (x² ≥ x) ≡ ∃x (x² < x) - true for x = 1/2.
Solved. Negate "If the teacher is absent then some students do not keep quiet": T → ∃x ¬Q(x). ¬(T → ∃x ¬Q(x)) ≡ T ∧ ¬∃x ¬Q(x) ≡ T ∧ ∀x Q(x) - "The teacher is absent and all students keep quiet."
Nested quantifiers
Order matters when the quantifiers differ: ∀x ∃y (x + y = 0) is T over Z (y = −x), but ∃y ∀x (x + y = 0) is F. Same-type quantifiers commute: ∀x ∀y ≡ ∀y ∀x.
5. Bound and Free Variables
A variable is bound if it lies within the scope of a quantifier on that variable, else free.
- ∀x (P(x) → Q(x)) - x is bound.
- ∀x (P(x) → Q(y)) - x bound, y free (so this is not a proposition until y is fixed).
- ∀x (P(x) ∧ Q(x)) ∨ ∀y R(y) - the scope of ∀x is (P(x) ∧ Q(x)); the scope of ∀y is R(y).
6. Validity in Predicate Logic
A predicate formula is valid if it is true for every domain and every interpretation of its predicates (for example ∀x P(x) → ∃x P(x) over a non-empty domain), and satisfiable if some interpretation makes it true.
Rules of inference for quantifiers
| Rule | From | Infer | Condition |
|---|---|---|---|
| Universal Specification (US) | ∀x P(x) | P(c) | any c |
| Universal Generalisation (UG) | P(c) for arbitrary c | ∀x P(x) | c is arbitrary, not special |
| Existential Specification (ES) | ∃x P(x) | P(c) | c is a new constant |
| Existential Generalisation (EG) | P(c) | ∃x P(x) | - |
> Apply ES before US. ES must introduce a fresh constant; if you first use US with c and then ES with the same c, you assume the special element is that particular c, which is not allowed.
Solved 1. Show ∀x (P(x) → Q(x)), ∀x (R(x) → ¬Q(x)) ⊢ ∀x (R(x) → ¬P(x)).
- P(y) → Q(y) - US; 2. R(y) → ¬Q(y) - US; 3. Q(y) → ¬P(y) - contrapositive of 1; 4. R(y) → ¬P(y) - HS (2, 3); 5. ∀x (R(x) → ¬P(x)) - UG. ∎
Solved 2. Show ∀x (P(x) → Q(y) ∧ R(x)), ∃x P(x) ⊢ Q(y) ∧ ∃x (P(x) ∧ R(x)).
- ∃x P(x) - premise; 2. P(z)
- ES (fresh z); 3. P(z) → Q(y) ∧ R(z) - US; 4. Q(y) ∧ R(z) - MP (2, 3); 5. Q(y) and 6. R(z) - simplification; 7. P(z) ∧ R(z) - conjunction (2, 6); 8. ∃x (P(x) ∧ R(x)) - EG; 9. Q(y) ∧ ∃x (P(x) ∧ R(x)) - conjunction (5, 8). ∎
Solved 3 (Socrates). All men are mortal; Socrates is a man ∴ Socrates is mortal. ∀x (M(x) → D(x)), M(s). US gives M(s) → D(s); MP gives D(s). ∎
Solved 4 (indirect proof). ∀x (P(x) → Q(x)), ∃y P(y) ⊢ ∃z Q(z). Assume ¬∃z Q(z) ≡ ∀z ¬Q(z). ES: P(a); US: P(a) → Q(a) and ¬Q(a); MP gives Q(a) - a contradiction with ¬Q(a). Hence ∃z Q(z). ∎
📝 IPU End-Term Exam Corner (5-10 Marks)
- Q1. Symbolise: (i) All monkeys have tails, (ii) Some monkeys have no tails, (iii) Not all roads lead to Delhi. (5 Marks)
- Q2. Explain US, UG, ES and EG with an example; prove ∀x(P(x) → Q(x)) ∧ ∀x(R(x) → ¬Q(x)) ⇒ ∀x(R(x) → ¬P(x)). (10 Marks)
- Q3. Negate "Every student in this class has a laptop" and "Some integer is even and prime". (2.5 Marks)
- Write: ∃x (S(x) ∧ ¬L(x)); ∀x (¬E(x) ∨ ¬P(x)).