real_pos_def_has_invertible_gram_factor
Every finite real positive-definite matrix is the Gram matrix Fᵀ F of an invertible real square matrix F.
Statement
theorem real_pos_def_has_invertible_gram_factor {n : Type*} [Fintype n] [DecidableEq n] (H : Matrix n n ℝ) (hH : H.PosDef) : ∃ F : Matrix n n ℝ, IsUnit F.det ∧ F.transpose * F = H
- Source
- arXiv:2611.19367v1, Section III D–E, positive-definite factorization and singular-case extension.
- Verified
- 18 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext
The proof, explained
The proof chooses the candidate matrix F to be the positive semidefinite square root √H obtained from the continuous functional calculus. Because H is positive-definite, it is invertible, so the identity (√H)² = H implies that √H is invertible and hence has a unit determinant. Furthermore, √H is non-negative and therefore self-adjoint, which over the real numbers means symmetric: (√H)ᵀ = √H. Substituting (√H)ᵀ = √H and (√H)² = H yields Fᵀ F = H.
We choose F = √H, the square root of H provided by the continuous functional calculus, reducing the goal to showing that det F is a unit and Fᵀ F = H.
We enable classical reasoning and equip the algebra of real matrices with its standard partial order (`Matrix.instPartialOrder`), star-ordered ring structure (`Matrix.instStarOrderedRing`), and non-negative spectrum property (`Matrix.instNonnegSpectrumClass`). These instances allow the continuous functional calculus to define F = √H, leaving two subgoals: proving that det(√H) is a unit and that (√H)ᵀ √H = H.
uses
Matrix.instPartialOrder,Matrix.instStarOrderedRing,Matrix.instNonnegSpectrumClassclassical letI : PartialOrder (Matrix n n ℝ) := Matrix.instPartialOrder letI : StarOrderedRing (Matrix n n ℝ) := Matrix.instStarOrderedRing letI : NonnegSpectrumClass ℝ (Matrix n n ℝ) := Matrix.instNonnegSpectrumClass refine ⟨CFC.sqrt H, ?_, ?_⟩(√H)² = √H · √H = H.
Since H is positive-definite (`Matrix.PosDef.isStrictlyPositive`), it is strictly positive and therefore non-negative (`IsStrictlyPositive.nonneg`). By the continuous functional calculus property `CFC.sq_sqrt`, the square of the square root of a non-negative element is the element itself; rewriting (√H)² as √H · √H via `pow_two` yields √H · √H = H.
uses
pow_two,CFC.sq_sqrt,IsStrictlyPositive.nonneg,Matrix.PosDef.isStrictlyPositive· have hsq : (CFC.sqrt H) * (CFC.sqrt H) = H := by simpa [pow_two] using CFC.sq_sqrt H (IsStrictlyPositive.nonneg (Matrix.PosDef.isStrictlyPositive hH))
det(√H) is a unit in ℝ.
Since √H · √H = H and every positive-definite matrix is invertible (`Matrix.PosDef.isUnit`), the product √H · √H is invertible. In a matrix ring, invertibility of the product implies invertibility of the factor √H (`isUnit_of_mul_isUnit_left`). Finally, a square matrix is invertible if and only if its determinant is a unit (`Matrix.isUnit_iff_isUnit_det`).
uses
Matrix.PosDef.isUnit,isUnit_of_mul_isUnit_left,Matrix.isUnit_iff_isUnit_dethave hprod : IsUnit ((CFC.sqrt H) * (CFC.sqrt H)) := by rw [hsq] exact Matrix.PosDef.isUnit hH have hFunit : IsUnit (CFC.sqrt H) := isUnit_of_mul_isUnit_left hprod rwa [← Matrix.isUnit_iff_isUnit_det]
(√H)² = √H · √H = H.
In the second branch of the proof, we re-establish that √H · √H = H using the same argument: H is positive-definite, hence non-negative, so `CFC.sq_sqrt` and `pow_two` give √H · √H = H.
uses
pow_two,CFC.sq_sqrt,IsStrictlyPositive.nonneg,Matrix.PosDef.isStrictlyPositive· have hsq : (CFC.sqrt H) * (CFC.sqrt H) = H := by simpa [pow_two] using CFC.sq_sqrt H (IsStrictlyPositive.nonneg (Matrix.PosDef.isStrictlyPositive hH))
√H is symmetric: (√H)ᵀ = √H.
The functional calculus square root √H is non-negative (`CFC.sqrt_nonneg`), so it is self-adjoint (`IsSelfAdjoint.of_nonneg`), meaning star(√H) = √H. For matrices, star is the conjugate transpose (`Matrix.star_eq_conjTranspose`), which over ℝ coincides with the ordinary transpose (`Matrix.conjTranspose_eq_transpose_of_trivial`). Therefore, (√H)ᵀ = √H.
uses
IsSelfAdjoint.of_nonneg,CFC.sqrt_nonneg,Matrix.star_eq_conjTranspose,Matrix.conjTranspose_eq_transpose_of_trivialhave hF : IsSelfAdjoint (CFC.sqrt H) := IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg H) have hstar : star (CFC.sqrt H) = CFC.sqrt H := hF have htr : (CFC.sqrt H).transpose = CFC.sqrt H := by rw [Matrix.star_eq_conjTranspose] at hstar simpa [Matrix.conjTranspose_eq_transpose_of_trivial] using hstar
(√H)ᵀ √H = H.
Substituting (√H)ᵀ = √H and √H · √H = H into the goal confirms that (√H)ᵀ √H = H, completing the proof.
rw [htr, hsq]
Matrix.instPartialOrder- The standard partial order on square matrices over an RCLike field.
Matrix.instStarOrderedRing- The star-ordered ring structure on square matrices over an RCLike field.
Matrix.instNonnegSpectrumClass- Every non-negative matrix over an RCLike field has non-negative real spectrum.
pow_two- In any monoid, the square of an element a ^ 2 equals a * a.
CFC.sq_sqrt- In an algebra equipped with continuous functional calculus, the square of the square root of a non-negative element a is a.
IsStrictlyPositive.nonneg- A strictly positive element in an ordered monoid with zero is non-negative (0 ≤ a).
Matrix.PosDef.isStrictlyPositive- Every positive-definite matrix is strictly positive.
Matrix.PosDef.isUnit- Every positive-definite matrix is invertible (a unit).
isUnit_of_mul_isUnit_left- In a Dedekind-finite monoid, if a product x * y is invertible, then x is invertible.
Matrix.isUnit_iff_isUnit_det- A square matrix over a commutative ring is invertible if and only if its determinant is invertible.
IsSelfAdjoint.of_nonneg- In a star-ordered ring, every non-negative element is self-adjoint.
CFC.sqrt_nonneg- The square root of an element produced by the continuous functional calculus is non-negative.
Matrix.star_eq_conjTranspose- The star involution on square matrices is the conjugate transpose.
Matrix.conjTranspose_eq_transpose_of_trivial- For matrices over a ring with trivial involution (such as ℝ), the conjugate transpose equals the ordinary transpose.
- The proof explicitly supplies three typeclass instances on real square matrices (`Matrix.instPartialOrder`, `Matrix.instStarOrderedRing`, and `Matrix.instNonnegSpectrumClass`) via `letI` declarations to enable the continuous functional calculus.
- The algebraic identity $(\sqrt{H})^2 = H$ is proven twice (lines 7–9 and lines 15–17) because the two goals are proved in separate branches where local hypotheses do not persist across branches.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem real_pos_def_has_invertible_gram_factor {n : Type*} [Fintype n] [DecidableEq n] (H : Matrix n n ℝ) (hH : H.PosDef) : ∃ F : Matrix n n ℝ, IsUnit F.det ∧ F.transpose * F = H := by classical letI : PartialOrder (Matrix n n ℝ) := Matrix.instPartialOrder letI : StarOrderedRing (Matrix n n ℝ) := Matrix.instStarOrderedRing letI : NonnegSpectrumClass ℝ (Matrix n n ℝ) := Matrix.instNonnegSpectrumClass refine ⟨CFC.sqrt H, ?_, ?_⟩ · have hsq : (CFC.sqrt H) * (CFC.sqrt H) = H := by simpa [pow_two] using CFC.sq_sqrt H (IsStrictlyPositive.nonneg (Matrix.PosDef.isStrictlyPositive hH)) have hprod : IsUnit ((CFC.sqrt H) * (CFC.sqrt H)) := by rw [hsq] exact Matrix.PosDef.isUnit hH have hFunit : IsUnit (CFC.sqrt H) := isUnit_of_mul_isUnit_left hprod rwa [← Matrix.isUnit_iff_isUnit_det] · have hsq : (CFC.sqrt H) * (CFC.sqrt H) = H := by simpa [pow_two] using CFC.sq_sqrt H (IsStrictlyPositive.nonneg (Matrix.PosDef.isStrictlyPositive hH)) have hF : IsSelfAdjoint (CFC.sqrt H) := IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg H) have hstar : star (CFC.sqrt H) = CFC.sqrt H := hF have htr : (CFC.sqrt H).transpose = CFC.sqrt H := by rw [Matrix.star_eq_conjTranspose] at hstar simpa [Matrix.conjTranspose_eq_transpose_of_trivial] using hstar rw [htr, hsq]