Encyclopedia Foundation Foundation Ledger Comparison To Composition Comparison Cost Swap Invariant
ARTICLE 3 claims 3 theorems
Foundation Ledger Comparison To Composition Comparison Cost Swap Invariant
A comparison between two states of a system is a ratio, and swapping the order of comparison inverts that ratio, so any cost that respects this symmetry assigns the same price to both orders.
The swap invariant
A comparison between two observable states of a system is a ratio: the value of one state divided by the value of the other. Swapping the order of comparison, comparing the second state to the first, inverts this ratio. The declaration comparison_cost_swap_invariant establishes that any cost function which respects this inversion, a reciprocal symmetry, will assign the same cost to both orders of comparison. This is a direct consequence of the ratio being inverted by the swap, and it is a theorem proved in the framework's machine-checked library of formal theorems.
The cost function in question is the recognition cost, the price the universe's ledger charges for telling two observations apart. The theorem states that this cost is invariant under swapping the two states being compared. This is not an assumption; it is forced by the fact that the comparison itself is a positive ratio, a fact derived from the framework's strictly positive observable. The theorem also shows that comparing a state to itself yields a ratio of one, and a normalized cost vanishes on this self-comparison.
The swap invariant does not claim that the cost function is symmetric in any other sense, nor that it is the only cost function with this property. It does not claim that the framework derives the specific form of the cost function, J(x) = (x + 1/x)/2 - 1, from this property alone. That derivation requires additional conditions, such as the cost being normalized, calibrated, and continuous. The swap invariant is one piece of that larger derivation, not the whole of it.
What the swap invariant provides is a concrete, checkable property that any candidate cost function must satisfy. It is a necessary condition, not a sufficient one. A reader can now see that any cost function which does not assign equal cost to a comparison and its reverse is incompatible with the framework's foundational structure.
THEOREM comparison_cost_swap_invariant · IndisputableMonolith/Foundation/LedgerComparisonToComposition.lean
/-- **Reciprocal symmetry realized on the ledger.** A reciprocal-symmetric cost
assigns equal cost to a comparison and its state-swap, because the swap inverts the
positive ratio. -/
theorem comparison_cost_swap_invariant (F : ClosedObservableFramework)
(J : ℝ → ℝ) (hJ : IsReciprocalCost J) (s₁ s₂ : F.S) :
J (compRatio F s₁ s₂) = J (compRatio F s₂ s₁) := by
rw [compRatio_swap F s₁ s₂]
exact hJ (compRatio F s₁ s₂) (compRatio_pos F s₁ s₂)
THEOREM compRatio_swap · IndisputableMonolith/Foundation/LedgerComparisonToComposition.lean
/-- **State swap inverts the comparison ratio.** Swapping the two states sends the
ratio to its reciprocal, the geometric origin of reciprocal symmetry. -/
theorem compRatio_swap (F : ClosedObservableFramework) (s₁ s₂ : F.S) :
compRatio F s₂ s₁ = (compRatio F s₁ s₂)⁻¹ := by
unfold compRatio
rw [inv_div]
THEOREM compRatio_self · comparison_cost_self_zero · IndisputableMonolith/Foundation/LedgerComparisonToComposition.lean
/-- **Self-comparison is the unit ratio.** -/
theorem compRatio_self (F : ClosedObservableFramework) (s : F.S) :
compRatio F s s = 1 :=
div_self (ne_of_gt (F.r_pos s))
/-- **Normalization realized on the ledger.** A normalized cost vanishes on
self-comparison, since self-comparison is the unit ratio. -/
theorem comparison_cost_self_zero (F : ClosedObservableFramework)
(J : ℝ → ℝ) (hJ : IsNormalized J) (s : F.S) :
J (compRatio F s s) = 0 := by
rw [compRatio_self]
exact hJ
What this page does not claim
This theorem does not derive the full form of the cost function J. It does not claim that the swap invariant is a sufficient condition for the cost function to be J. It does not claim that any cost function satisfying the swap invariant is the recognition cost.
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/LedgerComparisonToComposition.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:
- What additional conditions, beyond the swap invariant, are required to force the specific form of the cost function J?
- How does the swap invariant relate to the full derivation of the cost function from the ledger?
- What is the role of the positive ratio in the framework's definition of comparison?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM comparison_cost_swap_invariant · IndisputableMonolith/Foundation/LedgerComparisonToComposition.lean
/-- **Reciprocal symmetry realized on the ledger.** A reciprocal-symmetric cost assigns equal cost to a comparison and its state-swap, because the swap inverts the positive ratio. -/ theorem comparison_cost_swap_invariant (F : ClosedObservableFramework) (J : ℝ → ℝ) (hJ : IsReciprocalCost J) (s₁ s₂ : F.S) : J (compRatio F s₁ s₂) = J (compRatio F s₂ s₁) := by rw [compRatio_swap F s₁ s₂] exact hJ (compRatio F s₁ s₂) (compRatio_pos F s₁ s₂)The declaration comparison_cost_swap_invariant establishes that any cost function which respects this inversion, a reciprocal symmetry, will assign the same cost to both orders of comparison. comparison_cost_swap_invariant · IndisputableMonolith/Foundation/LedgerComparisonToComposition.leanTHEOREM compRatio_swap · IndisputableMonolith/Foundation/LedgerComparisonToComposition.lean
/-- **State swap inverts the comparison ratio.** Swapping the two states sends the ratio to its reciprocal, the geometric origin of reciprocal symmetry. -/ theorem compRatio_swap (F : ClosedObservableFramework) (s₁ s₂ : F.S) : compRatio F s₂ s₁ = (compRatio F s₁ s₂)⁻¹ := by unfold compRatio rw [inv_div]This is a direct consequence of the ratio being inverted by the swap, and it is a theorem proved in the framework's machine-checked library of formal theorems. compRatio_swap · IndisputableMonolith/Foundation/LedgerComparisonToComposition.leanTHEOREM compRatio_self · comparison_cost_self_zero · IndisputableMonolith/Foundation/LedgerComparisonToComposition.lean
/-- **Self-comparison is the unit ratio.** -/ theorem compRatio_self (F : ClosedObservableFramework) (s : F.S) : compRatio F s s = 1 := div_self (ne_of_gt (F.r_pos s))/-- **Normalization realized on the ledger.** A normalized cost vanishes on self-comparison, since self-comparison is the unit ratio. -/ theorem comparison_cost_self_zero (F : ClosedObservableFramework) (J : ℝ → ℝ) (hJ : IsNormalized J) (s : F.S) : J (compRatio F s s) = 0 := by rw [compRatio_self] exact hJThe theorem also shows that comparing a state to itself yields a ratio of one, and a normalized cost vanishes on this self-comparison. compRatio_self · comparison_cost_self_zero · IndisputableMonolith/Foundation/LedgerComparisonToComposition.lean