Encyclopedia Cost Cost Ndim Xcoordinates Det X Hessian Matrix2 Formula
ARTICLE 3 claims 3 theorems
Cost Ndim Xcoordinates Det X Hessian Matrix2 Formula
A compact formula gives the curvature of a two-component cost surface, and it reveals exactly where that curvature vanishes.
The determinant formula
In the Recognition Science framework, the cost of a recognition event is a number that measures how far a proposed state is from a perfect match. For a system with two components, the cost surface bends in two independent directions, and the determinant of its Hessian matrix summarizes that bending into a single number. The declaration det_xHessianMatrix2_formula establishes a closed algebraic formula for this determinant, valid whenever the two coordinates are nonzero and the weighted aggregate R is nonzero.
The formula itself is explicit. For positive weights a and b, coordinates x and y, and aggregate R = a x + b y, the determinant equals
−(a b (R − 1) (R + 1) (R² a + R² b − R² + a + b + 1)) / (4 R² x² y²).
This factorization is the content of the theorem. The factors (R − 1) and (R + 1) show that the determinant vanishes when R = 1 or R = −1, and the remaining quadratic factor in R gives a second, less obvious degeneracy condition. When R = 1, the cost is at its zero, and the Hessian collapses to a rank-one outer product, so the determinant is zero. Away from these loci, the Hessian is nondegenerate, meaning the cost surface has genuine curvature in both directions.
What the declaration does not claim is equally important. It does not assert that the Hessian is positive definite, so it does not establish a minimum or a maximum. It does not say anything about the sign of the determinant away from the degeneracy loci, and it does not apply to the full n-dimensional cost, only to the two-component specialization. The formula is a computational tool, not a statement about the physics or the uniqueness of the cost function.
THEOREM det_xHessianMatrix2_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
theorem det_xHessianMatrix2_formula (a b x y : ℝ)
(hx : x ≠ 0) (hy : y ≠ 0) :
let R := aggregate (vec2 a b) (vec2 x y)
Matrix.det (xHessianMatrix2 a b x y)
= -(a * b * (R - 1) * (R + 1) * (R ^ 2 * a + R ^ 2 * b - R ^ 2 + a + b + 1))
/ (4 * R ^ 2 * x ^ 2 * y ^ 2) := by
dsimp [xHessianMatrix2]
simpa using det_xHessianMatrix2OfR_formula a b x y (aggregate (vec2 a b) (vec2 x y))
hx hy (aggregate_pos (vec2 a b) (vec2 x y)).ne'
THEOREM det_xHessianMatrix2_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
theorem det_xHessianMatrix2_formula (a b x y : ℝ)
(hx : x ≠ 0) (hy : y ≠ 0) :
let R := aggregate (vec2 a b) (vec2 x y)
Matrix.det (xHessianMatrix2 a b x y)
= -(a * b * (R - 1) * (R + 1) * (R ^ 2 * a + R ^ 2 * b - R ^ 2 + a + b + 1))
/ (4 * R ^ 2 * x ^ 2 * y ^ 2) := by
dsimp [xHessianMatrix2]
simpa using det_xHessianMatrix2OfR_formula a b x y (aggregate (vec2 a b) (vec2 x y))
hx hy (aggregate_pos (vec2 a b) (vec2 x y)).ne'
THEOREM xHessianEntry_zero_cost · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
/-- On the zero-cost locus `aggregate α x = 1`, the `x`-Hessian collapses to
the rank-one outer product of the active direction with itself. -/
theorem xHessianEntry_zero_cost {n : ℕ} (α x : Vec n) {i j : Fin n}
(hR : aggregate α x = 1) :
xHessianEntry α x i j = xDirection α x i * xDirection α x j := by
unfold xHessianEntry xDirection xDiagonalCorrection
rw [hR]
by_cases hij : i = j
· simp [hij]
· simp [hij]
What this page does not claim
The formula does not establish positive definiteness or the nature of any critical point. The declaration does not apply to the general n-dimensional cost, only to the two-component case. The formula does not by itself prove any physical claim about the cost function's uniqueness.
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/XCoordinates.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 is the geometric meaning of the secondary degeneracy locus where the quadratic factor vanishes?
- Does the determinant formula generalize to n components with a similar factorization?
- How does the degeneracy at R = 1 relate to the physical interpretation of the cost function?
- What conditions on the weights and coordinates make the Hessian positive definite?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM det_xHessianMatrix2_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
theorem det_xHessianMatrix2_formula (a b x y : ℝ) (hx : x ≠ 0) (hy : y ≠ 0) : let R := aggregate (vec2 a b) (vec2 x y) Matrix.det (xHessianMatrix2 a b x y) = -(a * b * (R - 1) * (R + 1) * (R ^ 2 * a + R ^ 2 * b - R ^ 2 + a + b + 1)) / (4 * R ^ 2 * x ^ 2 * y ^ 2) := by dsimp [xHessianMatrix2] simpa using det_xHessianMatrix2OfR_formula a b x y (aggregate (vec2 a b) (vec2 x y)) hx hy (aggregate_pos (vec2 a b) (vec2 x y)).ne'The declaration det_xHessianMatrix2_formula establishes a closed algebraic formula for the determinant of the 2x2 x-coordinate Hessian matrix. det_xHessianMatrix2_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.leanTHEOREM det_xHessianMatrix2_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
theorem det_xHessianMatrix2_formula (a b x y : ℝ) (hx : x ≠ 0) (hy : y ≠ 0) : let R := aggregate (vec2 a b) (vec2 x y) Matrix.det (xHessianMatrix2 a b x y) = -(a * b * (R - 1) * (R + 1) * (R ^ 2 * a + R ^ 2 * b - R ^ 2 + a + b + 1)) / (4 * R ^ 2 * x ^ 2 * y ^ 2) := by dsimp [xHessianMatrix2] simpa using det_xHessianMatrix2OfR_formula a b x y (aggregate (vec2 a b) (vec2 x y)) hx hy (aggregate_pos (vec2 a b) (vec2 x y)).ne'The determinant vanishes when the aggregate R equals 1 or −1, and also when the secondary quadratic factor is zero. det_xHessianMatrix2_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.leanTHEOREM xHessianEntry_zero_cost · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
/-- On the zero-cost locus `aggregate α x = 1`, the `x`-Hessian collapses to the rank-one outer product of the active direction with itself. -/ theorem xHessianEntry_zero_cost {n : ℕ} (α x : Vec n) {i j : Fin n} (hR : aggregate α x = 1) : xHessianEntry α x i j = xDirection α x i * xDirection α x j := by unfold xHessianEntry xDirection xDiagonalCorrection rw [hR] by_cases hij : i = j · simp [hij] · simp [hij]When R = 1, the Hessian collapses to a rank-one outer product, so the determinant is zero. xHessianEntry_zero_cost · IndisputableMonolith/Cost/Ndim/XCoordinates.lean