Schur complement formula for a diagonal entry of :
ProvedGaussianMatrix.schur_diag_invLet be a real matrix, fix a row index , let be the -th row of , and let be the matrix obtained from by deleting row (its rows are , , in their original order). Assume that the Gram matrix is invertible. Then
where is the orthogonal projector of onto the row space of , so that is the residual of after projection onto the span of the other rows. The quantity is the Schur complement of the block in .
This is the deterministic linear-algebra step in the classical computation of the mean of an inverse Wishart matrix: it expresses each diagonal entry of through the squared distance from one row to the span of the others, which for a Gaussian matrix has a chi-square law.
Formalization Note. Lean's matrix inverse is total ( when ) and in ; the identity holds under the sole hypothesis , including the degenerate case where lies in the row space of (then both sides are ). The matrix is written G.submatrix i.succAbove id.
import Definitions.Def_GaussianMatrix_basic open MeasureTheory ProbabilityTheory open scoped Matrix
namespace GaussianMatrix
theorem schur_diag_inv {n k : ℕ} (G : Matrix (Fin (n + 1)) (Fin k) ℝ) (i : Fin (n + 1))
(hH : (G.submatrix i.succAbove id * (G.submatrix i.succAbove id)ᵀ).det ≠ 0) :
(G * Gᵀ)⁻¹ i i =
(G i ⬝ᵥ G i - (G.submatrix i.succAbove id *ᵥ G i) ⬝ᵥ
((G.submatrix i.succAbove id * (G.submatrix i.succAbove id)ᵀ)⁻¹ *ᵥ
(G.submatrix i.succAbove id *ᵥ G i)))⁻¹ := by sorry
end GaussianMatrix