Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

Quantifiers

Nearly every theorem is a claim about all numbers of some kind or about at least one of them, and the connectives of the previous lesson have no way to say either.

That lesson fixed the meaning of "not", "and", "or", "implies" and "if and only if", and closed on a sentence they could not build: "for every integer n, if n is divisible by 4, then n is even". This lesson adds the two missing words, "for every" and "there exists". It fixes what they mean, shows that the collection a variable ranges over is part of every claim, gives mechanical rules for negating any quantified statement, and shows that the order of two quantifiers can be the whole difference between a true statement and a false one. It then covers "there is exactly one", the translation of mathematical English into symbols and back, and the quantifiers hidden in ordinary sentences. It ends where the subject earns its keep: the definitions of a limit and of continuity, each a string of three alternating quantifiers, read, used and negated symbol by symbol.

Open sentences and the two quantifiers

A sentence such as "x2>4" has no truth value until x is fixed: it is true when x=3 and false when x=1. Such an open sentence, also called a predicate, is written P(x), so that P(3) is a true statement and P(1) a false one. Open sentences can have several variables. "x<y" is a predicate P(x,y) in two variables, true for the pair (2,5) and false for (5,2), and "a divides b" is another. The set of values that make P(x) true is its truth set: over the real numbers the truth set of x2>4 is everything below −2 together with everything above 2.

Two quantifiers turn an open sentence into a statement.

Definition. The universal quantifier ∀ is read "for all" or "for every". The statement ∀xP(x) is true when P(x) is true for every value of x in the domain, and false when at least one value makes P(x) false.

Definition. The existential quantifier ∃ is read "there exists" or "for some". The statement ∃xP(x) is true when P(x) is true for at least one value of x in the domain, and false when every value makes P(x) false.

"At least one" is the exact reading of ∃. It does not mean exactly one, and it does not hint that not all: "there is an even integer" is true, though there are infinitely many, and "some real number satisfies x2≥0" is true, though every real number does. As with inclusive "or", the weaker reading is the default, and a stronger one is always spelt out.

When the domain is finite the quantifiers are nothing new. Over the domain {1,2,3}, ∀xP(x) says the same as P(1)∧P(2)∧P(3), and ∃xP(x) says the same as P(1)∨P(2)∨P(3). So "for all" is a long "and", and "there exists" is a long "or". What the quantifiers add is the ability to take that "and" or "or" over infinitely many cases, which no finite formula built from connectives can do.

A variable governed by a quantifier is bound, and one that is not is free. In ∀x(x2≥0) the x is bound, and the statement is about no particular x: renaming it gives ∀t(t2≥0), the same statement. The bound variable is a placeholder, like k in ∑k=110k2 or t in ∫01tdt. A sentence with a free variable is still an open sentence. Over the integers, ∃k(n=2k) has k bound and n free, so it is not a statement but a predicate of n: it says "n is even". That is how definitions are made. Each definition in this course is an open sentence in the thing being defined, with the other variables bound inside it.

A quantifier governs the formula written directly after it, and brackets say how far that reaches. In ∀x(P(x)∧Q(x)) the quantifier covers both parts. In ∀xP(x)∧Q(x) it covers only P(x), and the x in Q(x) is free, so the whole is an open sentence. When in doubt, bracket.

Often the quantifier is not written at all. "If n is divisible by 4, then n is even" is printed as a theorem with no "for all", and every reader supplies "for every integer n". A proof has to put it back, because "every n" and "some n" call for different proofs.

What if the domain is empty?

Then every universal statement is true and every existential statement is false. ∃xP(x) needs a value of x with P(x), and there are none. ∀xP(x) is false only if some value makes P(x) false, and there are none of those either. So over an empty domain "every x satisfies P" is true whatever P is, including P(x) and ¬P(x) at once.

This is the vacuous truth of the previous lesson in another form. A universal statement restricted to a set, such as "every element of A is positive", is ∀x(x∈A⇒x>0), and when A is empty every instance has a false hypothesis. "Every real number x with x2<0 is equal to 17" is true, and so is "every such x is not equal to 17".

The convention is forced, not chosen for convenience. The negation law of the section below says ¬∀xP(x) is the same as ∃x¬P(x). Over an empty domain the right-hand side is false, so ∀xP(x) must be true. Any other choice would break that law, and with it the rule that a universal claim is refuted exactly by a counterexample.

One familiar inference does fail. Over a non-empty domain, ∀xP(x) implies ∃xP(x): pick any element, and it satisfies P. Over an empty domain the first is true and the second false. Formal logic usually requires domains to be non-empty so that this inference holds, and in mathematics the issue surfaces when a statement about "every element of A" is used to produce an element of A. A proof that does so has quietly assumed that A is not empty, and should say so.

The domain is part of the claim

"For all x" always means all x in some collection, the domain, and changing the domain changes the claim. Take "x2≥x for every x". Over the integers it is true: if x≤0 then x2≥0≥x, and if x≥1 then multiplying x≥1 by the positive number x gives x2≥x. Over the reals it is false, since x=12 gives x2=14. Likewise "there is an x with x2=2" is true over the reals and false over the rationals: the lesson on contrapositive and contradiction proves the second, and the lesson on the real numbers the first. And "there is an x with 2x=1" is false over the integers and true over the rationals.

So mathematicians write the domain into the quantifier: ∀x∈ℤ, ∃x∈ℝ, with ℕ, ℤ, ℚ and ℝ for the natural numbers, integers, rationals and reals. This course takes ℕ to start at 1, so ℕ={1,2,3,…}. When the domain is clear from the context, as in "over the integers" at the head of an argument, it is left out of each quantifier.

A claim often concerns part of a domain, as in "every prime greater than 2 is odd", and the two quantifiers restrict in different ways. A restricted universal uses a conditional: ∀n(nis prime∧n>2⇒nis odd). A value that fails the restriction makes the conditional vacuously true, so it is let through. A restricted existential uses a conjunction: "some prime is even" is ∃n(nis prime∧nis even), which needs one value with both properties.

Swapping the connectives destroys the claim. ∀n(nis prime∧nis odd) says every integer is an odd prime, which 4 refutes. ∃n(nis prime⇒nis even) is made true by n=4, which is not prime, so it says nothing about primes at all. The rule to remember: ∀ goes with ⇒, and ∃ goes with ∧.

The shorthands ∀x>0, ∃n≥N and ∀x∈A abbreviate exactly these patterns. They are called restricted or bounded quantifiers:

∀x>0P(x)means∀x(x>0⇒P(x))∃n≥NP(n)means∃n(n≥N∧P(n))

With them, definitions become short formulas. Over the integers, "a divides b" is ∃k(b=ak), and "n is a perfect square" is ∃m(n=m2). "n is prime" says n>1 and the only positive divisors of n are 1 and n:

n>1∧∀d∈ℕ(d∣n⇒d=1∨d=n)

A positive divisor of a positive integer n is at most n, so the quantifier could equally be written ∀d≤n, with d running over 1,2,…,n. A quantifier bounded by a number in this way ranges over finitely many values, and a statement all of whose quantifiers are bounded like this can be settled by checking. "1009 is prime" is a finite claim, and a computer confirms it by trying every d up to 1009 (or, with a little more thought, up to 31, since a factorisation n=de with 1<d≤e has d2≤n).

Why does it matter whether every quantifier is bounded?

Because it marks the line between what can be settled by a finite computation and what cannot. A statement in which every quantifier ranges over a finite, explicitly given set is a finite conjunction or disjunction in disguise, and a patient enough computer decides it. "Every even number from 4 to 4×1018 is a sum of two primes" is such a statement, and a distributed computation led by Tomás Oliveira e Silva verified it, with the results published in 2014.

Goldbach's conjecture itself is ∀n(neven∧n>2⇒∃p≤n∃q≤n(pprime∧qprime∧n=p+q)). Everything inside the first quantifier is bounded, so each instance can be checked, but the first quantifier is not bounded. That shape has a consequence. If the conjecture is false, a search through the even numbers will eventually find a counterexample and stop. If it is true, the search runs for ever, and no amount of running tells you which case you are in. A statement of the form "for all n, (a checkable property of n)" can be refuted by computation but never confirmed by it.

Logicians sort statements by how their unbounded quantifiers alternate, a classification called the arithmetical hierarchy. Goldbach's conjecture has one unbounded ∀ in front of a checkable property. The twin prime conjecture, that there are infinitely many primes p with p+2 also prime, reads ∀n∃p(p>n∧pandp+2are prime), with an unbounded ∀ followed by an unbounded ∃, and neither a proof nor a disproof of it can come from searching alone: no finite amount of data about primes settles it either way. The definition of a limit, later in this lesson, alternates three times. The more alternations, the further a statement is from anything a computer can check, and the more the proof has to do.

Negating a quantified statement

To deny that every x has a property is to say that some x lacks it, and to deny that some x has it is to say that every x lacks it.

Theorem (negation of quantifiers). For every predicate P(x) over any domain,

¬∀xP(x)≡∃x¬P(x)¬∃xP(x)≡∀x¬P(x)

Proof. For the first, ¬∀xP(x) is true exactly when ∀xP(x) is false. By the definition of ∀, that happens exactly when at least one value of x makes P(x) false, that is, makes ¬P(x) true, and by the definition of ∃ that is exactly when ∃x¬P(x) is true. For the second, ¬∃xP(x) is true exactly when no value of x makes P(x) true, that is, when every value makes ¬P(x) true, which is the meaning of ∀x¬P(x). □

These are the previous lesson's De Morgan laws, stretched. Over a domain of three objects a, b and c, ∀xP(x) is P(a)∧P(b)∧P(c), and De Morgan turns its negation into ¬P(a)∨¬P(b)∨¬P(c), which is ∃x¬P(x). The theorem says the same holds when the domain is infinite, where there is no finite formula to apply De Morgan to.

Negation is therefore mechanical: move the ¬ inwards, and every quantifier it passes changes kind. When it reaches the open sentence at the end, the previous lesson's rules take over: ¬(P∧Q) is ¬P∨¬Q, ¬(P∨Q) is ¬P∧¬Q, and ¬(P⇒Q) is P∧¬Q. A negated inequality flips completely: ¬(x<y) is x≥y, not x>y.

The domain and the restrictions do not change. The negation of ∀x>0P(x) is ∃x¬(x>0⇒P(x)), which is ∃x(x>0∧¬P(x)), or ∃x>0¬P(x): the ">0" rides along untouched. In the other direction, ¬∃n≥NP(n) is ∀n¬(n≥N∧P(n)), which is ∀n(n≥N⇒¬P(n)), or ∀n≥N¬P(n). The restriction says which objects the claim is about, and denying the claim does not change the subject. So the negation of "every positive real has a square root" is "some positive real has no square root", never "some non-positive real ...".

With several quantifiers the rule is applied once per quantifier, from the outside in:

¬∀x∃y∀zP(x,y,z)≡∃x¬∃y∀zP≡∃x∀y¬∀zP≡∃x∀y∃z¬P(x,y,z)

The pattern of the result is easy to remember: every quantifier flips, their order stays, and the ¬ lands on the innermost sentence.

The mistake this prevents is turning "not every" into "none". "Not every prime is odd" is true, because of 2. "No prime is odd" is false, because of 3. The negation of a universal claim is an existential one, which asks for a single exception, not a universal claim of the opposite.

Example. Symbolise "every positive real number x satisfies x2≥x", negate it, and decide which of the two is true.

Over the reals, the claim is ∀x(x>0⇒x2≥x). Passing the negation through the quantifier gives ∃x¬(x>0⇒x2≥x), and negating the conditional gives ∃x(x>0∧x2<x): some positive real number has a square smaller than itself. The negation is true, because x=12 is positive and x2=14<12. So the original claim is false.

The work was in two steps: first get the symbols right, then negate by rule, and only then think about the mathematics. The rule is reliable, and intuition about what "the opposite" of a sentence should be is not.

Now you. Symbolise "every real number x with x2=x satisfies x=1", negate it, and decide which of the two is true.

Answer

The claim is ∀x(x2=x⇒x=1). Its negation is ∃x¬(x2=x⇒x=1), which is ∃x(x2=x∧x≠1): some real number equals its own square without being 1. The negation is true, because 02=0 and 0≠1. So the original claim is false.

Is the negation law really safe for infinite domains?

In the mathematics of this course, yes: the proof above used nothing but the definitions of ∀ and ∃, and nothing in it depended on the domain being finite. But one half of it carries more weight than it seems to, and some mathematicians refuse it.

The half that nobody doubts is ∃x¬P(x)⇒¬∀xP(x). If you hold a particular x at which P fails, then plainly not every x satisfies P. The same goes for both directions of the second law, ¬∃xP(x)⟺∀x¬P(x).

The other half is ¬∀xP(x)⇒∃x¬P(x). Suppose you have shown that "every x satisfies P" leads to a contradiction. Have you shown that some particular x fails P? Classically, yes: each x either satisfies P or does not, by the law of excluded middle, and if every one satisfied it you would have ∀xP(x). But the argument never tells you which x fails. The constructive mathematicians, following L. E. J. Brouwer (the next lesson says more about them), read "there exists" as "we can find", and for them this half of the law fails over infinite domains.

A standard example shows what is at stake. Let P(n) say "the nth digit after the decimal point of π is not the start of a run of a hundred consecutive 7s". Over a finite range of n you can check. Over all of ℕ, suppose someone proved ¬∀nP(n) by an indirect argument. Classically that proves such a run exists; constructively it proves only that the absence of such a run is impossible, and the run's position may be beyond anyone's reach.

For this course the classical law holds without reservation. The point of the story is where the weight sits: a proof of "some x fails" that does not produce an x has used excluded middle, and in constructive settings, such as some proof assistants, that step has to be flagged.

What each kind of claim needs

The shape of a statement says in advance what a proof of it must do and what a disproof must do. For a single quantifier there are four cases.

StatementTo prove itTo disprove it
∀xP(x)Let x be arbitrary and show P(x)Exhibit one x with ¬P(x)
∃xP(x)Exhibit one x with P(x)Let x be arbitrary and show ¬P(x)

The table is two facts and their negations. An existential statement is proved by producing a value, called a witness, and checking it. So one value at which P fails, a counterexample, refutes a universal claim however many other values it holds for, because the negation of ∀xP(x) is the existential statement ∃x¬P(x). For a restricted claim ∀x(P(x)⇒Q(x)), a counterexample must satisfy the hypothesis and fail the conclusion; a value that fails the hypothesis refutes nothing.

In 1640 Pierre de Fermat wrote that every number 22n+1 is prime. The cases n=0 to 4 give 3, 5, 17, 257 and 65537, all prime. In 1732 Euler showed that the next, 232+1=4294967297, equals 641×6700417, and that one line settles the matter. Nobody has since found another prime of this form.

The other direction has no such shortcut. No number of examples proves a universal claim over an infinite domain: n2+n+41 is prime for every n from 0 to 39 and equals 412 at n=40, and Pólya's conjecture about prime factors held for every number below 906,150,257. A universal claim needs an argument about an arbitrary element: name an x, assume nothing about it beyond membership of the domain (and the hypothesis, if the claim is a conditional), and derive P(x). Because nothing was assumed about the named x, the argument works for each one. The next lesson turns this into a method and explains exactly why it is valid.

Existential claims are the mirror image. One example proves "some prime is one more than a square", namely 5=22+1, and one example proves "some rational x has x2−3x+2<0", namely x=32, which gives 94−92+2=−14. Refuting an existential claim needs a proof about every value: "no integer x satisfies 2x=1" is ∀x(2x≠1), and it is proved by noting that for an integer x the number 2x is even while 1 is odd, and no integer is both (a fact the next lesson proves).

When the statement has two quantifiers the table is applied twice, from the outside in. A proof of ∀x∃yP(x,y) lets x be arbitrary and then exhibits a y that works for that x, so its y is typically a formula in x. A proof of ∃y∀xP(x,y) exhibits one y first and then shows it works for an arbitrary x, so its y cannot mention x at all. Knowing which kind of statement is in hand says in advance whether an example will be enough, and what shape of argument is needed when it is not.

The order of quantifiers

An open sentence in two variables, like "y>x", needs two quantifiers. Two of the same kind can come in either order: ∀x∀yP(x,y) and ∀y∀xP(x,y) both say that P holds for every pair, and ∃x∃y and ∃y∃x both say that it holds for at least one pair. When the kinds are mixed, the order is part of the meaning.

Over the integers, "every integer has a larger one" is ∀x∃y(y>x), and "some integer is larger than all of them" is ∃y∀x(y>x). The first is true and the second false, and the symbols differ only in order. In ∀x∃y the y is found after x is known, so it may depend on x: for 7 take 8, for 1000 take 1001. In ∃y∀x the y is fixed first and must then work against every x at once.

It helps to read quantifiers as a game between two players. A sceptic picks the values under ∀ and a prover picks those under ∃, in the order written, each seeing the choices already made. The statement is true when the prover has a strategy that wins however the sceptic plays. In ∀x∃y(y>x) the sceptic names x and the prover answers x+1, and wins every time. In ∃y∀x(y>x) the prover must commit to y first, and the sceptic answers y itself, or anything larger, and wins every time. Every proof in this course of a statement with several quantifiers is a winning strategy for the prover, written down.

Committing early is a handicap, never an advantage, and that makes one direction of the order a theorem.

Theorem. For every predicate P(x,y), ∃y∀xP(x,y) implies ∀x∃yP(x,y).

Proof. Suppose ∃y∀xP(x,y), and let y0 be a value with ∀xP(x,y0). Let x be arbitrary. Then P(x,y0) holds, so y0 is a value of y with P(x,y), and ∃yP(x,y) is true. Since x was arbitrary, ∀x∃yP(x,y). □

In the game, the prover who can win by committing first can win by committing second: play the same y0 whatever x turns out to be. The converse is false, and the integers with y>x show it. A counterexample to a claim about all predicates is one predicate on one domain, and y>x over ℤ makes ∀x∃y true and ∃y∀x false.

Negation still works one quantifier at a time, so ¬∀x∃yP(x,y) is ∃x∀y¬P(x,y). The negation of "every integer has a larger one" is "some integer has no larger one", that is, "some integer is at least as large as every integer", and the negation of "some integer is larger than every integer" is "every integer is at most as large as some integer", a clumsy but true sentence.

Example. Over the integers, decide whether ∀x∃y(y>x) and ∃y∀x(y>x) are true, and prove each answer.

The first is true. Let x be any integer and take y=x+1. Then y is an integer and y−x=1>0, so y>x. As x was arbitrary, the statement holds.

The second is false, so prove its negation, ∀y∃x(y≤x). Let y be any integer and take x=y. Then y≤x. As y was arbitrary, no integer is larger than all integers, not even than itself.

In both proofs the witness is a formula in the variable chosen before it: y=x+1 in the first, x=y in the second. That is what the order ∀∃ permits, and it is why the proof of the negation could be so short. The sceptic's value came first.

Now you. Over the integers, decide whether ∀x∃y(x+y=0) and ∃y∀x(x+y=0) are true, and prove each answer. Does the first stay true over ℕ?

Answer

The first is true. Let x be any integer and take y=−x, which is an integer. Then x+y=0. As x was arbitrary, the statement holds.

The second is false, so prove its negation, ∀y∃x(x+y≠0). Let y be any integer. If y≠0, take x=0, so x+y=y≠0. If y=0, take x=1, so x+y=1≠0. Either way the required x exists, and as y was arbitrary, the negation holds. (A single choice also works: x=1−y gives x+y=1.)

Over ℕ the first is false. Its negation is ∃x∈ℕ∀y∈ℕ(x+y≠0), and x=1 is a witness: for every natural number y, 1+y≥2, so 1+y≠0.

If the y depends on the x, is there a function hiding in ∀x∃y?

Yes, and making it explicit is a standard tool. Suppose ∀x∃yP(x,y) is true. For each x there is at least one suitable y; pick one and call it f(x). Then f is a function on the domain with ∀xP(x,f(x)). Conversely, if some function f has ∀xP(x,f(x)), then ∀x∃yP(x,y), with y=f(x) as the witness. So

∀x∃yP(x,y)is equivalent to∃f∀xP(x,f(x))

and the right-hand side makes the dependence visible: the prover's strategy is the function f. Logicians call f a Skolem function, after the Norwegian logician Thoralf Skolem, who used this move to replace existential quantifiers by function symbols. In the Examples above the Skolem functions were f(x)=x+1 and f(x)=−x.

The equivalence also explains the theorem that ∃y∀x implies ∀x∃y: the first says there is a constant function that works, and a constant function is a function.

Proofs of ∀∃ statements are, in practice, constructions of such functions, and much of analysis is the study of how good the function can be made. In the definition of a limit, below, the Skolem function sends each tolerance ε to a starting point N, and a proof of convergence usually gives it by a formula such as "take N greater than 1ε". In continuity, the function sends a point and a tolerance to a δ, and whether it can be chosen without looking at the point is exactly the difference between continuity and uniform continuity.

There is a subtlety in "pick one". When the domain is finite, or when a rule such as "the least suitable y" is available, the choice is unproblematic. Making infinitely many arbitrary choices at once, with no rule, is the content of the axiom of choice, which the lesson on order relations meets again through Zorn's lemma. For the statements in this course a rule is always at hand.

Exactly one

The existential quantifier means "at least one", and many theorems claim more: there is exactly one such object. The quotient and remainder on dividing one integer by another, the positive square root of a positive number, the limit of a convergent sequence, each is unique, and each word "the" in those phrases depends on it.

Definition. ∃!xP(x), read "there is a unique x with P(x)" or "there is exactly one x with P(x)", means

∃x(P(x)∧∀y(P(y)⇒y=x))

In words: some x has the property, and every object with the property is that x. The same claim splits into two independent halves,

∃xP(x)∧∀x∀y(P(x)∧P(y)⇒x=y)

existence, that at least one object has the property, and uniqueness, that at most one does. The second half on its own is how "there is at most one" is written. It asserts nothing about existence: over the integers, "at most one x satisfies x2=−1" is true because none does.

The two forms say the same thing. If x witnesses the first form, then ∃xP(x) holds, and whenever P(u) and P(v), both u=x and v=x, so u=v. Conversely, if both halves hold, take x with P(x); any y with P(y) then has y=x by uniqueness, which is the first form.

The split is also the plan of every proof of unique existence: two separate arguments. Existence is proved like any existential claim, by a witness. Uniqueness is a universal claim, proved by letting two objects with the property be arbitrary and showing they are equal. Finding one object and failing to think of another proves existence only.

Uniqueness shows up hidden in counting. Two variables may take the same value, so ∃x∃y(P(x)∧P(y)) is true whenever one object has P, and "at least two objects have P" needs the inequality written in:

∃x∃y(x≠y∧P(x)∧P(y))

Negating ∃!xP(x) by rule, from the second form, gives ¬∃xP(x)∨∃x∃y(P(x)∧P(y)∧x≠y): either nothing has the property, or at least two things do. A claim of unique existence fails in two quite different ways, and a disproof must say which.

Example. Prove that there is a unique natural number n with n2−2n−3=0. Is there a unique integer with that property?

Existence. Take n=3. Then n2−2n−3=9−6−3=0, and 3∈ℕ.

Uniqueness. Let n be a natural number with n2−2n−3=0. Factorising, (n−3)(n+1)=0, so n−3=0 or n+1=0. Since n≥1, the number n+1 is at least 2 and so is not 0. Hence n−3=0, and n=3. So every natural number with the property equals 3.

Over the integers the answer changes: −1 also works, since 1+2−3=0. So there are at least two integers with the property, 3 and −1, and by the negation above, ∃!n∈ℤ is false. The uniqueness argument shows where the domain entered: "n+1≠0" was the only step that used n≥1.

The uniqueness proof here showed that every solution equals the one already found. The other pattern, taking two arbitrary solutions and showing they are equal, is often cleaner when the solution has no formula, as in the next exercise.

Now you. Prove that there is a unique real number x with x3+x=10.

Answer

Existence. Take x=2: then x3+x=8+2=10.

Uniqueness. Let x and y be real numbers with x3+x=10 and y3+y=10. Subtracting, x3−y3+x−y=0, and since x3−y3=(x−y)(x2+xy+y2), this is

(x−y)(x2+xy+y2+1)=0

The second factor is positive: x2+xy+y2=(x+y2)2+3y24≥0, so x2+xy+y2+1≥1. A product of two real numbers is 0 only if one of them is, so x−y=0, and x=y.

The uniqueness half never needed to know the solution: it would work unchanged for x3+x=c with any real c. Existence for other values of c, where no neat witness can be guessed, needs the intermediate value theorem, a consequence of the completeness of the real numbers.

Does ∃!x∃!yP(x,y) say there is exactly one pair?

No, and the failure is a good test of reading symbols literally. Unwrap the outer quantifier: ∃!xQ(x), where Q(x) is "∃!yP(x,y)", that is, "exactly one y goes with this x". So the statement says: exactly one x has exactly one partner. Other values of x may have no partner, or several.

A small example makes it concrete. Take the domain {1,2} and let P(x,y) be true for the pairs (1,1), (2,1) and (2,2), and false for (1,2). The value x=1 has exactly one partner, y=1. The value x=2 has two, so it fails "∃!y". Hence exactly one x, namely 1, has exactly one partner, and ∃!x∃!yP(x,y) is true. Yet three pairs satisfy P.

The implication does hold the other way. If exactly one pair (a,b) satisfies P, then x=a has exactly one partner, b, and every other x has none, so ∃!x∃!yP(x,y) is true. So "exactly one pair" is strictly stronger, and its correct symbolisation treats the pair as a single object:

∃x∃y(P(x,y)∧∀u∀v(P(u,v)⇒u=x∧v=y))

Mixed stacks need the same care. "∀x∃!y" says that every x has exactly one partner, which is what it means for P to define a function. "∃!y∀x" says something else: exactly one y is a partner of every x at once. Unique existence does not even commute with itself: on the domain {1,2,3}, with P true for exactly the pairs (1,2), (1,3) and (2,1), only x=2 has exactly one partner, so ∃!x∃!yP(x,y) is true, while each of y=1, 2, 3 has exactly one partner, so ∃!y∃!xP(x,y) is false. So the only safe way to read a stack of quantifiers is from the outside in, one at a time. The Logic course treats identity and counting quantifiers formally in its lesson on identity and number.

Translating mathematical English

Mathematics is written in English with symbols mixed in, and most of its quantifiers are words. Translating into symbols is how you find out exactly what a sentence claims, and translating back is how you say it to a reader. The common words are these.

  • "for every", "for all", "for each", "for any", "whenever", "always", and the indefinite article in a general claim ("a square is never negative") are universal.
  • "there is", "there exists", "for some", "at least one", "can be" ("6 can be written as a sum of two primes") and the indefinite article in an existence claim ("x2=2 has a real solution") are existential.
  • "no", "none", "never" are ∀¬, which is the same as ¬∃: "no square is negative" is ∀x(x2≥0).
  • "only" marks the conclusion of a conditional: "only even numbers are divisible by 4" is ∀n(4∣n⇒nis even).

The word "any" is the dangerous one, because it is universal in some positions and existential in others. "Any square is non-negative" means every square. "If any integer is a counterexample, the conjecture is false" means if some integer is, and "there is not any solution" means no solution. When "any" appears, rewrite with "every" or "some" and check that the meaning survived.

Several phrases in analysis and number theory package two quantifiers at once, and they come in pairs that differ only in order. For a property P(n) of natural numbers:

  • "P(n) holds for all sufficiently large n", or "eventually", means ∃N∀n≥NP(n): from some point on, always.
  • "P(n) holds for infinitely many n", or "frequently", means ∀N∃n≥NP(n): beyond every point, at least once more.

The negation of "eventually P" is ∀N∃n≥N¬P(n), "infinitely often not P", and the negation of "infinitely often P" is "eventually not P". Over ℕ, "arbitrarily large" means the same as "infinitely many": "there are arbitrarily large primes" is ∀N∃p(p>N∧pis prime), which says the primes never stop.

Example. Symbolise "between any two distinct real numbers there is a rational number". Then negate the symbolic form, and translate the negation back into English.

The claim is universal in the two numbers and existential in the rational. "Distinct" can be replaced by "x<y", since of two distinct reals one is smaller and the sentence does not care which is named first. So the claim is

∀x∈ℝ∀y∈ℝ(x<y⇒∃q∈ℚ(x<q∧q<y))

To negate, flip each quantifier and push the ¬ inwards, using ¬(A⇒B)≡A∧¬B and De Morgan on the final conjunction:

∃x∈ℝ∃y∈ℝ(x<y∧∀q∈ℚ(q≤x∨q≥y))

In English: there are real numbers x<y such that every rational number lies at or below x or at or above y, that is, no rational lies strictly between them. The original is the true one: it is the density of the rationals, which the lesson on the real numbers proves from the completeness axiom.

Now you. A function f:ℝ→ℝ is bounded if some number M is at least |f(x)| for every real x. Symbolise "f is bounded", write the negation "f is unbounded" in symbols and in English, and prove that f(x)=x2 is unbounded.

Answer

"f is bounded" is ∃M∈ℝ∀x∈ℝ(|f(x)|≤M). Its negation is ∀M∈ℝ∃x∈ℝ(|f(x)|>M): whatever bound is proposed, some value of f exceeds it in size.

To prove x2 unbounded, let M be any real number and take x=|M|+1. Then x≥1, so x2=x⋅x≥x=|M|+1>|M|≥M, and |f(x)|=x2>M. Since M was arbitrary, f is unbounded. The witness x depended on M, as the order ∀M∃x allows.

By contrast sin is bounded, with M=1 as the witness, since |sinx|≤1 for every x. Here one M is fixed first and must serve every x, as the order ∃M∀x requires.

Hidden quantifiers

Most quantifiers in real writing are not written as quantifiers at all, and a large share of confusion, in mathematics and outside it, comes from supplying the wrong one.

In algebra the sign "=" carries a hidden quantifier that changes with the sentence. "(x+1)2=x2+2x+1" is an identity, a claim about every real x. "x2=2x" is an equation, an open sentence, and "solve it" means find its truth set, here {0,2}. "x2=2x has a solution" is an existential claim. The three look alike on the page, and a proof needs to know which it is holding, because an identity may be used for any value while an equation may be used only for the values that satisfy it.

Properties of functions are quantified statements in the same way. For a function f:ℝ→ℝ:

  • f is increasing when ∀x∀y(x<y⇒f(x)≤f(y)), and strictly increasing with f(x)<f(y) at the end;
  • f is constant when ∃c∀x(f(x)=c), or equivalently ∀x∀y(f(x)=f(y));
  • f is periodic when ∃p>0∀x(f(x+p)=f(x));
  • f has a maximum when ∃a∀x(f(x)≤f(a)).

Each negation is then a matter of rule. "f is not increasing" is ∃x∃y(x<y∧f(x)>f(y)): one pair of points where the function goes down. It is not "f is decreasing", which is a universal claim of its own, and most functions, x2 among them, are neither.

The words "let" and "suppose" in a proof also carry quantifiers. "Let n be an integer" introduces an arbitrary object, the first move of a proof of a ∀. "Choose k with n=2k" introduces a particular one, supplied by an ∃ in a hypothesis. The next lesson makes the difference precise, because confusing the two is behind many invalid proofs.

Everyday English is looser still. "All that glisters is not gold", from The Merchant of Venice, literally says ∀x(glisters(x)⇒¬gold(x)): nothing that glisters is gold. It means ¬∀x(glisters(x)⇒gold(x)): not everything that glisters is gold. "Everybody loves somebody" is usually ∀x∃y, each person has someone, but can be heard as ∃y∀x, one person whom everybody loves. A statistic such as "a pedestrian is injured in this city every hour" is ∀ hour ∃ pedestrian; the old joke replies "that poor pedestrian", reading it as ∃ pedestrian ∀ hour. None of this is a defect of English, which leans on context. Mathematics cannot, so when a sentence could be read two ways it is rewritten until it cannot.

The limit of a sequence

Quantifier order is the whole content of the definition calculus rests on. A sequence a1,a2,a3,… of real numbers converges to a real number L, written an→L, when

∀ε>0∃N∈ℕ∀n≥N(|an−L|<ε)

Read aloud: for every tolerance ε>0 there is a position N such that every term from position N on lies within ε of L. Here |an−L| is the distance from an to L, so |an−L|<ε says L−ε<an<L+ε.

As a game: the sceptic names a tolerance ε, the prover answers with a position N, the sceptic picks any term from position N on, and the prover wins if it lies within ε of L. Since ∃N follows ∀ε, the position may depend on the tolerance, and it must. For an=1n and L=0, the tolerance 0.01 is met from N=101, since 1101<0.01 while 1100 is not, and 0.001 needs N=1001.

Swap the first two quantifiers and the definition collapses.

Proposition. If ∃N∈ℕ∀ε>0∀n≥N(|an−L|<ε), then an=L for every n≥N.

Proof. Take such an N, and let n≥N. Then |an−L|<ε for every ε>0. Suppose |an−L|>0. Then ε=|an−L| is a positive tolerance, and the hypothesis gives |an−L|<|an−L|, which is impossible. So |an−L|=0, and an=L. □

So under the swapped reading a sequence would converge only if it were eventually equal to its limit, and 1n, which never reaches 0, would not converge to 0. The order ∀ε∃N is what lets a sequence approach a value without arriving.

Proving that a limit is correct means winning the game for every ε at once, so the proof must give N as a rule in terms of ε. Finding the rule is scrap work: write |an−L|, simplify it, and see how large n must be to make it less than ε. The proof then needs a natural number beyond any given real number, which is the Archimedean property of the reals: for every real number x there is a natural number N with N>x. It is used here as a known fact about ℝ, and the lesson on the real numbers derives it from the completeness axiom.

Example. Prove that nn+1→1.

Scrap work: |nn+1−1|=|−1n+1|=1n+1, and 1n+1<ε exactly when n+1>1ε. So any N beyond 1ε will do.

Proof. Let ε>0. By the Archimedean property there is a natural number N with N>1ε. Let n≥N. Then n+1>n≥N>1ε, so 1n+1<ε, and

|nn+1−1|=1n+1<ε

Since ε>0 was arbitrary, nn+1→1. □

The proof follows the quantifiers exactly. "Let ε>0" answers ∀ε, "there is N" answers ∃N, "let n≥N" answers ∀n≥N, and the displayed line is the sentence at the end. For ε=0.01 the rule gives any N>100, say 101, and then 1n+1≤1102<0.01 for every n≥101. The rule need not give the smallest N that works, only one that does.

Now you. Prove that 3nn+2→3.

Answer

Scrap work: |3nn+2−3|=|3n−3n−6n+2|=6n+2. Solving 6n+2<ε exactly is possible, but it is simpler to bound first: 6n+2<6n, and 6n≤ε once n≥6ε.

Proof. Let ε>0. By the Archimedean property there is a natural number N with N>6ε. Let n≥N. Then n>6ε, so 6n<ε, and

|3nn+2−3|=6n+2<6n<ε

Since ε>0 was arbitrary, 3nn+2→3. □

Bounding 6n+2 by something simpler before solving is the standard move: the proof needs some N that works, and a cruder estimate that is easy to invert is worth more than an exact one that is not.

To show that a sequence does not converge to L, negate the definition, one symbol at a time. ∀ε>0 becomes ∃ε>0, keeping its restriction. ∃N∈ℕ becomes ∀N∈ℕ. ∀n≥N becomes ∃n≥N. Finally |an−L|<ε becomes |an−L|≥ε. So an does not converge to L when

∃ε>0∀N∈ℕ∃n≥N(|an−L|≥ε)

that is, some tolerance is broken by a term beyond every starting point. In the language of the section on mathematical English: for some ε, infinitely many terms lie at distance at least ε from L. A disproof must therefore supply one ε, and a way to answer every N with a suitable n.

Example. Prove that an=(−1)n does not converge to 1.

Prove the negation with L=1. Take ε=1. Let N be any natural number and take n=2N+1. Then n≥N and n is odd, so an=−1 and |an−1|=2≥1. Since N was arbitrary, the negation holds.

Now the roles have changed. The prover of the negation chooses ε and n, the sceptic chooses N, and the prover's n is allowed to depend on N, as 2N+1 does.

Now you. Prove that an=1n does not converge to 1.

Answer

Prove the negation with L=1. Take ε=12. Let N be any natural number and take n=N+1. Then n≥N and n≥2, so |an−1|=1−1n≥1−12=12. Since N was arbitrary, the negation holds.

A sequence that converges to no real number at all is said to diverge, and that is one more quantifier in front: ∀L∈ℝ∃ε>0∀N∈ℕ∃n≥N(|an−L|≥ε). Showing that (−1)n diverges means defeating every candidate L, not just 1 and −1, and it is one of the problems at the end. The lesson on limits builds the theory on this definition: that a sequence has at most one limit, that a convergent sequence is bounded, and the rules for limits of sums and products.

Continuity, pointwise and uniform

The definition of continuity has the same three quantifiers, with a fourth that can stand in two places, and its two positions give two different notions.

Definition. A function f:ℝ→ℝ is continuous at the point a when

∀ε>0∃δ>0∀x∈ℝ(|x−a|<δ⇒|f(x)−f(a)|<ε)

It is continuous when it is continuous at every point, ∀a∀ε>0∃δ>0∀x(…), and uniformly continuous when

∀ε>0∃δ>0∀a∈ℝ∀x∈ℝ(|x−a|<δ⇒|f(x)−f(a)|<ε)

In the game for continuity at a, the sceptic names a tolerance ε for the output, the prover answers with a tolerance δ for the input, and the sceptic may then pick any x within δ of a; the prover wins if f(x) is within ε of f(a). It says that f(x) can be made as close as you like to f(a) by taking x close enough to a. The definitions of continuity and uniform continuity differ only in where ∀a stands. In continuity it comes before ∃δ, so δ may depend on the point a as well as on ε. In uniform continuity it comes after, so one δ must serve every point at once. By the theorem on quantifier order, moving an ∃ later can only weaken a statement, so every uniformly continuous function is continuous. The converse fails, and the standard example shows why.

A linear function is uniformly continuous. For f(x)=2x+1, |f(x)−f(a)|=|2x−2a|=2|x−a|, so given ε>0 take δ=ε2: whenever |x−a|<δ, |f(x)−f(a)|=2|x−a|<ε. The δ mentions only ε, so it serves every a at once. (The calculation uses |uv|=|u||v| and the other school facts about absolute value, which the next lesson proves.)

The squaring function is continuous, but its δ has to shrink as a grows. Since x2−a2=(x−a)(x+a), the output error is the input error multiplied by |x+a|, which is about 2|a| when x is near a.

Proposition. The function f(x)=x2 is continuous at every real number a.

Proof. Let a be a real number and let ε>0. Take δ to be the smaller of 1 and ε2|a|+1, which is positive. Let x be a real number with |x−a|<δ. Since δ≤1, we have a−1<x<a+1, so 2a−1<x+a<2a+1, and as 2a+1≤2|a|+1 and 2a−1≥−(2|a|+1), this gives |x+a|<2|a|+1. Therefore

|x2−a2|=|x−a||x+a|≤|x−a|(2|a|+1)<δ(2|a|+1)≤ε

where the strict step uses |x−a|<δ and 2|a|+1>0, and the last step uses δ≤ε2|a|+1. □

The δ depends on a through the factor 2|a|+1. That is not a weakness of this proof. No choice of δ free of a can work, as the negation of uniform continuity shows. By rule, f is not uniformly continuous when

∃ε>0∀δ>0∃a∃x(|x−a|<δ∧|f(x)−f(a)|≥ε)

Proposition. The function f(x)=x2 is not uniformly continuous on ℝ.

Proof. Take ε=1. Let δ>0, and take a=1δ and x=a+δ2. Then |x−a|=δ2<δ, and

x2−a2=(x−a)(x+a)=δ2(2δ+δ2)=1+δ24≥1

So |f(x)−f(a)|≥1=ε. Since δ>0 was arbitrary, f is not uniformly continuous. □

However small the proposed δ, the sceptic goes far enough out along the parabola, to a=1δ, that the curve is steep enough to turn an input step of δ2 into an output jump of more than 1. Both propositions are about the same function, and the only difference between the statements they settle is the position of ∀a.

If every uniformly continuous function is continuous anyway, why does anyone care about the difference?

Because many arguments need one δ for a whole interval, and pointwise continuity supplies only one δ per point. The clearest case is integration. To show that a continuous function on [0,1] has an integral, one cuts the interval into pieces of width δ and needs the function to vary by less than ε across every piece at once, which is uniform continuity. The same need appears whenever a limit must be taken uniformly across a range: approximating functions by polynomials, exchanging a limit with an integral, solving differential equations by successive approximation.

The rescue is a theorem named after Eduard Heine and Georg Cantor: a function continuous at every point of a closed bounded interval [p,q] is uniformly continuous there. For x2 this can be seen directly. On [0,1], if x and a both lie in the interval then |x+a|≤2, so |x2−a2|≤2|x−a|, and δ=ε2 works at every point. The trouble in the proposition above came entirely from letting a run off to infinity.

Both conditions of the theorem matter. On the unbounded set ℝ, x2 fails. On the bounded but open interval between 0 and 1, excluding the ends, the function 1x is continuous at every point and not uniformly continuous, because near 0 it is as steep as you please; one of the challenge problems below proves this. The general proof of the theorem needs the completeness of the real numbers, through the theorem of Bolzano and Weierstrass on convergent subsequences, and it is a staple of a first course in analysis.

The same distinction, between a quantity that may depend on a point and one that may not, runs through the rest of analysis: uniform convergence of sequences of functions against pointwise convergence is the next instance, and it decides whether a limit of continuous functions is continuous.

From what a claim says to how to prove it

Any statement in this course can now be written with quantifiers over a stated domain, and its negation computed rather than guessed. The shape of the symbols dictates the shape of the proof: a ∀ is met by letting the variable be arbitrary, an ∃ by naming a value, which may depend on every variable chosen before it, and a disproof is a proof of the negation, with every quantifier flipped.

Take the claim that the square of every odd integer is one more than a multiple of 8. In symbols it is

∀n∈ℤ(nis odd⇒∃m∈ℤ(n2=8m+1))

and the symbols say what a proof must do: let n be an arbitrary odd integer, and produce an integer m, depending on n, with n2=8m+1. The examples agree: 1=8×0+1, 9=8×1+1, 25=8×3+1, 49=8×6+1, 81=8×10+1, and (−3)2=9 as well. But they are examples, and the claim is universal over an infinite domain. The quantifiers say what a proof must deliver, not how to find the m. The next lesson supplies the method, the direct proof, and proves this claim with it.

Problems

Work each problem on paper before opening anything; for Core and Challenge problems, try the hint before the solution.

Warm-up

1. Decide whether each statement is true over ℕ, over ℤ and over ℝ, twelve verdicts in all, and justify each. (a) ∀x(x2>0). (b) ∃x(2x=1). (c) ∀x∃y(x=2y). (d) ∃x∀y(x≤y).

Solution

(a) Over ℕ, true: every natural number x is at least 1, so x2≥1>0. Over ℤ and over ℝ, false: x=0 is a counterexample, since 02=0.

(b) Over ℕ and ℤ, false: for an integer x, 2x is even and 1 is odd, and no integer is both (a fact the next lesson proves), so 2x≠1. Over ℝ, true, with witness x=12.

(c) Over ℕ, false: for x=1 we would need a natural number y with 2y=1, and by (b) there is none. Over ℤ, false for the same reason, with the same counterexample x=1. Over ℝ, true: for any real x, y=x2 gives 2y=x.

(d) Over ℕ, true, with witness x=1: every natural number y has 1≤y. Over ℤ, false. Its negation is ∀x∃y(y<x), and for any integer x the integer y=x−1 is smaller. Over ℝ, false by the same argument with y=x−1.

2. Negate each statement, moving ¬ inwards until it applies to nothing but an equation or inequality, and then remove it by rewriting that equation or inequality. Say whether the original or the negation is true. (a) ∀x∈ℝ(x>0⇒∃y∈ℝ(y2=x)). (b) ∃n∈ℕ∀m∈ℕ(m≤n). (c) ∀x∈ℝ∀y∈ℝ(x<y⇒∃z∈ℝ(x<z∧z<y)).

Solution

(a) ∃x∈ℝ(x>0∧∀y∈ℝ(y2≠x)): some positive real number is not the square of any real number. The original is true, since every positive real has a real square root, as the lesson on the real numbers proves.

(b) ∀n∈ℕ∃m∈ℕ(m>n): every natural number is exceeded by some natural number. The negation is true, with m=n+1, so the original, "some natural number is at least every natural number", is false.

(c) ∃x∈ℝ∃y∈ℝ(x<y∧∀z∈ℝ(z≤x∨z≥y)): some two reals x<y have no real strictly between them. The original is true: for x<y, the midpoint z=x+y2 satisfies x<z<y, because z−x=y−x2>0 and y−z=y−x2>0.

3. Over the integers, write each of these as a formula using only quantifiers, connectives, +, ×, =, < and ∣. (a) n is odd. (b) n is a sum of two squares. (c) a and b have a common divisor greater than 1. (d) n has exactly two positive divisors.

Solution

(a) ∃k(n=2k+1).

(b) ∃x∃y(n=x×x+y×y). The two variables may take the same value, which is right: 8=22+22 counts.

(c) ∃d(1<d∧d∣a∧d∣b).

(d) ∃u∃v(0<u∧0<v∧u≠v∧u∣n∧v∣n∧∀d(0<d∧d∣n⇒d=u∨d=v)). The clause u≠v makes "at least two", and the final universal makes "at most these two". Here u≠v abbreviates ¬(u=v). For positive n this says that n is prime, since the two divisors must be 1 and n with 1≠n; it is a second definition of primality, equivalent to the one in the lesson.

4. Decide which of these are true, and justify each answer. (a) ∃!x∈ℤ(x2=4). (b) ∃!x∈ℕ(x2=4). (c) ∃!x∈ℝ(x3=−8). (d) ∃!x∈ℝ(x2<0).

Solution

(a) False: 2 and −2 are two different integers whose squares are 4, so uniqueness fails.

(b) True. Existence: 2∈ℕ and 22=4. Uniqueness: if x∈ℕ and x2=4, then (x−2)(x+2)=0, and x+2≥3 is not 0, so x=2.

(c) True. Existence: (−2)3=−8. Uniqueness: if x3=y3=−8, then 0=x3−y3=(x−y)(x2+xy+y2). So x=y or x2+xy+y2=0. In the second case, x2+xy+y2=(x+y2)2+3y24 is a sum of two non-negative terms, so both are 0, giving y=0 and then x=0; so x=y in this case too.

(d) False, for the other reason: no real number has a negative square, so existence fails.

Core

5. Over ℝ, decide which statements are true, and prove each answer. (a) ∀x∃y(xy=1). (b) ∃y∀x(xy=0). (c) ∀x∃y(y2=x). (d) ∃x∀y(x≤y2). (e) ∀x∃y∀z(z>y⇒z2>x).

Hint

Play the game. For a true statement, give the prover's choices, each as a formula in the variables chosen earlier. For a false one, prove the negation, which means giving the sceptic's choices.

Solution

(a) False. The negation is ∃x∀y(xy≠1), with witness x=0: for every real y, 0×y=0≠1.

(b) True, with witness y=0: for every real x, x×0=0.

(c) False. The negation is ∃x∀y(y2≠x), with witness x=−1: every real y has y2≥0>−1.

(d) True, with witness x=0: for every real y, 0≤y2.

(e) True. Let x be any real number and take y=|x|+1. Let z be any real number with z>y. Then z>1, and multiplying z>1 by the positive number z gives z2>z. So z2>z>y=|x|+1>|x|≥x. The conditional therefore holds for every z, and since x was arbitrary, the statement holds. It says that however large x is, the squares of all sufficiently large numbers exceed it, and the y had to depend on x.

6. Find the flaw in this proof, and show that the claim is false.

Claim. There is a natural number M such that n≤M for every natural number n.

Proof. Let n be a natural number. Take M=n. Then M is a natural number and n≤M. Since n was arbitrary, such an M exists.

Hint

Write the claim in symbols, and write in symbols what the proof actually establishes. Compare the order of the quantifiers.

Solution

The claim is ∃M∈ℕ∀n∈ℕ(n≤M). The proof chose n first and then M in terms of n, so what it proves is ∀n∈ℕ∃M∈ℕ(n≤M): every natural number is at most some natural number. That statement is true and has just been proved, but it is not the claim. In the claim, M must be fixed before n is chosen and must then work for every n, so it may not depend on n. The phrase "since n was arbitrary, such an M exists" hides the swap: the M found was a different number for each n.

The claim is false. Its negation is ∀M∈ℕ∃n∈ℕ(n>M). Let M be any natural number and take n=M+1. Then n is a natural number and n>M. Since M was arbitrary, the negation holds.

7. Over ℝ, prove or disprove each statement. (a) ∃!x∀y(xy=x). (b) ∃!y∀x(xy=x). (c) ∀x∃!y(xy=x).

Hint

Each "exists exactly one" needs an existence argument and a uniqueness argument. For uniqueness, the ∀ inside lets you substitute any convenient value.

Solution

(a) True. Existence: x=0 gives 0×y=0=x for every y. Uniqueness: suppose x satisfies xy=x for every real y. Taking y=2 gives 2x=x, so x=0. So every such x is 0.

(b) True. Existence: y=1 gives x×1=x for every x. Uniqueness: suppose y satisfies xy=x for every real x. Taking x=1 gives y=1.

(c) False. Its negation is ∃x¬∃!y(xy=x), and x=0 is a witness: 0×y=0 for every real y, so both y=1 and y=2 satisfy 0×y=0, and the y is not unique. (For every x≠0 there is exactly one such y, namely 1, since xy=x gives x(y−1)=0 and x≠0. So the statement fails at a single point.)

Parts (a) and (b) say that 0 is the unique number that absorbs every product, and 1 the unique number that leaves every product unchanged.

8. Let P(x) and Q(x) be predicates over a domain D. (a) Prove that ∀x(P(x)∧Q(x)) is equivalent to ∀xP(x)∧∀xQ(x), and that ∃x(P(x)∨Q(x)) is equivalent to ∃xP(x)∨∃xQ(x). (b) Prove that ∀xP(x)∨∀xQ(x) implies ∀x(P(x)∨Q(x)), and disprove the converse. (c) Prove that ∃x(P(x)∧Q(x)) implies ∃xP(x)∧∃xQ(x), and disprove the converse.

Hint

For the disproofs, one domain and one pair of predicates is enough: try the integers with "even" and "odd".

Solution

(a) Suppose ∀x(P(x)∧Q(x)). Let x be arbitrary; then P(x)∧Q(x), so P(x). As x was arbitrary, ∀xP(x), and in the same way ∀xQ(x). Conversely, suppose ∀xP(x) and ∀xQ(x), and let x be arbitrary. Then P(x) and Q(x), so P(x)∧Q(x), and as x was arbitrary, ∀x(P(x)∧Q(x)).

For the second equivalence, negate both sides of the first with ¬P and ¬Q in place of P and Q. The first equivalence gives ∀x(¬P(x)∧¬Q(x))≡∀x¬P(x)∧∀x¬Q(x). The negation of the left side is ∃x¬(¬P(x)∧¬Q(x)), which is ∃x(P(x)∨Q(x)). The negation of the right side is ¬∀x¬P(x)∨¬∀x¬Q(x), which is ∃xP(x)∨∃xQ(x). Equivalent statements have equivalent negations, so these two are equivalent.

(b) Suppose ∀xP(x)∨∀xQ(x), and let x be arbitrary. If ∀xP(x) holds, then P(x), so P(x)∨Q(x). Otherwise ∀xQ(x) holds, so Q(x) and again P(x)∨Q(x). As x was arbitrary, ∀x(P(x)∨Q(x)).

The converse fails. Over ℤ, let P(x) be "x is even" and Q(x) be "x is odd". Every integer is even or odd (the next lesson proves this, and that no integer is both), so ∀x(P(x)∨Q(x)) is true. But ∀xP(x) is false, since 1 is not even, and ∀xQ(x) is false, since 0 is not odd, so ∀xP(x)∨∀xQ(x) is false.

(c) Suppose ∃x(P(x)∧Q(x)), and let a be a witness, so P(a) and Q(a). Then a witnesses ∃xP(x) and also ∃xQ(x).

The converse fails, with the same predicates. ∃xP(x) is true (take 0) and ∃xQ(x) is true (take 1), but ∃x(P(x)∧Q(x)) is false, since no integer is both even and odd. The two witnesses were different objects, and nothing forces one object to serve both.

So ∀ distributes over ∧ and ∃ over ∨, as a long "and" and a long "or" should, and neither distributes over the other connective.

9. Write each statement in symbols, then write its negation in symbols and in plain English without the word "not" at the front. Here (an) is a sequence of real numbers and f:ℝ→ℝ. (a) The sequence (an) is bounded. (b) an=0 for infinitely many n. (c) Every real number is a value of f. (d) f is periodic.

Hint

Decide first which quantifier each phrase hides, and in what order. "Infinitely many" over ℕ was translated in the section on mathematical English.

Solution

(a) ∃M∈ℝ∀n∈ℕ(|an|≤M). Negation: ∀M∈ℝ∃n∈ℕ(|an|>M). In English: whatever bound is proposed, some term exceeds it in size; the sequence is unbounded.

(b) ∀N∈ℕ∃n≥N(an=0). Negation: ∃N∈ℕ∀n≥N(an≠0). In English: from some point on, no term is 0; there are only finitely many zero terms.

(c) ∀y∈ℝ∃x∈ℝ(f(x)=y). Negation: ∃y∈ℝ∀x∈ℝ(f(x)≠y). In English: some real number is missed by f altogether. (A function with property (c) is called surjective onto ℝ; the lesson on functions studies it.)

(d) ∃p>0∀x∈ℝ(f(x+p)=f(x)). Negation: ∀p>0∃x∈ℝ(f(x+p)≠f(x)). In English: for every proposed positive period, some point is not repeated one period later.

In each case the restrictions (n≥N, p>0) survive the negation unchanged, and each quantifier flips.

10. (a) Prove that (−1)nn→0. (b) For ε=0.1, find the smallest N that works in the definition of convergence for this sequence.

Hint

Compute |an−0|, and ask how large n must be to make it less than ε. You will need a natural number larger than a given real number.

Solution

(a) For every n∈ℕ, |an−0|=|(−1)n|n=1n. Let ε>0. By the Archimedean property there is a natural number N with N>1ε2. Let n≥N. Then n>1ε2, and since both sides are positive and taking square roots preserves order between positive numbers, n>1ε. Hence 1n<ε, that is, |an−0|<ε. Since ε>0 was arbitrary, an→0.

(b) We need 1n<0.1 for every n≥N. For positive n, 1n<0.1 holds exactly when n>10, that is, when n>100. So N=101 works, since every n≥101 has n>100. And no smaller N works: if N≤100, then n=100 satisfies n≥N and |a100|=110, which is not less than 0.1. So the smallest N is 101.

11. Prove that the sequence an=(−1)n does not converge to any real number.

Hint

Write down the statement to prove: ∀L∃ε>0∀N∃n≥N(|an−L|≥ε). One ε can work for every L, but the choice of n must depend on whether L is closer to 1 or to −1.

Solution

We prove ∀L∈ℝ∃ε>0∀N∈ℕ∃n≥N(|an−L|≥ε).

Let L be any real number, and take ε=1. Let N be any natural number. There are two cases.

If L≥0, take n=2N+1. Then n≥N and n is odd, so an=−1, and |an−L|=|−1−L|=1+L≥1, since 1+L is positive.

If L<0, take n=2N. Then n≥N and n is even, so an=1, and |an−L|=|1−L|=1−L>1, since 1−L is positive.

In both cases n≥N and |an−L|≥1=ε. Since N was arbitrary, an does not converge to L, and since L was arbitrary, it converges to no real number.

The order of choices matches the order of quantifiers: ε was chosen after L (though it happened not to depend on it), and n after both L and N, depending on each.

12. Let H:ℝ→ℝ be the step function with H(x)=1 for x≥0 and H(x)=0 for x<0. Prove that H is continuous at every a≠0 and is not continuous at 0.

Hint

At a point a≠0, choose δ small enough that every x within δ of a has the same sign as a. At 0, write out the negation of continuity at 0 and look to the left of 0.

Solution

Continuity at a≠0. Let ε>0 and take δ=|a|, which is positive. Let x be a real number with |x−a|<|a|, so a−|a|<x<a+|a|.

If a>0, the left inequality reads 0<x, so H(x)=1=H(a). If a<0, then |a|=−a and the right inequality reads x<0, so H(x)=0=H(a). In both cases |H(x)−H(a)|=0<ε. Since ε was arbitrary, H is continuous at a. Notice that δ depended on a and not on ε.

No continuity at 0. We prove ∃ε>0∀δ>0∃x(|x−0|<δ∧|H(x)−H(0)|≥ε). Take ε=12. Let δ>0, and take x=−δ2. Then |x|=δ2<δ, and x<0, so |H(x)−H(0)|=|0−1|=1≥12. Since δ was arbitrary, H is not continuous at 0.

Any ε up to 1 would do in the second part. For ε>1 the sceptic cannot win, since H never varies by more than 1, which is why the negation only asks for one ε.

Challenge

13. Let P(x,y) be a predicate over a non-empty domain. Up to the fact that quantifiers of the same kind commute, there are six statements obtained by putting one quantifier on each variable:

∀x∀yP,∃y∀xP,∃x∀yP,∀x∃yP,∀y∃xP,∃x∃yP

Determine exactly which of these statements imply which others for every predicate P on every non-empty domain. Prove each implication that holds, and give a counterexample for each one that does not.

Hint

Arrange the six in a diamond with ∀∀ at the top and ∃∃ at the bottom. For the non-implications, four small predicates on the domain {1,2} suffice: try x=y, x=1, y=1, and "x=1 and y=1".

Solution

Write the statements as A=∀x∀yP, B=∃y∀xP, C=∃x∀yP, D=∀x∃yP, E=∀y∃xP and F=∃x∃yP. The claim is that the implications that hold are exactly these, together with each statement implying itself:

A⇒B⇒D⇒FA⇒C⇒E⇒F

and the ones they give by chaining: A⇒D, A⇒E, A⇒F, B⇒F and C⇒F. That is eleven implications between distinct statements, out of thirty ordered pairs.

The implications. Since implication is transitive, it suffices to prove the six arrows displayed.

A⇒B: suppose A. The domain is non-empty, so pick an element b. For every x, P(x,b) holds by A, so b witnesses ∃y∀xP(x,y).

B⇒D is the theorem on quantifier order proved in the lesson.

D⇒F: suppose D. Pick an element a of the domain. By D there is a y with P(a,y), and the pair a, y witnesses F.

A⇒C, C⇒E and E⇒F are the same three arguments with the roles of x and y exchanged: C⇒E is the theorem on quantifier order applied with x and y swapped.

The non-implications. Take the domain {1,2} and four predicates.

Model 1, P(x,y) is "x=y". Then D and E are true (each element is paired with itself) and F is true, while A is false (P(1,2) fails), B is false (no y equals both 1 and 2) and so is C.

Model 2, P(x,y) is "x=1". Then C is true (x=1 works for every y), so E and F are true. But A is false, B is false (for any y, P(2,y) fails), and D is false (for x=2 no y works).

Model 3, P(x,y) is "y=1". This is Model 2 with the roles exchanged: B, D, F true, and A, C, E false.

Model 4, P(x,y) is "x=1 and y=1". Only the pair (1,1) satisfies P. Then F is true, and A, B, C, D, E are all false (D fails at x=2, E at y=2, and B, C because they imply D, E).

A model in which X is true and Y false refutes "X⇒Y". Going through the nineteen remaining ordered pairs:

  • From B (true in Model 3): B⇏A, B⇏C, B⇏E, all by Model 3.
  • From C (true in Model 2): C⇏A, C⇏B, C⇏D, all by Model 2.
  • From D: D⇏A, D⇏B, D⇏C by Model 1, and D⇏E by Model 3.
  • From E: E⇏A, E⇏B, E⇏C by Model 1, and E⇏D by Model 2.
  • From F: F implies none of A, B, C, D, E, by Model 4.

That is 3+3+4+4+5=19 non-implications, and with the eleven implications it accounts for all thirty ordered pairs. The picture is a diamond: the two "∃∀" statements sit side by side and are independent of each other, as are the two "∀∃" statements, and each "∃∀" statement implies, of the two "∀∃" statements, only the one obtained by swapping its two quantifiers.

14. Let f(x)=1x on the open interval of real numbers x with 0<x<1. Prove that f is continuous at every point of this interval, but not uniformly continuous on it. (Quantifiers over x and a now range over the interval.)

Hint

For continuity at a, first make δ≤a2 so that x stays above a2, and then bound |1x−1a|=|x−a|xa. For the failure of uniform continuity, take ε=1 and put both points very close to 0.

Solution

Write I for the interval.

Continuity at each point. Let a∈I and ε>0. Take δ to be the smaller of a2 and εa22, which is positive. Let x∈I with |x−a|<δ. Then x>a−δ≥a−a2=a2, so xa>a22>0. Therefore

|1x−1a|=|a−x|xa<δa2/2=2δa2≤ε

where the strict inequality uses |a−x|<δ together with xa>a22, and the last step uses δ≤εa22. Since ε was arbitrary, f is continuous at a, and since a was arbitrary, at every point of I.

Not uniformly continuous. We prove ∃ε>0∀δ>0∃a∈I∃x∈I(|x−a|<δ∧|f(x)−f(a)|≥ε). Take ε=1. Let δ>0, and let t be the smaller of δ and 12. Take a=t and x=t2. Both lie in I, since 0<t2<t≤12. Then |x−a|=t2<t≤δ, and

|f(x)−f(a)|=2t−1t=1t≥2≥1

because t≤12. Since δ was arbitrary, f is not uniformly continuous on I.

The δ in the first part shrinks like a2 as a approaches 0, and the second part shows this is unavoidable. The interval is bounded, so the failure comes from the missing endpoint 0, where the function is unbounded; this is why the theorem of Heine and Cantor needs a closed interval.

15. Let (an) be a sequence and L a real number. Prove that each of the following is equivalent to an→L. (a) ∀ε>0∃N∈ℕ∀n≥N(|an−L|≤ε). (b) ∀k∈ℕ∃N∈ℕ∀n≥N(|an−L|<1k). (c) ∀ε>0∃N∈ℕ∀n≥N(|an−L|<Cε), where C>0 is a fixed real number. Then show that the condition ∀ε>0∀N∈ℕ∃n≥N(|an−L|<ε) is not equivalent to an→L.

Hint

Each proof in one direction is immediate. In the other, feed the given condition a different tolerance from the one you were given: ε2, or 1k for a suitable k, or εC. For the last part, look at (−1)n.

Solution

Write (D) for the definition, ∀ε>0∃N∀n≥N(|an−L|<ε).

(a) Suppose (D), and let ε>0. By (D) there is N with |an−L|<ε for all n≥N, and then |an−L|≤ε for those n. So (a) holds. Conversely, suppose (a), and let ε>0. Apply (a) with the tolerance ε2>0: there is N with |an−L|≤ε2<ε for all n≥N. So (D) holds.

(b) Suppose (D), and let k∈ℕ. Apply (D) with ε=1k>0 to get the required N. Conversely, suppose (b), and let ε>0. By the Archimedean property there is a natural number k with k>1ε, so 1k<ε. By (b) there is N with |an−L|<1k<ε for all n≥N. So (D) holds.

(c) Suppose (D), and let ε>0. Apply (D) with the tolerance Cε>0 to get N with |an−L|<Cε for all n≥N. Conversely, suppose (c), and let ε>0. Apply (c) with the tolerance εC>0: there is N with |an−L|<C⋅εC=ε for all n≥N.

The last condition is weaker. Every convergent sequence satisfies it: given ε and N, (D) gives some N′, and n equal to the larger of N and N′ is at least N and has |an−L|<ε. But an=(−1)n with L=1 also satisfies it: given ε>0 and N, take n=2N, which is even, so |an−1|=0<ε. And (−1)n does not converge to 1, as the lesson proved. So the condition does not imply convergence. It says that terms come within ε of L infinitely often, rather than eventually for good; a number with this property is called a cluster point of the sequence, and (−1)n has two, 1 and −1.

Parts (a) to (c) are used constantly. They let a proof aim at |an−L|≤ε, or at |an−L|<3ε, and still conclude convergence, and they show that the definition does not depend on the choice between < and ≤ or on the exact scale of the tolerance.