Encyclopedia Foundation Foundation Ordered Logic Realization Nat Cost
ARTICLE 4 claims 3 theorems 1 model
Foundation Ordered Logic Realization Nat Cost
A simple rule that charges 0 for equality and 1 for difference turns out to be the seed of a faithful arithmetic.
The equality cost
The declaration natCost defines a cost function on pairs of natural numbers: it returns 0 when the two numbers are equal and 1 when they are different. In plain terms, it is a binary comparison that asks whether two counting numbers match. The definition is a model, a chosen starting point, not a derived result. Its two properties are proved as theorems: the cost of comparing a number with itself is always 0, and the cost is symmetric, meaning the cost of comparing m with n equals the cost of comparing n with m.
This cost function is the engine of a larger construction called the ordered natural-number realization, a concrete instance of a logical structure that assigns meaning to arithmetic. The framework proves that this realization interprets arithmetic faithfully: distinct natural numbers remain distinct, and zero is not the successor of any number. It also proves that the order on the recovered numbers matches the usual order on natural numbers. The cost function is what makes the realization ordered, because it provides a way to distinguish elements by their equality behavior.
In Recognition Science, the framework uses this realization to show that arithmetic is invariant across all realizations. The theorem ordered_arithmetic_invariant states that the arithmetic recovered from any logical realization is equivalent to the arithmetic recovered from the ordered natural-number realization. This means the choice of cost function does not change the arithmetic that emerges; the natural numbers with their usual structure are the same no matter which realization one starts from. The framework's library, a machine-checked collection of formal theorems, records this as a proved fact.
What natCost does not claim is just as important. It does not derive the cost function from deeper principles; it simply chooses it. It does not establish that equality is the only possible cost, nor does it say anything about the golden ratio, the eight-tick cycle, or the forcing chain that produces physical constants. Those results live elsewhere in the framework. The declaration is a building block, not a conclusion. Its role is to show that a minimal, symmetric cost on natural numbers can support a faithful and ordered arithmetic, and that this arithmetic is the same across all realizations.
The practical consequence is that the framework can ground arithmetic in a single, simple rule: charge 0 for equality and 1 for difference. From that rule, the natural numbers with their usual order and structure follow. This is the first step in showing that the framework's logical foundations are not arbitrary, because the arithmetic they produce is unique up to equivalence. The reader can now see that a cost function as plain as equality comparison is enough to fix the arithmetic of the natural numbers.
MODEL natCost · IndisputableMonolith/Foundation/OrderedLogicRealization.lean
/-- Equality cost on `Nat`. -/
def natCost (m n : Nat) : Nat :=
if m = n then 0 else 1
THEOREM natCost_self · natCost_symm · IndisputableMonolith/Foundation/OrderedLogicRealization.lean
@[simp] theorem natCost_self (n : Nat) : natCost n n = 0 := by
simp [natCost]
theorem natCost_symm (m n : Nat) : natCost m n = natCost n m := by
by_cases h : m = n
· subst h
simp [natCost]
· have h' : n ≠ m := by intro hnm; exact h hnm.symm
simp [natCost, h, h']
THEOREM ordered_faithful · IndisputableMonolith/Foundation/OrderedLogicRealization.lean
/-- The ordered realization interprets arithmetic faithfully. -/
theorem ordered_faithful :
LogicRealization.FaithfulArithmeticInterpretation natOrderedRealization where
injective := by
intro a b h
exact (ArithmeticFromLogic.LogicNat.eq_iff_toNat_eq).mpr h
zero_step_noncollapse := by
intro n h
have hnat := congrArg id h
simp [natOrderedRealization] at hnat
exact Nat.succ_ne_zero _ hnat.symm
THEOREM ordered_arithmetic_invariant · IndisputableMonolith/Foundation/OrderedLogicRealization.lean
/-- Ordered arithmetic is invariant with every realization. -/
noncomputable def ordered_arithmetic_invariant (R : LogicRealization.{0, 0}) :
(UniversalForcing.arithmeticOf natOrderedRealization).peano.carrier
≃ (UniversalForcing.arithmeticOf R).peano.carrier :=
ArithmeticOf.equivOfInitial
(UniversalForcing.arithmeticOf natOrderedRealization)
(UniversalForcing.arithmeticOf R)
What this page does not claim
natCost derives from deeper principles; it is a chosen model, not a proved result. Equality is the only possible cost function on natural numbers. natCost establishes anything about the golden ratio, the forcing chain, or physical constants.
Verify this page
Every tagged claim above names its theorem. To check one yourself rather than trust this page, elaborate the source module with Lean 4 and audit its axiom basis:
$ lake env lean IndisputableMonolith/Foundation/OrderedLogicRealization.lean
expected axiom basis: [propext, Classical.choice, Quot.sound] (the Lean kernel's standard three; no RS-specific axioms)
A page whose claims cannot be reproduced this way does not ship. In production, every anchor links to the exact declaration in the public source release, and this block carries the build receipt for the page itself.
Derived articles
This page is generated by a question-recursion engine: the questions its answers raise become the next pages. The current agenda, with open targets marked red:
- How does the cost function on natural numbers connect to the cost function J that forces the golden ratio?
- What other realizations of the logical structure exist besides the ordered natural-number realization?
- What does the equivalence of arithmetic across realizations imply for the framework's physical constants?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
MODEL natCost · IndisputableMonolith/Foundation/OrderedLogicRealization.lean
/-- Equality cost on `Nat`. -/ def natCost (m n : Nat) : Nat := if m = n then 0 else 1The declaration natCost defines a cost function on pairs of natural numbers: it returns 0 when the two numbers are equal and 1 when they are different. natCost · IndisputableMonolith/Foundation/OrderedLogicRealization.leanTHEOREM natCost_self · natCost_symm · IndisputableMonolith/Foundation/OrderedLogicRealization.lean
@[simp] theorem natCost_self (n : Nat) : natCost n n = 0 := by simp [natCost]theorem natCost_symm (m n : Nat) : natCost m n = natCost n m := by by_cases h : m = n · subst h simp [natCost] · have h' : n ≠ m := by intro hnm; exact h hnm.symm simp [natCost, h, h']The cost of comparing a number with itself is always 0, and the cost is symmetric. natCost_self · natCost_symm · IndisputableMonolith/Foundation/OrderedLogicRealization.leanTHEOREM ordered_faithful · IndisputableMonolith/Foundation/OrderedLogicRealization.lean
/-- The ordered realization interprets arithmetic faithfully. -/ theorem ordered_faithful : LogicRealization.FaithfulArithmeticInterpretation natOrderedRealization where injective := by intro a b h exact (ArithmeticFromLogic.LogicNat.eq_iff_toNat_eq).mpr h zero_step_noncollapse := by intro n h have hnat := congrArg id h simp [natOrderedRealization] at hnat exact Nat.succ_ne_zero _ hnat.symmThe framework proves that this realization interprets arithmetic faithfully: distinct natural numbers remain distinct, and zero is not the successor of any number. ordered_faithful · IndisputableMonolith/Foundation/OrderedLogicRealization.leanTHEOREM ordered_arithmetic_invariant · IndisputableMonolith/Foundation/OrderedLogicRealization.lean
/-- Ordered arithmetic is invariant with every realization. -/ noncomputable def ordered_arithmetic_invariant (R : LogicRealization.{0, 0}) : (UniversalForcing.arithmeticOf natOrderedRealization).peano.carrier ≃ (UniversalForcing.arithmeticOf R).peano.carrier := ArithmeticOf.equivOfInitial (UniversalForcing.arithmeticOf natOrderedRealization) (UniversalForcing.arithmeticOf R)The theorem ordered_arithmetic_invariant states that the arithmetic recovered from any logical realization is equivalent to the arithmetic recovered from the ordered natural-number realization. ordered_arithmetic_invariant · IndisputableMonolith/Foundation/OrderedLogicRealization.lean