3.1  The Rationals as Classes of Fractions

Chapter 2 built Z and made it an ordered commutative ring, but not a field: 2x=1 has no solution in Z (Quick check in Section 2.4). This section repairs that defect with the move of Section 2.1, used a second time. There a pair (a,b) recorded “a−b” without performing it; here a pair (p,q) records “p divided by q” without performing it. We define Q as a set of classes of such pairs, give it addition and multiplication through representatives, check that they are well defined, and prove that Q is a field containing a copy of Z.

3.1.1. Fractions as pairs

Before reading on. The pairs (1,2) and (2,4) are different elements of Z×Z>0, yet both should name one half. Which condition on two pairs (p,q) and (r,s) says “same quotient”, using only operations that Z already has?

At school, 12, 24 and 36 are “the same number”, and the test for sameness is cross-multiplication: pq=rs when ps=rq. The test is the useful part. It mentions only multiplication of integers, which we have, and not division, which we do not. So we keep the test and let a rational number be what the equivalent fractions have in common: the class of all of them.

A rational number is a quotient you have not computed yet: the set of all fractions that would compute to it.

Signs need a decision. The fractions 1−2 and −12 name the same number, and allowing both would put a sign in two places. We require the denominator to be positive, so that a sign can sit only in the numerator. This is the convention Sets and Functions, Section 5.2 already used for its fractions, and Section 3.2 below will profit from it: there, the order of Q is read off a single inequality between integers. Recall that Z>0={n∈Z:n>0}, by Theorem 2.4.2 (b).

On Z×Z>0, let (p,q)∼(r,s) mean ps=rq. We reuse the symbol ∼ of Section 2.1; which relation is meant is always clear from the pairs, natural numbers there and an integer with a positive integer here.

Proposition 3.1.1 (Cross-Multiplication Is an Equivalence Relation)

The relation ∼ on Z×Z>0 given by (p,q)∼(r,s)⟺ps=rq is an equivalence relation (Sets and Functions, Definition 5.2.1).

Idea. Reflexivity and symmetry are just reflexivity and symmetry of =: with this form of the test, (p,q)∼(p,q) reads pq=pq. For transitivity we are given ps=rq and ru=ts, and want pu=tq. Multiply the first equation by u and use the second to replace ru: this gives (pu)s=(tq)s. We cannot divide by s, but Z has no zero divisors, so a factor s≠0 can be canceled.

Proof. Let (p,q),(r,s),(t,u)∈Z×Z>0. All computations are in the commutative ring Z (Theorem 2.3.1).

(Eq1) pq=pq, so (p,q)∼(p,q).

(Eq2) If ps=rq, then rq=ps, so (r,s)∼(p,q).

(Eq3) Let ps=rq and ru=ts. Then, using (F5), (F6) and the two hypotheses, (pu)s=(ps)u=(rq)u=(ru)q=(ts)q=(tq)s. Hence (pu−tq)s=(pu)s−(tq)s=0, by (F9) and Proposition 2.3.2 (c). Since s∈Z>0, s>0, so s≠0 by (O1). By Proposition 2.4.3 (f), pu−tq=0, that is, pu=tq. So (p,q)∼(t,u). This proves the proposition.

The hypothesis that denominators are non-zero is used once, for the middle pair (r,s), and it is needed there. On Z×N, with the same formula, (1,0)∼(0,0) (since 1⋅0=0⋅0) and (0,0)∼(1,1) (since 0⋅1=1⋅0), but (1,0)≁(1,1) (since 1⋅1≠1⋅0). The pair (0,0) is related to everything, and transitivity collapses through it. Sets and Functions, Section 5.2 met the same failure in an exercise; it is why denominators must be non-zero.

Definition 3.1.1 (The Rational Numbers)

Let ∼ be the equivalence relation of Proposition 3.1.1 on Z×Z>0. The set of rational numbers is the quotient set (Sets and Functions, Definition 5.2.4) Q:=(Z×Z>0)/∼. A rational number is an element of Q: a class [(p,q)] with p∈Z and q∈Z>0. We call p a numerator and q a denominator of the representative (p,q).

In words: a rational number is a set of pairs, all the pairs (r,s) with positive s that cross-multiply with (p,q). It is not a pair, and it is not a number with a sign and a bar. Numerators and denominators belong to representatives, not to the class: (1,2) and (2,4) represent the same rational number with different denominators. Nothing in the definition needs checking beyond Proposition 3.1.1, which makes the quotient set meaningful. By Sets and Functions, Theorem 5.2.1, every pair lies in exactly one class, and [(p,q)]=[(r,s)] holds exactly when ps=rq.

Examples.

  • [(1,2)]={(k,2k):k∈Z>0}. Indeed, (r,s)∼(1,2) means 2r=s. Then 2r>0, and r≤0 would give 2r=r+r≤0 (Proposition 2.4.3 (b)), so r>0. Conversely each (k,2k) with k>0 has 2k>0 and k⋅2=2k⋅1. Its elements with denominator at most 6 are (1,2), (2,4), (3,6).
  • [(−2,1)]={(−2s,s):s∈Z>0}, since (r,s)∼(−2,1) means r=−2s. This is the class that will be the integer −2.
  • The degenerate case: [(0,1)]={(0,s):s∈Z>0}, since (r,s)∼(0,1) means r⋅1=0⋅s=0. Every fraction with numerator 0 lies in this one class, whatever its denominator; it will be the zero of Q.
  • [(2,3)] contains (4,6) and (6,9), since 2⋅6=4⋅3 and 2⋅9=6⋅3. It does not contain (−4,−6), which is not even an element of Z×Z>0. Describing the whole class needs lowest terms, proved in Preliminaries for Analysis and Algebra, Chapter 2.

Why positive denominators? Non-zero denominators of either sign give a set in bijection with Q, with matching classes (Exercise C3). The difference appears with the order: with positive denominators, “[(p,q)] is positive” can mean “p>0”, one inequality in Z; Section 3.2 shows what breaks otherwise.

Warning. Do not read [(p,q)] as the number p/q. There is no division in Z, and Q has no multiplication yet, so “p/q” means nothing at this point. The class is a set of pairs, and any statement made with one representative, such as “the denominator of [(1,2)] is 2”, must be checked against all of them (here it fails: (2,4) is also in the class). The fraction notation becomes honest once Z is placed inside Q, in Proposition 3.1.4 and the identification that follows it.

Quick check. Is (3,4)∼(−6,−8) in Z×Z>0?

Solution. The question is malformed: −8∉Z>0, so (−6,−8) is not an element of Z×Z>0, and ∼ says nothing about it.

3.1.2. Adding and multiplying classes

The school rules pq+rs=ps+rqqs and pq⋅rs=prqs are a heuristic for the definition, nothing more; the definition below does not depend on them, and the proofs never use them.

Definition 3.1.2 (Operations on the Rationals)

For [(p,q)],[(r,s)]∈Q, define +[(r,s)]:=[(ps+rq, qs)],[(p,q)]⋅[(r,s)]:=[(pr, qs)],−[(p,q)]:=[(−p, q)].

The right-hand sides are classes of elements of Z×Z>0: since q>0 and s>0, qs>0 by (O4), so qs∈Z>0 by Theorem 2.4.2 (b). Each formula is computed from chosen representatives, so the definition is legitimate only once we know that other representatives give the same class. That is the next proposition.

Proposition 3.1.2 (The Operations on the Rationals Are Well Defined)

Let X:=Z×Z>0, with ∼ as in Proposition 3.1.1. The maps g+((p,q),(r,s)):=(ps+rq, qs),g⋅((p,q),(r,s)):=(pr, qs) from X×X to X satisfy the hypotheses of Theorem 2.2.1 (b), and f(p,q):=(−p,q) satisfies the hypothesis of Theorem 2.2.1 (a). Hence +, ⋅ and − of Definition 3.1.2 are functions Q×Q→Q, Q×Q→Q and Q→Q.

Idea. This is Sets and Functions, Example (Method: checking that a definition on classes is well defined), run one argument at a time as in Section 2.2: by Theorem 2.2.1 (b), it suffices to change one pair with the other fixed. Each change is one identity in Z that uses the hypothesis pq′=p′q once. Both formulas are symmetric in the two pairs, so the second argument costs nothing.

Proof. All computations are in the commutative ring Z (Theorem 2.3.1), and we reorder products by (F5), (F6) without comment.

Multiplication, first argument. Let (p,q)∼(p′,q′), so pq′=p′q, and let (r,s)∈X. We need (pr,qs)∼(p′r,q′s), that is, (pr)(q′s)=(p′r)(qs). Indeed (pr)(q′s)=(pq′)(rs)=(p′q)(rs)=(p′r)(qs).

Addition, first argument. Let pq′=p′q. We need (ps+rq,qs)∼(p′s+rq′,q′s), that is, (ps+rq)(q′s)=(p′s+rq′)(qs). By (F9), (ps+rq)(q′s)=(pq′)s2+rqq′s,(p′s+rq′)(qs)=(p′q)s2+rqq′s, and the right-hand sides are equal because pq′=p′q.

Second argument, by symmetry. For pairs x,y∈X, g+(y,x)=g+(x,y) and g⋅(y,x)=g⋅(x,y) as pairs, by (F1) and (F6) in Z: for instance (rq+ps, sq)=(ps+rq, qs). So if y∼y′, the first-argument case, applied with the pair y in first place, gives g(x,y)=g(y,x)∼g(y′,x)=g(x,y′), for g=g+ and g=g⋅.

Negation. If pq′=p′q, then (−p)q′=−(pq′)=−(p′q)=(−p′)q by Proposition 2.3.2 (c), so (−p,q)∼(−p′,q′).

So g+ and g⋅ satisfy the hypotheses of Theorem 2.2.1 (b): for a change of both arguments, g(x,y)∼g(x′,y)∼g(x′,y′), and transitivity joins the two steps, which is what the proof of that lemma does. By its conclusion, there is exactly one function Q×Q→Q with [x]+[y]=[g+(x,y)], and likewise for ⋅. By Theorem 2.2.1 (a), −[(p,q)]:=[(−p,q)] is a function Q→Q. This proves the proposition.

Quick check. Which rules define a function Q→Q: (a) [(p,q)]↦[(p+q, q)]; (b) [(p,q)]↦[(p, q+1)]?

Solution.

  • (a) Yes: it is x↦x+1, since [(p,q)]+[(1,1)]=[(p⋅1+1⋅q, q⋅1)]=[(p+q, q)] by Definition 3.1.2. (b) No: [(1,2)]=[(2,4)], but (1,3)≁(2,5), as 1⋅5≠2⋅3.

Not every formula in representatives passes this test, and the failures are instructive.

Example (Formulas that ignore the class)

Decide which of the following rules define a function on Q.

  • (a) [(p,q)]↦p+q∈Z.
  • (b) [(p,q)]↦p∈Z.
  • (c) [(p,q)]↦[(p2,q2)]∈Q.

Solution.

  • (a) Not a function. [(1,2)]=[(2,4)], since 1⋅4=2⋅2, yet the rule gives 1+2=3 for one representative and 2+4=6 for the other. A function has one value at each argument (Sets and Functions, Definition 2.1.1), and this rule offers two at the same class.

  • (b) Not a function, for the same pair: the outputs are 1 and 2.

  • (c) A function. First, q2>0 by Proposition 2.4.3 (e), as q≠0, so (p2,q2)∈Z×Z>0. If pq′=p′q, then p2(q′)2=(pq′)2=(p′q)2=(p′)2q2, by (F5), (F6), so (p2,q2)∼(p′2,q′2), and Theorem 2.2.1 (a) applies. The function is x↦x⋅x, since [(p,q)]⋅[(p,q)]=[(p2,q2)] by Definition 3.1.2.

The tempting argument for (a), “x is p/q, so p and q are determined by x”, fails at the word “is”: (p,q) is a representative, and (2p,2q) is another. A rule through representatives is a function only once every representative is shown to give the same value, as in (c).

3.1.3. The rationals form a field

The ring axioms for Q are checked by the move of Section 2.3, reduce to the level below: each side of an axiom, written on representatives, is the class of an explicit pair in Z×Z>0, and the two pairs are compared by an identity in Z. One small observation recurs: for every (p,q)∈Z×Z>0 and k∈Z>0, (p,q)∼(kp,kq),since p(kq)=(kp)q; here kq>0 by (O4), so (kp,kq)∈Z×Z>0 by Theorem 2.4.2 (b), and the relation makes sense. Scaling both entries by the same positive integer does not change the class.

Theorem 3.1.3 (The Rationals Form a Field)

Q, with the operations of Definition 3.1.2, is a field (Definition 2.3.1), with zero [(0,1)] and one [(1,1)]. A rational number [(p,q)] is zero if and only if p=0. If p>0, its inverse is [(q,p)]; if p<0, its inverse is [(−q,−p)].

Idea. Eight laws are identities between pairs of integers, checked in a table as for Z. As there, (F4) gives pairs that are related rather than equal; here (F9) does too, and the scaling observation is what relates them. The genuinely new axiom is (F8): inverting [(p,q)] should swap numerator and denominator, and the sign of p decides whether the swapped pair is allowed.

Proof. By Proposition 3.1.2, the operations are functions. Let x,y,z∈Q; by Sets and Functions, Definition 5.2.4, x=[(p,q)], y=[(r,s)], z=[(t,u)] with p,r,t∈Z and q,s,u∈Z>0. As in Section 2.3, “equal” means that the two pairs are the same pair of integers, by the laws (F1)–(F9) of Z (Theorem 2.3.1); “related” means that they are related by ∼, so that the classes agree by Sets and Functions, Theorem 5.2.1 (b).

Axiom left side, as a pair right side, as a pair why the classes agree
(F1) (ps+rq,qs) (rq+ps,sq) equal
(F2) ((ps+rq)u+tqs, qsu) (psu+(ru+ts)q, qsu) equal: both first entries are psu+qru+qst
(F3) x+[(0,1)]=x (p⋅1+0⋅q, q⋅1) (p,q) equal, by Proposition 2.3.2 (b)
(F4) x+(−x)=[(0,1)] (pq+(−p)q, q2)=(0,q2) (0,1) related: 0⋅1=0⋅q2
(F5) ((pr)t, (qs)u) (p(rt), q(su)) equal
(F6) (pr,qs) (rp,sq) equal
(F7) x⋅[(1,1)]=x (p⋅1, q⋅1) (p,q) equal
(F9) (p(ru+ts), q(su)) ((pr)(qu)+(pt)(qs), (qs)(qu)) related: the right pair is the left pair scaled by q

In (F4), pq+(−p)q=pq−pq=0 by Proposition 2.3.2 (c), and 0⋅1=0=0⋅q2 by Proposition 2.3.2 (b). In (F9), the right side is xy+xz=[(pr,qs)]+[(pt,qu)]; its first entry is q(pru+pts)=q⋅p(ru+ts) and its second is q⋅q(su), so the scaling observation above, with k=q, relates it to the left pair.

The zero. [(p,q)]=[(0,1)] if and only if p⋅1=0⋅q, that is, p=0.

1≠0. [(1,1)]=[(0,1)] would need 1=0 in Z, which Theorem 2.3.1 excludes.

(F8). Let x=[(p,q)]≠0, so p≠0. If p>0, then p∈Z>0, so (q,p)∈Z×Z>0, and [(p,q)]⋅[(q,p)]=[(pq, qp)]=[(1,1)], since (pq)⋅1=1⋅(qp). If p<0, then −p>0 by Proposition 2.4.3 (a), so (−q,−p)∈Z×Z>0, and ⋅[(−q,−p)]=[(p(−q), q(−p))]=[(−(pq), −(pq))]=[(1,1)], by Proposition 2.3.2 (c) and (−(pq))⋅1=1⋅(−(pq)). By (O1), one of the two cases occurs. So every non-zero element has an inverse, and Q is a field. This proves the theorem.

Two rows, (F4) and (F9), are “related” rather than “equal”; (F9) needs the scaling observation because the sum multiplies the denominators qs and qu. The case split in (F8) is the price of positive denominators: [(q,p)] is not a class when p<0.

Quick check. Compute [(1,2)]+[(1,3)] and [(−3,4)]−1, and check the second answer by multiplying.

Solution. [(1,2)]+[(1,3)]=[(1⋅3+1⋅2, 2⋅3)]=[(5,6)]. For [(−3,4)] the numerator is negative, so the inverse is [(−4,3)]. Check: [(−3,4)]⋅[(−4,3)]=[(12,12)], and (12,12)∼(1,1) since 12⋅1=1⋅12.

3.1.4. The integers inside the rationals

As N sat inside Z through ι (Proposition 2.2.3), Z sits inside Q through the classes with denominator 1.

Proposition 3.1.4 (The Integers Embed in the Rationals)

Let j:Z→Q, j(m):=[(m,1)]. Then j is injective, and for all m,n∈Z, j(m+n)=j(m)+j(n),j(mn)=j(m)j(n),j(−m)=−j(m), with j(0)=0 and j(1)=1. Moreover, writing a/b:=ab−1 in the field Q:

  • (a) for p∈Z and q∈Z>0, [(p,q)]=j(p)⋅j(q)−1=j(p)/j(q);
  • (b) every rational number is j(p)/j(q) for some p∈Z and q∈Z>0, and for p,r∈Z and q,s∈Z>0, j(p)/j(q)=j(r)/j(s) if and only if ps=rq;
  • (c) Q={j(m)/j(n):m∈Z, n∈Z>0}.

Idea. The classes with denominator 1 add and multiply exactly as their numerators do, by the formulas of Definition 3.1.2 with q=s=1. For (a), [(1,q)] is the inverse of [(q,1)], and multiplying it by [(p,1)] gives [(p,q)]; (b) and (c) are (a) read through Sets and Functions, Theorem 5.2.1.

Proof. Injective. If j(m)=j(n), then (m,1)∼(n,1) by Sets and Functions, Theorem 5.2.1 (b), that is, m⋅1=n⋅1, so m=n.

Operations. By Definition 3.1.2, j(m)+j(n)=[(m⋅1+n⋅1, 1⋅1)]=[(m+n,1)]=j(m+n), j(m)j(n)=[(mn,1)]=j(mn), and −j(m)=[(−m,1)]=j(−m). Also j(0)=[(0,1)] and j(1)=[(1,1)] are the zero and one of Q (Theorem 3.1.3).

  • (a) Since q>0, j(q)=[(q,1)]≠0, and by Theorem 3.1.3 its inverse is [(1,q)] (the case of a positive numerator; inverses are unique, Section 2.3). Hence j(p)⋅j(q)−1=[(p,1)]⋅[(1,q)]=[(p⋅1, 1⋅q)]=[(p,q)].

  • (b) Every element of Q is [(p,q)] for some (p,q)∈Z×Z>0 (Sets and Functions, Definition 5.2.4), which is j(p)/j(q) by (a). By (a) again, j(p)/j(q)=j(r)/j(s) means [(p,q)]=[(r,s)], which holds if and only if ps=rq (Sets and Functions, Theorem 5.2.1 (b)).

  • (c) Each j(m)/j(n) lies in Q, and every element of Q has this form by (b). This proves the proposition.

Identification. From now on we write m for j(m), as Section 2.2 wrote n for ι(n), and regard Z as a subset of Q; together with Section 2.2, N⊆Z⊆Q. This is a convenient abuse, made honest by j: it is injective and carries 0, 1, +, ⋅ and − of Z to those of Q, so a computation with integers gives the same result read in Z or in Q. With this convention, (a)–(c) read: =pq,pq=rs⟺ps=rq,Q={mn:m∈Z, n∈Z>0}. The last equation is the description of Q that Sets and Functions, Section 3.1 took as a definition; it is now a theorem about the constructed set. The fraction bar is division in the field Q, and the school rules for fractions, such as pq+rs=ps+rqqs, are now the formulas of Definition 3.1.2 read through (a). The order of Q, and the fact that j respects it, are Section 3.2’s business.

Quick check. Is j surjective? Decide whether 1/2∈j(Z).

Solution. No. If [(m,1)]=[(1,2)], then 2m=1 in Z, which is impossible: 1=2⋅0+1 is odd, so it is not of the form 2m (Corollary 2.5.3 (a); it is also the Quick check “Is Z a field?” of Section 2.4). So 1/2∉j(Z): Z is a proper subset of Q.

3.1.5. Exercises

A. Check your understanding

Exercise (A1)
  • (a) In Definition 3.1.2, why is qs∈Z>0?
  • (b) Where does the proof of transitivity in Proposition 3.1.1 use that a denominator is non-zero, and which denominator is it?
  • (c) Find the inverse of [(−3,5)] in Q, as a class with positive denominator.
  • (d) True or false: j(2)−1=[(1,2)]. Give a reason.

Solution.

  • (a) q,s∈Z>0 means q>0 and s>0 (Theorem 2.4.2 (b)); then qs>0 by (O4), so qs∈Z>0, again by Theorem 2.4.2 (b).

  • (b) In the last step: from (pu−tq)s=0 it concludes pu−tq=0 by Proposition 2.4.3 (f), which needs s≠0. Here s is the denominator of the middle pair (r,s).

  • (c) The numerator −3 is negative, so by Theorem 3.1.3 the inverse is [(−5,3)]. Check: [(−3,5)]⋅[(−5,3)]=[(15,15)]=[(1,1)], since 15⋅1=1⋅15.

  • (d) True. j(2)=[(2,1)] has positive numerator, so its inverse is [(1,2)] by Theorem 3.1.3; directly, [(2,1)]⋅[(1,2)]=[(2,2)]=[(1,1)].

B. Practice

Exercise (B1: Three rows in detail)

Let x=[(p,q)], y=[(r,s)], z=[(t,u)] be rational numbers. Verify in detail, naming the law of Z used at each step, the rows (F9), (F4) and (F2) of the table in the proof of Theorem 3.1.3.

Solution. All operations are those of Definition 3.1.2; (F1)–(F9) refer to the laws of Z (Theorem 2.3.1).

(F9). y+z=[(ru+ts, su)], so x(y+z)=[(p(ru+ts), q(su))]=[(pru+pts, qsu)] by (F9) and (F5). On the other side, xy=[(pr,qs)] and xz=[(pt,qu)], so xy+xz=[((pr)(qu)+(pt)(qs), (qs)(qu))]=[(q(pru+pts), q(qsu))], by (F5), (F6) and (F9). The pairs (A,B):=(pru+pts,qsu) and (qA,qB) are related, since A(qB)=(qA)B by (F5), (F6). By Sets and Functions, Theorem 5.2.1 (b), x(y+z)=xy+xz.

(F4). −x=[(−p,q)], so x+(−x)=[(pq+(−p)q, qq)]. By Proposition 2.3.2 (c), (−p)q=−(pq), so the numerator is pq+(−(pq))=0 by (F4). The pair (0,q2) is related to (0,1), since 0⋅1=0=0⋅q2 (Proposition 2.3.2 (b)). So x+(−x)=[(0,1)].

(F2). x+y=[(ps+rq,qs)], so (x+y)+z=[((ps+rq)u+t(qs), (qs)u)]=[(psu+qru+qst, qsu)], by (F9), (F5), (F6). And y+z=[(ru+ts,su)], so x+(y+z)=[(p(su)+(ru+ts)q, q(su))]=[(psu+qru+qst, qsu)], by the same laws. The pairs are equal, so (x+y)+z=x+(y+z).

Exercise (B2: Addition is well defined)

Prove directly, by computing both changes and without the symmetry argument of Proposition 3.1.2, that the addition of Definition 3.1.2 is well defined. The first half is done for you.

Change the first argument. Let (p,q)∼(p′,q′), that is, pq′=p′q, and fix (r,s). Then (ps+rq)(q′s)=(pq′)s2+rqq′s=(p′q)s2+rqq′s=(p′s+rq′)(qs), so (ps+rq,qs)∼(p′s+rq′,q′s).

Name the move, then complete it.

Solution. The move is check on representatives, one argument at a time: having changed the first argument with the second fixed, change the second with the first fixed, and join the two changes by transitivity.

Change the second argument. Let (r,s)∼(r′,s′), that is, rs′=r′s, and fix (p,q). Then, by (F5), (F6), (F9) in Z, (ps+rq)(qs′)=pqss′+(rs′)q2=pqss′+(r′s)q2=(ps′+r′q)(qs), so (ps+rq,qs)∼(ps′+r′q,qs′).

Join. Let (p,q)∼(p′,q′) and (r,s)∼(r′,s′). Write g for the sum formula on representatives. The first step, with (r,s) fixed, gives g((p,q),(r,s))∼g((p′,q′),(r,s)); the second, with (p′,q′) fixed, gives g((p′,q′),(r,s))∼g((p′,q′),(r′,s′)). By transitivity (Proposition 3.1.1), g((p,q),(r,s))∼g((p′,q′),(r′,s′)), so the classes [g((p,q),(r,s))] and [g((p′,q′),(r′,s′))] are equal (Sets and Functions, Theorem 5.2.1 (b)). The two steps are the hypotheses of Theorem 2.2.1 (b); the join is the step its proof makes, and its conclusion gives addition as a function Q×Q→Q.

Exercise (B3: Prove or disprove)

Prove or disprove each statement.

  • (a) The rule [(p,q)]↦[(p+2q, 2q)] defines a function Q→Q.
  • (b) The rule [(p,q)]↦[(p, q2)] defines a function Q→Q.
  • (c) If x,y∈Q and xy=0, then x=0 or y=0.
  • (d) Every non-zero rational number has a representative with numerator 1.

Solution.

  • (a) True. Since q>0, 2q=q+q>0 (Proposition 2.4.3 (b)), so (p+2q,2q)∈Z×Z>0 by Theorem 2.4.2 (b). By Theorem 2.2.1 (a) it suffices that (p,q)∼(p′,q′) gives (p+2q,2q)∼(p′+2q′,2q′). By (F5), (F6), (F9) in Z, (p+2q)(2q′)=2pq′+4qq′,(p′+2q′)(2q)=2p′q+4qq′, and the right-hand sides are equal since pq′=p′q. (The function is x↦[(p,2q)]+[(1,1)], half of x plus one, by Definition 3.1.2.)

  • (b) False. [(1,1)]=[(2,2)], since 1⋅2=2⋅1, but the rule gives [(1,1)] for one representative and [(2,4)] for the other, and (1,1)≁(2,4) because 1⋅4≠2⋅1.

  • (c) True. Let x=[(p,q)] and y=[(r,s)]. Then xy=[(pr,qs)], and by Theorem 3.1.3 this class is zero only if pr=0. So p=0 or r=0 by Proposition 2.4.3 (f) in Z, that is, x=0 or y=0, again by Theorem 3.1.3. (The statement holds in every field: if x≠0, multiply xy=0 by x−1.)

  • (d) False. Take 2=[(2,1)]. If (1,s)∼(2,1) with s∈Z>0, then 1⋅1=2s, and 2s=1 has no solution in Z (Corollary 2.5.3 (a), as in the Quick check after the Identification). So no representative of 2 has numerator 1.

C. Going deeper

Exercise (C1: The least denominator)
  • (a) Show that the rule “[(p,q)]↦q” does not define a function Q→Z>0.
  • (b) Prove that there is exactly one function N:Q→Z>0 such that, for every x∈Q, N(x) is the least q∈Z>0 for which x=[(p,q)] for some p∈Z.
  • (c) Compute N(6/4), justifying that no smaller denominator is possible.

Solution (Hint 1). For (b), fix x and look at the set of all denominators of representatives of x. Which result of Section 2.4 gives a least element?

Solution (Hint 2). Let Dx:={q∈Z>0:(p,q)∈x for some p∈Z}. It is non-empty because a class contains its representative.

Solution.

  • q=1 is impossible: it needs 4p=6. By discreteness (Theorem 2.4.2 (c)), p≤1 or p≥2. If p≤1, then 4p≤4<6; if p≥2, then 4p≥8>6, by Proposition 2.4.3 (c) (or equality). Either way 4p≠6, by (O1).
  • q=2 works: 4⋅3=12=6⋅2, so (3,2)∈[(6,4)].

Since 1 is the only element of Z>0 below 2 (discreteness), N(6/4)=2.

Marking scheme. (10 points) - 2: (a) exhibits two representatives of one class with different denominators. - 2: (b) defines the set of denominators of x from the class, and shows it non-empty. - 2: (b) gets a least element from Proposition 2.4.4, with the lower bound named. - 2: (b) explains why this defines exactly one function (one value per class; any such function has those values). - 2: (c) shows 4p=6 has no integer solution and exhibits (3,2). Fatal errors (0 for the step): defining N([(p,q)]) as “q divided by a common factor” (the formula uses a representative, and lowest terms come only in Preliminaries for Analysis and Algebra, Chapter 2); in (c), “4p=6 has no solution since p=3/2” (uses division in Q to decide a question about Z without the discreteness argument).

Exercise (C2: Find the error)

Here is a proof that multiplication on Q is well defined. Is the conclusion true? Is the proof correct? If not, name the first line that fails, the error, and give a counterexample to the step.

  1. Let (p,q)∼(p′,q′), and let (r,s)∈Z×Z>0. (2) Then [(p,q)]=[(p′,q′)]. (3) So [(p,q)]⋅[(r,s)]=[(p′,q′)]⋅[(r,s)]. (4) That is, [(pr,qs)]=[(p′r,q′s)], so the product does not depend on the first representative. (5) The second argument is handled in the same way.

Solution. The conclusion is true: it is Proposition 3.1.2. The proof is not correct.

The failing line is (3). Line (2) is correct: it is (1) restated by Sets and Functions, Theorem 5.2.1 (b), and says that (p,q) and (p′,q′) name the same class. Line (3) then multiplies that class by [(r,s)], using the multiplication of Q. But that multiplication is exactly what is being shown to exist: until it is known to be well defined, “[(p,q)]⋅[(r,s)]” has no meaning, or rather means “[(pr,qs)], computed from the representative (p,q)”, and whether this depends on the representative is the claim. The line cites the goal, which is circular: entry (N9) of Logic and Proof, Example (What is not allowed).

Counterexample to the step. The inference “[(p,q)]=[(p′,q′)], so F(p,q)=F(p′,q′)” fails for formulas F in representatives. With F(p,q):=p+q, the same lines “prove” that [(p,q)]↦p+q is a function on Q, since “p+q is a function of the class [(p,q)]”. It is not: (1,2)∼(2,4) and 1+2≠2+4 (Example (Formulas that ignore the class) (a)).

Repair. Replace (2)–(3) by an identity in Z: from pq′=p′q, (pr)(q′s)=(pq′)(rs)=(p′q)(rs)=(p′r)(qs), so (pr,qs)∼(p′r,q′s). Do the same for the second argument, and conclude with Theorem 2.2.1 (b). Lines (1), (4) and (5) are correct as stated, once (3) is replaced.

Marking scheme. (10 points) - 2: says that the conclusion is true and that the proof is not correct. - 3: names line (3) as the failing line and explains that it uses the multiplication of Q, which is being defined. - 2: names the error as circular, entry (N9). - 2: gives a counterexample to the step (any formula in representatives that is not constant on classes, such as p+q). - 1: gives the repair through the integer identity (pr)(q′s)=(p′r)(qs). Fatal errors (0 for the step): declaring the conclusion false; blaming line (1) or (2), which only restate the hypothesis.

Exercise (C3: Non-zero denominators)

Let Y:=Z×(Z∖{0}), and for (p,q),(r,s)∈Y let (p,q)≈(r,s) mean ps=rq. Show that ≈ is an equivalence relation on Y, and that I:Q→Y/≈,I([(p,q)]):=[(p,q)]≈, is a well-defined bijection.

Solution. Equivalence relation. The proof of Proposition 3.1.1 works on Y with two changes: the pairs are taken in Y instead of Z×Z>0, and the line deriving s≠0 from s>0 is dropped, since in Y the middle denominator s is non-zero by definition. That is the only property of the denominators the proof uses.

Well defined. Since q>0, q≠0 by (O1), so (p,q)∈Y and the inclusion is a function. Apply Theorem 2.2.1 (a) to the inclusion (p,q)↦(p,q) from Z×Z>0 to Y: if (p,q)∼(p′,q′), then pq′=p′q, which says (p,q)≈(p′,q′).

Injective. If [(p,q)]≈=[(p′,q′)]≈, then (p,q)≈(p′,q′) by Sets and Functions, Theorem 5.2.1 (b), so pq′=p′q, so (p,q)∼(p′,q′) and [(p,q)]=[(p′,q′)].

Surjective. Let [(p,q)]≈∈Y/≈, with q≠0. By (O1), q>0 or q<0. If q>0, the class is I([(p,q)]). If q<0, then −q>0 (Proposition 2.4.3 (a)), so −q∈Z>0 by Theorem 2.4.2 (b), and (−p,−q)∈Z×Z>0; and (p,q)≈(−p,−q), since p(−q)=−(pq)=(−p)q by Proposition 2.3.2 (c); so [(p,q)]≈=[(−p,−q)]≈ by Sets and Functions, Theorem 5.2.1 (b), and the class is I([(−p,−q)]).

So I is a bijection: the two constructions have “the same” rational numbers, matched by I.