Universal quantifier (\forall ) [004G]
- February 3, 2026
The first quantifier we will learn about is the universal quantifier, which lets us encode the idea behind English words like "all", "every", and "each", that is, universal statements that are supposed to be true for every member of some domain.
Definition Universal quantifier [004H]
- February 3, 2026
If P(x) is a predicate and D is some “domain” (i.e. set of values, i.e. type) then \forall x: D .\; P(x) (pronounced “for all x in D, P(x)”) is a proposition which is true iff P(x) is true for every x in the domain D.
Remark [004I]
- February 3, 2026
You also often see the notation \forall x \in D. P(x).
Sometimes mathematicians omit writing the domain D as part of the notation, and simply require that it be mentioned off to the side somehwere what the "domain of discourse" is, but this is silly and dangerous: specifying the domain of discourse is not optional (it can determine whether the proposition is true or false), so we should force ourselves to put it in the notation. Otherwise, the notation is ambiguous.
Example [004J]
- February 3, 2026
- \forall {n}: {\mathbb {N}}.\; P(n): assuming P is defined as above, this is a false proposition: it is not the case that n + 2 = 5 for every natural number n.
- \forall {n}: {\mathbb {N}}.\; n \geq 0: this is a true proposition. Every natural number is greater than or equal to zero.
- \forall {x}: {\Z }.\; x \geq 0: this is false. For example, -2 is less than zero.
- \forall {x}: {\Z }.\; x^2 \geq 0: this is true.
We can explore the same examples with Disco:
Disco> :test forall n:N. P(n)
- Certainly false: ∀n. P(n)
Counterexample:
n = 0
Disco> :test forall n:N. n >= 0
- Possibly true: ∀n. n >= 0
Checked 100 possibilities without finding a counterexample.
Disco> :test forall x:Z. x >= 0
- Certainly false: ∀x. x >= 0
Found counterexample:
x = -1
- Left side: -1
- Right side: 0
Disco> :test forall x:Z. x^2 >= 0
- Possibly true: ∀x. x ^ 2 >= 0
Checked 100 possibilities without finding a counterexample.
Disco> :test forall b:Bool. (b /\ b) == b
- Certainly true: ∀b. (b /\ b) == b
No counterexamples exist.Remark [004K]
- February 3, 2026
We should think of \forall as being like a big “and”. That is, \forall x:D.\; P(x) \equiv P(x_1) \land P(x_2) \land P(x_3) \land \dots where x_1, x_2, x_3, ... are all the elements of the domain D. But writing out such giant lists of propositions would be tedious; the domain could even be infinite, as in the last example! But even though this is not literally true it will help us think about what properties \forall should have.
\forall with an empty domain [004N]
- February 4, 2026
Consider this example: suppose H is the domain of "Hendrix students who are over 11 feet tall". Is the following proposition true or false? \forall {h}: {H}.\; h \text { plays varsity pickleball} The strange thing here, of course, is that the domain H is empty. What should it mean to say that "every" element of a domain has some property, when the domain is in fact empty?
Although we don't even have a varsity pickleball team, the perhaps surprising answer is that this is true, and in fact any \forall with an empty domain should be true. On one level, you can just take my word for it: this is the standard, commonly accepted definition within mathematics. But there are also good reasons for defining it this way: things work out more elegantly and consistently this way. Here are a couple ways to think about it:
- In order for the proposition \forall {x}: {D}.\; P(x) to be false, there should be a counterexample, that is, a specific value of x in the domain D for which P(x) is false. If the domain D is empty, then clearly no counterexamples can exist.
- Recall that we can think of \forall like a big \land : \forall {x}: {D}.\; P(x) \equiv P(x_1) \land P(x_2) \land P(x_3) \land \dots So what do we get when we take the \land of zero things? The answer is that we should get the identity element for \land —which is \mathsf {T}; just like the sum of zero things is zero (the identity element for addition), the product of zero things is one (the identity element for multiplication), and so on.
This is our first example of the theme Don't be afraid of zero! For example, we could require any \forall to have a non-empty domain, and say that it is undefined when the domain has size zero. But this is unnecessary: there is a perfectly elegant way to define it.