fromNat
plain-language theorem explainer
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.
Claim. The 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
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.
Switch to Lean above to see the machine-checked source, dependencies, and usage graph.