"x > 5 x > 5 x > 5 " is not a proposition, yet mathematics and programs are full of such sentences. Quantifiers such as “for all” and “there exists” turn them into propositions. They are also the basis of database queries (“find all customers who …”) and of the proofs in Unit 2.
Predicates
Definition 1.24 · Predicate (propositional function)
A predicate (or propositional function) P ( x ) P(x) P ( x ) is a sentence containing a variable x x x that becomes a proposition when x x x is given a definite value. The set of values that x x x may take is called the domain of discourse (IGNOU: universe of discourse).
Example: let P ( x ) P(x) P ( x ) be "x > 5 x > 5 x > 5 " with domain the integers. P ( 6 ) P(6) P ( 6 ) is true, P ( 0 ) P(0) P ( 0 ) is false, and P ( x ) P(x) P ( x ) by itself is not a proposition. A predicate can have several variables: Q ( x , y ) Q(x, y) Q ( x , y ) : "x + y = 0 x + y = 0 x + y = 0 ".
Intuition
A predicate is like a function in a program that returns a Boolean: is_greater_than_5(x). It gives no answer until you call it with a value. A quantifier is like a loop that calls the function for every value in the domain and combines the answers.
The three quantifiers
Definition 1.25 · Universal, existential and uniqueness quantifiers
∀ x P ( x ) \forall x\, P(x) ∀ x P ( x ) (“for all x x x , P ( x ) P(x) P ( x ) ”) is true if P ( x ) P(x) P ( x ) is true for every x x x in the domain. This is the universal quantifier . ∃ x P ( x ) \exists x\, P(x) ∃ x P ( x ) (“there exists an x x x such that P ( x ) P(x) P ( x ) ”) is true if P ( x ) P(x) P ( x ) is true for at least one x x x in the domain. This is the existential quantifier . ∃ ! x P ( x ) \exists! x\, P(x) ∃ ! x P ( x ) (“there is exactly one x x x such that P ( x ) P(x) P ( x ) ”) is true if P ( x ) P(x) P ( x ) is true for one and only one x x x ; this is the uniqueness quantifier .
Statement True when False when ∀ x P ( x ) \forall x\, P(x) ∀ x P ( x ) P ( x ) P(x) P ( x ) is true for every x x x there is at least one x x x with P ( x ) P(x) P ( x ) false (a counterexample) ∃ x P ( x ) \exists x\, P(x) ∃ x P ( x ) P ( x ) P(x) P ( x ) is true for at least one x x x P ( x ) P(x) P ( x ) is false for every x x x ∃ ! x P ( x ) \exists! x\, P(x) ∃ ! x P ( x ) exactly one x x x makes P ( x ) P(x) P ( x ) true no x x x , or two or more x x x , make P ( x ) P(x) P ( x ) true
In programming terms, ∀ \forall ∀ is Python’s all(...) and ∃ \exists ∃ is any(...) over the domain.
The domain matters. "∃ x ( x 2 = 2 ) \exists x\,(x^2 = 2) ∃ x ( x 2 = 2 ) " is true over the real numbers (x = 2 x = \sqrt{2} x = 2 ) but false over the rational numbers.
Negating quantified statements
Theorem 1.26 · De Morgan's laws for quantifiers
¬ ∀ x P ( x ) ≡ ∃ x ¬ P ( x ) and ¬ ∃ x P ( x ) ≡ ∀ x ¬ P ( x ) . \neg\, \forall x\, P(x) \equiv \exists x\, \neg P(x) \qquad \text{and} \qquad \neg\, \exists x\, P(x) \equiv \forall x\, \neg P(x). ¬ ∀ x P ( x ) ≡ ∃ x ¬ P ( x ) and ¬ ∃ x P ( x ) ≡ ∀ x ¬ P ( x ) .
In words: “not everyone passed” means “someone did not pass”; “nobody passed” means “everyone did not pass”. For several quantifiers, move ¬ \neg ¬ from left to right, switching each ∀ \forall ∀ to ∃ \exists ∃ and each ∃ \exists ∃ to ∀ \forall ∀ , and finally negate the predicate.
Nested quantifiers: order matters
With the domain R \mathbb{R} R :
∀ x ∃ y ( x + y = 0 ) \forall x\, \exists y\, (x + y = 0) ∀ x ∃ y ( x + y = 0 ) : for every x x x we can choose y = − x y = -x y = − x . True .
∃ y ∀ x ( x + y = 0 ) \exists y\, \forall x\, (x + y = 0) ∃ y ∀ x ( x + y = 0 ) : one single y y y that works for every x x x . For x = 0 x = 0 x = 0 we need y = 0 y = 0 y = 0 , but for x = 1 x = 1 x = 1 we need y = − 1 y = -1 y = − 1 . False .
Swapping ∀ \forall ∀ and ∃ \exists ∃ changes the meaning.
Example 1.27 Writing and negating a statement with two quantifiers
Goal. Write “Every student in the class has submitted at least one assignment” with quantifiers, then write its negation in symbols and in words.
Step. Let S S S be the set of students in the class, A A A the set of assignments, and P ( s , a ) P(s, a) P ( s , a ) : “student s s s has submitted assignment a a a ”.
Step. “Every student” is ∀ s ∈ S \forall s \in S ∀ s ∈ S ; “at least one assignment” is ∃ a ∈ A \exists a \in A ∃ a ∈ A . So the statement is ∀ s ∈ S ∃ a ∈ A P ( s , a ) \forall s \in S\; \exists a \in A\; P(s, a) ∀ s ∈ S ∃ a ∈ A P ( s , a ) .
Step. Negate step by step: ¬ ∀ s ∃ a P ( s , a ) ≡ ∃ s ¬ ∃ a P ( s , a ) ≡ ∃ s ∀ a ¬ P ( s , a ) \neg\, \forall s\, \exists a\, P(s,a) \equiv \exists s\, \neg\, \exists a\, P(s,a) \equiv \exists s\, \forall a\, \neg P(s, a) ¬ ∀ s ∃ a P ( s , a ) ≡ ∃ s ¬ ∃ a P ( s , a ) ≡ ∃ s ∀ a ¬ P ( s , a ) .
Step. Read it back: there is a student s s s such that, for every assignment a a a , s s s has not submitted a a a .
Result. Negation: ∃ s ∈ S ∀ a ∈ A ¬ P ( s , a ) \exists s \in S\; \forall a \in A\; \neg P(s, a) ∃ s ∈ S ∀ a ∈ A ¬ P ( s , a ) , i.e. “Some student has not submitted any assignment”.
Example 1.28 Truth values of statements with the uniqueness quantifier
Goal. With domain R \mathbb{R} R , decide whether each is true: (a) ∀ x ∃ ! y ( x + y = 0 ) \forall x\, \exists! y\, (x + y = 0) ∀ x ∃ ! y ( x + y = 0 ) ; (b) ∀ x ∃ ! y ( y 2 = x ) \forall x\, \exists! y\, (y^2 = x) ∀ x ∃ ! y ( y 2 = x ) ; (c) ∃ x ∃ ! y ( x y = 0 ) \exists x\, \exists! y\, (xy = 0) ∃ x ∃ ! y ( x y = 0 ) .
Step. (a) For any x x x , x + y = 0 x + y = 0 x + y = 0 has exactly one solution, y = − x y = -x y = − x . So (a) is true.
Step. (b) Take x = − 1 x = -1 x = − 1 : y 2 = − 1 y^2 = -1 y 2 = − 1 has no real solution, so “exactly one y y y ” fails. (Also x = 4 x = 4 x = 4 has two solutions, y = 2 y = 2 y = 2 and y = − 2 y = -2 y = − 2 .) So (b) is false.
Step. (c) Take x = 1 x = 1 x = 1 : 1 ⋅ y = 0 1 \cdot y = 0 1 ⋅ y = 0 has exactly one solution, y = 0 y = 0 y = 0 . One such x x x is enough for ∃ \exists ∃ , so (c) is true.
Result. (a) true, (b) false, (c) true.
Correction · Answer to E24 refers to a part that does not exist
Study material says: E24 (§1.5) has three parts, (i)–(iii), but the answer (§1.7) also discusses a part “(iv)”, “equivalent to ( ∀ x ∈ R ) [ ∼ ( ∃ ! y ∈ R ) ( x + y = 0 ) ] (\forall x \in R)[\sim(\exists! y \in R)(x + y = 0)] ( ∀ x ∈ R ) [ ∼ ( ∃ ! y ∈ R ) ( x + y = 0 )] ”, and calls it false.
Correct version: Only (i)–(iii) exist. Their answers are: (i) true, (ii) false (for x = − 1 x = -1 x = − 1 there is no real y y y with y 2 = x 3 = − 1 y^2 = x^3 = -1 y 2 = x 3 = − 1 ), (iii) true (for x = 1 x = 1 x = 1 , y = 0 y = 0 y = 0 is the only solution of x y = 0 xy = 0 x y = 0 ). The statement discussed under “(iv)” is indeed false, because for every real x x x the equation x + y = 0 x + y = 0 x + y = 0 has exactly one solution y = − x y = -x y = − x .
Why: Comparison of the exercise list with the answer list; each truth value was checked directly above.
Common mistake
Negating ∀ \forall ∀ as ∀ ¬ \forall \neg ∀¬ . The negation of “All students passed” (∀ x P ( x ) \forall x\, P(x) ∀ x P ( x ) ) is ∃ x ¬ P ( x ) \exists x\, \neg P(x) ∃ x ¬ P ( x ) , not ∀ x ¬ P ( x ) \forall x\, \neg P(x) ∀ x ¬ P ( x ) (“no student passed”).
Common mistake
Swapping the order of ∀ \forall ∀ and ∃ \exists ∃ . “Everyone has a mother” (∀ x ∃ y \forall x\, \exists y ∀ x ∃ y ) is not the same as “There is one person who is everyone’s mother” (∃ y ∀ x \exists y\, \forall x ∃ y ∀ x ).
Key idea
A predicate becomes a proposition when its variable is fixed or quantified. To negate a quantified statement, switch every ∀ \forall ∀ to ∃ \exists ∃ and every ∃ \exists ∃ to ∀ \forall ∀ , and negate the predicate; the order of quantifiers must stay the same.
TEE Exam note
Typical questions: translate English into quantifiers and negate (E22), invent statements for a given pattern (E23), decide truth values (E24). Model answers: E22(ii) ∀ x ∈ R ∃ y ∈ R ( x = y 2 ) \forall x \in \mathbb{R}\; \exists y \in \mathbb{R}\; (x = y^2) ∀ x ∈ R ∃ y ∈ R ( x = y 2 ) , negation ∃ x ∈ R ∀ y ∈ R ( x ≠ y 2 ) \exists x \in \mathbb{R}\; \forall y \in \mathbb{R}\; (x \neq y^2) ∃ x ∈ R ∀ y ∈ R ( x = y 2 ) — “some real number is not the square of any real number” (true negation, e.g. x = − 1 x = -1 x = − 1 ). E22(iii) “There is a lawyer who never tells lies”: ∃ x ∈ L ∀ t ¬ Lies ( x , t ) \exists x \in L\; \forall t\; \neg \text{Lies}(x, t) ∃ x ∈ L ∀ t ¬ Lies ( x , t ) ; negation: ∀ x ∈ L ∃ t Lies ( x , t ) \forall x \in L\; \exists t\; \text{Lies}(x, t) ∀ x ∈ L ∃ t Lies ( x , t ) — “every lawyer tells a lie at some time”. E23(i): e.g. ∀ x ∈ N ∃ y ∈ N ( y > x ) \forall x \in \mathbb{N}\; \exists y \in \mathbb{N}\; (y > x) ∀ x ∈ N ∃ y ∈ N ( y > x ) (true); negation ∃ x ∀ y ( y ≤ x ) \exists x\; \forall y\; (y \leq x) ∃ x ∀ y ( y ≤ x ) .
Key takeaways
A predicate P ( x ) P(x) P ( x ) becomes a proposition when x x x is given a value or is quantified.
∀ \forall ∀ : true for every element; ∃ \exists ∃ : true for at least one; ∃ ! \exists! ∃ ! : true for exactly one.
¬ ∀ x P ( x ) ≡ ∃ x ¬ P ( x ) \neg \forall x\, P(x) \equiv \exists x\, \neg P(x) ¬∀ x P ( x ) ≡ ∃ x ¬ P ( x ) and ¬ ∃ x P ( x ) ≡ ∀ x ¬ P ( x ) \neg \exists x\, P(x) \equiv \forall x\, \neg P(x) ¬∃ x P ( x ) ≡ ∀ x ¬ P ( x ) .
The order of different quantifiers matters.
Practice questions Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 1 · multiple choice With domain R \mathbb{R} R , which is the negation of ∀ x ∃ y ( x < y ) \forall x\, \exists y\, (x < y) ∀ x ∃ y ( x < y ) ?
Check answer
Show answer Answer: D. ∃ x ∀ y ( x ≥ y ) \exists x\, \forall y\, (x \geq y) ∃ x ∀ y ( x ≥ y )
Switch ∀ \forall ∀ to ∃ \exists ∃ , switch ∃ \exists ∃ to ∀ \forall ∀ , keep the order, and negate x < y x < y x < y to get x ≥ y x \geq y x ≥ y . Option 1 is tempting, but it only negates the predicate without switching the quantifiers.
Question 2 · multiple choice With domain R \mathbb{R} R , what is the truth value of ∃ y ∀ x ( x + y = 0 ) \exists y\, \forall x\, (x + y = 0) ∃ y ∀ x ( x + y = 0 ) ?
Check answer
Show answer Answer: A. False
One single y y y would have to work for every x x x ; x = 0 x = 0 x = 0 forces y = 0 y = 0 y = 0 , but then x = 1 x = 1 x = 1 fails. Option 2 is tempting, but y = − x y = -x y = − x depends on x x x , which is allowed only in ∀ x ∃ y \forall x\, \exists y ∀ x ∃ y .
Question 3 · multiple choice With domain Q \mathbb{Q} Q (the rational numbers), what is the truth value of ∃ x ( x 2 = 2 ) \exists x\, (x^2 = 2) ∃ x ( x 2 = 2 ) ?
Check answer
Show answer Answer: B. False
The only real solutions are ± 2 \pm\sqrt{2} ± 2 , and 2 \sqrt{2} 2 is irrational, so no rational x x x works. Option 1 would be correct with domain R \mathbb{R} R ; the domain changes the answer.
Question 4 · multiple choice What is the negation of “Every student has a laptop”?
A No student has a laptop. B Every student has no laptop. C Some student does not have a laptop. D Some student has a laptop.
Check answer
Show answer Answer: C. Some student does not have a laptop.
¬ ∀ x L ( x ) ≡ ∃ x ¬ L ( x ) \neg\, \forall x\, L(x) \equiv \exists x\, \neg L(x) ¬ ∀ x L ( x ) ≡ ∃ x ¬ L ( x ) . Option 1 is tempting, but “no student has a laptop” is ∀ x ¬ L ( x ) \forall x\, \neg L(x) ∀ x ¬ L ( x ) , which is much stronger.
Question 5 · multiple choice Check Your Progress E24(ii): with domain R \mathbb{R} R , what is the truth value of ∀ x ∃ ! y ( y 2 = x 3 ) \forall x\, \exists! y\, (y^2 = x^3) ∀ x ∃ ! y ( y 2 = x 3 ) ?
Check answer
Show answer Answer: D. False; for x = − 1 x = -1 x = − 1 there is no real y y y
For x = − 1 x = -1 x = − 1 , y 2 = − 1 y^2 = -1 y 2 = − 1 has no real solution (and for x = 1 x = 1 x = 1 there are two, y = ± 1 y = \pm 1 y = ± 1 , so uniqueness also fails). Option 3 is wrong: for x = 0 x = 0 x = 0 the only solution is y = 0 y = 0 y = 0 , so that x x x works.
Question 6 · short answer
Check Your Progress E22(ii): write “Every real number is the square of some real number” with quantifiers, write its negation in symbols and in words, and give the truth values.
Show worked answer Statement: ∀ x ∈ R ∃ y ∈ R ( x = y 2 ) \forall x \in \mathbb{R}\; \exists y \in \mathbb{R}\; (x = y^2) ∀ x ∈ R ∃ y ∈ R ( x = y 2 ) . It is false, because x = − 1 x = -1 x = − 1 is not the square of any real number. Negation: ∃ x ∈ R ∀ y ∈ R ( x ≠ y 2 ) \exists x \in \mathbb{R}\; \forall y \in \mathbb{R}\; (x \neq y^2) ∃ x ∈ R ∀ y ∈ R ( x = y 2 ) , i.e. “There is a real number that is not the square of any real number”. The negation is true (example: x = − 1 x = -1 x = − 1 ).