Quantifiers

Chapter 2: Quantificational Logic

Learning objectives

  • Read and write statements using βˆ€\forall and βˆƒ\exists
  • Translate between English and quantified symbolic logic
  • Use bounded quantifiers βˆ€x∈D\forall x \in D and βˆƒx∈D\exists x \in D over an explicit domain
  • Recognize how the order of nested quantifiers changes the meaning

Propositional logic alone cannot say 'every integer has a successor'. Propositional logic only talks about whole sentences, it cannot reach inside a sentence to talk about every object or some object. To express the bulk of real mathematical statements, "every continuous function is integrable," "there exists a prime between nn and 2n2n," "for every Ξ΅>0\varepsilon > 0 there is a Ξ΄>0\delta > 0 such that…", we need quantifiers. The two quantifiers βˆ€\forall ("for all") and βˆƒ\exists ("there exists") are the gateway from propositional to predicate logic, and once their order rules are nailed down, you can read essentially any modern mathematical text.

Universal and existential quantifiers

The universal quantifier βˆ€\forall means "for all" or "for every." The formula βˆ€x,β€…β€ŠP(x)\forall x,; P(x) asserts that the predicate P(x)P(x) is true for every value xx in the domain of discourse. To prove a universal statement, you must establish P(x)P(x) for an arbitrary xx; to disprove it, a single counterexample suffices.

The existential quantifier βˆƒ\exists means "there exists" or "for some." The formula βˆƒx,β€…β€ŠP(x)\exists x,; P(x) asserts that there is at least one xx in the domain for which P(x)P(x) is true. To prove an existential statement, you must exhibit a witness, a specific xx that works; to disprove it, you must show P(x)P(x) fails for every xx.

Bounded quantifiers

Real mathematics almost always quantifies over a specific domain, not the entire universe. We write bounded quantifiers as βˆ€x∈D,P(x)\forall x \in D, P(x) or βˆƒx∈D,P(x)\exists x \in D, P(x). The unwritten translation is:

βˆ€x∈D,β€…β€ŠP(x)β€…β€Šβ‰‘β€…β€Šβˆ€x,β€…β€Š(x∈Dβ‡’P(x))\forall x \in D,\; P(x) \;\equiv\; \forall x,\; (x \in D \Rightarrow P(x))
βˆƒx∈D,β€…β€ŠP(x)β€…β€Šβ‰‘β€…β€Šβˆƒx,β€…β€Š(x∈D∧P(x))\exists x \in D,\; P(x) \;\equiv\; \exists x,\; (x \in D \wedge P(x))

The universal uses an implication (the property only has to hold for the xx's that are in DD) while the existential uses a conjunction (you need an xx that both lies in DD and satisfies the property). Notice how the connective differs, that asymmetry has a habit of biting students.

f : A β†’ BAB1234abcd

Order matters: βˆ€βˆƒ\forall \exists vs. βˆƒβˆ€\exists \forall

Quantifier order is non-commutative in a way that bites every undergraduate. To see the bite directly, the widget below shows two panels side by side: βˆ€xβˆƒy P(x,y)\forall x \exists y , P(x, y) on the left and βˆƒyβˆ€x P(x,y)\exists y \forall x , P(x, y) on the right, both for the same PP. Cycle through the four presets, including the Ρ–δ definition of continuity, where the order of the quantifiers is what separates a usable definition from a degenerate one, and the everyday "every student has a favourite course" example.

Quantifier scopescope of βˆ€xscope of βˆƒyβˆ€xβˆƒyP(x, y)For every x there exists a y such that P(x, y) holds

The single subtlest move in predicate logic is the order of nested quantifiers. Consider two superficially similar statements about R\mathbb{R}:

βˆ€x∈R,β€…β€Šβˆƒy∈R,β€…β€Šx+y=0\forall x \in \mathbb{R},\; \exists y \in \mathbb{R},\; x + y = 0

"For every xx, there is some yy with x+y=0x + y = 0." This is true: given xx, choose y=βˆ’xy = -x. The witness yy is allowed to depend on xx.

βˆƒy∈R,β€…β€Šβˆ€x∈R,β€…β€Šx+y=0\exists y \in \mathbb{R},\; \forall x \in \mathbb{R},\; x + y = 0

"There is some yy such that, for every xx, x+y=0x + y = 0." This is false: it demands a single yy that works for every xx at once. Any choice of yy would have to satisfy 1+y=01 + y = 0 and 2+y=02 + y = 0 simultaneously, which is impossible.

The pattern βˆ€xβˆƒy\forall x \exists y allows yy to depend on xx; the pattern βˆƒyβˆ€x\exists y \forall x demands a single yy that works for every xx. These two patterns are not interchangeable, and almost every "Ξ΅\varepsilon-Ξ΄\delta" definition in analysis hinges on this distinction.

Pause and think: In the Ρ–δ definition of limit, we say βˆ€Ξ΅>0,β€…β€ŠβˆƒΞ΄>0,β€…β€Šβˆ€x,β€…β€Š(0<∣xβˆ’a∣<Ξ΄β‡’βˆ£f(x)βˆ’L∣<Ξ΅)\forall \varepsilon > 0,; \exists \delta > 0,; \forall x,;(0 < |x - a| < \delta \Rightarrow |f(x) - L| < \varepsilon). Why is the Ξ΄\delta allowed to depend on Ξ΅\varepsilon? What would change if we swapped to βˆƒΞ΄β€‰βˆ€Ξ΅\exists \delta, \forall \varepsilon? (Hint: that swap is too strong to be useful, it would force a single Ξ΄ to work for all Ξ΅. The genuine strengthening is uniform continuity, βˆ€Ξ΅ βˆƒΞ΄ βˆ€x,y with one Ξ΄ working at every point at once, a global property of the function, not something at a single point a.)

Try it

  • Before translating: identify whether "There is a real number whose square is βˆ’1-1" is true or false. Then write it symbolically and double-check by inspection.
  • Predict first: is βˆ€x∈R,β€…β€Šβˆƒy∈R,β€…β€Šy>x\forall x \in \mathbb{R},; \exists y \in \mathbb{R},; y > x true? Now is βˆƒy∈R,β€…β€Šβˆ€x∈R,β€…β€Šy>x\exists y \in \mathbb{R},; \forall x \in \mathbb{R},; y > x true? Explain the difference.
  • Translate into symbols: "Every nonzero real number has a multiplicative inverse." Then "There is an integer that divides every integer." Both statements should use a quantifier; check whether each is true.
  • Find a witness: prove βˆƒn∈Z,β€…β€Šn2=16\exists n \in \mathbb{Z},; n^2 = 16 by exhibiting one.
  • Find a counterexample: disprove βˆ€n∈N,β€…β€Šn2>n\forall n \in \mathbb{N},; n^2 > n.

PYTHON Β· OPTIONALRun β–·1deffactorial(n):2ifn <= 1:3return14returnn * factorial(n - 1)Write a working solution, click Run, see the test results inline.

A trap to watch for

The most damaging mistake in early predicate logic is treating βˆ€xβˆƒy\forall x \exists y as if it meant the same as βˆƒyβˆ€x\exists y \forall x. They are not the same. The give-away phrasing is "there exists a… for every…", English word order can mask which quantifier is on the outside. A single example to keep in mind: "for every person there is a mother" (true, everyone has a mother) versus "there is a person who is the mother of everyone" (false). Same words, different quantifier order, opposite truth values. Whenever you read a multi-quantifier statement, draw an arrow from each variable to its scope: the yy in βˆ€xβˆƒy\forall x \exists y depends on xx; the yy in βˆƒyβˆ€x\exists y \forall x does not.

What you now know

You can read, write, and translate quantified statements with bounded domains, and you know that quantifier order is load-bearing, βˆ€xβˆƒy\forall x \exists y and βˆƒyβˆ€x\exists y \forall x usually say different things. The next section attacks the operations on quantifiers: how to negate them, push negations through them, and recognize logically equivalent quantified statements.

References

  • Velleman, D. J. (2019). How to Prove It: A Structured Approach (3rd ed.). Cambridge University Press, ch. 2.
  • Enderton, H. B. (2001). A Mathematical Introduction to Logic (2nd ed.). Academic Press, ch. 2.
  • Smullyan, R. M. (1995). First-Order Logic. Dover Publications, ch. 2.
  • Mendelson, E. (2015). Introduction to Mathematical Logic (6th ed.). Chapman and Hall/CRC, ch. 2.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.