Encyclopedia Cost Cost Ndim Hessian Quadratic Hessian Nonneg
ARTICLE 3 claims 3 theorems
Cost Ndim Hessian Quadratic Hessian Nonneg
In the framework's n-dimensional cost model, the curvature of the cost surface is never negative, a fact that pins down the local geometry of recognition events.
The curvature sign
In calculus, the Hessian of a function is the matrix of its second derivatives. It measures how the slope of the function changes as you move away from a point. For a cost function, the Hessian tells you whether the cost surface curves upward or downward in each direction. The declaration quadraticHessian_nonneg in the framework's machine-checked library of formal theorems establishes a simple and strong fact: for the n-dimensional reciprocal cost, the quadratic form built from the Hessian is always greater than or equal to zero.
To see what this means, consider the framework's recognition cost, a function that assigns a price to each recognition event, a discrete record of an observation. In log-coordinates, this cost depends only on a single weighted aggregate of the input vector α and the state t. The Hessian of this cost is a rank-one matrix: it factors through the outer product α ⊗ α, meaning all its curvature is concentrated along one direction, the direction of α. The theorem quadraticHessian_nonneg proves that this curvature is never negative, so the cost surface is convex, curving upward in every direction, at every point.
The proof is short and direct. The quadratic form equals cosh(dot α t) times (dot α v)². The hyperbolic cosine is always at least 1, and a square is never negative, so the product is always nonnegative. The theorem uses the positivity tactic in the library to close the goal. This is a proved result in the framework's formal system, not a hypothesis or a numerical approximation.
What the theorem does not claim is just as important. It does not say the Hessian matrix is positive definite, which would mean the cost is strictly convex and has a unique minimum. The matrix is positive semidefinite: it can be zero along directions orthogonal to α. The theorem does not say anything about the sign of the cost itself, only about its curvature. And it does not claim that the cost function is globally convex in the original coordinates, only in the log-coordinates where the proof is carried out.
This result matters because it guarantees that the cost surface has a well-defined local geometry: no saddle points or downward curvature along any direction. It is a structural fact that supports the framework's later claims about the uniqueness of the cost function and the forced structure of recognition dynamics.
THEOREM quadraticHessian_nonneg · IndisputableMonolith/Cost/Ndim/Hessian.lean
theorem quadraticHessian_nonneg {n : ℕ} (α t v : Vec n) :
0 ≤ quadraticHessian α t v := by
rw [quadraticHessian_eq]
positivity
THEOREM quadraticHessian_eq · IndisputableMonolith/Cost/Ndim/Hessian.lean
/-- The Hessian quadratic form depends only on the single active direction `dot α v`. -/
theorem quadraticHessian_eq {n : ℕ} (α t v : Vec n) :
quadraticHessian α t v = Real.cosh (dot α t) * (dot α v) ^ 2 := by
unfold quadraticHessian dot
rw [applyHessian_eq_direction]
calc
∑ i : Fin n, v i * (Real.cosh (dot α t) * α i * dot α v)
= ∑ i : Fin n, Real.cosh (dot α t) * dot α v * (v i * α i) := by
apply Finset.sum_congr rfl
intro i hi
ring
_ = (Real.cosh (dot α t) * dot α v) * ∑ i : Fin n, v i * α i := by
rw [Finset.mul_sum]
_ = Real.cosh (dot α t) * (dot α v) * dot α v := by
congr 1
unfold dot
apply Finset.sum_congr rfl
intro i hi
ring
_ = Real.cosh (dot α t) * (dot α v) ^ 2 := by
ring
THEOREM hessianAt_factor · IndisputableMonolith/Cost/Ndim/Hessian.lean
/-- The full Hessian is a scalar multiple of the equilibrium outer-product model. -/
theorem hessianAt_factor {n : ℕ} (α t : Vec n) :
hessianAt α t = fun i j => Real.cosh (dot α t) * hessianMatrix α i j := by
funext i j
unfold hessianAt hessianEntry hessianMatrix
ring
What this page does not claim
The Hessian matrix is not proven to be positive definite, only positive semidefinite. The theorem does not claim global convexity in the original, non-log coordinates. The theorem says nothing about the sign of the cost function itself, only about its curvature.
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/Ndim/Hessian.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 does the nonnegativity of the Hessian imply for the existence and uniqueness of minima of the cost function?
- How does the rank-one structure of the Hessian relate to the framework's derivation of three spatial dimensions?
- What is the significance of the log-coordinate transformation in making the cost function convex?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM quadraticHessian_nonneg · IndisputableMonolith/Cost/Ndim/Hessian.lean
theorem quadraticHessian_nonneg {n : ℕ} (α t v : Vec n) : 0 ≤ quadraticHessian α t v := by rw [quadraticHessian_eq] positivityThe theorem quadraticHessian_nonneg proves that the quadratic form built from the Hessian is always greater than or equal to zero. quadraticHessian_nonneg · IndisputableMonolith/Cost/Ndim/Hessian.leanTHEOREM quadraticHessian_eq · IndisputableMonolith/Cost/Ndim/Hessian.lean
/-- The Hessian quadratic form depends only on the single active direction `dot α v`. -/ theorem quadraticHessian_eq {n : ℕ} (α t v : Vec n) : quadraticHessian α t v = Real.cosh (dot α t) * (dot α v) ^ 2 := by unfold quadraticHessian dot rw [applyHessian_eq_direction] calc ∑ i : Fin n, v i * (Real.cosh (dot α t) * α i * dot α v) = ∑ i : Fin n, Real.cosh (dot α t) * dot α v * (v i * α i) := by apply Finset.sum_congr rfl intro i hi ring _ = (Real.cosh (dot α t) * dot α v) * ∑ i : Fin n, v i * α i := by rw [Finset.mul_sum] _ = Real.cosh (dot α t) * (dot α v) * dot α v := by congr 1 unfold dot apply Finset.sum_congr rfl intro i hi ring _ = Real.cosh (dot α t) * (dot α v) ^ 2 := by ringThe quadratic form equals cosh(dot α t) times (dot α v)². quadraticHessian_eq · IndisputableMonolith/Cost/Ndim/Hessian.leanTHEOREM hessianAt_factor · IndisputableMonolith/Cost/Ndim/Hessian.lean
/-- The full Hessian is a scalar multiple of the equilibrium outer-product model. -/ theorem hessianAt_factor {n : ℕ} (α t : Vec n) : hessianAt α t = fun i j => Real.cosh (dot α t) * hessianMatrix α i j := by funext i j unfold hessianAt hessianEntry hessianMatrix ringThe Hessian is a rank-one matrix that factors through the outer product α ⊗ α. hessianAt_factor · IndisputableMonolith/Cost/Ndim/Hessian.lean