Inverse-Wishart mean: for a Gaussian ,
ProvedGaussianMatrix.inverse_wishart_meanLet be a standard Gaussian matrix with . Then every entry of is integrable and
The matrix is Wishart distributed with degrees of freedom and identity scale, and is inverse-Wishart; this is the classical formula for its mean. Taking the trace gives , the quantity governing the expected Frobenius error of the randomized SVD.
Formalization Note. The statement is entrywise: for all , the function is integrable under and its integral equals . Mathlib's inverse is total ( on the singular null set), which does not affect the integral.
import Definitions.Def_GaussianMatrix_basic open MeasureTheory ProbabilityTheory open scoped Matrix
namespace GaussianMatrix
theorem inverse_wishart_mean {r k : ℕ} (hrk : r + 2 ≤ k) :
(∀ i j : Fin r, Integrable (fun G : Fin r → Fin k → ℝ =>
(Matrix.of G * (Matrix.of G)ᵀ)⁻¹ i j) (gaussianMatrix r k)) ∧
∀ i j : Fin r, ∫ G, (Matrix.of G * (Matrix.of G)ᵀ)⁻¹ i j ∂(gaussianMatrix r k)
= (1 / ((k : ℝ) - r - 1)) * (1 : Matrix (Fin r) (Fin r) ℝ) i j := by sorry
end GaussianMatrixRead-back
What the Lean code literally says, in plain math · claude-fable-5-1
Throughout, denotes the measure called gaussianMatrix r k: the product measure on the function space in which every one of the coordinates is an independent standard normal ; it is a probability measure, and a sample is viewed as the real matrix with entries . Matrix inversion is Mathlib's total inverse on square real matrices: it is the usual inverse when the determinant is nonzero and is the zero matrix otherwise.
Statement. Let be natural numbers with . Write for the Gram matrix of a sample . The theorem asserts the conjunction of two claims:
-
Integrability. For every pair of indices , the real-valued function is integrable with respect to (i.e. it is almost-everywhere strongly measurable and ).
-
Value of the mean. For every ,
where is the identity matrix, so the right-hand side is when and when . Here is computed in (after casting the naturals), and since this quantity is at least , so no division by zero occurs.
Edge cases. The integral is Lean's Bochner integral in , which returns for a non-integrable integrand; however, part 1 separately asserts integrability, so part 2 is not trivially satisfied by that convention. On the -null set of samples where is singular, is the zero matrix. When the index set is empty and both parts are vacuously true (the hypothesis then reads ). The hypothesis is on natural numbers.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.