3.3  The Gaps in the Rationals

The rationals now have everything Section 3.2 asked of them: they form an ordered field (Theorem 3.2.1), every rational lies below a natural number (Theorem 3.2.3), and no two rationals are neighbors, since their midpoint lies between them. Is anything missing? School geometry suggests an answer. The diagonal of a square with side 1 has a length whose square is 2, and no fraction seems to measure it. That picture is motivation only. This section proves the two facts behind it from the construction: no rational squares to 2, and the set of rationals whose square is below 2 has no least upper bound in Q. We also build a sequence of rationals that closes in on the gap from above without ever landing in it. A later chapter of this volume fills the gap.

3.3.1. No rational squares to two

Throughout, x2:=x⋅x, and 2:=1+1, 4=2⋅2 and so on are the natural numbers of these names, read in Q through the identifications of Sections 2.2 and 3.1; their sums, products and comparisons may be computed in N (Proposition 2.2.3, Proposition 3.1.4, Theorem 2.4.2 (a), Theorem 3.2.1 (b)).

Logic and Proof, Chapter 2 proved by parity that 2 is irrational (Logic and Proof, Theorem 2.2.1), for the school rationals. Parity is available for the constructed Z too (Corollary 2.5.3), and Exercise C1 allows it. Here we take a route that needs only the order and the least elements of Z, and that adapts to other non-squares (Exercise C2).

Theorem 3.3.1 (No Rational Squares to Two)

There is no x∈Q with x2=2.

Idea. Work backwards from a supposed square root x=p/q. This is the smallest-counterexample method (Sets and Functions, Example (Method: the smallest counterexample)) run on denominators, as in Sets and Functions, Lemma 3.2.4; here no lowest terms are needed, only a least denominator. From x2=2 we get 2−x=x2−x=x(x−1), so x=2−xx−1=2−p/qp/q−1=2q−pp−q. Since 1<x<2 (as 12<2<22), the new denominator p−q is positive and smaller than q. So no fraction for x can have a least positive denominator, while Proposition 2.4.4 says some fraction must. The written proof checks the descent with integers only: it never divides, and it verifies (2q−p)2=2(p−q)2 by expanding. Before reading on: using only integers, why is the new denominator q′:=p−q positive, and why is q′<q?

Proof. Suppose, for a contradiction, that x∈Q and x2=2. Then x≠0, since 02=0 (Proposition 2.3.2 (b)) and 2>0. By (O1), x>0 or x<0; let y:=x in the first case and y:=−x in the second. Then y>0 (Proposition 2.4.3 (a)) and y2=x2=2, because (−x)(−x)=xx (Proposition 2.3.2 (c)).

By Proposition 3.1.4 (b), y=a/b with a∈Z and b∈Z>0, and a>0 by Theorem 3.2.1 (a). By Definition 3.1.2, y2=a2/b2, and 2=2/1, so y2=2 says a2⋅1=2b2 (Proposition 3.1.4 (b)). Hence the set D:={q∈Z>0:p2=2q2 for some p∈Z>0} contains b, so it is non-empty, and 0 is a lower bound of it. By Proposition 2.4.4, D has a least element q. Choose p∈Z>0 with p2=2q2.

q<p. Suppose p≤q. Since p,q≥0, Proposition 2.4.3 (g) gives p2<q2 if p<q, and p2=q2 if p=q; so p2≤q2, that is, q2+q2≤q2, and adding −q2 (O3) gives q2≤0. But q≠0, so q2>0 by Proposition 2.4.3 (e). This contradicts (O1), so p≤q fails, and q<p by totality (Proposition 2.4.3 (i)).

p<2q. Suppose 2q≤p. Since 2q,p≥0, (g) (or equality, if 2q=p) gives (2q)2≤p2, that is, 2q2+2q2=4q2≤2q2, so 2q2≤0. But 2q2>0 by (O4). As before, p<2q.

Descent. Let p′:=2q−p and q′:=p−q, integers. By Proposition 2.4.3 (a), p<2q gives p′>0, and q<p gives q′>0; so p′,q′∈Z>0 (Theorem 2.4.2 (b)). Adding −q to p<2q (O3) gives q′=p−q<q. Expanding with Proposition 2.3.2 (c) and (d), p′2−2q′2=(4q2−4pq+p2)−(2p2−4pq+2q2)=2q2−p2=0. So p′2=2q′2 with p′∈Z>0, that is, q′∈D. But q′<q, and q is the least element of D. This contradiction shows that no x∈Q has x2=2.

The answer to the prompt: q′=p−q>0 because q<p, and q′<q because p<2q. These are the two inequalities “1<x<2” of the Idea, written for integers. The hypothesis p2=2q2 is used in each of the three steps, and the minimality of q only once, in the final contradiction.

Quick check. Run the descent on p=2, q=1, a pair with p2=4q2. Which step fails, and why must it?

Solution. The step p<2q fails: 2q≤p now gives 4q2≤p2=4q2, no contradiction, and indeed p=2q. Then p′=2q−p=0 is not positive and q′=p−q=1 is not below q (and p′2−2q′2=−2). A descent must fail here, since 22=4.

3.3.2. The set below the gap

Sets and Functions, Section 5.3 stated, without proof, that the set of positive rationals with square below 2 has no least upper bound in Q, and pointed out that the ambient set decides whether a supremum exists. We now prove it. By Proposition 2.4.3 (i) and Theorem 3.2.1, ≤ is a total order on Q, so (Q,≤) is a partially ordered set and the words of Sets and Functions, Section 5.3 apply: upper bounds (Sets and Functions, Definition 5.3.2) and a supremum, an upper bound s with (S1) x≤s for every x in the set and (S2) s≤u for every upper bound u (Sets and Functions, Definition 5.3.5).

Theorem 3.3.2 (A Bounded Set of Rationals with No Rational Supremum)

Let A:={x∈Q:x2<2},A+:={x∈A:x>0}={x∈Q:x>0, x2<2}.

  • (a) A is non-empty and bounded above in (Q,≤), but A has no supremum in Q.
  • (b) A and A+ have the same upper bounds in Q. Hence A+ is also non-empty and bounded above, and has no supremum in Q.

Try it first (ten minutes): a rational s>0 is offered as supA. Find a rational that proves the offer wrong, once in the case s2<2 and once in the case s2>2.

Idea (Scratch work). Suppose a rational s is the supremum. Unwind what that gives and what would refute it.

Givens Goal
s is a supremum of A: (S1) and (S2) a contradiction
1∈A, so s≥1>0; s2≠2 by Theorem 3.3.1 split by trichotomy: s2<2 or s2>2
s2<2 an element of A above s, against (S1)
s2>2 an upper bound of A below s, against (S2)

If s2<2, we need an element of A above s. The obvious try is s+h with h>0 small, but (s+h)2=s2+2sh+h2 has an h2 in it, and taming that needs a separate size estimate on h. If s2>2, we need a smaller upper bound, and a guess s−h runs into the same algebra.

A cleaner idea finds the new rational in one formula. If s2>2, then 2/s<s and (2/s)2=4/s2<2: the gap lies between 2/s and s. Their average t(s):=12(s+2s)=s2+22s is smaller than s, and its square is still above 2; that is the smaller upper bound. If s2<2, apply the same trick from the other side: t(s) overshoots, so u(s):=2/t(s)=4s/(s2+2) undershoots, and it lands above s. Each claim is an identity in the field Q, checked by clearing denominators.

Proof.

  • (a) Non-empty: 12=1<2, so 1∈A. Bounded above: 2 is an upper bound. Indeed, let x∈A, and suppose x>2. Then 0≤2<x, so 4=22<x2 by Proposition 2.4.3 (g), and 2<4, so 2<x2, against x2<2 by (O1). So x≤2, by totality.

    Two maps. For s∈Q>0, we have 2s>0 by (O4), and s2+2>0 by Proposition 2.4.3 (e) and (b); both are non-zero. Let t(s):=s2+22s,u(s):=4ss2+2. Both are rationals, and both are positive, by Proposition 3.2.2 (a) and (O4). They satisfy

    t(s)2−2=(s2−2)24s2,s−t(s)=s2−22s,u(s)−s=s(2−s2)s2+2,2−u(s)2=2(s2−2)2(s2+2)2.
    (3.3.1)

    Each identity is checked by clearing its non-zero denominator.

    Second readingChecking the four identities

    Multiply both sides of each identity by its denominator, which is non-zero, so that the multiplication can be undone with the inverse. For the first, 2s⋅t(s)=s2+2, so 4s2(t(s)2−2)=(s2+2)2−8s2=s4−4s2+4=(s2−2)2. For the second, 2s(s−t(s))=2s2−(s2+2)=s2−2. For the third, (s2+2)(u(s)−s)=4s−s3−2s=s(2−s2). For the fourth, (s2+2)2(2−u(s)2)=2(s2+2)2−16s2=2(s2−2)2.

    No supremum. Suppose, for a contradiction, that s∈Q is a supremum of A. By (S1) and 1∈A, s≥1>0, so s∈Q>0. By Theorem 3.3.1, s2≠2, so by (O1), s2<2 or s2>2. In both cases s2−2≠0, so (s2−2)2>0 by Proposition 2.4.3 (e).

    Case 1: s2<2. Then 2−s2>0, and the third identity of Eq. 3.3.1 exhibits u(s)−s as a product of positive elements (with Proposition 3.2.2 (a) for the reciprocal), so u(s)>s. The fourth gives 2−u(s)2>0, so u(s)2<2 and u(s)∈A. So A has an element u(s)>s, and s is not an upper bound of A, against (S1).

    Case 2: s2>2. The first identity gives t(s)2−2>0, so t(s)2>2. Then t(s) is an upper bound of A: if some x∈A had x>t(s), then 0<t(s)<x would give 2<t(s)2<x2 by Proposition 2.4.3 (g), against x2<2; so x≤t(s) for every x∈A. By (S2), s≤t(s). But the second identity, with s2−2>0 and 2s>0, gives s−t(s)>0, that is, t(s)<s. Then t(s)<s≤t(s), so t(s)<t(s), against (O1).

    Both cases are impossible, so A has no supremum in Q.

  • (b) Every upper bound of A bounds A+⊆A. Conversely, if u bounds A+, then u≥1>0, since 1∈A+; and an x∈A is either positive, so x∈A+ and x≤u, or x≤0<u. So A and A+ have the same upper bounds. Conditions (S1) and (S2) mention only the set of upper bounds, so by (a), A+ has no supremum. It contains 1 and is bounded above by 2.

Quick check. Compute u(1/2) and t(3), and say what each refutes.

Solution. u(1/2)=2/(9/4)=8/9, and (8/9)2=64/81<2, so 8/9∈A lies above 1/2: 1/2 is not an upper bound. t(3)=11/6, and (11/6)2=121/36>2 (121>72), so 11/6 is an upper bound below 3: 3 is not the least.

The set A+ is the set of Sets and Functions, Section 5.3, so (b) is the statement left unproved there. Analysis on the Real Line, Chapter 1 proves it again and then shows that A+ has a supremum in the real numbers: that is the sense of “gap”.

Warning. “A has no supremum in Q, so A is unbounded” mixes up the two conditions a supremum needs. A is bounded above, by 2 for instance; what fails is (S2): among the rational upper bounds there is no least one, because every upper bound s is beaten by the smaller upper bound t(s).

Quick check. In Q, is 3/2 the supremum of {x∈Q:x2<9/4}? Which step of the proof of (a) fails for this set?

Solution. Yes. (S1): x>3/2>0 gives x2>9/4 (Proposition 2.4.3 (g)), so every element of the set is at most 3/2. (S2): if v<3/2 bounded the set, let w be the larger of v and 1, and c the midpoint of w and 3/2 (Section 3.2); then 0<c<3/2, so c2<9/4 and c is in the set, and c>w≥v. The step that fails is “s2≠2”: here s2=9/4 is the target value, the third case of the trichotomy, which neither t nor u refutes.

3.3.3. A rational sequence aimed at the gap

The map t does more than refute a candidate. Started at an upper bound, it produces a smaller one, and it can be applied again. Iterating it gives a sequence of rationals that approaches the gap from above.

Example (A Rational Sequence Aimed at the Gap)

For s∈Q>0 let t(s):=(s2+2)/(2s). Define x0:=2 and xn+1:=t(xn) for n∈N, and let en:=xn2−2. Show that this defines a sequence with xn∈Q>0 for every n∈N, and that for every n∈N:

  • (i) en>0, that is, xn2>2;
  • (ii) en+1=en2/(4xn2)≤en2/8;
  • (iii) xn−xn+1=en/(2xn)>0, so xn+1<xn.

Compute x0,…,x3 and e0,…,e3.

Solution. The sequence. For s∈Q>0, s2+2>0 and 2s>0, so t(s)∈Q>0 by (O4) and Proposition 3.2.2 (a): t maps Q>0 to Q>0. The recursion theorem (Sets and Functions, Theorem 3.3.1, which holds on N by Corollary 1.4.3 (b)), with X=Q>0, starting value 2 and g(n,s):=t(s), gives exactly one function n↦xn from N to Q>0 with x0=2 and xn+1=t(xn). So every xn is a positive rational, with no further argument.

(i). We use Logic and Proof, Axiom 4.2.1 (on N by Corollary 1.4.3 (b)) for P(n): en>0. Base P(0): e0=22−2=2>0. Step: suppose en>0. By the first identity of Eq. 3.3.1 with s=xn, en+1=t(xn)2−2=en24xn2. Here en2>0 by Proposition 2.4.3 (e), since en≠0, and 1/(4xn2)>0 by Proposition 3.2.2 (a); so en+1>0 by (O4). This proves (i) for every n.

(ii). The equation was just shown, for every n. By (i), xn2>2, so 4xn2>4⋅2=8 by Proposition 2.4.3 (c). From 0<8<4xn2, Proposition 3.2.2 (b) gives 1/(4xn2)<1/8, and multiplying by en2>0 (Proposition 2.4.3 (c)) gives en+1<en2/8; in particular en+1≤en2/8.

(iii). By the second identity of Eq. 3.3.1 with s=xn, xn−xn+1=en/(2xn), a product of the positive elements en and 1/(2xn); so it is positive, and xn+1<xn by Proposition 2.4.3 (a).

The first terms. By the definition of t, x1=4+24=32,x2=9/4+23=1712,x3=289/144+217/6=577408. The errors are e0=2, e1=9/4−2=1/4, e2=289/144−2=1/144 and e3=5772/4082−2=1/166464, since 5772=332929=2⋅166464+1 and 4082=166464. As a check on (ii): e1=22/(4⋅4)=1/4, e2=(1/16)/9=1/144, and e3=(1/144)2/(4⋅289/144)=1/(144⋅1156)=1/166464.

For orientation only (decimals are not part of this volume’s toolkit), here are the terms in school decimals:

n xn en=xn2−2 xn, roughly
0 2 2 2
1 3/2 1/4 1.5
2 17/12 1/144 1.41667
3 577/408 1/166464 1.414216

The terms decrease, each is an upper bound of A (Case 2 of the proof above), and by (ii) the error is roughly squared at each step: e3=1/166464. Yet no rational L can be “the number they approach”: the squares would approach L2, the errors force L2=2, and Theorem 3.3.1 forbids that. This is a picture, not a proof, since limits in Q are not defined yet. Chapter 4 defines them, with ε∈Q>0, and proves that this sequence is Cauchy in Q with no limit in Q, citing (i)–(iii).

Quick check. Is 3/2 an upper bound of A={x∈Q:x2<2}? Is 17/12? Is 4/3?

Solution. The first two are. Each is positive, and (3/2)2=9/4>2 because 9>8, while (17/12)2=289/144>2 because 289>288 (the comparison formula, Theorem 3.2.1 (a)). A positive rational b with b2>2 bounds A: if x∈A had x>b, then x2>b2>2 by Proposition 2.4.3 (g), against x2<2.

But 4/3 is not, although it is positive: (4/3)2=16/9<2 because 16<18, so the hypothesis b2>2 fails, and indeed 7/5∈A, as (7/5)2=49/25<2 (49<50), while 7/5>4/3 (21>20).

Chapters 2 and 3 built two number systems by one method. From N to Z: pairs (a,b), identified when a+d=b+c, so that subtraction becomes possible. From Z to Q: pairs (p,q) with q>0, identified when ps=rq, so that division becomes possible. Chapter 5 takes the third step, from Q to the real numbers, by the same route: the representatives are sequences of rationals like the one above, identified when their difference tends to 0.

3.3.4. Exercises

A. Check your understanding

Exercise (A1)

These questions are about the proof of Theorem 3.3.2.

  • (a) Where is Theorem 3.3.1 used, and what would go wrong without it?
  • (b) Run the proof on s=3/2 and on s=7/5: which case applies, which rational does the proof produce, and why does it refute s?
  • (c) Let F be an ordered field containing an element r>0 with r2=2, and let AF:={x∈F:x2<2}. Which step of the proof fails for AF, and what happens to t(r) and u(r)?
  • (d) State the idea of the proof in two sentences.

Solution.

  • (a) Once, right after a supposed supremum s is fixed: it excludes s2=2, so that trichotomy leaves the two cases s2<2 and s2>2. Without it there is a third case, in which neither map helps: (s2−2)2=0, so the identities give u(s)=s and t(s)=s.

  • (b) For s=3/2: s2=9/4>2 (as 9>8), so Case 2. The proof produces t(3/2)=(9/4+2)/3=17/12, an upper bound of A, since (17/12)2=289/144>2; and 17/12<3/2, since 17⋅2=34<36=3⋅12. So 3/2 is not the least upper bound. For s=7/5: s2=49/25<2 (as 49<50), so Case 1. The proof produces u(7/5)=28/549/25+2=28/599/25=14099, which lies in A, since 1402=19600<19602=2⋅992, and exceeds 7/5, since 140⋅5=700>693=7⋅99. So 7/5 is not an upper bound.

  • (c) The step “s2≠2”: in F the candidate s=r satisfies r2=2, and it falls in neither case. Indeed r is the supremum of AF in F: it is an upper bound (if x>r>0, then x2>2), and an upper bound v<r would have v>0 (as 1∈AF) and v2<2, and then u(v)∈AF with u(v)>v, as in Case 1. The maps fix r: t(r)=(2+2)/(2r)=2/r=r, since r⋅r=2, and u(r)=4r/4=r.

  • (d) Suppose a rational s were the supremum; since no rational squares to 2, either s2<2 or s2>2. The explicit rationals u(s) and t(s) then give, respectively, an element of the set above s or an upper bound below s, so s fails (S1) or (S2).

B. Practice

Exercise (B1: Put the proof in order)

Here are lines of a proof of Theorem 3.3.1, shuffled, together with two lines that do not belong. Write the lines of a correct proof in a correct order, and say what is wrong with each line you leave out.

  • (i) Set p′:=2q−p and q′:=p−q; both are positive integers, by the two inequalities between p and q.

  • (ii) Write x=a/b with a,b∈Z>0; then a2=2b2.

  • (iii) Since p2=2q2, we have p<q.

  • (iv) Since q′=p−q<q, this contradicts the choice of q; so no rational squares to 2.

  • (v) Suppose x∈Q has x2=2; replacing x by −x if necessary, take x>0.

  • (vi) p<2q, since p≥2q would give p2≥4q2>2q2.

  • (vii) Choose such an x with the least positive value.

  • (viii) Among all pairs (p,q) of positive integers with p2=2q2, choose one with q least (Proposition 2.4.4; b is such a q).

  • (ix) Expanding, p′2−2q′2=2q2−p2=0, so p′2=2q′2.

  • (x) q<p, since p≤q would give 2q2=p2≤q2, that is, q2≤0.

Solution. An admissible order is (v), (ii), (viii), (x), (vi), (i), (ix), (iv). Lines (x) and (vi) may be exchanged, since neither uses the other. Otherwise the order is forced by what each line uses: (ii) needs the x>0 of (v); (viii) needs the pair (a,b) of (ii), which makes the set of such q non-empty; (x) and (vi) are about the pair fixed in (viii), and if they came before it, the pair might change afterwards; (i) needs both inequalities; (ix) needs the definitions in (i); and (iv) needs q′∈Z>0 with p′2=2q′2, from (i) and (ix), and q′<q, which comes from (vi).

Line (vii) is legal but does no work. There is only one positive rational x with x2=2: if 0<x<y had x2=y2=2, then Proposition 2.4.3 (g) would give 2=x2<y2=2, against (O1). So “the least” just picks out the x of (v) and gives nothing new. The descent does not produce a smaller x: it keeps the number and shrinks its denominator, p′/q′=p/q, so choosing x least never leads to a contradiction. What must be least is the denominator q, as in (viii).

Line (iii) fails. Its conclusion is false: from p2=2q2 and q>0 we get p2>q2, hence q<p by Proposition 2.4.3 (g), the opposite of (iii). It also clashes with (x).

Exercise (B2: Prove or disprove)

Prove or disprove each statement.

  • (a) There is no x∈Q with x2=8.
  • (b) For all x,y∈Q, if x2<y2, then x<y.
  • (c) If s∈Q, s>0 and s2>2, then (2/s)2<2.
  • (d) If s∈Q, s>0 and s2<2, then (s+1/10)2<2.

Solution.

  • (a) True. If x2=8, then y:=x/2 has y2=x2/4=2 (Definition 3.1.2), against Theorem 3.3.1.

  • (b) False: x=1, y=−2 give x2=1<4=y2, but 1>−2. (Rule (g) of Proposition 2.4.3 needs 0≤x and 0≤y.)

  • (c) True. (2/s)2=4/s2. From s2>2>0, Proposition 3.2.2 (b) gives 1/s2<1/2, and multiplying by 4>0 (Proposition 2.4.3 (c)) gives 4/s2<2. (So the map s↦2/s carries upper bounds of A+ into A+; the proof’s u(s) improves on it.)

  • (d) False: s=7/5 has s2=49/25<2 (49<50), but s+1/10=3/2 and (3/2)2=9/4>2 (9>8). A fixed step can overshoot; the proof’s u(s) is chosen from s.

Exercise (B3)

Compute x4 of Example (A Rational Sequence Aimed at the Gap), as a fraction of integers, and e4=x42−2. Check your value of e4 against (ii) of the example. Hence x4 is an upper bound of {x∈Q:x2<2} below x3.

Solution. With x3=577/408, x4=t(x3)=5772+2⋅40822⋅577⋅408=332929+332928470832=665857470832. Then 6658572=443365544449 and 4708322=221682772224, and 443365544449−2⋅221682772224=1, so e4=1221682772224. By (ii), e4=e32/(4x32)=1/(166464⋅4⋅332929), and 4⋅166464⋅332929=221682772224, which agrees. Since x4>0 and e4>0, x4 bounds the set (the argument of the Quick check after the table), and x4<x3 by (iii).

C. Going deeper

Exercise (C1: Exit check: the gap at 2)

Prove that no rational number squares to 2, and that the set {x∈Q:x2<2} has no supremum in Q.

Solution. No rational squares to 2. Suppose x∈Q with x2=2. Then x≠0, and replacing x by −x if needed ((−x)2=x2), x>0. Write x=a/b with a,b∈Z>0 (Proposition 3.1.4 (b), Theorem 3.2.1 (a)); then a2=2b2. Among all q∈Z>0 for which some p∈Z>0 has p2=2q2, take the least (Proposition 2.4.4; the set contains b and is bounded below by 0), with its p. Then q<p (else p2≤q2 by Proposition 2.4.3 (g), so q2≤0, against q2>0) and p<2q (else 4q2≤p2=2q2, so 2q2≤0). So p′:=2q−p and q′:=p−q are positive integers with q′<q, and p′2−2q′2=2q2−p2=0 by expanding. This contradicts the choice of q.

Bounded above. 2 bounds the set A: x>2 would give x2>4>2 (Proposition 2.4.3 (g)). And 1∈A.

No supremum. Suppose s∈Q is a supremum of A. As 1∈A, s≥1>0, and s2≠2 by the first part.

If s2<2, let u:=4s/(s2+2)∈Q>0. By the third and fourth identities of Eq. 3.3.1, u−s>0 and 2−u2>0. So u∈A and u>s: s is not an upper bound.

If s2>2, let t:=(s2+2)/(2s)∈Q>0. By the first and second identities of Eq. 3.3.1, t2−2>0 and s−t>0. So t2>2, and t bounds A (an x∈A with x>t>0 would have x2>t2>2); and t<s. So s is not the least upper bound.

By trichotomy one of the two cases holds, and each contradicts the choice of s. So A has no supremum in Q.

Marking scheme. (10 points) - 4: no rational squares to 2: a least denominator, or another correct route (1); q<p<2q, or the parity step (2); the contradiction (1). - 1: shows 1∈A, so that a supremum s satisfies s≥1>0 (an upper bound of A is optional). - 2: the case s2<2: an explicit element of A larger than s, with both properties verified. - 2: the case s2>2: an explicit smaller rational, verified to be an upper bound of A. - 1: concludes by trichotomy, with s2=2 excluded by the first part. Fatal errors (0 for the step): assuming that 2 exists (in Q or in a larger field) and comparing s with it; “s2<2, so s+ε∈A for small ε” with no ε exhibited and checked. A correct parity route (every integer is 2m or 2m+1, and not both, Corollary 2.5.3 (a)) earns the same 4 points.

Exercise (C2: Which integers have a rational square root?)

For which n∈Z>0 does the set An:={x∈Q:x2<n} have a supremum in Q? Prove your answer.

Solution (Hint 1). First find k∈N with k2≤n<(k+1)2, and treat n=k2 on its own. For k2<n, adapt both proofs of this section: the descent, and then the two maps.

Solution (Hint 2). Let T:={m∈Z:m≥0, n<m2}. It contains n+1, it is bounded below by 0, and 0∉T; so its least element is k+1 for some k∈N. In the descent for k2<n, try q′:=p−kq.

Solution. Answer: exactly when n=k2 for some k∈N, and then the supremum is k.

Finding k. Let T:={m∈Z:m≥0, n<m2}. Since n+1≥1, (n+1)2≥n+1>n (Proposition 2.4.3 (c)), so n+1∈T; 0 is a lower bound of T; and 0∉T, as 02=0<n. By Proposition 2.4.4, T has a least element l. Since 0∉T and l≥0, we have l>0, so l≥1 by discreteness (Theorem 2.4.2 (c)); then l−1≥0 by (O3), so k:=l−1∈N by Theorem 2.4.2 (b). Then n<(k+1)2, and k∉T with k≥0 gives k2≤n. So either n=k2 or k2<n<(k+1)2.

Case n=k2. Here k≥1, since n≥1. We show k=supAn. (S1): if x∈An had x>k, then x>k≥0 would give x2>k2=n (Proposition 2.4.3 (g)), against x2<n; so x≤k. (S2): let v be an upper bound of An, and suppose v<k. Let w:=v if v≥0 and w:=0 otherwise; then v≤w and 0≤w<k. Let c be the midpoint of w and k (Section 3.2): w<c<k. Then c>0 and c2<k2=n by (g), so c∈An, and c>w≥v, so v is not an upper bound. Hence k≤v for every upper bound v, and k is the supremum.

Case k2<n<(k+1)2. Then n≥2, since n=1=12 is the other case; so 1∈An.

  • (i) No rational squares to n. Suppose x2=n with x∈Q; as in Theorem 3.3.1, we may take x>0, and then p2=nq2 for some p,q∈Z>0, with q least among all such denominators (Proposition 2.4.4). Multiplying k2<n<(k+1)2 by q2>0 gives (kq)2<p2<((k+1)q)2, so kq<p<(k+1)q by (g). Let p′:=nq−kp,q′:=p−kq. Then 0<q′<q. For p′, expand: q⋅p′=nq2−kpq=p2−kpq=p(p−kq)>0 by (O4); since q>0, p′≤0 would give qp′≤0 (Proposition 2.4.3 (c)), so p′>0. Finally, expanding, p′2−nq′2=(k2−n)(p2−nq2)=0, so q′ is a smaller admissible denominator, a contradiction.

  • (ii) No supremum. The proof of Theorem 3.3.2 (a) goes through with n in place of 2, using (i) where it used Theorem 3.3.1, and An contains 1 and is bounded above by n. For s∈Q>0, let t(s):=s2+n2s,u(s):=2nss2+n. Clearing denominators as before gives the four identities t(s)2−n=(s2−n)24s2,s−t(s)=s2−n2s,u(s)−s=s(n−s2)s2+n,n−u(s)2=n(s2−n)2(s2+n)2. So An has a supremum in Q exactly when n is the square of a natural number.

Marking scheme. (10 points) - 2: produces k∈N with k2≤n<(k+1)2, from a least element. - 2: the case n=k2: checks (S1) and (S2) for k. - 3: the case k2<n: no rational squares to n, by a descent with a least denominator (or another correct route), including a proof that the new numerator is positive. - 2: the two maps (or any explicit rationals) and the two cases, as in the proof for 2. - 1: states the answer: exactly the squares of natural numbers. Fatal errors (0 for the step): using a square root of n, or the floor of one, as if it existed; deducing nq−kp>0 from kq<p<(k+1)q alone, which fails for n=5, k=2, q=10, p=28.

R. Review

Exercise (R1)

Recall that an integer is a class [(a,b)] of pairs of natural numbers, with (a,b)∼(c,d) if and only if a+d=b+c. For (a,b)∈N×N, let f(a,b):=(a,b) if b≤a, and f(a,b):=(b,a) if a<b. Does [(a,b)]↦[f(a,b)] define a function Z→Z? Prove your answer, and say which integer it assigns to x≥0 and to x<0.

Solution. Yes. By Theorem 2.2.1 (a), with X=Y=N×N, it suffices to show that (a,b)∼(c,d) implies f(a,b)∼f(c,d) (the representative check, Sets and Functions, Example (Method: checking that a definition on classes is well defined)). Let a+d=b+c, and x:=[(a,b)]=[(c,d)].

The cases match. x∈PZ if and only if b<a, whichever representative is used (the well-definedness paragraph after Definition 2.4.2), and x=0 if and only if a=b, since (a,b)∼(0,0) means a=b. So b≤a⟺(x∈PZ or x=0)⟺d≤c.

Hence either b≤a and d≤c, and then f(a,b)=(a,b)∼(c,d)=f(c,d); or a<b and c<d, and then f(a,b)=(b,a), f(c,d)=(d,c), and b+c=a+d says (b,a)∼(d,c).

Since x≥0 if and only if b≤a, and −[(a,b)]=[(b,a)] (Definition 2.2.1), the function sends x to x if x≥0 and to −x if x<0: it is the familiar x↦|x|.

Exercise (R2)

Show that the set Q, as constructed in this chapter, is countable.

Solution. The tools are the results on countable sets of Sets and Functions, Chapter 4, which run on N by the citing rule after Corollary 1.4.3 (group (i) for Sets and Functions, Proposition 4.2.3 and Sets and Functions, Proposition 4.2.4; group (ii), citable in review exercises, for Sets and Functions, Theorem 4.2.6 and Sets and Functions, Corollary 4.2.7 (a)).

Z is countable. N×N is countable (Sets and Functions, Theorem 4.2.6). The map a↦[a], from N×N to Z=(N×N)/∼, is surjective, since every class is the class of each of its elements (Sets and Functions, Definition 5.2.4). By Sets and Functions, Proposition 4.2.4, Z is countable.

Z×Z>0 is countable. Z>0⊆Z is countable by Sets and Functions, Proposition 4.2.3, and the product of two countable sets is countable (Sets and Functions, Corollary 4.2.7 (a)).

Q is countable. The map (p,q)↦[(p,q)], from Z×Z>0 to Q, is surjective (Sets and Functions, Definition 5.2.4), so Q is countable by Sets and Functions, Proposition 4.2.4.

The conclusion is Sets and Functions, Theorem 4.2.8 for the constructed Q; that theorem, about the school rationals, is not used.

Exercise (R3)

Let A:={x∈Q:x2<2} and s∈Q. Write “s is a supremum of A in Q” in symbols, with bounded quantifiers. Then write its negation, moving ¬ inward as far as it goes and naming the law used at each step. The proof that A has no supremum in Q has two cases; which half of the negation does each case establish, and with which witness?

Solution. By Sets and Functions, Definition 5.3.5, “s is a supremum of A” is the conjunction of (S1) and (S2): (∀x∈A  x≤s) ∧ ∀v∈Q ((∀x∈A  x≤v)→s≤v). Its negation is, by Logic and Proof, Proposition 2.5.5 (d), ¬(∀x∈A  x≤s) ∨ ¬∀v∈Q ((∀x∈A  x≤v)→s≤v). By Logic and Proof, Proposition 6.2.3 (a), the first disjunct becomes ∃x∈A ¬(x≤s), that is, ∃x∈A  s<x (totality of ≤, Proposition 2.4.3 (i)). By Logic and Proof, Proposition 6.2.3 (a) and then Logic and Proof, Proposition 6.2.2, the second becomes ∃v∈Q ((∀x∈A  x≤v)∧¬(s≤v)), that is, there is an upper bound v of A with v<s. In words: s fails to be the supremum when some element of A lies above s, or some upper bound lies below s.

In the proof of Theorem 3.3.2, Case 1 (s2<2) establishes the first disjunct, with witness x=u(s)=4s/(s2+2). Case 2 (s2>2) establishes the second, with witness v=t(s)=(s2+2)/(2s). (The proof itself needs no negation law: it derives a contradiction from (S1) in Case 1 and from (S2) in Case 2.)

Exercise (R4)

Is there a rational number x with x3=2, where x3:=x2⋅x? Prove your answer.

Solution. No. The tool is descent on the denominator, as in Theorem 3.3.1, run with parity.

Parity. Every integer is 2m or 2m+1 for some m∈Z, and not both (Corollary 2.5.3 (a)). An odd cube is odd: (2m+1)3=2(4m3+6m2+3m)+1.

Descent. Suppose x∈Q and x3=2. Then x>0: x=0 gives x3=0, and x<0 gives x2>0 and x3=x2⋅x<0 (Proposition 2.4.3 (e), (c)). So x=p/q with p,q∈Z>0 and p3=2q3 (Proposition 3.1.4 (b), Definition 3.1.2). Take q least among such denominators (Proposition 2.4.4), with its p. Since p3=2q3 has the even form, p is not odd (its cube would be odd), so p=2m with m∈Z, and m>0 because p>0 (m≤0 would give 2m≤0). Then 2q3=8m3, and canceling the non-zero factor 2 (Proposition 2.4.3 (f)), q3=2(2m3). So q is not odd either: q=2l with l∈Z>0. Then 8m3=2⋅8l3, so m3=2l3, and l<l+l=q. So l is a smaller admissible denominator, with m∈Z>0: a contradiction.

Why the look-alike fails. The substitution p′:=2q−p, q′:=p−q of the square-root proof came from x=(2−x)/(x−1), which used x2=2. For cubes the same algebra fails: expanding, (2q−p)3−2(p−q)3=−3p3+12p2q−18pq2+10q3, which is not a constant multiple of p3−2q3 (it has a p2q term), so this identity gives no way to derive p′3=2q′3 from p3=2q3, and the descent has no smaller pair to move to. Parity, by contrast, works for every power: “even cube, so even base” is the same argument for squares and cubes.