Quantifier Rules & Equivalences

GATE Relevance: High

Prerequisites

🎯 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)

Quantifier Negation Laws

These are the most frequently tested equivalences in GATE:

¬∀x P(x)   ≡   ∃x ¬P(x)
¬∃x P(x)   ≡   ∀x ¬P(x)

Intuition: “Not everything has property P” means “something lacks P.” “Nothing has P” means “everything lacks P.”

Example — Pushing Negation Inward

Negate: ∀x (P(x) → Q(x))

  1. ¬∀x (P(x) → Q(x))
  2. ≡ ∃x ¬(P(x) → Q(x))
  3. ≡ ∃x ¬(¬P(x) ∨ Q(x))   [since α → β ≡ ¬α ∨ β]
  4. ≡ ∃x (P(x) ∧ ¬Q(x))   [De Morgan’s]

English: “There exists an x with property P but not Q.”

2. Quantifier Distribution over ∧ and ∨

Distribution Laws
EquivalenceValid?
∀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 ✗
Common GATE Trap

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!)
Counter-example for ∀ over ∨

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

Restricted Quantifiers

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”
Example — “Every prime greater than 2 is odd”

∀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 ∃.

Quantifier Order Matters
FormulaEnglish 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
Key Relationships
  • ∃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.
Example — Showing ∀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

Quantifier Scope and Connectives

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) ∨ φ
Prenex Normal Form

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.

Example — Convert to Prenex Normal Form

Formula: ∀x P(x) → ∃x Q(x)

  1. Rename: ∀x P(x) → ∃y Q(y)   (avoid variable clash)
  2. Eliminate →: ¬∀x P(x) ∨ ∃y Q(y)
  3. Push ¬ in: ∃x ¬P(x) ∨ ∃y Q(y)
  4. 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.