Quantifiers (Concept) — Beginner-Friendly Notes
1. What Quantifiers Do
Quantifiers say how many objects a statement applies to:
- (universal): "for all" — applies to every object.
- (existential): "there exists" — applies to at least one object.
2. Semantics (meaning with domain)
Given a domain (set of objects) and interpretation:
- is true iff true for every object in domain.
- is true iff true for at least one object .
Example domain = {Tweety, Penguin}:
- is false (Penguin is bird but doesn't fly).
- is true (Tweety flies).
3. Patterns You Must Get Right (common exam error)
| English | Wrong | Correct | Why? |
|---|---|---|---|
| Every bird flies | would mean every object is a bird | ||
| Some bird flies | would be true for any non-bird |
Rule: goes with , goes with — memorise!
4. Nesting & Order Matters
- : "Everyone loves someone" (each may love different person) — true in many worlds.
- : "There is one person loved by everyone" — much stronger.
Swapping and changes meaning.
5. De Morgan for Quantifiers
- $
eg \forall x\ P(x) \equiv \exists x\
eg P(x)$ - $
eg \exists x\ P(x) \equiv \forall x\
eg P(x)$
6. Connection to CS
- ≈
for allloop must be true for every iteration. - ≈
existssearch — stop when one found.
7. One-Line Summary
means the sentence holds for every domain element and pairs with , while means it holds for some element and pairs with , with nesting order determining strength and meaning.
8. Quick Self-Check
- Write "Every student has a mentor" correctly.
- Negate .