Encyclopedia Cost Cost Ndim Hessian Hessian Matrix

ARTICLE 5 claims 4 theorems 1 model

Cost Ndim Hessian Hessian Matrix

A single weighted direction controls the entire second-derivative structure of the n-dimensional cost.

The one-direction Hessian

In calculus, the Hessian matrix collects the second partial derivatives of a function. For a function of n variables, it is an n by n matrix that describes how the slope changes in every direction. The Recognition Science declaration hessianMatrix defines this object for the n-dimensional version of the framework's cost function, and the definition is strikingly simple: the entry in row i and column j is just the product of two fixed numbers, α_i times α_j.

Those numbers come from the cost function's log-coordinate form. The framework's cost function, which measures the price of a recognition event, takes a vector of n coordinates. In log-coordinates, the function depends only on a single weighted aggregate, the dot product of the vector α with the coordinate vector t. Because of that collapse, the Hessian matrix at any point is a scalar multiple of the simple outer product α ⊗ α. The result hessianAt_factor proves this factorization, and the result hessianAt_zero shows that at the equilibrium point, where t is all zeros, the full Hessian is exactly the outer product.

The practical consequence is that the Hessian has rank one. It has only one active direction, the direction of α itself. The result applyHessian_eq_direction proves that when the Hessian acts on any vector v, the result is always parallel to α. Any vector orthogonal to α lies in the kernel, meaning the Hessian sends it to zero, as proved in applyHessian_of_dot_zero. The quadratic form, which measures the second-order change in cost along a direction v, is a single squared term: the hyperbolic cosine of the aggregate times the square of the dot product of α with v. This is proved in quadraticHessian_eq, and the result quadraticHessian_nonneg confirms that this form is never negative, so the cost is locally convex along every direction.

In Recognition Science, this one-direction structure is not a numerical accident but a consequence of the cost function's forced form. The framework models recognition cost as a function that must satisfy a small set of plain conditions, and the resulting function has this special property: in the right coordinates, all of its curvature points along a single line. The Hessian matrix is the precise statement of that fact in n dimensions.

What the declaration does not claim is broader. It does not claim that the cost function is globally convex, only that the quadratic form is nonnegative at every point. It does not claim that the direction α is derived from the physical constants of the framework; α is a parameter of the model. And it does not claim that the Hessian matrix itself is the cost function's full second derivative in the original coordinates; the factorization holds in log-coordinates, and the relationship to the original coordinate system is a separate matter.

MODEL hessianMatrix · IndisputableMonolith/Cost/Ndim/Hessian.lean
/-- The equilibrium Hessian model is the outer product `α ⊗ α`. -/
def hessianMatrix {n : ℕ} (α : Vec n) : Fin n → Fin n → ℝ :=
  fun i j => α i * α j
THEOREM hessianAt_zero · IndisputableMonolith/Cost/Ndim/Hessian.lean
@[simp] theorem hessianAt_zero {n : ℕ} (α : Vec n) :
    hessianAt α (fun _ => 0) = hessianMatrix α := by
  funext i j
  simp [hessianAt, hessianMatrix, hessianEntry_zero]
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
THEOREM applyHessian_eq_direction · IndisputableMonolith/Cost/Ndim/Hessian.lean
applyHessian_eq_direction · IndisputableMonolith/Cost/Ndim/Hessian.lean:67
/-- The Hessian action is always parallel to `α`. -/
theorem applyHessian_eq_direction {n : ℕ} (α t v : Vec n) :
    applyHessian α t v = fun i => Real.cosh (dot α t) * α i * dot α v := by
  funext i
  unfold applyHessian applyTensor hessianAt hessianEntry dot
  calc
    ∑ j : Fin n, (α i * α j * Real.cosh (dot α t)) * v j
        = ∑ j : Fin n, (α i * Real.cosh (dot α t)) * (α j * v j) := by
            apply Finset.sum_congr rfl
            intro j hj
            ring
    _ = (α i * Real.cosh (dot α t)) * ∑ j : Fin n, α j * v j := by
          rw [Finset.mul_sum]
    _ = Real.cosh (dot α t) * α i * dot α v := by
          simp [dot, mul_comm, mul_assoc]
THEOREM quadraticHessian_nonneg · IndisputableMonolith/Cost/Ndim/Hessian.lean
quadraticHessian_nonneg · IndisputableMonolith/Cost/Ndim/Hessian.lean:112
theorem quadraticHessian_nonneg {n : ℕ} (α t v : Vec n) :
    0 ≤ quadraticHessian α t v := by
  rw [quadraticHessian_eq]
  positivity

What this page does not claim

The cost function is globally convex, only locally along each direction. The direction α is derived from the framework's physical constants. The Hessian matrix defines the full second derivative in the original coordinates, not just in log-coordinates.

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:

MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND