Theorem 3.2.1: the density of the Wishart distribution
ProvedMuirheadMST.wishart_densityLet and let be a positive definite matrix. If , that is, for an matrix with independent rows, then has density
on positive definite matrices , and density elsewhere, with respect to Lebesgue measure on symmetric matrices. Here and is the multivariate gamma function.
This theorem turns probabilities about Wishart matrices into integrals over the cone of positive definite matrices; it is the starting point for the distribution of the latent roots.
Formalization Note The statement is an equality of measures on arrays Fin m → Fin m → ℝ; symVolume m is , supported on symmetric arrays. is allowed and trivial.
import Mathlib import Definitions.Def_MuirheadMST_Wishart open MeasureTheory ProbabilityTheory
namespace MuirheadMST
open scoped Classical in
theorem wishart_density (m n : ℕ) (hmn : m ≤ n) (S : Matrix (Fin m) (Fin m) ℝ) (hS : S.PosDef) :
wishart m n S = (symVolume m).withDensity fun A => ENNReal.ofReal
(if (Matrix.of A).PosDef then
(2 ^ ((m : ℝ) * n / 2) * multivariateGamma m ((n : ℝ) / 2) * S.det ^ ((n : ℝ) / 2))⁻¹ *
Real.exp (-(1 / 2) * (S⁻¹ * Matrix.of A).trace) *
(Matrix.of A).det ^ (((n : ℝ) - m - 1) / 2)
else 0) := by sorry
end MuirheadMSTRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Fix natural numbers and a positive definite real matrix (symmetric, for ); is allowed. The statement says that two measures on the space of real arrays (product σ-algebra) are equal: , i.e. for every measurable .
- is the law of , , where the rows of are independent (the image of the standard Gaussian under ).
- is the pushforward of Lebesgue measure on the upper-triangular coordinates (including the diagonal) under symmetric completion; it lives on symmetric arrays.
- if is positive definite, and otherwise (negative values would be truncated to ). is the ordinary inverse. All exponents are real numbers, so when ; the powers are real powers of positive numbers.
- ; at every argument is at least because .
Edge case: for the array space is a point, the empty matrix counts as positive definite, and .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.