Learning objectives
- Define a predicate and its domain.
- Use ∀ and ∃ to form quantified statements and decide their truth.
- Negate quantified statements correctly.
- Explain why the order of nested quantifiers matters.
Roman Urdu. Predicate aisa jumla hai jis mein variable ho, jaise P(x) = "x > 3". Jab hum x ko quantifier ∀ (har) ya ∃ (kam az kam ek) se bandhte hain to proposition ban jata hai. Is lecture mein hum in ki sachai parakhna aur negation karna seekhte hain.
Core concepts
Definition (Predicate). A statement P(x) containing a variable x that becomes a proposition when x is given a value from a domain (universe of discourse).
Quantifiers
| Statement | Meaning | True when | False when |
|---|---|---|---|
| ∀x P(x) | P holds for every x in the domain | P(x) is true for all x | one counterexample exists |
| ∃x P(x) | P holds for at least one x | one witness exists | P(x) is false for all x |
Negation laws. ¬∀x P(x) ≡ ∃x ¬P(x) and ¬∃x P(x) ≡ ∀x ¬P(x). These are De Morgan's laws extended to quantifiers.
Nested quantifiers. ∀x∃y and ∃y∀x are different. Take P(x, y): x + y = 0 over ℤ. Then ∀x∃y (x + y = 0) is true (take y = −x), but ∃y∀x (x + y = 0) is false (no single y works for every x).
Common misconceptions - Translate "every student passed" as ∀x (S(x) → P(x)), not ∀x (S(x) ∧ P(x)). The second says everyone in the domain is a student who passed. - Translate "some student passed" as ∃x (S(x) ∧ P(x)), not ∃x (S(x) → P(x)), which is true whenever any non-student exists. - The truth of a quantified statement depends on the domain.
Worked examples
Example 1 (basic). Domain ℤ. Decide ∀x (x² ≥ 0) and ∃x (x² = 2). The first is true, since a square of an integer is never negative. The second is false: the only candidates are ±√2, which are not integers. Over the real numbers the second would be true, so the domain matters.
Example 2 (intermediate). Negate "Every program in the folder compiles." With P(x) = "x compiles": ∀x P(x). Negation: ∃x ¬P(x), i.e. "Some program in the folder does not compile." To refute a ∀ statement, one counterexample is enough.
Example 3 (advanced). Translate and negate: "Every student has a friend who is a student." Let S(x) mean x is a student, F(x, y) mean x and y are friends. Statement: ∀x [S(x) → ∃y (F(x, y) ∧ S(y))]. Negation steps: ¬∀x[…] ≡ ∃x ¬[S(x) → ∃y(…)] ≡ ∃x [S(x) ∧ ¬∃y(F(x, y) ∧ S(y))] ≡ ∃x [S(x) ∧ ∀y (¬F(x, y) ∨ ¬S(y))]. In words: some student has no friend who is a student.
Example 4 (computing). A SQL query SELECT * FROM T WHERE EXISTS (...) expresses ∃. A check "all array elements are positive" is ∀ and stops at the first counterexample, just like a loop with an early break.
Computer science connection
Database queries (EXISTS, NOT EXISTS, relational calculus); program assertions and preconditions; formal specification languages; AI knowledge representation in first-order logic.
Key takeaways
- One counterexample disproves ∀; one witness proves ∃.
- ¬∀ ≡ ∃¬ and ¬∃ ≡ ∀¬.
- ∀ pairs with →; ∃ pairs with ∧. Order of nested quantifiers matters.
Roman Urdu. ∀ ko ghalat sabit karne ke liye sirf ek counterexample kafi hai, ∃ ko sahih sabit karne ke liye sirf ek misaal. ¬∀x P(x) = ∃x ¬P(x). ∀ ke saath aam taur par → aata hai aur ∃ ke saath ∧.
Five revision questions
- Over ℤ, give the truth value of ∃x (x² = x) and name a witness.
- Negate "There is a prime number that is even and greater than 2."
- Translate "No student failed" using S(x) and F(x).
- Give a domain in which ∀x ∃y (y > x) is true and one in which it is false.
- Why is ∃x (S(x) → P(x)) a poor translation of "some student passed"?
Homework. Write five quantified statements about a university database, state their truth in a small sample table of your own, and write the negation of each.
Quiz
¬∀x P(x) kis ke barabar hai?
Sab ke liye sach nahi = koi ek aisa hai jis ke liye ghalat.
All lectures
- Lecture 0: Discrete vs Continuous
- Lecture 1: Propositions and Connectives
- Lecture 2: Truth Tables, Tautologies and Contradictions
- Lecture 3: Logical Equivalence and the Laws of Logic
- Lecture 4: Predicate Logic and Quantifiers
- Lecture 5: Rules of Inference
- Lecture 6: Logical Arguments and Puzzle Solving
- Lecture 7: Direct Proof and Proof by Implication
- Lecture 8: Proof by Contraposition
- Lecture 9: Proof by Contradiction
- Lecture 10: Mathematical Induction
- Lecture 11: Strong Induction
- Lecture 12: Applications of Proofs and Proof Strategy
START WELL TO END WELL