Number Construction

This chapter covers notes on constructing numbers.

Preliminaries

There are many ways to define the natural numbers, but for this chapter, we'll use the Von Neumann definition.

The Axiom of Infinity

Before we see that definition, we define a special set called the successor set.

successor. Let S{S} be a set. Then

S+=S{S} S^+ = S \cup \set{S}

is the set obtained by adjoining S{S} to the elements of S,{S,} called the successor of S.{S.}

Suppose we represented the empty set with the symbol 0.{0.}

0:= 0 := \nil

Note that this is an antisymmetric relation. We're not saying that 0{0} is ,{\nil,} nor are we saying that {\nil} is 0.{0.} We're merely stating that the symbol 0{0} is a representation of .{\nil.} Now, using the successor set, we can construct a set that looks like the following:

{0=0+={}(0+)+={,{}}((0+)+)+={,{},{,{}}}    }\lset{ \small \eqs{ & 0 = \nil \\ & 0^+ = \set{\nil} \\ & (0^+)^+ = \set{\nil, \set{\nil}} \\ & ((0^+)^+)^+ = \set{\nil, \set{\nil}, \set{\nil, \set{\nil}}} \\ & ~~~~ \vdots } }

The problem, however, is that ellipsis. With what we have so far, we have no premise, or reason, that allows us to say that we can continue the pattern above. Put differently, if someone asked us: "How do you know that your pattern will continue forever? Who's to say that it won't stop?" we'd have no good answer. Obviously, we can't tell our interrogator "Well why don't you list them out and see if I'm wrong." That's far too rude. We can achieve a similar effect — more politely — with an axiom.

axiom of infinity. There exists a set ω,{\omega,} called the inductive set, containing 0{0} and the successor of each of its elements.

With this axiom established, we can now end the interrogation with a definition:

natural numbers. Let 0:={0 := \nil} and S{S} be the successor S(a)=a{a}{S(a) = a \cup \set{a}} for every set a.{a.} By the axiom of infinity, there are subsets of the inductive set ω{\omega} which contain 0,{0,} are closed under S,{S,} and are themselves inductive. If one such subset B{B} is an arbitrary successor set, then ωB{\omega \cap B} is also an arbitrary successor. Hence, the intersection of all inductive sets is still an inductive set. We call this intersection the natural numbers, which may be visualized as:

{{}{,{}}{,{,{}}}{,{,{,{}}}}{,{,{,{,{}}}}}{,{,{,{,{,{}}}}}}{,{,{,{,{,{,{}}}}}}}{,{,{,{,{,{,{,{}}}}}}}}{,{,{,{,{,{,{,{,{}}}}}}}}}{,{,{,{,{,{,{,{,{,{}}}}}}}}}}{,{,{,{,{,{,{,{,{,{,{}}}}}}}}}}}{,{,{,{,{,{,{,{,{,{,{,{}}}}}}}}}}}}{,{,{,{,{,{,{,{,{,{,{,{,{}}}}}}}}}}}}}}. \lset{ \small \eqs{ & \nil \\ & \set{\nil} \\ & \set{\nil,\set{\nil}} \\ & \set{\nil,\set{\nil,\set{\nil}}} \\ & \set{\nil,\set{\nil,\set{\nil,\set{\nil}}}} \\ & \set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil}}}}} \\ & \set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil}}}}}} \\ & \set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil}}}}}}} \\ & \set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil}}}}}}}} \\ & \set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil}}}}}}}}} \\ & \set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil}}}}}}}}}} \\ & \set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil}}}}}}}}}}} \\ & \set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil}}}}}}}}}}}} \\ & \set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil,\set{\nil}}}}}}}}}}}}} \\ & \vdots } }.

In short, we're using the axiom of infinity to implement the natural numbers inductively. We define 0{0} as the empty set, and then for each natural number n,{n,} we have the definition S(n):=n{n}.{S(n) := n \cup \set{n}.} Because the axiom of infinity tells us that there is a set ω{\omega} that contains (i) the empty set, and (ii) for all xω,{x \in \omega,} we have x{x}ω,{x \cup \set{x} \in \omega,} the set of natural numbers N{\nat} is merely an intersection of all the subsets of ω.{\omega.} And since N{\nat} is an intersection, it is, in fact, a set (as opposed to a class).

The Peano Axioms

To nail the coffin completely, we take a closer look at what exactly the set of natural numbers is. From the definition of the successor set, we get the first two Peano axioms:

peano axiom i. 0ω.{0 \in \omega.}

peano axiom ii. nωn+ω{n \in \omega \nc n^+ \in \omega}

Next, we know that if a set S{S} is a subset of ω{\omega} and S{S} is a successor set, then S=ω.{S = \omega.} This gives us the third Peano axiom:

peano axiom iii. If Sω,{S \subset \omega,} 0S,{0 \in S,} and n+S{n^+ \in S} whenever nS,{n \in S,} then S=ω.{S = \omega.}

The third axiom follows simply from the definition of the successor set. As it turns out, the third Peano axiom is also known as the Principle of Mathematical Induction — that given the set S{S} we just described, there is always a minimal element. Next, we know that since 0{0} represents the empty set, it cannot be the case that any successor is 0,{0,} since the successor, by definition, is a union of an element and a set — i.e., not empty, and therefore, not zero. This yields the fourth axiom:

peano axiom iv. For all nω,{n \in \omega,} n+0.{n^+ \neq 0.}

Now, suppose we defined the set S{S} as follows:

nS{n \in S} if, and only if:

   {~~~} (1) nω   {n \in \omega~~~} and

   {~~~} (2) xn[n⊄x]{\forall x \in n \ix{ n \not\subset x}}

That is, S{S} is the set of all n{n} that are not subsets of themselves. Since 0{0} is not a subset of any of its elements (it's the empty set), it follows that 0S.{0 \in S.} What if, say, nS?{n \in S?} Well, from the definition above, we have nω,{n \in \omega,} which means that n⊄n,{n \not\subset n,} and nn.{n \notin n.} It follows, then, that n+{n^+} (the successor of n{n}) is not a subset of n{n}n+n.{n^+ \subset n.} But n+{n^+} must be in there somewhere, otherwise nω.{n \notin \omega.} The only other set n+{n^+} can be a subset of is x.{x.} But if n+x,{n^+ \subset x,} then nx,{n \subset x,} and because nS,{n \subset S,} it must be the case that xn.{x \notin n.} Thus, it cannot be the case that n+⊄n,{n^+ \not\subset n,} and n+⊄xn.{n^+ \not\subset x \in n.} This yields the following lemma:

peano lemma i. For all nS,{n \in S,} n⊄n.{n \not\subset n.}

Next, suppose we defined the set S{S} as follows:

nS{n \in S} if, and only if,

   {~~~} (1) nω{n \in \omega} and

   {~~~} (2) xn[xn]{\forall x \in n \ix{x \subset n}}

It's true that 0S.{0 \in S.} Now let's consider nS.{n \in S.} If xn+,{x \in n^+,} then we have two cases: Either (a) xn,{x \in n,} or (b) x=n.{x = n.} For case (a), since nS,{n \in S,} it follows that xn{x \in n} from our definition. And since nS,{n \in S,} it follows that xn+.{x \subset n^+.} Case (b) is trivial — if x=n,{x=n,} we have x=nS,{x=n \in S,} and since x=nS,{x=n \in S,} x=nn+.{x=n \subset n^+.} This yields the following lemma:

peano lemma ii. For all nS,{n \in S,} nn+.{n \subset n^+.}

Now suppose that n,mS{n,m \in S} and n+=m+{n^+ = m^+} (the successor of n{n} is the same set as the successor of m{m}). This means there are two cases:

  1. Since nn+,{n \in n^+,} it follows that nm+,{n \in m^+,} and either nm{n \in m} or n=m.{n = m.}
  2. Since mm+,{m \in m^+,} it follows that mn+,{m \in n^+,} and either mn,{m \in n,} or m=n.{m = n.}

Suppose nm.{n \neq m.} Then it must be the case that nm{n \in m} and mn.{m \in n.} From the second lemma, it follows that nn.{n \in n.} But this would then mean that nn,{n \subset n,} which contradicts the first lemma. This yields the fifth Peano axiom:

peano axiom v. If n,mω{n,m \in \omega} and n+=m+,{n^+ = m^+,} then n=m.{n = m.}

The Peano axioms define the set S{S} as the natural numbers N.{\nat.} Given the set N,{\nat,} we can construct the integers Z,{\uint,} the rationals Q,{\rat,} the reals R,{\reals,} and the complex numbers C.{\com.}

The Recursion Theorem

Say we had some set X.{X.} We just constructed the natural numbers, so let's consider the Cartesian product N×X.{\nat \times X.} Suppose there's some collection N{\Nn} with the following properties:

  1. N{\Nn} is a collection of all the subsets A{A} of N×X,{\nat \times X,} with nN.{n \in \nat.}
  2. There exists a function f:XX,{f: X \to X,} with aX.{a \in X.}
  3. N{\Nn} contains a tuple (0,a)N.{(0,a) \in \Nn.}
  4. If (n,x)N,{(n,x) \in \Nn,} then (n+,f(x))N.{(n^+, f(x)) \in \Nn.}

From the two properties above, it follows that N.{\Nn \neq \nil.} And since N{\Nn} is a nonempty collection of sets, there exists an intersection of all the subsets. We'll denote that intersection u.{u.} Since all of the subsets of N×X{\nat \times X} are sets of tuples, it follows that u{u} is a set of tuples.

Since (0,a)N,{(0,a) \in \Nn,} it follows that there is exactly one (0,a)u.{(0,a) \in u.} Why? Because if there wasn't just one (0,a)u,{(0,a) \in u,} it follows that there's another (0,b)u,{(0,b) \in u,} where ab.{a \neq b.} That is, u{u} contains two tuples (0,a){(0,a)} and (0,b).{(0,b).} If we excluded the (0,b),{(0,b),} then we'd have two outcomes. First, we'd still have (0,a),{(0,a),} since ab.{a \neq b.} Second, excluding (0,b){(0,b)} means that u{(0,b)}{u \rid \set{(0,b)}} is the smallest set in N.{\Nn.} But this can't be true, because u{u} is the smallest set in N.{\Nn.}

Is there exactly one (n,x)u?{(n,x) \in u?} Well, if (n,x)u,{(n,x) \in u,} then (n+,f(x))u{(n^+,f(x)) \in u} by property 4. And if (n,x){(n,x)} was not unique, then there must be some (n+,y)u{(n^+,y) \in u} where yf(x).{y \neq f(x).} Otherwise, we'd violate property 4. Say we excluded (n+,y).{(n^+,y).} This gives us the set u{(n+,y)}.{u \rid \set{(n^+,y)}.} Because n+0,{n^+ \neq 0,} this smaller set still contains (0,a).{(0,a).} But if the smaller set contains (0,a),{(0,a),} then it must also contain some tuple of the form (k+,f(k)),{(k^+,f(k)),} again by property 4. If turns out that k=n,{k = n,} then it must be the case that the smaller set contains (n+,f(x)),{(n^+,f(x)),} because we said that yf(x).{y \neq f(x).} If kn,{k \neq n,} then the smaller set contains (k+,f(k)){(k^+,f(k))} anyway, because m+n+.{m^+ \neq n^+.} These cases (k=n{k=n} or kn{k \neq n}) cannot be true, because both imply u{(n+,y)}N.{u \rid \set{(n^+,y)} \in \Nn.} This contradicts the fact that u{u} is smallest set in N.{\Nn.} Therefore, there is exactly one (n,x)u.{(n,x) \in u.}

What can we conclude from these findings? From property 1, the giant collection N{\Nn} contains functions from N{\nat} to some set X.{X.} Now, if we had an element aX{a \in X} and a function f:XX,{f: X \to X,} then there's a function u:NX{u: \nat \to X} where u(0)=a{u(0) = a} and u(n+)=f(u(n)){u(n^+) = f(u(n))} for every nN.{n \in \nat.} Why? Because there's always a subset of N,{\Nn,} call it S,{S,} where (n,x)u,{(n,x) \in u,} for at most one x.{x.} That subset S{S} has the property where if 0S,{0 \in S,} then nS,{n \in S,} then n+S.{n^+ \in S.} This conclusion is called the Recursion Theorem.

recursion theorem. Let aX{a \in X} and f:XX.{f: X \mapsto X.} Then there exists a function u:NX{u: \nat \mapsto X} such that u(0)=a{u(0) = a} and u(n+)=f(u(n)){u(n^+) = f(u(n))} for all nN.{n \in \nat.}

The recursion theorem is what allows us to construct recursive definitions. For example, suppose we were told that a function f{f} is defined as

f(0),f(f(0)),f(f(f(0))),f(f(f(f(0)))),. f(0), f(f(0)), f(f(f(0))), f(f(f(f(0)))), \ldots.

This is a function defined in terms of a previous application of the function, starting at some known base case. The Principle of Induction, on its own, does not allow us to create these definitions. Why? Because we have no reason to believe, with induction alone, that the function f{f} even exists. Induction says nothing about existence. Indeed, this is a drawback of inductive proofs, and it's why many mathematicians find them unsatisfying — they do not yield new theorems. This illustrates a key point in mathematics, and more broadly, logic: There's a difference between describing an object (e.g., proving its properties with induction) and establishing the object's existence.

Operations on Naturals

Having established the natural numbers, we now want to establish their arithmetic. We begin with addition.

Addition

The recursion theorem is precisely what allows us to define addition. Before we do so, let's quickly review the notion of a successor:

successor. For each nN,{n \in \nat,} there exists exactly one natural number called the successor of n,{n,} denoted n+,{n^+,} for which the following properties are true:

  1. n+0.{n^+ \neq 0.}
  2. If n+=m+,{n^+ = m^+,} then n=m.{n = m.}
  3. If n=0,{n = 0,} then we denote n+{n^+} as 1.{1.}

Here is the definition of addition:

addition. By the recursion theorem, to every pair (x,y)N×N,{(x,y) \in \nat \times \nat,} there exists a unique function +{+} that assigns exactly one natural number such that:

  1. +(x,0)x{+(x,0) \mapsto x} for every xN.{x \in \nat.}
  2. +(x,y+)(+(x,y))+{+(x,y^+) \mapsto (+(x,y))^+} for every x,yN.{x,y \in \nat.}

We denote the assigned natural number as x+y.{x + y.}

Suppose we're given +(x,0+).{+(x,0^+).} Then by property (2), we have +(x,0+)=(+(x,0+))+.{+(x,0^+) = (+(x,0^+))^+.} Recall that we denote the successor 0+{0^+} with the symbol 1. So, we have +(x,1)=(+(x,0))+.{+(x,1) = (+(x,0))^+.} And since +(x,0)=x,{+(x,0) = x,} we have +(x,1)=x+.{+(x,1) = x^+.} What this means, then, is that the successor of any natural number xN{x \in \nat} can be expressed as x+1.{x + 1.} We now join the rest of society: Whenever we write x+1{x + 1} with xN,{x \in \nat,} we mean the successor of x.{x.} Since +(x,0)x,{+(x,0) \mapsto x,} we get the following properties:

lemma. Given xN,{x \in \nat,} x+0=x.{x + 0 = x.}

lemma. 0+1=1.{0 + 1 = 1.}

The second property is quite remarkable, because it's in line with the fourth Peano axiom: For all nω,n+0.{n \in \omega, n^+ \neq 0.} Thus, 1+10.{1 + 1 \neq 0.} To make things clearer, we ought to state the Peano axioms entirely with our new notation for the succesor.

axiom. 0N.{0 \in \nat.}

axiom. If nN,{n \in \nat,} then n+1N.{n + 1 \in \nat.}

axiom. For all nN,{n \in \nat,} n+10.{n + 1 \neq 0.}

Having established addition, we can move forward to establishing a few other properties.

Given n,mN,{n,m \in \nat,} if nm,{n \neq m,} then n+1m+1.{n + 1 \neq m + 1.} This is just the contrapositive of the fourth Peano Axiom: If n,mN,{n,m \in \nat,} then nm{n \neq m} implies n+m+.{n^+ \neq m^+.}

axiom. Given n,mN,{n,m \in \nat,} if nm,{n \neq m,} then n+1m+1.{n + 1 \neq m + 1.}

Next, given nN,{n \in \nat,} it must be the case that n+1n.{n + 1 \neq n.} Why? Suppose n+1=n.{n + 1 = n.} If n=0,{n = 0,} then 0+1=0.{0 + 1 = 0.} But that can't be true, since we've already established that 0+1=1.{0 + 1 = 1.} So it must be the case that n+1n.{n + 1 \neq n.}

lemma. Given n,mN,{n,m \in \nat,} n+1n.{n + 1 \neq n.}

We'll state the contrapositive of the third property explicitly as well:

lemma. Given n,mN,{n,m \in \nat,} if n+1=m+1,{n + 1 = m + 1,} then n=m.{n = m.}

Suppose we have some nN{n \in \nat} with n0.{n \neq 0.} It follows that n+1N,{n + 1 \in \nat,} since n+1{n + 1} is simply n{n}'s successor. If we let x=n+1,{x = n + 1,} then xN.{x \in \nat.} And since x=n+1,{x = n + 1,} it cannot be the case that x=1,{x = 1,} since n0.{n \neq 0.} (It also can't be the case that x=0,{x = 0,} since the successor of a natural number is never 0.{0.}) Thus, we have the following:

lemma. For each xN{x \in \nat} with x0{x \neq 0} and x1,{x \neq 1,} there exists an n{n} such that x=n+1{x = n + 1} and n0.{n \neq 0.}

Associative Law of Addition

From the definition of addition, we know that given a,bN,{a,b \in \nat,} there exists a natural number a+bN.{a + b \in \nat.} Addition also tells us that (a+b)+0=a+b,{(a + b) + 0 = a + b,} and b+0=b.{b + 0 = b.} Thus, we have:

a+b=(a+b)+0=a+(b+0)=a+b. a + b = (a + b) + 0 = a + (b + 0) = a + b.

Might it be true that (a+b)+c=a+(b+c){(a + b) + c = a + (b + c)} for all a,b,cN?{a,b,c \in \nat?} Well, let's suppose it's true. Then it must be the case that:

(a+b)+c+1N. (a + b) + c + 1 \in \nat.

Let x=c+1.{x = c + 1.} Then by the definition of addition, we have:

(a+b)+x=((a+b)+x)+1. (a + b) + x = ((a + b) + x) + 1.

Since we assumed that (a+b)+c=a+(b+c){(a + b) + c = a + (b + c)} is true, it follows that for the righthand side, ((a+b)+x)+1=(a+(b+x))+1.{((a + b) + x) + 1 = (a + (b + x)) + 1.} Therefore:

(a+b)+x=((a+b)+x)+1.=(a+(b+x))+1. \eqs{ (a + b) + x &= ((a + b) + x) + 1. \\ &= (a + (b + x)) + 1. }

From the definition of addition, know that a+(b+x)=(a+(b+x))+1.{a + (b + x) = (a + (b + x)) + 1.} Thus, we get:

(a+b)+x=((a+b)+x)+1.=(a+(b+x))+1.=a+(b+x). \eqs{ (a + b) + x &= ((a + b) + x) + 1. \\ &= (a + (b + x)) + 1. \\ &= a + (b + x). }

Given that x=c+1,{x = c + 1,} it follows that (a+b)+c=a+(b+c){(a + b) + c = a + (b + c)} for all a,b,cN.{a,b,c \in \nat.}

associativity of addition. a,b,cN:{\forall a,b,c \in \nat:} (a+b)+c=a+(b+c).{(a + b) + c = a + (b + c).}

Commutativity of Addition

From the definition of addition, we know that 0+0=0=0+0.{0 + 0 = 0 = 0 + 0.} Is 0+k=k+0?{0 + k = k + 0?} Suppose it's true that 0+k=k+0.{0 + k = k + 0.} Then let k=k+1,{k' = k + 1,} the successor of k.{k.} From the definition of addition, we know that (0+k)=(0+k).{(0 + k') = (0 + k)'.} Thus, we have:

0+k=(0+k). \eqs{ 0 + k' &= (0 + k)'. \\ }

Then, we assumed that 0+k=k+0,{0 + k = k + 0,} we have:

0+k=(0+k).=(k+0). \eqs{ 0 + k' &= (0 + k)'. \\ &= (k + 0)'. \\ }

By the definition of addition, we know that k+0=k.{k + 0 = k.} Therefore, we have:

0+k=(0+k).=k. \eqs{ 0 + k' &= (0 + k)'. \\ &= k'. \\ }

And since k+0=k,{k' + 0 = k',} we have:

0+k=(0+k).=k+0. \eqs{ 0 + k' &= (0 + k)'. \\ &= k' + 0. \\ }

This gives us the first property of commutativity:

commutativity of zero on addition. nN:n+0=n=0+n.{\forall n \in \nat: n + 0 = n = 0 + n.}

Say we had a,bN,{a,b \in \nat,} with b=a+1,{b = a + 1,} the successor of a.{a.} Is it the case that (a+1)+b=(a+b)+1?{(a + 1) + b = (a + b) + 1?} Well, suppose (a+1)+b(a+b)+1.{(a + 1) + b \neq (a + b) + 1.} If a=0,{a = 0,} it follows that:

(0+1)+b(0+b)+1. (0 + 1) + b \neq (0 + b) + 1.

We know that the successor of 0{0} is 1,{1,} and that 0+b=b{0 + b = b} following the commutativity of zero on addition. Therefore:

1+bb+1. 1 + b \neq b + 1.

We said that a=0,{a = 0,} and that b=a+1,{b = a + 1,} the successor of a,{a,} which means b=1:{b = 1:}

1+00+1. 1 + 0 \neq 0 + 1.

The initial assumption that (a+1)+b(a+b)+1{(a + 1) + b \neq (a + b) + 1} cannot be true. We know that the successor of 0{0} is 1,{1,} and that 1+0=1,{1 + 0 = 1,} by the law of commutativity on zero. Given an nN,{n \in \nat,} it must be true that (a+1)+b=(a+b)+1.{(a + 1) + b = (a + b) + 1.}

commutatitivty of successor on addition. a,bN:(a+1)+b=(a+b)+1.{\forall a,b \in \nat: (a + 1) + b = (a + b) + 1.}

Might it be the case that for any m,nN,{m,n \in \nat,} m+n=n+m?{m + n = n + m?} Well, it's certainly true if n=0.{n = 0.} Let's assume it's true for all m,nN.{m,n \in \nat.} From the commutativity of a successor on addition, we know know that:

(n+1)+m=(n+m)+1. (n + 1) + m = (n + m) + 1.

Because we assumed that m+n=n+m,{m + n = n + m,} we have:

(n+1)+m=(n+m)+1.=(m+n)+1. \eqs{ (n + 1) + m &= (n + m) + 1. \\ &= (m + n) + 1. }

Clearly, (n+1)+m=(m+n)+1{(n + 1) + m = (m + n) + 1} is true, per the commutativity of a successor on addition. Therefore, we have:

commutativity of addition. n,mN:n+m=m+n.{\forall n,m \in \nat: n + m = m + n.}

Commutativity is a valuable property, but it also means that we must keep a close eye on it. In particular, we ought to establish that y=x+y{y = x + y} if, and only if, x=0{x = 0} for all yN.{y \in \nat.} This proposition consists of two claims:

(x=0)(x+y=y).(x+y=y)(x=0). (x = 0) \nc (x + y = y). \\ (x + y = y) \nc (x = 0).

The second claim is straightforward to check. Suppose x+yy,{x + y \neq y,} x=0,{x = 0,} and y{y} is some arbitrary natural number. Then we'd have 0+yy.{0 + y \neq y.} But this violates the commutativity of zero on addition, so it must be true that (x+y=y)(x=0).{(x + y = y) \nc (x = 0).} Now to the first claim. Suppose (x=0)(x+yy).{(x = 0) \nc (x + y \neq y).} The contrapositive of this assumption is that (x+y=y)(x0).{(x + y = y) \nc (x \neq 0).} But we just verified that (x+y=y)(x=0).{(x + y = y) \nc (x = 0).} The first claim must therefore be true. Thus, we have the following:

lemma. For all yN,{y \in \nat,} y=x+y{y = x + y} if, and only if, x=0.{x = 0.}

We should also establish that given x,y,zN,{x,y,z \in \nat,} if yz,{y \neq z,} then x+yx+z.{x + y \neq x + z.} We'll use induction for this one. First, consider the case of some fixed y,zN.{y,z \in \nat.} If yz,{y \neq z,} we know that their successors aren't equal either: yz.{y' \neq z'.} And since yz,{y' \neq z',} we have 1+y1+z.{1 + y \neq 1 + z.} And since 1N,{1 \in \nat,} we know that the proposition holds for the base case — a fixed yN{y \in \nat} and a fixed zN.{z \in \nat.} Let's prove it for any natural number xN.{x \in \nat.} Suppose its true that if yz,{y \neq z,} then x+yx+z.{x + y \neq x + z.} It follows that (x+y)(x+z).{(x + y)' \neq (x + z)'.} Because addition is commutative on successors, we know that x+yx+z.{x' + y \neq x' + z.} Since xN,{x \in \nat,} xN,{x' \in \nat,} and the proposition holds for all xN.{x \in \nat.}

lemma. For all x,y,zN,{x,y,z \in \nat,} if yz,{y \neq z,} then x+yx+z.{x + y \neq x + z.}

Comparison Relations

Having established addition, we should establish that N{\nat} is ordered. To do so, we have to return to using strictly set theory symbols. For a set to have some notion of ordering, we must have method of comparing its elements. For the natural numbers, this is done with the following definition:

comparable. Given m,nN,{m,n \in \nat,} we say that m{m} and n{n} are comparable if at least one of these cases is true: (a) mn,{m \in n,} (b) m=n,{m = n,} or (c) nm.{n \in m.}

Suppose that for each nN,{n \in \nat,} there exists a set S(n){S(n)} comprising all the mN{m \in \nat} that satisfy at least one of the cases in the definition. That is, all the mN{m \in \nat} that are comparable to n{n} are contained in the set S(n).{S(n).} Now let's say that S{S} is the set of all n{n} where S(n)=N.{S(n) = \nat.} This implies that S=N.{S = \nat.} Clearly, 0S,{0 \in S,} because S(0){S(0)} contains the set of all n{n} that are comparable to 0:{0:} Given an mN,{m \in \nat,} it's impossible for m0,{m \in 0,} because 0:=,{0 := \nil,} so either m=0{m = 0} or 0m,{0 \in m,} which satisfies the definition. Because mS(0),{m \in S(0),} it follows that m+S(0),{m^+ \in S(0),} which means that S(0)=N.{S(0) = \nat.} That's the base case, where n=0.{n = 0.} Now let's show that if S(n)=N,{S(n) = \nat,} it follows that S(n+)=ω.{S(n^+) = \omega.} We know that 0S(n+),{0 \in S(n^+),} because n+S(0).{n^+ \in S(0).} Suppose that mS(n+).{m \in S(n^+).} Then either n+m,{n^+ \in m,} or n+=m,{n^+ = m,} or mn+,{m \in n^+,} per the definition. If it's mn+,{m \in n^+,} then either m=n{m = n} or mn.{m \in n.} Consider the last case, mn.{m \in n.} Because we assumed that mS(n+),{m \in S(n^+),} we know that m+S(n+),{m^+ \in S(n^+),} since mN.{m \in \nat.} This means that we have either nm+,{n \in m^+,} n=m+,{n = m^+,} or m+n.{m^+ \in n.} The first case, nm+,{n \in m^+,} cannot occur. Why? Because if nm+,{n \in m^+,} then either nm{n \in m} or n=m,{n = m,} which means that nm.{n \subset m.} And that cannot be true, because no natural number is a subset of its elements. What about the case where n+m{n^+ \in m} or n+=m?{n^+ = m?} Well, if n+m,{n^+ \in m,} then n+=m+,{n^+ = m^+,} and if n+=m,{n^+ = m,} then n+=m+.{n^+ = m^+.} And the cases where n=m+{n = m^+} and m+n?{m^+ \in n?} Both of these cases imply that m+n+.{m^+ \in n^+.} All of this leads to the following:

theorem. Let m,nN{m,n \in \nat} with mn.{m \neq n.} Then it must be true that: (mn)(mn){(m \in n) \iff (m \subset n)}. Because it is always the case that either mn,{m \in n,} m=n,{m = n,} or nm,{n \in m,} we adopt the following conventions: If it is known that mn,{m \in n,} we write m<n.{m \lt n.} If it is known that mn,{m \notin n,} we write mn.{m \ge n.} If it is known that nm,{n \in m,} we write m>n.{m \gt n.} And if it is known that nm,{n \notin m,} we write mn.{m \le n.}

From the theorem above, we can make a few observations. (A) First, if m=n,{m = n,} then nm{n \notin m} and mn.{m \notin n.} (B) Second, if mn,{m \in n,} then nm,{n \notin m,} since no natural number is a subset of itself. (C) Third, if nm,{n \in m,} then mn,{m \notin n,} again because no natural number is a subset of itself. Putting it all together:

(a):  (m=n)(mnnm)(b):  (mn)(nm)(c):  (nm)(mn) \eqs{ &\df{(a):}~~ (m = n) \nc (m \notin n \land n \notin m) \\ &\df{(b):}~~ (m \in n) \nc (n \notin m) \\ &\df{(c):}~~ (n \in m) \nc (m \notin n) \\ }

Examining each of these cases, it's clear that they can never occur at the same time. If (A) is true, then (B) and (C) are false. If (B) is true, then (A) is false because mn{m \in n} and (C) is false. If (C) is true, then (A) is again false because nm,{n \in m,} and (B) is false.

theorem. Let m,nN.{m,n \in \nat.} Then exactly one of the following is true:

  1. m<n.{m \lt n.}
  2. m=n.{m = n.}
  3. m>n.{m \gt n.}

We can state some properties about the comparison properties. Suppose a,b,cN.{a,b,c \in \nat.} If a<b,{a \lt b,} and b<c,{b \lt c,} is it the case that a<c?{a \lt c?} Let's assume it's not the case: a<b{a \lt b} and b<c{b \lt c} and ac.{a \nless c.} If ac,{a \nless c,} then ca.{c \le a.} So either c=a{c = a} or c<a.{c \lt a.} If c=a,{c = a,} then b<a.{b \lt a.} But this contradicts our assumption that a<b.{a \lt b.} Perhaps c<a{c \lt a} then? If c<a,{c \lt a,} then it must be true that ca.{c \subset a.} But from the definition of the <{\lt} sign, we know that if b<c{b \lt c} and a<b{a \lt b} imply that bc{b \subset c} and ab.{a \subset b.} Can it be true that cabc?{c \subset a \subset b \subset c?} No. It must be the case that a<c.{a \lt c.}

transitivity of lesser. Given a,b,cN,{a,b,c \in \nat,} if a<b{a \lt b} and b<c,{b \lt c,} it follows that a<b<c.{a \lt b \lt c.}

Multiplication

Here is the definition of multiplication:

multiplication. By the recursion theorem, to every pair (x,y)N×N,{(x,y) \in \nat \times \nat,} there exists a unique function ×{\times} that assigns exactly one natural number such that:

  1. ×(x,0)0{\times(x,0) \mapsto 0} for every xN.{x \in \nat.}
  2. ×(x,y+)×(x,y+x){\times(x,y^+) \mapsto \times(x, y + x)} for every x,yN.{x,y \in \nat.}

We denote the assigned natural number as x×y,{x \times y,} or equivalently, xy.{xy.}

Notice that this is structurally the same definition as that of addition. Other than the different function symbol ×,{\times,} the key difference is that x×0{x \times 0} maps to 0,{0,} and that x×y+{x \times y^+} maps to x×y+x.{x \times y+x.}

The first property we should prove is the commutativity of zero on multiplication. This will make our lives easier for the other proofs. We claim that x×0=0=0×x.{x \times 0 = 0 = 0 \times x.} We'll prove this with induction. Our base case is x=0.{x = 0.} In that case, 0×0=0=0×0.{0 \times 0 = 0 = 0 \times 0.} This is true by definition. Now we prove it holds our claim holds for xN.{x \in \nat.} We claim that if x×0=0×x{x \times 0 = 0 \times x} is true, then (x+1)×0=0×(x+1).{(x + 1) \times 0 = 0 \times (x + 1).}

By the definition of multiplication, we know that 0×(x+1)=(0×(x+0))+0.{0 \times (x + 1) = (0 \times (x + 0)) + 0.} Therefore, we have:

0×(x+1)=(0×x)+0 \eqs{ 0 \times (x + 1) &= (0 \times x) + 0 \\ }

Since we assumed that x×0=0×x{x \times 0 = 0 \times x} (our induction hypothesis), we have:

0×(x+1)=(0×x)+0=0+0 \eqs{ 0 \times (x + 1) &= (0 \times x) + 0 \\ &= 0 + 0 }

By the definition of natural addition, we know that 0+0=0.{0 + 0 = 0.} By the definition of natural multiplication, we have (x+1)×0=0.{(x + 1) \times 0 = 0.} Therefore, it must be true that 0×(x+1)=0=(x+1)×0.{0 \times (x + 1) = 0 = (x + 1) \times 0.}

zero element. nN:{\forall n \in \nat:} n×0=0=0×n.{n \times 0 = 0 = 0 \times n.}

We should state clearly that there's an identity element for multiplication, 1.{1.} This follows directly from the definition of multiplication. We know that 1 is the successor of 0. So, given x×1,{x \times 1,} we must have x×(0+1).{x \times (0 + 1).} It must also be the case that n×1=1×n.{n \times 1 = 1 \times n.} If it weren't, then we'd have 0×10×1{0 \times 1 \neq 0 \times 1} when n=0,{n = 0,} which violates the zero element rule.

identity element. nN:n×1=n=1×n.{\forall n \in \nat: n \times 1 = n = 1 \times n.}

Commutativity of Multiplication

Is it true that xy=yx{xy = yx} for any x,yN?{x,y \in \nat?} It's certainly true when x=1,{x=1,} by the identity element. We have y×1=y,{y \times 1 = y,} and 1×y=y.{1 \times y = y.} Suppose xN,{x \in \nat,} and xy=yx{xy = yx} is true. Then by the definition of addition, xy+y=yx+y=yx+.{xy + y = yx + y = yx^+.} And by the definition of multiplication, we have x+y=xy+y.{x^+y = xy + y.} Thus, we have x+y=yx+.{x^+y=yx^+.} It follows that xy=yx{xy = yx} for all x,yN.{x,y \in \nat.}

commutativity of multiplication. a,bN:ab=ba.{\forall a,b \in \nat: a \by b = b \by a.}

Distributivity of Multiplication over Addition

Suppose x,yN.{x,y \in \nat.} We claim that x(y+z)=xy+xz.{x(y+z)=xy+xz.} First, suppose z=1.{z=1.} Then we'd have x(y+1)=xy+=xy+x=xy+x1.{x(y+1) = xy^+ = xy + x = xy + x \by 1.} Which is true. Therefore, the claim is true for the case where z=1.{z = 1.} Now suppose we select an arbitrary z.{z.} Assume that x(y+z)=xy+xz{x(y+z)=xy+xz} is true. If it is true, then we have:

x(y+z+)=x((y+z)+)=x(y+z)+x=(xy+xz)+x=xy+(xz+x)=xy+xz+. \eqs{ x(y+z^+) &= x((y+z)^+) \\ &= x(y+z) + x \\ &= (xy+xz) + x \\ &= xy + (xz + x) \\ &= xy + xz^+. }

It follows that x(y+z)=xy+xz{x(y+z) = xy + xz} for all x,y,zN.{x,y,z \in \nat.}

distributivity of multiplication. a,b,cN:a(b+c)=ab+ac.{\forall a,b,c \in \nat: a(b+c) = ab + ac.}

Associativity of Multiplication

We claim that (xy)z=x(yz){(xy)z = x(yz)} for all x,y,zN.{x,y,z \in \nat.} First, suppose z=1.{z = 1.} Then (xy)1=xy=x(y1).{(xy) \by 1 = xy = x(y \by 1).} This is true. No suppose z{z} is some arbitrary natural number. Assume (xy)z=x(yz){(xy)z = x(yz)} is true. Then we have:

(xy)z+=(xy)z+xy=x(yz)+xy=x(yz+y)=x(yz+). \eqs{ (xy)z^+ &= (xy)z + xy \\ &= x(yz) + xy \\ &= x(yz + y) \\ &= x(yz^+). }

Clearly, (xy)z=x(yz){(xy)z = x(yz)} for all x,y,zN.{x,y,z \in \nat.}

associativity of multiplication. a,b,cN:a(bc)=b(ac).{\forall a,b,c \in \nat: a(bc) = b(ac).}

Integers

The natural numbers, truly, are a remarkable construct. But they're inherently limited: We have no way of solving equations like x+1=0{x + 1 = 0} and x+5=3.{x + 5 = 3.} The former cannot be solved because no successor is 0 by definition, and the latter cannot be solved because no natural number is a subset of its elements, which implies that 3{3} cannot be a successor of 5.{5.} We need another construct.

One idea is to define the integers as solutions to the equation x+b=a,{x + b = a,} where x,b,aN.{x,b,a \in \nat.} This avoids violating our established definitions and propositions, because it's cast entirely in terms of the naturals. An integer, then, is an ordered pair (a,b){(a,b)} which we may denote as ab.{a - b.} The problem with this idea, however, is that it's overbroad — different equations can have the same solutions. For example, x+1=2{x+1=2} and x+3=4{x+3=4} have the same solution 1.{1.} However, because we defined the solutions as tuples, the x{x} in x+1=2{x+1=2} is the tuple (1,2),{(1,2),} which we denote as 21,{2-1,} and the x{x} in x+3=4{x+3=4} is the tuple (3,4),{(3,4),} which we denote as 43.{4-3.} Because these are different tuples, we have 2143.{2-1 \neq 4-3.} That's not what we want.

What we can do is establish that the tuples solving these equations are all the same. We'll start by establishing some notation.

notation. Let m,nN.{m,n \in \nat.} Then the notation mn{m - n} denotes a pair (m,n)N×N.{(m,n) \in \nat \times \nat.}

Now a definition:

definition. Let {\sim} be a relation on N×N.{\nat \times \nat.} The relation mnpq{m - n \sim p - q} is true if and only if m+q=n+p.{m + q = n + p.}

From the definition above, we can infer a few things. First, we have mnmn,{m - n \sim m - n,} since m+n=m+n{m + n = m + n} by the definition of addition. Thus:

lemma i.a. Given m,nN,{m,n \in \nat,} it follows mnmn.{m - n \sim m - n.} That is, the relation {\sim} is reflexive.

Second, if by the commutative property of addition, we have n+p=m+q.{n + p = m + q.} It follows that pqmn.{p - q \sim m - n.}

lemma i.b. Given m,n,p,qN,{m,n,p,q \in \nat,} if mnpq,{m - n \sim p - q,} then pqmn.{p - q \sim m - n.} That is, the relation {\sim} is symmetric.

Third, say we had six natural numbers, m,n,p,q,r,s.{m,n,p,q,r,s.} Now suppose we had mnpq{m - n \sim p - q} and pqrs.{p - q \sim r - s.} This implies that:

m+q=n+p,p+s=q+r. \eqs{ m + q &= n + p, \\ p + s &= q + r. }

Since all six numbers are natural numbers, we know that (m+s)+q{(m + s) + q} is a natural number, since the successor of a natural number is a natural number. Using the laws we already have:

(m+s)+q=m+(s+q)     by associativity of addition=m+(q+s)     by commutativity of addition=(m+q)+s     by associativity of addition=(n+p)+s     since m+q=n+p=n+(p+s)     by associativity of addition=n+(q+r)     since p+s=q+r=n+(r+q)     by commutativity of addition=(n+r)+q     by associativity of addition \eqs{ (m + s) + q &= m + (s + q) ~~~~~ \text{by associativity of addition} \\ &= m + (q + s) ~~~~~ \text{by commutativity of addition} \\ &= (m + q) + s ~~~~~ \text{by associativity of addition} \\ &= (n + p) + s ~~~~~ \text{since $m + q = n + p$} \\ &= n + (p + s) ~~~~~ \text{by associativity of addition} \\ &= n + (q + r) ~~~~~ \text{since $p + s = q + r$} \\ &= n + (r + q) ~~~~~ \text{by commutativity of addition} \\ &= (n + r) + q ~~~~~ \text{by associativity of addition} \\ }

Since (m+s)+q=(n+r)+q,{(m + s) + q = (n + r) + q,} we know that m+s=n+r.{m + s = n + r.} Which means that, if mnpq{m - n \sim p - q} and pqrs,{p - q \sim r - s,} it follows that mnrs.{m - n \sim r - s.}

lemma i.c. Given m,n,p,q,r,sN,{m,n,p,q,r,s \in \nat,} if mnpq,{m - n \sim p - q,} and pqrs,{p - q \sim r - s,} then mnrs.{m - n \sim r - s.} That is, the relation {\sim} is symmetric.

Because of lemma i.a., lemma i.b., and lemma i.c., the relation  {~} is reflexive, symmetric, and transitive. Therefore, the relation {\sim} is an equivalence relation.

theorem. For all natural numbers a,b,c,d,{a,b,c,d,} if and only if a+d=b+c,{a + d = b + c,} then the pair of natural numbers represented by ab{a - b} is equivalent to the pair represented by cd.{c - d.}

What we've essentially done is define ab{a - b} as denoting a pair (a,b){(a,b)} where a,bN.{a,b \in \nat.} But more importantly, we've established that we can verify whether a given pair is equivalent to ab.{a - b.} In other words, by the recursion theorem, given a,b,c,dN,{a,b,c,d \in \nat,} there exists an equivalence class of ordered pairs:

[(a,b)]:=[(a,b)(c,d)(a+d=b+c)]. [(a,b)]_{\equiv} := [(a,b) \equiv (c,d) \iff (a + d = b + c)].

Because the set of natural numbers always has a unique member 0, every equivalence class [(a,b)]{[(a,b)]_{\equiv}} has a unique member of the form (n,0),{(n,0),} (0,n),{(0,n),} or both at once, where nN.{n \in \nat.} Gathering all of these classes into a set, we have:

{,[(0,3)],[(0,2)],[(0,1)],[(0,0)],[(0,0)],[(1,0)],[(2,0)],[(3,0)],}. \lset{\ldots, [(0,3)]_{\equiv}, [(0,2)]_{\equiv}, [(0,1)]_{\equiv}, [(0,0)_{\equiv}], [(0,0)]_{\equiv}, [(1,0)]_{\equiv}, [(2,0)]_{\equiv}, [(3,0)]_{\equiv}, \ldots}.

Following our notation, each member of this set corresponds to:

{,[03],[02],[01],[00],[00],[10],[20],[30],}. \lset{\ldots, [0-3], [0-2], [0-1], [0-0], [0-0], [1-0], [2-0], [3-0], \ldots}.

By convention, we denote classes of the form [(n,0)]{[(n,0)]} as n,{n,} and classes of the form [(0,n)]{[(0,n)]} as n.{-n.} That is, their solution forms:

{,3,2,1,0,0,1,2,3,}. \lset{\ldots, -3, -2, -1, -0, 0, 1, 2, 3, \ldots}.

Now, to embed the natural numbers in this set, we define (by the recursion theorem) a function that maps each natural number nN{n \in \nat} to a subset of Z:{\uint:} the subset [(n,0)].{[(n,0)].} Thus, we have 00,11,22,{0 \mapsto 0, 1 \mapsto 1, 2 \mapsto 2,} and so on. This allows us to say that the natural numbers are a subset of this set of equivalent classes. We might notice something funny. There's a 0?{-0?} Indeed, there is! But only because of how we've defined the integers: Each member of the set (an integer) is a set of equivalence classes of mappings — there are always two symbols. However, the natural number 0 has a very special property: 0+n=0=n+0.{0 + n = 0 = n + 0.} As such, 0{-0} and 0{0} are no different. Thus, we adopt another convention to denote the set:

[(a,b)]:={ab if ab(ba) else  [(a,b)] := \begin{cases} a - b ~ & \if a \ge b \\ -(b-a) ~& \else \end{cases}

This gives us the set we're all familiar with, which we denote more concisely as Z:{\uint:}

Z:={,3,2,1,0,1,2,3,} \uint := \set{\ldots, -3, -2, -1, 0, 1, 2, 3, \ldots}

More explicitly:

integers. The set Z{\uint} is defined as the disjoint union Z{0}Z+,{\uint^- \dup \set{0} \dup \uint^+,} where Z{\uint^-} is the set of all equivalence classes [(0,a)],{[(0,a)]_{\equiv},} where Z+{\uint^+} is the set of all equivalence classes [(a,0)],{[(a,0)]_{\equiv},} and where the equivalence {\equiv} is defined as x+m=y+n{x + m = y + n} given (x,y),(n,m)N×N.{(x,y), (n,m) \in \nat \times \nat.} By definition, NZ.{\nat \subset \uint.}

Operations on the integers are defined as follows:

integer addition. Let a,bZ.{a,b \in \uint.} Then

a+b=[(m,n)]+[(p,q)]=[(m+p,n+q)] a + b = [(m,n)]_{\equiv} + [(p,q)]_{\equiv} = [(m+p,n+q)]_{\equiv}

where m,n,p,qN.{m,n,p,q \in \nat.}

Now, we have to make sure that this operation is well-defined, because we're adding equivalence classes here, rather than the usual natural numbers. Fortunately, we can do so quickly. First, let's consider the base case (m,n)(m,n),{(m,n) \equiv (m,n),} and (p,q)(p,q).{(p,q) \equiv (p,q).} Then we have:

m+n=m+n   and   p+q=p+q. m + n = m + n ~~~ \text{and} ~~~ p + q = p + q.

Both true. Now let's suppose (m,n)(m+,n+){(m,n) \equiv (m^+,n^+)} and (p,q)(p+,q+).{(p,q) \equiv (p^+,q^+).} Then we have:

m+n+=m++n   and   p+q+=p++q. m + n^+ = m^+ + n ~~~ \text{and} ~~~ p + q^+ = p^+ + q.

According to our definition of addition, we have:

m++p++n+q=n++q++m+p. m^+ + p^+ + n + q = n^+ + q^+ + m + p.

Integer addition is well defined. Note that because of this definition, subttraction comes naturally. The same verification must be done for multiplication:

integer multiplication. Let a,bZ.{a,b \in \uint.} Then

ab=[(m,n)][(p,q)]=[(mp+nq,np+mq)] a \by b = [(m,n)]_{\equiv} \by [(p,q)]_{\equiv} = [(mp + nq, np + mq)]_{\equiv}

where m,n,p,qN.{m,n,p,q \in \nat.}

The Rationals

From number theory, the /{/} operation, called division, is defined as follows:

division. Let a,bZ.{a,b \in \uint.} Then a/b{a/b} is defined if and only if there exists a qZ{q \in \uint} such that a=bq+r{a = bq + r} with 0r<b.{0 \le r \lt b.}

This is a nice definition, since it allows us to solve equations like 2x+1=5.{2x + 1 = 5.} Here, there is a qZ,{q \in \uint,} the integer 2.{2.} Unfortunately, we can't solve 2x=1.{2x = 1.} Why? Because there is no qZ{q \in \uint} that satisfies 2x=1.{2x = 1.} This means that we need a special set of numbers that can solve this equation. Since we want to solve equations involving Z,{\uint,} we need all of the usual integer operations to work on this new set. We'll also want its members to be ordered. The last thing we want is reinventing over a thousand years of mathematics. What we want is a number of the form

ab. \dfrac{a}{b}.

This allows us to use the cancellation law of addition on the integers. For example, given 2x=1,{2x = 1,} the solution would be a number from this set, denoted 12.{\frac{1}{2}.}

212=1. \cancel{2} \by \dfrac{1}{\cancel{2}} = 1.

Sound familiar? Indeed, this is precisely what we did when we wanted to define subtraction. We defined a set of equivalence classes. Once again, we'll have to define what the symbol ab{\frac{\phantom{a}}{\phantom{b}}} means. Otherwise, it'd be ambiguous. A good first attempt is to define ab{\frac{a}{b}} as a tuple (a,b){(a,b)} that belongs to some relation RZ×Z.{R \subseteq \uint \times \uint.} This is permissible, since aZ{a \in \uint} and bZ.{b \in \uint.} If we just left it at this, however, we'd run into a problem. Since we're allowing any integer to form this tuple, we can have

10. \dfrac{1}{0}.

But if there is a number 1/0,{1/0,} it follows that:

010=10.1=0. \eqs{ \cancel{0} \by \dfrac{1}{\cancel{0}} &= 1 \by 0. \\ 1 &= 0. }

Not good. So, we can't allow the b{b} in the tuple (a,b){(a,b)} to be 0. So, we'll have to adjust the codomain to Z0{\uint \rid 0} (the integers excluding 0). This gives us our first working definition:

ab(a,b)R(Z×Z0) \dfrac{a}{b} \iff (a,b) \in R \subseteq (\uint \times \uint \rid 0)

This is pretty good. We've defined what ab{\frac{a}{b}} means purely in terms some relation. But, we've got a problem. Recall that tuple equality is defined as (a,b)=(c,d)(a=cb=d).{(a,b) = (c,d) \iff (a = c \land b = d).} Suppose we're given the following equations: 2x1=0,{2x - 1 = 0,} and 4x2=0.{4x - 2 = 0.} Since both these equations are equal to 0,{0,} have:

4x2=2x1.4x22x=1.2x2=1.2x=1+2.2x=1.x=12. \eqs{ 4x - 2 &= 2x - 1. \\ 4x - 2 - 2x &= - 1. \\ 2x - 2 &= -1. \\ 2x &= -1 + 2. \\ 2x &= 1. \\ x &= \frac{1}{2}. }

So, the solution for both equations is x=12.{x = \frac{1}{2}.} If we solved them individually, we get the following:

2x1=0.2x=1.x=12. \eqs{ 2x - 1 &= 0. \\ 2x &= 1. \\ x &= \frac{1}{2}. \\ }
4x2=0.4x=2.x=24. \eqs{ 4x - 2 &= 0. \\ 4x &= 2. \\ x &= \frac{2}{4}. }

We're getting two different tuples. If 2x1=0,{2x - 1 = 0,} then we get the tuple (1,2).{(1,2).} But if 4x2=0,{4x - 2 = 0,} we get the tuple (2,4).{(2,4).} Those are two different tuples, but we just saw that both equations should return the same tuple (1,2).{(1,2).} So how do we ensure that (1,2){(1,2)} is the same as (2,4)?{(2,4)?} Clearly, they aren't the same under tuple equality. This is the precisely the kind of problem we wanted to avoid when we constructed the integers. Thus, we again define the rationals as equivalence classes.

rationals. Let (a,b),(c,d)Z×Z.{(a,b), (c,d) \in \uint \times \uint.} The set Q{\rat} is defined as the set of all equivalence classes [(a,b)],{[(a,b)]_{\equiv},} such that adbc{ad \equiv bc} and b0.{b \neq 0.} If [(a,b)]Q,{[(a,b)] \in \rat,} we may denote it as ab.{\dfrac{a}{b}.}

The construction of the reals is left to the notes on real analysis.