Quantifier Rules & Equivalences
Prerequisites
- FOL Syntax — quantifiers ∀, ∃, WFFs
- FOL Semantics — truth under interpretations
🎯 Learning Objectives
- Apply quantifier negation rules (De Morgan’s laws for quantifiers)
- Understand distributivity of quantifiers over ∧ and ∨
- Master nested quantifier semantics (∀x∃y vs ∃y∀x)
- Translate restricted quantification properly
1. Quantifier Negation (De Morgan’s for Quantifiers)
These are the most frequently tested equivalences in GATE:
Intuition: “Not everything has property P” means “something lacks P.” “Nothing has P” means “everything lacks P.”
Negate: ∀x (P(x) → Q(x))
- ¬∀x (P(x) → Q(x))
- ≡ ∃x ¬(P(x) → Q(x))
- ≡ ∃x ¬(¬P(x) ∨ Q(x)) [since α → β ≡ ¬α ∨ β]
- ≡ ∃x (P(x) ∧ ¬Q(x)) [De Morgan’s]
English: “There exists an x with property P but not Q.”
2. Quantifier Distribution over ∧ and ∨
| Equivalence | Valid? |
|---|---|
| ∀x (P(x) ∧ Q(x)) ≡ ∀x P(x) ∧ ∀x Q(x) | Yes ✓ |
| ∃x (P(x) ∨ Q(x)) ≡ ∃x P(x) ∨ ∃x Q(x) | Yes ✓ |
| ∀x (P(x) ∨ Q(x)) ≡ ∀x P(x) ∨ ∀x Q(x) | No ✗ |
| ∃x (P(x) ∧ Q(x)) ≡ ∃x P(x) ∧ ∃x Q(x) | No ✗ |
While ∀ distributes over ∧ and ∃ distributes over ∨, the reverse directions do not hold:
- ∀x P(x) ∨ ∀x Q(x) ⇒ ∀x (P(x) ∨ Q(x)) (one direction only!)
- ∃x (P(x) ∧ Q(x)) ⇒ ∃x P(x) ∧ ∃x Q(x) (one direction only!)
D = {1, 2}, PI = {1}, QI = {2}.
- ∀x (P(x) ∨ Q(x)): x=1: T∨F=T; x=2: F∨T=T. ⇒ True
- ∀x P(x) ∨ ∀x Q(x): F ∨ F = False
So ∀x (P(x) ∨ Q(x)) ≢ ∀x P(x) ∨ ∀x Q(x). □
3. Restricted Quantification
Often we want to quantify over a subset of the domain. The standard patterns:
- ∀x : C(x), P(x) ≡ ∀x (C(x) → P(x)) — “For all x satisfying C, P holds”
- ∃x : C(x), P(x) ≡ ∃x (C(x) ∧ P(x)) — “There is an x satisfying C such that P holds”
∀x ((Prime(x) ∧ GreaterThan(x, 2)) → Odd(x))
Using restricted quantification notation: ∀x : Prime(x) ∧ GT(x,2), Odd(x)
4. Nested Quantifiers
The order of quantifiers is critical when mixing ∀ and ∃.
| Formula | English Meaning |
|---|---|
| ∀x ∀y L(x,y) | Everyone loves everyone |
| ∀x ∃y L(x,y) | Everyone loves someone (possibly different) |
| ∃y ∀x L(x,y) | There is someone whom everyone loves |
| ∃x ∃y L(x,y) | Someone loves someone |
| ∃x ∀y L(x,y) | There is someone who loves everyone |
| ∀y ∃x L(x,y) | Everyone is loved by someone |
- ∃y ∀x P(x,y) ⇒ ∀x ∃y P(x,y) (but NOT the converse!)
- Same-type quantifiers commute: ∀x ∀y ≡ ∀y ∀x, and ∃x ∃y ≡ ∃y ∃x.
D = {1, 2}, L(x,y) means “x < y is false”. Define LI = {(1,2), (2,3)} — wait, 3 ∉ D. Better:
D = Z (integers), P(x,y) iff y = x+1. Then:
- ∀x ∃y (y = x+1): True — for every integer, there is a successor.
- ∃y ∀x (y = x+1): False — no single y equals x+1 for every x.
5. Additional Useful Equivalences
When φ does not contain x free:
- ∀x φ ≡ φ (∀ over formula without x is vacuous)
- ∃x φ ≡ φ (same)
- ∀x (P(x) ∨ φ) ≡ ∀x P(x) ∨ φ
- ∃x (P(x) ∧ φ) ≡ ∃x P(x) ∧ φ
- ∀x (P(x) ∧ φ) ≡ ∀x P(x) ∧ φ
- ∃x (P(x) ∨ φ) ≡ ∃x P(x) ∨ φ
Any FOL formula can be converted to prenex normal form: Q1x1 Q2x2 … Qnxn φ, where each Qi is ∀ or ∃, and φ is quantifier-free (the matrix).
Steps: Rename bound variables to be unique → eliminate → and ↔ → push ¬ inward (flipping quantifiers) → pull quantifiers to the front.
Formula: ∀x P(x) → ∃x Q(x)
- Rename: ∀x P(x) → ∃y Q(y) (avoid variable clash)
- Eliminate →: ¬∀x P(x) ∨ ∃y Q(y)
- Push ¬ in: ∃x ¬P(x) ∨ ∃y Q(y)
- Pull quantifiers: ∃x ∃y (¬P(x) ∨ Q(y)) ✓ Prenex form
Summary
- ¬∀x P(x) ≡ ∃x ¬P(x) and ¬∃x P(x) ≡ ∀x ¬P(x) — most important equivalences.
- ∀ distributes over ∧; ∃ distributes over ∨. The converse directions are only implications, not equivalences.
- Quantifier order matters: ∀x∃y ≠ ∃y∀x in general. But ∃y∀x ⇒ ∀x∃y.
- Same-type quantifiers commute freely.
- Any FOL formula can be converted to prenex normal form.
References
- Russell, S. & Norvig, P. AIMA, 4th Ed. — Section 8.2
- Ben-Ari, M. Mathematical Logic for Computer Science, 3rd Ed.