Tangential Hessian in the quaternion frame is a bordered Hessian
Proveddet_quaternionFrame_eq_borderedFor let be the quaternion matrices of Joung–van Koert (Section 2.3), so that , , span the orthogonal complement of . Let be the matrix with rows , and . Then for every symmetric real matrix ,
When and for a function on , the matrix is the Hessian of restricted to the tangent space of the level set, written in the frame . The identity turns its determinant into a bordered Hessian, since . This is the four-dimensional, quaternion-frame analogue of the bordered-Hessian formula for the Gauss curvature of an implicit surface (Goldman, Curvature formulas for implicit curves and surfaces, 2005). For a Hamiltonian, the determinant factor of the positive-tangential-Hessian (convexity) test then no longer involves the frame.
Formalization note. is given entrywise, , so it is symmetric by construction.
import Mathlib.Data.Real.Basic import Mathlib.LinearAlgebra.Matrix.Adjugate
/-- In the quaternion frame `I g, J g, K g` of `ℝ⁴`, the determinant of the tangential Hessian
equals `|g|⁴ · gᵀ adj(H) g` (a bordered-Hessian identity), for every symmetric `4 × 4` matrix `H`. -/
theorem det_quaternionFrame_eq_bordered (g0 g1 g2 g3 a b c d e f h i j k : ℝ) :
(!![g2, g3, -g0, -g1; g1, -g0, -g3, g2; -g3, g2, -g1, g0] *
!![a, b, c, d; b, e, f, h; c, f, i, j; d, h, j, k] *
(!![g2, g3, -g0, -g1; g1, -g0, -g3, g2; -g3, g2, -g1, g0] : Matrix (Fin 3) (Fin 4) ℝ).transpose).det
= (![g0, g1, g2, g3] ⬝ᵥ ![g0, g1, g2, g3]) ^ 2 *
(![g0, g1, g2, g3] ⬝ᵥ Matrix.mulVec
(!![a, b, c, d; b, e, f, h; c, f, i, j; d, h, j, k] : Matrix (Fin 4) (Fin 4) ℝ).adjugate
![g0, g1, g2, g3]) := by sorry