Encyclopedia Cost Cost Convexity Jcost As Composition

ARTICLE 3 claims 3 theorems

Cost Convexity Jcost As Composition

The recognition cost function J(x) = ½(x + x⁻¹) − 1 is strictly convex on positive numbers, a shape fact that underpins its uniqueness theorem.

The cost function's shape

A function's convexity tells you its graph bends upward like a bowl instead of dipping or wobbling. For the recognition cost J(x) = ½(x + x⁻¹) − 1, defined for positive x, the second derivative is x⁻³, which is always positive. A function with a positive second derivative on an interval is strictly convex, meaning the bowl bends upward at every point. The machine-checked library of formal theorems proves this directly: J is strictly convex on the positive real numbers.

The same library proves a companion fact about the logarithmic form. Write Jlog(t) = cosh t − 1, where cosh t = ½(eᵗ + e⁻ᵗ). This function is also strictly convex, on the whole real line, because its second derivative is cosh t, always positive. The two forms connect through the substitution x = eᵗ: Jcost(x) = Jlog(log x). The declaration Jcost_as_composition establishes exactly this bridge, showing that the positive-x cost function is the logarithmic one pulled back through the exponential map.

In Recognition Science, this convexity is not a curiosity. The framework's uniqueness theorem T5 relies on it: among cost functions satisfying five plain conditions, only J(x) = ½(x + x⁻¹) − 1 survives. Convexity supplies the regularity that lets the functional equation force a single solution instead of a family of them. Without strict convexity, the composition law could admit pathological alternatives; with it, the bowl shape pins the cost down uniquely.

What the declaration does not claim is broader. It does not assert that J is the only convex function, nor that convexity alone selects it. The uniqueness requires all five conditions together. The declaration also does not claim anything about the golden ratio, particle masses, or spatial dimensions; those follow from later theorems in the forcing chain, not from this convexity lemma. The bridge Jcost(x) = Jlog(log x) is a structural fact about the two forms, not a physical prediction.

THEOREM Jcost_strictConvexOn_pos · IndisputableMonolith/Cost/Convexity.lean
Jcost_strictConvexOn_pos · IndisputableMonolith/Cost/Convexity.lean:122
/-- Strict convexity of `Jcost` on `(0, ∞)`. -/
theorem Jcost_strictConvexOn_pos : StrictConvexOn ℝ (Ioi (0 : ℝ)) Jcost := by
  -- A function is strictly convex if its derivative is strictly increasing
  apply strictConvexOn_of_deriv2_pos (convex_Ioi 0)
  · -- Continuity on (0, ∞)
    unfold Jcost
    apply ContinuousOn.sub
    · apply ContinuousOn.div_const
      apply ContinuousOn.add continuousOn_id
      exact continuousOn_inv₀.mono (fun x hx => ne_of_gt hx)
    · exact continuousOn_const
  · -- Positive second derivative on interior
    intro x hx
    rw [interior_Ioi] at hx
    -- deriv^[2] Jcost x = x⁻³ > 0
    show 0 < deriv^[2] Jcost x
    rw [Function.iterate_succ, Function.iterate_one, Function.comp_apply]
    -- In a neighborhood of x, deriv Jcost = JcostDeriv
    have h_event : ∀ᶠ y in nhds x, deriv Jcost y = JcostDeriv y := by
      have h_mem : Ioi (0 : ℝ) ∈ nhds x := Ioi_mem_nhds hx
      filter_upwards [h_mem] with y hy using deriv_Jcost hy
    have h_deriv2 : deriv (deriv Jcost) x = deriv JcostDeriv x := Filter.EventuallyEq.deriv_eq h_event
    rw [h_deriv2, deriv_JcostDeriv hx]
    unfold JcostDeriv'
    -- x ^ (-3) > 0 for x > 0
    have hx_pos : 0 < x := hx
    exact zpow_pos hx_pos (-3)
THEOREM Jcost_as_composition · IndisputableMonolith/Cost/Convexity.lean
Jcost_as_composition · IndisputableMonolith/Cost/Convexity.lean:150
/-- Helper: Jcost on positive reals via composition with exp -/
lemma Jcost_as_composition {x : ℝ} (hx : 0 < x) :
  Jcost x = Jlog (log x) := by
  -- Jlog t = Jcost (exp t), so Jlog (log x) = Jcost (exp (log x)) = Jcost x
  unfold Jlog
  congr 1
  exact (Real.exp_log hx).symm
THEOREM Jlog_strictConvexOn · IndisputableMonolith/Cost/Convexity.lean
Jlog_strictConvexOn · IndisputableMonolith/Cost/Convexity.lean:51
/-- Strict convexity of `Jlog` on `ℝ`. -/
theorem Jlog_strictConvexOn : StrictConvexOn ℝ univ Jlog := by
  -- Jlog = cosh - 1, and cosh is strictly convex
  -- Subtracting a constant preserves strict convexity
  have h : Jlog = fun t => Real.cosh t - 1 := by ext t; exact Jlog_eq_cosh_sub_one t
  rw [h]
  exact strictConvexOn_cosh.add_const (-1)

What this page does not claim

Convexity alone does not force J; all five conditions are needed. The declaration says nothing about the golden ratio or particle masses. No physical prediction follows from this lemma by itself.

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