Encyclopedia Cost Cost Convexity Cosh Strictly Convex

ARTICLE 3 claims 3 theorems

Cost Convexity Cosh Strictly Convex

The hyperbolic cosine, the curve of a hanging chain, turns out to be the exact shape of a forced recognition cost.

The shape of the cost curve

The hyperbolic cosine, written cosh, is a standard mathematical function defined as cosh(t) = (et + e-t)/2. Its graph is the familiar U-shaped curve of a hanging chain or cable, and it appears throughout physics and engineering. A basic fact from calculus is that this curve bends upward everywhere: its slope always increases as t moves from left to right. In precise language, cosh is strictly convex on the entire real line.

This strict convexity is what the Recognition Science declaration cosh_strictly_convex establishes. The framework's machine-checked library of formal theorems proves the statement directly: the second derivative of cosh is cosh itself, which is always positive, and a function with a positive second derivative on a convex set is strictly convex. The proof is short and complete, with no gaps or unstated assumptions.

The result matters because the framework's central object, the cost function J(x) = (x + 1/x)/2 - 1, is built from cosh. Writing x = et, the cost becomes J = cosh(t) - 1. Subtracting a constant does not change convexity, so the cost function inherits the same strict convexity on the positive real numbers. This geometric property, that the cost curve bends upward with no flat stretches, is foundational for the framework's uniqueness theorem T5, which forces J to be the only cost function satisfying five plain conditions.

Strict convexity also gives a practical guarantee: any minimum of the cost function is unique. For the cost J, the minimum occurs at x = 1, where J(1) = 0, matching the condition that recognition of something identical to itself costs nothing. The convex shape ensures there is exactly one such point, not a plateau of equally cheap options.

What the declaration does not claim is just as precise. It proves convexity of cosh and of J on the positive reals; it does not prove that J is the only function with this shape, nor does it address the five conditions that single out J among all cost functions. Those belong to the separate uniqueness theorem T5, which the convexity result supports but does not itself establish.

THEOREM cosh_strictly_convex · IndisputableMonolith/Cost/Convexity.lean
cosh_strictly_convex · IndisputableMonolith/Cost/Convexity.lean:24
/-- cosh is strictly convex on ℝ.

    Proof: cosh'' = cosh > 0 everywhere. A function with positive second
    derivative on a convex set is strictly convex. -/
theorem cosh_strictly_convex : StrictConvexOn ℝ univ Real.cosh := by
  apply strictConvexOn_of_deriv2_pos convex_univ
  · -- cosh is continuous
    exact Real.continuous_cosh.continuousOn
  · -- cosh'' = cosh > 0 on interior (which is univ)
    intro x _
    -- deriv^[2] cosh = cosh
    show 0 < deriv^[2] Real.cosh x
    rw [Function.iterate_succ, Function.iterate_one, Function.comp_apply]
    -- First derivative of cosh is sinh
    have h1 : deriv Real.cosh = Real.sinh := Real.deriv_cosh
    -- Second derivative: deriv sinh = cosh
    have h2 : deriv Real.sinh = Real.cosh := Real.deriv_sinh
    -- So deriv (deriv cosh) x = cosh x > 0
    rw [h1, congrFun h2 x]
    exact Real.cosh_pos x
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

What this page does not claim

The declaration does not prove that J is the only strictly convex function with this shape. It does not establish the five conditions that force J uniquely; that is the separate theorem T5. It says nothing about cost functions on negative numbers or complex inputs.

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