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
-
0\leq x; -
x\leq x; -
x\leq S(x); -
If
x\leq 0thenx=0.
Proof
-
What does the question mean? By definition of
\leqwe need to prove that there exists a natural numbernsuch thatx=0+n. We can choosento be whatever we like, so let's choosen=xand now we have to provex=0+x. But we already proved this in Lemma 8. -
Similarly here, the question means that we have to prove there exists a natural number
nsuch thatx=x+n. Just taken=0, becausex+0=xby definition of addition. -
The question means that we have to prove that there exists
nsuch thatS(x)=x+n. But we knowS(x)=x+1from Lemma 6, son=1will work. -
Say
x\leq 0. Then by definition, there is some natural numbernsuch thatx+n=0. By Theorem 19 we deducex=n=0and in particularx=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.
-
x\leq x(reflexivity); -
If
x\leq yandy\leq zthenx\leq z(transitivity); -
If
x\leq yandy\leq xthenx=y(antisymmetry); -
Either
x\leq yory\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.
-
This is Lemma 21(2).
-
For this one you can assume that
x\leq yandy\leq z, and you need to prove thatx\leq z. Use the definition of\leqand finish the proof as an exercise. -
Don't use induction -- use Theorem 18 and Theorem 19.
-
This one is fiddly! Let's fix
xand do induction ony. Formally, the statementP_nwe're proving by induction onnis thatx\leq norn\leq x. For the base case we need to provex\leq 0or0\leq x. But we already proved in Lemma 21(1) that0\leq x, and this finishes the base case.For the inductive step, we may assume
x\leq norn\leq x, and we want to provex\leq S(n)orS(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 provex\leq S(n)orS(n)\leq x. Let's provex\leq S(n); this follows fromx\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 xand we need to deduce that eitherx\leq S(n)orS(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; ifx=nthen the first one will be true, and ifxis much bigger thannthen it will be the second one, so we have to break things down even further. We known\leq xso we know there existsysuch thatx=n+y. We also know thatyis either0or of the formS(t)for some naturalt. So let's do a final case split and finish this problem.If
y=0thenx=n+0=n, so we can provex\leq S(n); indeedn\leq S(n)was proved already in Lemma 21(3).Finally, if
y=S(t)thenx=n+S(t)=S(n+t)=S(n)+tby definition of+and Lemma 9, and this means thatS(n)\leq xby 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
QEDTheorem 23
Let a, b and x be natural numbers.
-
If
a\leq bthena+x\leq b+x. -
If
a\leq bthena\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.
-
Choose
nsuch thatb=a+n. Now check that(b+x)=(a+x)+n. -
Choose
nsuch thatb=a+n. Now check thatbx=ax+nx.