Explanation of xDiagonalCorrection
(1) Plain English
The declaration defines a helper function for Hessian computations in a multi-component reciprocal cost. For dimension n, weight vector α, coordinate vector x, and indices i, j, it returns α_i / x_i² exactly when i = j and 0 otherwise. It supplies the diagonal correction term.
See xDiagonalCorrection.
(2) Why it matters in Recognition Science
Recognition Science extends the single-variable J-cost to vector cases via JcostN. The x-coordinate Hessian encodes curvature of this cost. The diagonal correction isolates the second-derivative contribution along each coordinate, enabling analysis of minima, degeneracy at the neutral locus (aggregate = 1), and non-degeneracy away from it.
(3) How to read the formal statement
noncomputable def: definition over reals, not required to be executable.{n : ℕ}: implicit natural-number dimension.(α x : Vec n): input vectors (Vec from Core).(i j : Fin n): indices in{0, …, n-1}.: ℝ: returns a real.- Body:
if i = j then α i / (x i) ^ 2 else 0. This is the standard diagonal-matrix pattern with entriesα_i / x_i².
(4) Visible dependencies or certificates
Imports IndisputableMonolith.Cost.Ndim.Core (supplies Vec, aggregate). Directly referenced by xHessianEntry and specialized in xHessianEntry_diag. Off-diagonal case is handled by xHessianEntry_offDiag. Determinant formulas such as det_xHessianMatrix2_formula and degeneracy result det_xHessianMatrix2_zero_cost build on the same structure. No sorry or external axioms appear in this module.
(5) What this declaration does not prove
It is a pure definition and asserts no properties. Non-degeneracy requires extra hypotheses (e.g., aggregate ≠ 1 and nonzero discriminant) proved separately in det_xHessianMatrix2_ne_zero_of_generic. No link is made here to the single-variable J-cost uniqueness, forcing chain, or physical constants.