IUM lectures on Numbers

2.10. The ordering on the naturals

We did not need Peano's extra axioms to develop the theory of addition and multiplication, but we will need them to develop the theory of \leq (this is not surprising: if there was some weird loop in the natural numbers then \leq would not satisfy basic properties which we require from it like transitivity).

Here are the definitions.

Definition 20 (The ordering on the naturals)

Let x and y be natural numbers. We say that x\leq y if there exists a natural number n such that y=x+n.

Let's do some warm-up exercises.

Lemma 21

Let x be a natural number. Then

  1. 0\leq x;

  2. x\leq x;

  3. x\leq S(x);

  4. If x\leq 0 then x=0.

Proof

  1. What does the question mean? By definition of \leq we need to prove that there exists a natural number n such that x=0+n. We can choose n to be whatever we like, so let's choose n=x and now we have to prove x=0+x. But we already proved this in Lemma 8.

  2. Similarly here, the question means that we have to prove there exists a natural number n such that x=x+n. Just take n=0, because x+0=x by definition of addition.

  3. The question means that we have to prove that there exists n such that S(x)=x+n. But we know S(x)=x+1 from Lemma 6, so n=1 will work.

  4. Say x\leq 0. Then by definition, there is some natural number n such that x+n=0. By Theorem 19 we deduce x=n=0 and in particular x=0.

Lemma zero_le "0 is no bigger than any other natural" Given: (x : ℕ) Assume: Conclusion: 0 ≤ x Proof: x:ℕ⊢ ∃ n, x = 0 + n x:ℕ⊢ x = 0 + x All goals completed! 🐙 QEDLemma le_refl "A natural number is no bigger than itself" Given: (x : ℕ) Assume: Conclusion: x ≤ x Proof: x:ℕ⊢ ∃ n, x = x + n x:ℕ⊢ x = x + 0 All goals completed! 🐙 QEDLemma le_succ_self "A natural number is no bigger than its successor" Given: (x : ℕ) Assume: Conclusion: x ≤ succ x Proof: x:ℕ⊢ ∃ n, succ x = x + n x:ℕ⊢ succ x = x + 1 All goals completed! 🐙 QEDLemma le_zero "Only 0 is no bigger than 0" Given: {x : ℕ} Assume: (hx : x ≤ 0) Conclusion: x = 0 Proof: x:ℕhx:x ≤ 0n:ℕhxn:0 = x + n⊢ x = 0 x:ℕhx:x ≤ 0n:ℕhxn:0 = x + nhxn':x + n = 0⊢ x = 0 All goals completed! 🐙 QED

The main theorem that we want is that \leq is a total order on \N. Let's recall what this means.

Theorem 22 (≤ is a total order)

Say x,y,z\in\N.

  1. x\leq x (reflexivity);

  2. If x\leq y and y\leq z then x\leq z (transitivity);

  3. If x\leq y and y\leq x then x=y (antisymmetry);

  4. Either x\leq y or y\leq x (totality).

Proof

We've already done the first part; I'll leave the next two to you, and will do the last one.

  1. This is Lemma 21(2).

  2. For this one you can assume that x\leq y and y\leq z, and you need to prove that x\leq z. Use the definition of \leq and finish the proof as an exercise.

  3. Don't use induction -- use Theorem 18 and Theorem 19.

  4. This one is fiddly! Let's fix x and do induction on y. Formally, the statement P_n we're proving by induction on n is that x\leq n or n\leq x. For the base case we need to prove x\leq 0 or 0\leq x. But we already proved in Lemma 21(1) that 0\leq x, and this finishes the base case.

    For the inductive step, we may assume x\leq n or n\leq x, and we want to prove x\leq S(n) or S(n)\leq x. Our assumption says that one of two things is true; let's deal with the two cases separately.

    The first case is where x\leq n. We need to prove x\leq S(n) or S(n)\leq x. Let's prove x\leq S(n); this follows from x\leq n (our assumption), n\leq S(n) (Lemma 21(3)), and transitivity (part 2 of this lemma).

    The second case is the trickiest part of the proof. We assume n\leq x and we need to deduce that either x\leq S(n) or S(n)\leq x. The reason this is the hardest case is that we still don't know which of these is going to be true; if x=n then the first one will be true, and if x is much bigger than n then it will be the second one, so we have to break things down even further. We know n\leq x so we know there exists y such that x=n+y. We also know that y is either 0 or of the form S(t) for some natural t. So let's do a final case split and finish this problem.

    If y=0 then x=n+0=n, so we can prove x\leq S(n); indeed n\leq S(n) was proved already in Lemma 21(3).

    Finally, if y=S(t) then x=n+S(t)=S(n+t)=S(n)+t by definition of + and Lemma 9, and this means that S(n)\leq x by definition of \leq.

Lemma le_total "Totality of ≤" Given: (x y : ℕ) Assume: Conclusion: x ≤ y ∨ y ≤ x Proof: x:ℕ⊢ x ≤ 0 ∨ 0 ≤ xx:ℕ⊢ ∀ (k : ℕ), x ≤ k ∨ k ≤ x ⇒ x ≤ succ k ∨ succ k ≤ x x:ℕ⊢ x ≤ 0 ∨ 0 ≤ x x:ℕ⊢ 0 ≤ x All goals completed! 🐙 x:ℕ⊢ ∀ (k : ℕ), x ≤ k ∨ k ≤ x ⇒ x ≤ succ k ∨ succ k ≤ x x:ℕn:ℕ⊢ x ≤ n ∨ n ≤ x ⇒ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ x⊢ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ x⊢ x ≤ n ⇒ x ≤ succ n ∨ succ n ≤ xx:ℕn:ℕhn:x ≤ n ∨ n ≤ x⊢ n ≤ x ⇒ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ x⊢ x ≤ n ⇒ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhxn:x ≤ n⊢ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhxn:x ≤ n⊢ x ≤ succ n All goals completed! 🐙 x:ℕn:ℕhn:x ≤ n ∨ n ≤ x⊢ n ≤ x ⇒ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ x⊢ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + y⊢ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ t⊢ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ t⊢ y = 0 ⇒ x ≤ succ n ∨ succ n ≤ xx:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ t⊢ (∃ t, y = succ t) ⇒ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ t⊢ y = 0 ⇒ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ thy:y = 0⊢ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ thy:y = 0⊢ x ≤ succ n Calc x = n + y from hxe _ = n + 0 from hy _ = n All goals completed! 🐙 All goals completed! 🐙 _ ≤ succ n from le_succ_self x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ t⊢ (∃ t, y = succ t) ⇒ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ thy:∃ t, y = succ t⊢ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ thy:∃ t, y = succ tt:ℕht:y = succ t⊢ x ≤ succ n ∨ succ n ≤ x x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ thy:∃ t, y = succ tt:ℕht:y = succ t⊢ ∃ s, x = succ n + s x:ℕn:ℕhn:x ≤ n ∨ n ≤ xhnx:n ≤ xy:ℕhxe:x = n + yhe:y = 0 ∨ ∃ t, y = succ thy:∃ t, y = succ tt:ℕht:y = succ t⊢ x = succ n + t Calc x = n + y from hxe _ = n + succ t from ht _ = succ (n + t) All goals completed! 🐙 All goals completed! 🐙 _ = succ n + t from succ_add QED

Theorem 23

Let a, b and x be natural numbers.

  1. If a\leq b then a+x\leq b+x.

  2. If a\leq b then a\times x\leq b\times x.

Proof

Here is a sketch. You should check that you can fill in the details, and that I definitely didn't assume anything which we didn't prove yet.

  1. Choose n such that b=a+n. Now check that (b+x)=(a+x)+n.

  2. Choose n such that b=a+n. Now check that bx=ax+nx.