Encyclopedia Foundation Foundation Ordered Logic Realization Nat Cost Symm

ARTICLE 3 claims 2 theorems 1 model

Foundation Ordered Logic Realization Nat Cost Symm

A simple symmetry result about a two-valued cost function on natural numbers, and the narrow scope of what it proves.

The equality cost

In mathematics, a cost function assigns a number to each pair of objects, measuring how expensive it is to treat them as equivalent. The simplest meaningful case uses the natural numbers 0, 1, 2, 3, and so on, with a cost that is 0 when the two numbers are equal and 1 when they differ. This is the equality cost, a discrete record of whether two entries match. The declaration natCost_symm establishes that this cost is symmetric: the cost of comparing m to n is always the same as the cost of comparing n to m. In symbols, natCost m n = natCost n m for every pair of natural numbers m and n.

Symmetry here is not a deep fact but a necessary one. If comparing two entries cost different amounts depending on order, the ledger would be inconsistent: the same pair of objects would carry two different prices. The proof in the machine-checked library of formal theorems is direct. It splits into two cases. If m equals n, both sides reduce to 0 by the definition. If m differs from n, then n also differs from m, and both sides reduce to 1. The theorem is a small but load-bearing piece of the framework's foundation, because it confirms that the equality cost behaves as a genuine measure of sameness rather than an arbitrary assignment.

What natCost_symm does not claim is equally important. It does not say that equality is the only possible cost function, nor that this symmetry forces the framework's central cost J(x) = (x + 1/x)/2 - 1. That uniqueness result requires five additional conditions, including a composition law and continuity, none of which appear here. The theorem also does not establish that the natural numbers themselves are the correct model of recognition; it only shows that this particular cost, once chosen, has the symmetry property. The declaration is a proof about a definition, not a proof about the world.

In the broader framework, this symmetry is one small rung in a ladder. The machine-checked library uses it as part of an ordered realization of arithmetic, showing that the recovered Peano structure behaves faithfully. But the rung itself supports only what it supports: a two-valued cost on natural numbers is symmetric. That is the entire content, and it is enough for the framework's purposes at this stage of the chain.

THEOREM natCost_symm · IndisputableMonolith/Foundation/OrderedLogicRealization.lean
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']
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_symm · IndisputableMonolith/Foundation/OrderedLogicRealization.lean
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']

What this page does not claim

This theorem does not prove that equality is the only possible cost function. This theorem does not derive the framework's central cost function J. This theorem does not establish that natural numbers are the correct model of recognition.

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:

MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND