Ordering Natural Numbers

Less Than

We're now prepared to define the usual order relations on natural numbers, starting with "less than". We might call these additive order relations, since they are defined in terms of plus.

We define a relation < on N (pronounced less than) as follows. Given a,bN, we say a<b if there exists cN such that plus(a,next(c))=b.

Showing that a<b is straightforward enough; we just have to exhibit a specific c such that plus(a,next(c))=b. Showing that ab is different, though, because we have to show that no such c exists. This will usually come down to showing that such an equation leads to something we know is absurd, like 0=next(m).

For all mN we have the following.

  1. 0<next(m).
  2. next(m)0.

To see (1), note that plus(0,next(m))=next(m) as needed.

To see (2), suppose to the contrary we have cN with plus(next(m),c)=0. But then next(plus(m,c))=plus(next(m),c)=0, which is absurd.

No natural number is less than itself.

If aN, then aa.

Relations satisfying this property are called antireflexive.

Suppose we have a<a. That is, that for some cN we have plus(a,next(c))=a. Note than that plus(a,0)=a=plus(a,next(c)). Since plus is cancellative, we have 0=next(c); however this is absurd. So we have aa.

Two natural numbers cannot be simultaneously less than each other.

If a,bN such that a<b, then ba.

Relations satisfying this property are called asymmetric.

Suppose a<b; then we have mN such that plus(a,next(m))=b. Now suppose we also have b<a, with nN such that plus(b,next(n))=a. Now =plus(a,plus(next(m),next(n)))=plus((plus(a,next(m)),next(n))=plus(b,next(n))=a. As we've shown, then plus(next(m),next(n))=0. But now we have 0=plus(next(m),next(n))=plus(plus(m,next(n)),next(n))=next(plus(plus(m,next(n)),n)), which is absurd. So ba.

We can collapse chains of less-than relationships.

Let a,b,cN. If a<b and b<c, then a<c.

Relations satisfying this property are called transitive.

Suppose a<b and b<c. Then we have m,nN such that plus(a,next(m))=b and plus(b,next(n))=c. Note that plus(a,next(plus(m,next(n))))=plus(a,plus(next(m),next(m)))=plus(plus(a,next(m)),next(n))=plus(b,next(n))=c, so that a<c.

Less than is compatible with next, plus, and times (almost).

Let a,b,cN. Then the following are equivalent.

  1. a<b
  2. next(a)<next(b).
  3. plus(a,c)<plus(b,c).
  4. times(a,next(c))<times(b,next(c)).

First we show that (1) implies (2). Suppose a<b; then there exists cN such that plus(a,next(c))=b. But then we have plus(next(a),next(c))=next(plus(a,next(c)))=next(b), so that next(a)<next(b).

To see (2) implies (1), suppose we have c such that plus(next(a),next(c)=next(b). Then next(plus(a,next(c)))=plus(next(a),next(c))=next(b); since next is injective, we have plus(a,next(c))=b and thus a<b as needed.

Next we show that (1) implies (3). To that end suppose a<b; then there exists mN such that plus(a,next(m))=b. Now plus(plus(a,c),next(m))=plus(a,plus(c,next(m)))=plus(a,plus(next(m),c))=plus(plus(a,next(m)),c)=plus(b,c) so that plus(a,c)<plus(b,c).

Next we show that (3) implies (1). To that end suppose plus(a,c)<plus(b,c); then there exists mN such that plus(plus(a,c),next(m))=plus(b,c). Now plus(plus(a,next(m)),c)=plus(a,plus(next(m),c))=plus(a,plus(c,next(m)))=plus(plus(a,c),next(m))=plus(b,c). Since plus is cancellative, we have plus(a,next(m))=b, so that a<b as needed.

Now we show that (1) implies (4). To that end, suppose a<b; then there exists mN such that plus(a,next(m))=b. Now times(b,next(c))=times(plus(a,next(m)),next(c))=plus(times(a,next(c)),times(next(m),next(c)))=plus(times(a,next(c)),plus(times(m,next(c)),next(c)))=plus(times(a,next(c)),next(plus(times(m,next(c)),c))), and so times(a,next(c))<times(b,next(c)).

Next we show that (4) implies (1), proceeding by induction on a. For the base case a=0, we consider two possibilities for b. If b=0, then we have times(a,next(c))=times(0,next(c))=times(b,next(c)), so that times(a,next(c))times(b,next(c)). Then (4) is false, so the implication (4) implies (1) holds vacuously. If b=next(m) for some m, then we have times(a,next(c))=times(0,next(c))=0<next(plus(times(m,next(c)),c))=plus(times(m,next(c)),next(c))=times(next(m),next(c))=times(b,next(c)) and a=0<next(m)=b, so (4) implies (1) holds.

For the inductive step, suppose we have aN such that for all b and c, if times(a,next(c))<times(b,next(c)) then a<b. We wish now to show that this statement also holds for next(a). To that end we consider two possibilities for b.

If b=0, we have times(next(a),next(c))=plus(times(a,next(c)),next(c))=next(plus(times(a,next(c)),c))0=times(0,next(c))=times(b,next(c)); So (4) does not hold for b=0, and thus (4) implies (1) holds vacuously in this case.

Suppose instead we have b=next(m) for some mN, and suppose further that times(next(a),next(c))<times(b,next(c)). Now =plus(times(a,next(c)),next(c))=times(next(a),next(c))<times(b,next(c))=times(next(m),next(c))=plus(times(m,next(c)),next(c)). We've already shown that (3) implies (1) over all natural numbers, so this implies times(a,next(c))<times(m,next(c)). By the induction hypothesis on a, we have a<m, and because (1) implies (2) over all natural numbers, we have next(a)<next(m)=b as needed. So (4) implies (1) for all b and c for all a by induction, and so (4) implies (1) over all natural numbers as needed.

...Or Equal To

It's typical to generalize < just a bit to make it reflexive.

We define a relation on N as follows: ab if either a<b or a=b.

Less than or equal to satisfies most of the properties less than does (or very nearly so).

The following are equivalent for all a,b,cN.

  1. ab.
  2. There exists mN such that plus(a,m)=b.
  3. next(a)next(b).
  4. plus(a,c)plus(b,c).
  5. times(a,next(c))times(b,next(c)).

First we show that (1) implies (2). If ab, either a=b or a<b. If a=b, then plus(a,0)=plus(b,0)=b. If a<b, then by definition there is a c with plus(a,next(c))=b. So (1) implies (2).

Now we show that (2) implies (1). Suppose we have mN with plus(a,m)=b. There are two possibilities for m. If m=0, then a=plus(a,0)=plus(a,m)=b, so ab. If m=next(n), then plus(a,next(n))=b, so a<b and thus ab. So (2) implies (1).

Now we show (1) implies (3). If ab, then either a=b or a<b. In the first case we have next(a)=next(b), and in the second case, as we've shown, next(a)<next(b). In either case next(a)next(b) as needed.

(3) implies (1) is shown similarly. If next(a)next(b), then either next(a)=next(b) or next(a)<next(b). In the first case we have a=b because next is injective, and in the second case we've shown that a<b. In either case ab as needed.

Now we show (1) implies (4). If ab then either a=b or a<b. If a=b, we have plus(a,c)=plus(b,c), and if a<b, we've shown that plus(a,c)<plus(b,c). In either case, plus(a,c)plus(b,c).

(4) implies (1) is shown similarly. If plus(a,c)plus(b,c) then either plus(a,c)=plus(b,c) or plus(a,c)<plus(b,c). In the first case, because plus is cancellative we have a=b. In the second case, we've shown that a<b. In either case we have ab as needed.

Next we show (1) implies (5). If ab, then either a=b or a<b. If a=b we have times(a,next(c))=times(b,next(c)). If a<b, then as we've shown we have times(a,next(c))<times(b,next(c)). In either case we have times(a,next(c))times(b,next(c)).

Finally we show (5) implies (1). If times(a,next(c))times(a,next(b)), then either times(a,next(c))=times(b,next(c)) or times(a,next(c))<times(b,next(c)). In the first case we have a=b because times is (almost) cancellative, and in the second case we've shown that a<b. In either case ab.

As expected, is reflexive, antisymmetric, and transitive.

The following hold for all a,b,cN.

  1. aa.
  2. If ab and ba, then a=b.
  3. If ab and bc, then ac.

If aN then a=a, so aa by definition.

Suppose ab and ba. Then there exist m,nN such that plus(a,m)=b and plus(b,n)=a. Now plus(a,plus(m,n))=plus(plus(a,m),n)=plus(b,n)=a; so we have plus(m,n)=0, and then m=n=0. So a=plus(b,m)=plus(b,0)=b as claimed.

Now suppose ab and bc; then there are m,nN with plus(a,m)=b and plus(b,n)=c. Then plus(a,plus(m,n))=plus(plus(a,m),n)=plus(b,n)=c, so ac.

We can also solve some inequalities.

If mN such that m0, then m=0.

Suppose m0. There are two possibilities for m; either m=0 or m=next(n) for some n. We've shown that next(n)0, and also that 00; in either case we have m0. So it must be that m=0.

We can split a inequality with a next into an = part and a < part with no next; this is handy for induction proofs.

Let k,nN. If knext(n), then either kn or k=next(n).

Suppose knext(n); then we have m such that plus(k,m)=next(n). There are two possibilities for m. If m=0, then k=plus(k,0)=plus(k,m)=next(n). Suppose instead that m=next(u) for some u. Then next(n)=plus(k,m)=plus(k,next(u))=next(plus(k,u)). Since next is injective, we have plus(k,u)=n, and so kn as needed.

We can state this in a slightly different way.

For all a,bN, if a<next(b) then ab.

Greater Than

It's convenient to name the inverses of < and .

We define a relation > on N (pronounced greater than) as follows. Given a,bN, a>b means the same as a<b.

Similarly we define such that ab means the same as ba.

> has analogous properties to those of < whose proofs are all trivial.

For all a,b,cN we have the following.

  1. next(a)>0.
  2. 0next(a).
  3. aa.
  4. If a>b, then ba.
  5. If a>b and b>c, then a>c.

> interacts with next, plus, and times.

For all a,b,cN, the following are equivalent.

  1. a>b.
  2. next(a)>next(b).
  3. plus(a,c)>plus(b,c).
  4. times(a,next(c))>times(b,next(c)).

Likewise .

For all a,b,cN we have the following.

  1. aa.
  2. If ab and ba, then a=b.
  3. If ab and bc, then ac.

And interacts with next, plus, and times.

For all a,b,cN, the following are equivalent.

  1. ab.
  2. There exists mN such that plus(b,m)=a.
  3. next(a)next(b).
  4. plus(a,c)plus(b,c).
  5. times(a,next(c))times(b,next(c)).

The additive order relations are handy for lots of reasons. A particularly good one is the following result, which gives a proof template for doing case analysis on N.

Let a,bN. Then one and only one of the following holds.

  1. a<b
  2. a=b
  3. a>b

We call this the trichotomy property of the natural numbers.

First we show the "one" part; that any two natural numbers satisfy at least one of these relations. We proceed by induction on a. For the base case a=0, note that there are two possibilities for b. If b=0, then we have a=0=b. If b=next(m) for some m, then we've shown that a=0<next(m)=b, so that a<b.

For the inductive step, suppose the claim holds for all b for some a, and consider next(a). Let bN. By the inductive hypothesis we have three possibilities.

If a<b, we have plus(a,next(c))=b for some c. Thus plus(next(a),c)=b. There are two possibilities for c; if c=0, then we have next(a)=b as needed, and if c=next(d) for some d then next(a)<b as needed.

If a=b, we have plus(b,next(0))=plus(a,next(0))=next(plus(a,0))=next(a), so b<next(a).

If a>b, we have plus(b,next(c))=a for some c. Now next(a)=next(plus(b,next(c)))=plus(b,next(next(c))), so that b<next(a).

In all cases, either next(a)<b, next(a)=b, or next(a)>b, as needed. By induction the claim holds for all a,bN.

We still need to check the "only one" part of this claim. If a=b, we've shown we cannot also have a<b, and similarly cannot have a>b. If a<b, then (by definition) b>a and we cannot also have a>b.

And so at least one of a<b, a=b, or a>b holds, but also at most one holds.

The order relations also allow us to express an alternative form of the induction principle. Recall that with ordinary induction, a property holds for all natural numbers if it holds for 0 and also for next(n) when it holds for n. It turns out we can "weaken" the inductive hypothesis a bit to all k such that kn. This form of induction is not actually stronger in deductive power than normal induction, but it is sometimes easier to use, and we call it strong induction to distinguish it from normal induction.

Let A be a set and suppose we have a function f:NA. Suppose now that we have a subset BA satisfying the following:

  1. f(0)B.
  2. If nN and f(k)B for all kn, then f(next(n))B.

Then we have f(n)B for all nN. When using this theorem we say we are proceeding by strong induction; (1) is called the base case and (2) is called the inductive step.

Let B be such a subset. We define an auxiliary subset TN as follows: T={nif kn then f(k)B for all k}. We first will show that T=N by induction.

For the base case, consider n=0. If k0, then k=0. We have f(k)=f(0)B by definition, and thus 0T as needed.

For the inductive step, suppose we have nT. Now suppose knext(n). We need to show that f(k)B. There are two possibilities: either kn or k=next(n). Suppose first that kn; since nT, we have f(k)B. Now suppose k=next(n). Again we have nT, and note that the condition for membership in T is precisely the hypothesis of (2). So we have f(next(n))B. In either case we have f(k)B, and so next(n)T. By induction we thus have T=N.

Finally we can show that f(n)B for all n. To this end let nN. We have nT, and in particular, since nn, we have f(n)B. Since n was arbitrary the theorem is proved.

The most common variant of strong induction is that having A=N and f=id.

Suppose we have a subset BN satisfying the following properties.

  1. 0B.
  2. For all nN, if kB whenever kn, then next(n)B.

Then B=N.

Strong induction also has an analogous "measure" variety.

Let f:AN be a function. Suppose we have BA satisfying the following.

  1. f(a)=0 implies aB for all aA.
  2. For all nN, if f(a)=k and kn imply aB for all kN and aA, then f(a)=next(n) implies aB for all aA.

Then we have B=A. When using this theorem we say we are proceeding by strong induction on f; (1) is called the base case, and (2) the inductive step.

Let B be such a subset. We define an auxiliary subset TN by T={nif f(a)=n then aB for all aA}. We first will show that T=N by strong induction.

For the base case n=0, note that for all aA, if f(a)=0 then ab by (1). So we have 0T.

For the inductive step, let nN and suppose we have kT for all kn. We want to show that next(n)T. First note the following: if aA and kn, since kT, we have that if f(a)=k then aB. This is precisely the hypothesis of (2). And so, whenever f(a)=next(n), we have aB. Thus next(n)T, and by induction we have T=N.

Finally, let aA. Now f(a)NT, so we have aB. Thus B=A as claimed.

We can also show that there are no natural numbers between m and next(m) for any m.

Let mN. There does not exist nN such that m<n and n<next(m).

Suppose we have m<n and n<next(m). Then we have u,vN such that plus(m,next(u))=n and plus(n,next(v))=next(m). Now next(m)=plus(n,next(v))=plus(plus(m,next(u)),next(v))=next(plus(plus(m,next(u)),v))=next(plus(m,plus(next(u),v)))=next(plus(m,next(plus(u,v)))). Since next is injective, m=plus(m,next(plus(u,v))), and so next(plus(u,v))=0, which is absurd. So no such m exists.

The following utility theorem tells us something about gaps between multiples of a nonzero number.

Suppose a1,a2,b,kN such that the following hold.

  1. times(a1,next(b))=plus(times(a2,next(b)),k).
  2. k<next(b).

Then k=0.

For bookkeeping purposes, let AN×N be the set of all pairs (a1,a2) such that conditions (1) and (2) simultaneously imply k=0 for all b,kN. We need to show that if (a1,a2)N×N then (a1,a2)A; we will show this by induction first on a1 and then on a2.

For the base case, we need to show that (0,a2)A for all a2. To this end, suppose we have b and k such that a1=0, a2, b, and k satisfy (1) and (2). Now 0=times(0,next(b))=times(a1,next(b))=plus(times(a2,next(b)),k). As we've shown, we must have k=0. Thus we have (0,a2)A for all a2.

For the inductive step, suppose we have a1 such that (a1,a2)A for all a2. We need to show that (next(a1),a2)A for all a2, and will proceed by considering two possibilities for a2.

First suppose a2=0, and suppose we have b and k such that next(a1), a2=0, b, and k satisfy (1) and (2). Now plus(times(a1,next(b)),next(b))=times(next(a1),next(b))=plus(times(a2,next(b)),k)=plus(times(0,next(b)),k)=plus(0,k)=k. In particular, next(b)k; but by the trichotomy property this is absurd since k<next(b). So (1) and (2) cannot hold simultaneously for a2=0, and thus (next(a1),a2)A vacuously.

Now suppose we have a2=next(m) for some m. We need to show that (next(a1),a2)A. To this end, suppose we have b and k such that next(a1), a2=next(m), b, and k satisfy (1) and (2). Specifically, we have times(next(a1),next(b))=plus(times(a2,next(b)),k)=plus(times(next(m),next(b)),k). Now we have plus(times(a1,next(b)),next(b))=times(next(a1),next(b))=plus(times(a2,next(b)),k)=plus(times(next(m),next(b)),k)=plus(plus(times(m,next(b)),next(b)),k)=plus(times(m,next(b)),plus(next(b),k))=plus(times(m,next(b)),plus(k,next(b)))=plus(plus(times(m,next(b)),k),next(b)), and because plus is cancellative, we have times(a1,next(b))=plus(times(m,next(b)),k). Because we also have k<next(b) and (a1,m)A by the inductive hypothesis, k=0. So (next(a1),a2)A.

So we have (next(a1),a2)A for all a2. By induction, A=N×N as claimed.