Encyclopedia Cost Cost Ndim Xcoordinates Det X Hessian Matrix2 Of R Formula
ARTICLE 3 claims 3 theorems
Cost Ndim Xcoordinates Det X Hessian Matrix2 Of R Formula
A formula for the curvature of a two-component cost function reveals where the cost becomes flat, and where it does not.
The two-component cost curvature
The cost function in Recognition Science measures the price of a recognition event. In the multi-component setting, the cost depends on positive coordinates recognition (a discrete record of events) through an aggregate value R. The second derivative of this cost, its Hessian matrix, describes how the cost curves as the coordinates move. For two components, this matrix is a 2 by 2 table of numbers, and its determinant summarizes the curvature in one number.
The declaration det_xHessianMatrix2OfR_formula is a proved theorem in the framework's machine-checked library of formal theorems. It gives a closed formula for that determinant in terms of the two coordinates x and y, their weights a and b, and the aggregate R. The formula factors into three pieces: a factor (R - 1)(R + 1), a secondary factor involving the weights, and a denominator of 4 R² x² y². This factorization is the key structural fact: the determinant vanishes exactly when R equals 1, or when the secondary factor vanishes.
The case R = 1 is the zero-cost locus, where the aggregate equals one. Here the theorem shows the Hessian collapses to a rank-one outer product, meaning the cost is flat in one direction. The secondary factor, R²(a + b - 1) + a + b + 1, is a separate degeneracy condition. Away from both of these loci, and with nonzero coordinates and weights, the determinant is nonzero, so the Hessian is nondegenerate and the cost curves in all directions.
In Recognition Science, this result is a step in understanding the geometry of the cost function. It does not claim that the secondary factor has a special physical meaning, nor that the determinant formula extends to more than two components. The formula is a precise, proved statement about the two-component case, and its value is in showing exactly where the cost flattens and where it does not.
THEOREM det_xHessianMatrix2OfR_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
theorem det_xHessianMatrix2OfR_formula (a b x y R : ℝ)
(hx : x ≠ 0) (hy : y ≠ 0) (hR : R ≠ 0) :
Matrix.det (xHessianMatrix2OfR a b x y R)
= -(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
simp [xHessianMatrix2OfR, Matrix.det_fin_two]
field_simp [hx, hy, hR]
ring
THEOREM det_xHessianMatrix2OfR_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
theorem det_xHessianMatrix2OfR_formula (a b x y R : ℝ)
(hx : x ≠ 0) (hy : y ≠ 0) (hR : R ≠ 0) :
Matrix.det (xHessianMatrix2OfR a b x y R)
= -(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
simp [xHessianMatrix2OfR, Matrix.det_fin_two]
field_simp [hx, hy, hR]
ring
THEOREM det_xHessianMatrix2_zero_cost · det_xHessianMatrix2_ne_zero_of_generic · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
/-- The neutral locus `aggregate = 1` is a degeneracy locus in the `2 × 2`
model. -/
theorem det_xHessianMatrix2_zero_cost (a b x y : ℝ)
(hx : x ≠ 0) (hy : y ≠ 0)
(hR : aggregate (vec2 a b) (vec2 x y) = 1) :
Matrix.det (xHessianMatrix2 a b x y) = 0 := by
rw [det_xHessianMatrix2_formula a b x y hx hy]
simp [hR]
/-- Away from the neutral locus and the secondary discriminant factor, the
`2 × 2` `x`-coordinate Hessian is nondegenerate. -/
theorem det_xHessianMatrix2_ne_zero_of_generic (a b x y : ℝ)
(hx : x ≠ 0) (hy : y ≠ 0)
(ha : a ≠ 0) (hb : b ≠ 0)
(hR1 : aggregate (vec2 a b) (vec2 x y) ≠ 1)
(hdisc :
(aggregate (vec2 a b) (vec2 x y)) ^ 2 * a
+ (aggregate (vec2 a b) (vec2 x y)) ^ 2 * b
- (aggregate (vec2 a b) (vec2 x y)) ^ 2
+ a + b + 1 ≠ 0) :
Matrix.det (xHessianMatrix2 a b x y) ≠ 0 := by
let R := aggregate (vec2 a b) (vec2 x y)
have hR : R ≠ 0 := (aggregate_pos (vec2 a b) (vec2 x y)).ne'
have hRp1 : R + 1 ≠ 0 := by
have hpos : 0 < R := by simp [R]
linarith
have hden : 4 * R ^ 2 * x ^ 2 * y ^ 2 ≠ 0 := by
have hR2 : R ^ 2 ≠ 0 := pow_ne_zero 2 hR
have hx2 : x ^ 2 ≠ 0 := pow_ne_zero 2 hx
have hy2 : y ^ 2 ≠ 0 := pow_ne_zero 2 hy
have h4R : 4 * R ^ 2 ≠ 0 := mul_ne_zero (by norm_num) hR2
have h4Rx : 4 * R ^ 2 * x ^ 2 ≠ 0 := mul_ne_zero h4R hx2
exact mul_ne_zero h4Rx hy2
rw [det_xHessianMatrix2_formula a b x y hx hy]
refine div_ne_zero ?_ hden
refine neg_ne_zero.mpr ?_
refine mul_ne_zero ?_ hdisc
refine mul_ne_zero ?_ hRp1
refine mul_ne_zero ?_ (sub_ne_zero.mpr hR1)
exact mul_ne_zero ha hb
What this page does not claim
The secondary factor has a physical interpretation. The determinant formula applies to more than two components. The theorem proves the cost function itself is unique; that is a separate result.
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 factor in higher dimensions?
- Does the determinant formula generalize to n components in a similar factored form?
- How does the zero-cost degeneracy relate to the framework's eight-tick recognition cycle?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM det_xHessianMatrix2OfR_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
theorem det_xHessianMatrix2OfR_formula (a b x y R : ℝ) (hx : x ≠ 0) (hy : y ≠ 0) (hR : R ≠ 0) : Matrix.det (xHessianMatrix2OfR a b x y R) = -(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 simp [xHessianMatrix2OfR, Matrix.det_fin_two] field_simp [hx, hy, hR] ringThe declaration det_xHessianMatrix2OfR_formula is a proved theorem in the framework's machine-checked library of formal theorems. det_xHessianMatrix2OfR_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.leanTHEOREM det_xHessianMatrix2OfR_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
theorem det_xHessianMatrix2OfR_formula (a b x y R : ℝ) (hx : x ≠ 0) (hy : y ≠ 0) (hR : R ≠ 0) : Matrix.det (xHessianMatrix2OfR a b x y R) = -(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 simp [xHessianMatrix2OfR, Matrix.det_fin_two] field_simp [hx, hy, hR] ringIt gives a closed formula for that determinant in terms of the two coordinates x and y, their weights a and b, and the aggregate R. det_xHessianMatrix2OfR_formula · IndisputableMonolith/Cost/Ndim/XCoordinates.leanTHEOREM det_xHessianMatrix2_zero_cost · det_xHessianMatrix2_ne_zero_of_generic · IndisputableMonolith/Cost/Ndim/XCoordinates.lean
/-- The neutral locus `aggregate = 1` is a degeneracy locus in the `2 × 2` model. -/ theorem det_xHessianMatrix2_zero_cost (a b x y : ℝ) (hx : x ≠ 0) (hy : y ≠ 0) (hR : aggregate (vec2 a b) (vec2 x y) = 1) : Matrix.det (xHessianMatrix2 a b x y) = 0 := by rw [det_xHessianMatrix2_formula a b x y hx hy] simp [hR]/-- Away from the neutral locus and the secondary discriminant factor, the `2 × 2` `x`-coordinate Hessian is nondegenerate. -/ theorem det_xHessianMatrix2_ne_zero_of_generic (a b x y : ℝ) (hx : x ≠ 0) (hy : y ≠ 0) (ha : a ≠ 0) (hb : b ≠ 0) (hR1 : aggregate (vec2 a b) (vec2 x y) ≠ 1) (hdisc : (aggregate (vec2 a b) (vec2 x y)) ^ 2 * a + (aggregate (vec2 a b) (vec2 x y)) ^ 2 * b - (aggregate (vec2 a b) (vec2 x y)) ^ 2 + a + b + 1 ≠ 0) : Matrix.det (xHessianMatrix2 a b x y) ≠ 0 := by let R := aggregate (vec2 a b) (vec2 x y) have hR : R ≠ 0 := (aggregate_pos (vec2 a b) (vec2 x y)).ne' have hRp1 : R + 1 ≠ 0 := by have hpos : 0 < R := by simp [R] linarith have hden : 4 * R ^ 2 * x ^ 2 * y ^ 2 ≠ 0 := by have hR2 : R ^ 2 ≠ 0 := pow_ne_zero 2 hR have hx2 : x ^ 2 ≠ 0 := pow_ne_zero 2 hx have hy2 : y ^ 2 ≠ 0 := pow_ne_zero 2 hy have h4R : 4 * R ^ 2 ≠ 0 := mul_ne_zero (by norm_num) hR2 have h4Rx : 4 * R ^ 2 * x ^ 2 ≠ 0 := mul_ne_zero h4R hx2 exact mul_ne_zero h4Rx hy2 rw [det_xHessianMatrix2_formula a b x y hx hy] refine div_ne_zero ?_ hden refine neg_ne_zero.mpr ?_ refine mul_ne_zero ?_ hdisc refine mul_ne_zero ?_ hRp1 refine mul_ne_zero ?_ (sub_ne_zero.mpr hR1) exact mul_ne_zero ha hbThe determinant vanishes exactly when R equals 1, or when the secondary factor vanishes. det_xHessianMatrix2_zero_cost · det_xHessianMatrix2_ne_zero_of_generic · IndisputableMonolith/Cost/Ndim/XCoordinates.lean