fromNat
The recursive map sending each natural number to the corresponding element in the LogicNat orbit by repeated application of the step constructor. Arithmetic proofs in Recognition Science rely on this to move between ordinary Nat and the orbit generated from the Law of Logic. The definition proceeds by pattern-matching on the input Nat, sending zero to identity and successor to an additional step.
claimThe function $f : {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N} {N
background
LogicNat is the inductive type with constructors identity (the zero-cost multiplicative identity in the orbit) and step (one iteration of the generator), mirroring the orbit {1, γ, γ², ...} as the smallest subset of positive reals closed under multiplication by γ and containing 1. The ArithmeticFromLogic module derives Peano arithmetic as theorems from the Law of Logic functional equation rather than positing axioms. This definition depends on the step operation from CellularAutomata (which applies a local rule to create a successor tape) and the succ definition in the same module (which applies one step to a LogicNat element).
proof idea
This is a direct recursive definition by pattern matching on the input Nat. It sends zero to the identity constructor and wraps each recursive call in the step constructor for successors. No lemmas are invoked; the definition itself establishes the map.
why it matters in Recognition Science
This definition supplies the inverse to toNat, enabling the equivalence equivNat between LogicNat and Nat. It is used in proofs such as add_left_cancel (left cancellation via transfer to Nat), embed_injective (distinct naturals map to distinct orbit points), and eq_iff_toNat_eq (transfer principle for equations). In the Recognition framework it closes the bridge from the forced natural numbers back to ordinary arithmetic, supporting derivation of addition and order from the functional equation.
scope and limits
- Does not establish any equalities or properties of the map.
- Does not depend on specific values of the generator γ.
- Does not interact with the J-cost function directly.
- Does not address higher arithmetic operations such as multiplication.
Lean usage
theorem fromNat_toNat : ∀ n : LogicNat, fromNat (toNat n) = n := by intro n; induction n with | identity => rfl | step n ih => show fromNat (toNat (succ n)) = succ n; rw [toNat_succ, fromNat_succ, ih]
formal statement (Lean)
226def fromNat : Nat → LogicNat
227 | 0 => .identity
228 | Nat.succ n => .step (fromNat n)
229