Encyclopedia Algebra Algebra Cost Algebra Defect Dist Le J Of Ratio Bounds

ARTICLE 3 claims 2 theorems 1 model

Algebra Cost Algebra Defect Dist Le J Of Ratio Bounds

A single machine-checked inequality says how close a composed cost stays to the simple cost of a ratio, and it does not say the bound is tight.

The defect distance bound

In the ledger, a discrete record of recognition events, the cost of moving from one positive number x to another y is measured by J(x/y), where J(t) = (t + 1/t)/2 − 1. This quantity, called the defect distance, vanishes when x equals y and grows as the ratio moves away from 1. The declaration defectDist_le_J_of_ratio_bounds establishes a bound on this distance when the ratio x/y is confined to a bounded interval.

Plainly, the theorem says: if the ratio x/y stays within a fixed band around 1, then the defect distance is controlled by a constant multiple of the maximum of J on that band. The proof uses the recognition composition law, the forced rule J(xy) + J(x/y) = 2J(x)J(y) + 2J(x) + 2J(y), together with the fact that J is nonnegative and symmetric under reciprocals. The result is a local quasi-triangle inequality: it shows that the defect distance behaves like a metric locally, even though it is not a true metric globally.

The theorem is proved in the machine-checked library of formal theorems, meaning the inequality is derived from the axioms of the framework without any unverified assumptions. It is a THEOREM in the framework's own classification. It does not claim that the bound is sharp, nor that the defect distance satisfies a global triangle inequality, nor that it is a metric on the whole positive reals. It also does not claim that the bound applies to ratios outside the stated interval.

What the result changes is practical: it gives a local control on how much the cost of a composed recognition event can deviate from the cost of a simple ratio. That control is a stepping stone for later results about the structure of the cost algebra, such as the shifted carrier monoid and the uniqueness of J. For a reader, the takeaway is that the defect distance, though not a metric, is locally well-behaved enough to support further algebraic analysis.

MODEL defectDist · IndisputableMonolith/Algebra/CostAlgebra.lean
/-- **Defect distance**: d(x,y) = J(x/y) measures the "cost of deviation"
    between two positive reals.

    Properties:
    - d(x,x) = 0 (identity)
    - d(x,y) = d(y,x) (symmetry, from J reciprocity)
    - d(x,y) ≥ 0 (non-negativity) -/
noncomputable def defectDist (x y : ℝ) : ℝ := J (x / y)
THEOREM costCompose_comm · IndisputableMonolith/Algebra/CostAlgebra.lean
/-- **THEOREM: Cost composition is commutative.** -/
theorem costCompose_comm (a b : ℝ) : a ★ b = b ★ a := by
  unfold costCompose; ring
THEOREM cost_algebra_unique_aczel · IndisputableMonolith/Algebra/CostAlgebra.lean
cost_algebra_unique_aczel · IndisputableMonolith/Algebra/CostAlgebra.lean:636
/-- **THEOREM (T5, clean form): The canonical cost algebra is unique, via Aczél's theorem.**

    This is the same result as `cost_algebra_unique` but with no regularity hypothesis
    parameters. The single Aczél axiom (`aczel_dAlembert_smooth`) is used internally
    by `law_of_logic_forces_jcost_aczel`. -/
theorem cost_algebra_unique_aczel (C : CostAlgebraData)
    (hCalib : deriv (deriv (fun t => C.cost (Real.exp t))) 0 = 1)
    (hCont : ContinuousOn C.cost (Set.Ioi 0)) :
    ∀ x : ℝ, 0 < x → C.cost x = J x := by
  have hRecip : IsReciprocalCost C.cost := fun x hx => by simpa using C.symmetric x hx
  have hNorm : IsNormalized C.cost := by simpa [IsNormalized] using C.normalized
  have hComp : SatisfiesCompositionLaw C.cost := fun x y hx hy => C.rcl x y hx hy
  have hCal : IsCalibrated C.cost := by simpa [IsCalibrated, G] using hCalib
  intro x hx
  simpa [J] using law_of_logic_forces_jcost_aczel C.cost hRecip hNorm hComp hCal hCont x hx

What this page does not claim

The bound is sharp. The defect distance satisfies a global triangle inequality. The bound applies to ratios outside the stated interval.

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/Algebra/CostAlgebra.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