Encyclopedia Cost Cost

ARTICLE 6 claims 6 theorems

Cost

Reciprocal cost is the unique mismatch formula forced by a combining rule and one local scale fix.

Reciprocal cost

Reciprocal cost is the quantity Recognition Science uses to measure how far a recognition event is from a perfect match. A recognition event compares two positive numbers, x and 1, where 1 is the reference. The cost is written J(x) and is defined as (x + 1/x)/2 - 1. At the reference, J(1) = 0, so a perfect match costs nothing. The formula is symmetric: J(x) = J(1/x), so swapping the two sides of the comparison does not change the cost. The cost is never negative for positive x, and it is zero only when x = 1.

The module establishes that this formula is not chosen. A theorem, T5_cost_uniqueness_on_pos, proves that any cost function satisfying five plain conditions must equal J(x). The conditions are reciprocal symmetry, zero cost at unity, a forced composition law, calibration, and continuity. The proof runs in the the kernel-checked library 4 kernel and is axiom-clean. This uniqueness is the first link in the forcing chain that later derives the golden ratio, an eight-tick recognition cycle, 2^3, and three spatial dimensions.

The same module proves structural properties of J. It is strictly increasing for x above 1, so larger mismatches cost more. Near the reference, J(1 + ε) behaves like ε²/2, with a small error bounded by ε²/10 when |ε| ≤ 1/10. This quadratic behavior means small fluctuations are cheap, and the cost has a flat stationary point at the reference. The module also defines a related metric, Jmetric(x) = sqrt(2 * J(x)), which measures distance in the same space. This metric takes the value sqrt(1/2) at x = 2 and sqrt(4/3) at x = 3.

THEOREM T5_cost_uniqueness_on_pos · IndisputableMonolith/Cost.lean
T5_cost_uniqueness_on_pos · IndisputableMonolith/Cost.lean:164
theorem T5_cost_uniqueness_on_pos {F : ℝ → ℝ} [JensenSketch F] :
  ∀ {x : ℝ}, 0 < x → F x = Jcost x :=
by
  intro x hx
  have hAgree : AgreesOnExp F := by
    intro t
    exact le_antisymm (JensenSketch.axis_upper (F:=F) t) (JensenSketch.axis_lower (F:=F) t)
  exact (agree_on_exp_extends (F:=F) hAgree) hx
THEOREM Jcost_unit0 · IndisputableMonolith/Cost.lean
Jcost_unit0 · IndisputableMonolith/Cost.lean:12
lemma Jcost_unit0 : Jcost 1 = 0 := by
  simp [Jcost]
THEOREM Jcost_symm · IndisputableMonolith/Cost.lean
lemma Jcost_symm {x : ℝ} (hx : 0 < x) : Jcost x = Jcost x⁻¹ := by
  have hx0 : x ≠ 0 := ne_of_gt hx
  rw [Jcost_eq_sq hx0, Jcost_eq_sq (inv_ne_zero hx0)]
  field_simp [hx0]
  ring
THEOREM Jcost_nonneg · Jcost_zero_iff_one · IndisputableMonolith/Cost.lean
Jcost_nonneg · IndisputableMonolith/Cost.lean:28
/-- J(x) ≥ 0 for positive x (AM-GM inequality) -/
lemma Jcost_nonneg {x : ℝ} (hx : 0 < x) : 0 ≤ Jcost x := by
  have hx0 : x ≠ 0 := hx.ne'
  rw [Jcost_eq_sq hx0]
  positivity
Jcost_zero_iff_one · IndisputableMonolith/Cost.lean:328
/-- From J(x) = 0 and x > 0, conclude x = 1. -/
lemma Jcost_zero_iff_one {x : ℝ} (hx : 0 < x) (h : Jcost x = 0) : x = 1 :=
  (Jcost_eq_zero_iff x hx).mp h
THEOREM Jcost_strict_mono_on_one_infty · IndisputableMonolith/Cost.lean
Jcost_strict_mono_on_one_infty · IndisputableMonolith/Cost.lean:649
/-- J-cost is strictly increasing on `[1, ∞)`.

This root-module copy keeps downstream files from importing both
`IndisputableMonolith.Cost` and `IndisputableMonolith.Cost.JcostCore`, which
define overlapping names in the same namespace. -/
lemma Jcost_strict_mono_on_one_infty (x y : ℝ) (hx : 0 < x) (hy : 0 < y)
    (hx1 : 1 ≤ x) (hxy : x < y) :
    Jcost x < Jcost y := by
  have hx0 : x ≠ 0 := ne_of_gt hx
  have hy0 : y ≠ 0 := ne_of_gt hy
  rw [Jcost_eq_sq hx0, Jcost_eq_sq hy0]
  have h2x : 0 < 2 * x := by linarith
  have h2y : 0 < 2 * y := by linarith
  rw [div_lt_div_iff₀ h2x h2y]
  have hmain : (x - 1) ^ 2 * (2 * y) < (y - 1) ^ 2 * (2 * x) := by
    let f : ℝ → ℝ := fun t => (t - 1) ^ 2 / t
    have hf_mono : ∀ a b : ℝ, 1 ≤ a → a < b → f a < f b := by
      intro a b ha hab
      simp only [f]
      have ha0 : (0 : ℝ) < a := by linarith
      have hb0 : (0 : ℝ) < b := by linarith
      rw [div_lt_div_iff₀ ha0 hb0]
      have : (a - 1) ^ 2 * b - (b - 1) ^ 2 * a < 0 := by
        have hcalc : (a - 1) ^ 2 * b - (b - 1) ^ 2 * a = (a - b) * (a * b - 1) := by
          ring
        rw [hcalc]
        have h1 : a - b < 0 := by linarith
        have h2 : a * b - 1 > 0 := by nlinarith
        nlinarith
      linarith
    have := hf_mono x y hx1 hxy
    simp only [f] at this
    rw [div_lt_div_iff₀ hx hy] at this
    calc
      (x - 1) ^ 2 * (2 * y) = 2 * ((x - 1) ^ 2 * y) := by ring
      _ < 2 * ((y - 1) ^ 2 * x) := by nlinarith
      _ = (y - 1) ^ 2 * (2 * x) := by ring
  exact hmain
THEOREM Jcost_small_strain_bound · IndisputableMonolith/Cost.lean
Jcost_small_strain_bound · IndisputableMonolith/Cost.lean:574
lemma Jcost_small_strain_bound (ε : ℝ) (hε : |ε| ≤ (1 : ℝ) / 10) :
    |Jcost (1 + ε) - ε ^ 2 / 2| ≤ ε ^ 2 / 10 := by
  classical
  have hbounds := abs_le.mp hε
  have hpos : 0 < 1 + ε := by
    have : -(1 : ℝ) / 10 ≤ ε := by simpa [neg_div] using hbounds.1
    linarith
  have hne : 1 + ε ≠ 0 := ne_of_gt hpos
  have hform : Jcost (1 + ε) = ε ^ 2 / (2 * (1 + ε)) := by
    simpa [pow_two, add_comm, add_left_comm, add_assoc, sub_eq_add_neg]
      using (Jcost_eq_sq hne)
  have hden_pos : 0 < 2 * (1 + ε) := by nlinarith [hpos]
  -- Exact difference and absolute value
  have h1 : Jcost (1 + ε) - ε ^ 2 / 2
      = ε ^ 2 / (2 * (1 + ε)) - ε ^ 2 / 2 := by
    simp [hform]
  have hx : (2 : ℝ) * (1 + ε) ≠ 0 := mul_ne_zero two_ne_zero hne
  have h2 : ε ^ 2 / (2 * (1 + ε)) - ε ^ 2 / 2 = -ε ^ 3 / (2 * (1 + ε)) := by
    field_simp [hx]
    ring
  have hdiff : Jcost (1 + ε) - ε ^ 2 / 2 = -ε ^ 3 / (2 * (1 + ε)) := h1.trans h2
  have habs : |Jcost (1 + ε) - ε ^ 2 / 2| = |ε| ^ 3 / (2 * (1 + ε)) := by
    have hposden : 0 < 2 * (1 + ε) := hden_pos
    simpa [abs_div, abs_neg, abs_pow, abs_of_pos hposden] using
      congrArg (fun z => |z|) hdiff
  -- Now bound using |ε|/(2(1+ε)) ≤ 1/18 from below
  have hx_lower : (9 : ℝ) / 10 ≤ 1 + ε := by linarith [show -(1 : ℝ) / 10 ≤ ε from by simpa [neg_div] using hbounds.1]
  have hx_pos : 0 < (9 : ℝ) / 10 := by norm_num
  have hx_inv : 1 / (1 + ε) ≤ (10 : ℝ) / 9 := by
    have := one_div_le_one_div_of_le hx_pos hx_lower
    simpa using this
  have hrec_bound : 1 / (2 * (1 + ε)) ≤ (5 : ℝ) / 9 := by
    have hmul : (1 / 2 : ℝ) * (1 / (1 + ε)) ≤ (1 / 2) * ((10 : ℝ) / 9) :=
      mul_le_mul_of_nonneg_left hx_inv (by norm_num)
    have hleft : 1 / (2 * (1 + ε)) = (1 / 2) * (1 / (1 + ε)) := by
      simp [div_eq_mul_inv, mul_comm]
    have hright : (5 : ℝ) / 9 = (1 / 2) * ((10 : ℝ) / 9) := by norm_num
    simpa [hleft, hright] using hmul
  have hrec_nonneg : 0 ≤ 1 / (2 * (1 + ε)) := by
    have : 0 ≤ 2 * (1 + ε) := le_of_lt (by nlinarith [hpos])
    exact one_div_nonneg.mpr this
  have hA : |ε| / (2 * (1 + ε)) ≤ (1 : ℝ) / 10 * (1 / (2 * (1 + ε))) := by
    simpa [div_eq_mul_inv, mul_comm, mul_left_comm, mul_assoc]
      using mul_le_mul_of_nonneg_right hε hrec_nonneg
  have hB : (1 : ℝ) / 10 * (1 / (2 * (1 + ε))) ≤ (1 : ℝ) / 18 := by
    have hmul := mul_le_mul_of_nonneg_left hrec_bound (by norm_num : (0 : ℝ) ≤ (1 : ℝ) / 10)
    have hright : (1 : ℝ) / 18 = (1 : ℝ) / 10 * ((5 : ℝ) / 9) := by norm_num
    simpa [hright] using hmul
  have hfrac : |ε| / (2 * (1 + ε)) ≤ (1 : ℝ) / 18 := hA.trans hB
  -- Conclude
  have hineq : |Jcost (1 + ε) - ε ^ 2 / 2| ≤ |ε| ^ 2 / 18 := by
    have hnn : 0 ≤ |ε| ^ 2 := by
      have := sq_nonneg (|ε|); simpa [pow_two] using this
    have hmul := mul_le_mul_of_nonneg_left hfrac hnn
    calc
      |Jcost (1 + ε) - ε ^ 2 / 2| = |ε| ^ 3 / (2 * (1 + ε)) := by simp [habs]
      _ ≤ |ε| ^ 2 * (1 / 18) := by
        simpa [pow_succ, pow_two, mul_comm, mul_left_comm, mul_assoc, div_eq_mul_inv] using hmul
      _ = |ε| ^ 2 / 18 := by simp [div_eq_mul_inv]
  have hratio : (1 : ℝ) / 18 ≤ 1 / 10 := by norm_num
  have hsq : |ε| ^ 2 = ε ^ 2 := by
    have h1 : |ε| * |ε| = |ε * ε| := by simp [abs_mul]
    calc
      |ε| ^ 2 = |ε| * |ε| := by simp [pow_two]
      _ = |ε * ε| := h1
      _ = |ε ^ 2| := by simp [pow_two]
      _ = ε ^ 2 := by simp [abs_of_nonneg (sq_nonneg ε)]
  have hcompare : |ε| ^ 2 / 18 ≤ ε ^ 2 / 10 := by
    have := mul_le_mul_of_nonneg_left hratio (by exact sq_nonneg ε)
    simpa [hsq, pow_two] using this
  exact (hineq.trans hcompare)

What this page does not claim

Not a claim that this module derives the fine-structure constant alpha. Not a claim that the five conditions are the only possible axioms for a cost function. Not a claim that the physical interpretation of the cost as a ledger entry is established in this module.

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/Cost.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