theorem
proved
logicNatLift_unique_fun
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.Foundation.ArithmeticOf on GitHub at line 102.
browse module
All declarations in this module, on Recognition.
explainer page
Derivations using this theorem
depends on
used by
formal source
99 intro x
100 rfl
101
102private theorem logicNatLift_unique_fun (B : PeanoObject)
103 (f : PeanoObject.Hom logicNatPeano B) :
104 f.toFun = (logicNatLift B).toFun := by
105 funext n
106 induction n with
107 | identity =>
108 exact f.map_zero
109 | step n ih =>
110 calc
111 f.toFun (LogicNat.step n) = B.step (f.toFun n) := f.map_step n
112 _ = B.step ((logicNatLift B).toFun n) := by rw [ih]
113 _ = (logicNatLift B).toFun (LogicNat.step n) := rfl
114
115/-- `LogicNat` is initial among Peano objects. -/
116def logicNat_initial : PeanoObject.IsInitial logicNatPeano where
117 lift := logicNatLift
118 uniq := by
119 intro B f g
120 rw [logicNatLift_unique_fun B f, logicNatLift_unique_fun B g]
121
122/-- The Peano object extracted from a realization's own orbit. -/
123def realizationPeano (R : LogicRealization) : PeanoObject where
124 carrier := R.Orbit
125 zero := R.orbitZero
126 step := R.orbitStep
127
128/-- Fold from a realization orbit into any Peano object, through the
129realization's certified equivalence with `LogicNat`. -/
130def realizationFold (R : LogicRealization) (B : PeanoObject) : R.Orbit → B.carrier :=
131 fun n => (logicNatLift B).toFun (R.orbitEquivLogicNat n)
132