2.4  The Rationals as Classes of Fractions

Section 2.3 made Z an ordered commutative ring and showed, in a Quick check, that Z is not a field, because 2x=1 has no solution in it. This section repairs that defect the way Section 2.1 repaired the missing subtraction in N. 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.

2.4.1. Fractions as pairs

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, Relations, and Cardinality, Section 2.5 already used for its fractions, and Section 2.5 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.3.4 (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 2.4.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, Relations, and Cardinality, Definition 2.5.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.3.5 (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.

Definition 2.4.1 (The Rational Numbers)

Let ∼ be the equivalence relation of Proposition 2.4.1 on Z×Z>0. The set of rational numbers is the quotient set (Sets, Relations, and Cardinality, Definition 2.5.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 2.4.1, which makes the quotient set meaningful. By Sets, Relations, and Cardinality, Theorem 2.5.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.3.5 (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 divisibility, which a later chapter of this volume develops on the constructed Z.

A non-example by minimal change. Allow the denominator 0: take Z×N instead of Z×Z>0, with the same formula. Reflexivity and symmetry survive, by the same lines. Transitivity fails, as the triple (1,0), (0,0), (1,1) above shows, so there is no quotient set. Sets, Relations, and Cardinality, Section 2.5 met the same failure in an exercise; it is the reason denominators must be non-zero.

Why positive and not merely non-zero denominators? Non-zero denominators would also give an equivalence relation, and, as the last example of this section shows, essentially the same set Q. The difference appears with the order. With positive denominators, “[(p,q)] is positive” can mean “p>0”, one inequality in Z; with non-zero denominators, it would have to say “p and q have the same sign”, and a naive comparison of two fractions breaks, as the warning at the end of this section shows.

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 2.4.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. In the variant with non-zero denominators (the last example of this section), the answer is yes: 3⋅(−8)=−24=(−6)⋅4.

This construction pays a debt. Sets, Relations, and Cardinality, Section 2.5 described Q as the quotient of Z×Z>0 by cross-multiplication while Z was still the school integers; now Z is the ring of Section 2.3, and the quotient is the definition of Q.

2.4.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 2.4.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.3.4 (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 2.4.2 (The Operations on the Rationals Are Well Defined)

Let X:=Z×Z>0, with ∼ as in Proposition 2.4.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 2.4.2 are functions Q×Q→Q, Q×Q→Q and Q→Q.

Idea. This is the move of Section 2.2, check on representatives, one argument at a time. Change the first pair to an equivalent one with the second fixed, then the second with the first fixed; Theorem 2.2.1 (b) joins the two changes by transitivity. Each change is one identity in Z: expand both cross-products and use the hypothesis pq′=p′q (or rs′=r′s) once.

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).

Multiplication, second argument. Let (r,s)∼(r′,s′), so rs′=r′s, and let (p,q)∈X. We need (pr)(qs′)=(pr′)(qs). Indeed (pr)(qs′)=(pq)(rs′)=(pq)(r′s)=(pr′)(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.

Addition, second argument. Let rs′=r′s. We need (ps+rq,qs)∼(ps′+r′q,qs′), that is, (ps+rq)(qs′)=(ps′+r′q)(qs). By (F9), (ps+rq)(qs′)=pqss′+(rs′)q2,(ps′+r′q)(qs)=pqss′+(r′s)q2, and the right-hand sides are equal because rs′=r′s.

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.

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, Relations, and Cardinality, Definition 1.4.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.3.5 (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 2.4.2.

The tempting argument for (a) runs: “a rational number x is p/q, so p and q are determined by x, and so is p+q”. Its conclusion is false, and the flaw is the word “is”: (p,q) is a representative of x, and (2p,2q) is another, just as legitimate. A rule defined through representatives is a function on classes only when every representative gives the same value, and that has to be proved, as in (c).

2.4.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.3.4 (b), and the relation makes sense. Scaling both entries by the same positive integer does not change the class.

Theorem 2.4.3 (The Rationals Form a Field)

Q, with the operations of Definition 2.4.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 2.4.2, the operations are functions. Let x,y,z∈Q; by Sets, Relations, and Cardinality, Definition 2.5.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, Relations, and Cardinality, Theorem 2.5.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.3.5 (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.

Six rows of the table are “equal” and two, (F4) and (F9), are “related”; the second needs the scaling observation because the sum formula multiplies the denominators qs and qu, so their common factor q appears twice. The case split in (F8) is the price of the convention: the obvious inverse [(q,p)] of a negative [(p,q)] is not a class at all, since its “denominator” p is negative, and we must move the sign to the numerator.

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.

2.4.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 2.4.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 2.4.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, Relations, and Cardinality, Theorem 2.5.1.

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

Operations. By Definition 2.4.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 2.4.3).

  • (a) Since q>0, j(q)=[(q,1)]≠0, and by Theorem 2.4.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, Relations, and Cardinality, Definition 2.5.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, Relations, and Cardinality, Theorem 2.5.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. (One could replace j(Z) by Z itself inside Q, but nothing needs it.) 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, Relations, and Cardinality, Section 2.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 2.4.2 read through (a). The order of Q, and the fact that j respects it, are Section 2.5’s business.

2.4.5. Other denominators

The convention of positive denominators was a choice. The next example shows that the other natural choice gives the same set of rational numbers, and where it would cost us.

Example (Non-zero denominators give the same rationals)

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 2.4.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. 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, Relations, and Cardinality, Theorem 2.5.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.3.5 (a)), and (p,q)≈(−p,−q), since p(−q)=−(pq)=(−p)q by Proposition 2.3.2 (c); so the class is I([(−p,−q)]).

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

Warning. The rule “[(p,q)]≈<[(r,s)]≈ if and only if ps<rq” is not well defined on Y/≈. Compare (0,1) with (1,1): 0⋅1<1⋅1, that is, 0<1, true. Now replace (1,1) by the equivalent (−1,−1): the rule asks whether 0⋅(−1)<(−1)⋅1, that is, 0<−1, which is false. Multiplying an inequality by a negative denominator reverses it (Proposition 2.3.5 (d)), so the rule’s verdict depends on the representative. With positive denominators this cannot happen, which is why Definition 2.4.1 uses them.

2.4.6. Exercises

A. Check your understanding

Exercise (A1)
  • (a) In Definition 2.4.2, why is qs∈Z>0?
  • (b) Where does the proof of transitivity in Proposition 2.4.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.3.4 (b)); then qs>0 by (O4), so qs∈Z>0, again by Theorem 2.3.4 (b).

  • (b) In the last step: from (pu−tq)s=0 it concludes pu−tq=0 by Proposition 2.3.5 (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 2.4.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 2.4.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 2.4.3.

Solution. All operations are those of Definition 2.4.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, Relations, and Cardinality, Theorem 2.5.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, without looking back at Proposition 2.4.2, that the addition of Definition 2.4.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 2.4.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, Relations, and Cardinality, Theorem 2.5.1 (b)). These are exactly the hypotheses, and the conclusion, of Theorem 2.2.1 (b), which then gives addition as a function Q×Q→Q.

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.3 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.3.4 (c)), p≤1 or p≥2. If p≤1, then 4p≤4<6; if p≥2, then 4p≥8>6, by Proposition 2.3.5 (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.3.6, 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” (divisibility is not available, and the formula uses a representative); 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 2.4.2. The proof is not correct.

The failing line is (3). Line (2) is correct: it is (1) restated by Sets, Relations, and Cardinality, Theorem 2.5.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.