Analysis I, Chapter 2 epilogue #
In this (technical) epilogue, we show that the "Chapter 2" natural numbers Chapter2.Nat are isomorphic in various standard senses to the standard natural numbers ℕ.
From this point onwards, Chapter2.Nat will be deprecated, and we will use the standard natural numbers ℕ instead. In particular, one should use the full Mathlib API for ℕ for all subsequent chapters, in lieu of the Chapter2.Nat API.
Filling the sorries here requires both the Chapter2.Nat API and the Mathlib API for the standard natural numbers ℕ. As such, they are excellent exercises to prepare you for the aforementioned transition.
In second half of this section we also give a fully axiomatic treatment of the natural numbers via the Peano axioms. The treatment in the preceding three sections was only partially axiomatic, because we used a specific construction Chapter2.Nat of the natural numbers that was an inductive type, and used that inductive type to construct a recursor. Here, we give some exercises to show how one can accomplish the same tasks directly from the Peano axioms, without knowing the specific implementation of the natural numbers.
Equations
- Chapter2.Nat.equivNat = { toFun := Chapter2.Nat.toNat, invFun := fun (n : ℕ) => ↑n, left_inv := Chapter2.Nat.equivNat._proof_2, right_inv := Chapter2.Nat.equivNat._proof_3 }
Instances For
Equations
- Chapter2.Nat.equivNat_order = { toEquiv := Chapter2.Nat.equivNat, map_rel_iff' := @Chapter2.Nat.equivNat_order._proof_4 }
Instances For
Equations
- Chapter2.Nat.equivNat_ring = { toEquiv := Chapter2.Nat.equivNat, map_mul' := Chapter2.Nat.equivNat_ring._proof_5, map_add' := Chapter2.Nat.equivNat_ring._proof_6 }
Instances For
The Chapter 2 natural numbers obey the Peano axioms.
Equations
- PeanoAxioms.Chapter2.Nat = { Nat := Chapter2.Nat, zero := Chapter2.Nat.zero, succ := Chapter2.Nat.succ, succ_ne := Chapter2.Nat.succ_ne, succ_cancel := ⋯, induction := Chapter2.Nat.induction }
Instances For
The Mathlib natural numbers obey the Peano axioms.
Equations
- PeanoAxioms.Mathlib.Nat = { Nat := ℕ, zero := 0, succ := Nat.succ, succ_ne := Nat.succ_ne_zero, succ_cancel := @PeanoAxioms.Mathlib.Nat._proof_7, induction := ⋯ }
Instances For
One can map the Mathlib natural numbers into any other structure obeying the Peano axioms.
Equations
- P.natCast Nat.zero = PeanoAxioms.zero
- P.natCast n_2.succ = PeanoAxioms.succ (P.natCast n_2)
Instances For
Equations
- equiv.symm = { equiv := PeanoAxioms.Equiv.equiv.symm, equiv_zero := ⋯, equiv_succ := ⋯ }
Instances For
Equations
- equiv1.trans equiv2 = { equiv := PeanoAxioms.Equiv.equiv.trans PeanoAxioms.Equiv.equiv, equiv_zero := ⋯, equiv_succ := ⋯ }
Instances For
Equations
- PeanoAxioms.Equiv.fromNat P = { equiv := { toFun := P.natCast, invFun := sorry, left_inv := ⋯, right_inv := ⋯ }, equiv_zero := ⋯, equiv_succ := ⋯ }