Theorem (integral_frobNorm_pinv_const_mul_sq_of_hasLaw_haarFrame). The inverse mean of a Beta matrix, trace form: for an n \times k Haar frame \mathbf{Q}, \mathbf{W} with p orthonormal rows and p + 2 \le k \le n, \mathbb{E}\|(\mathbf{W}\mathbf{Q})^{+}\|_{\mathsf{F}}^2 = \mathbb{E}\operatorname{tr}\bigl((\mathbf{W}\mathbf{Q}\mathbf{Q}^{\mathsf{H}} \mathbf{W}^{\mathsf{H}})^{-1}\bigr) = p\Bigl(1 + \frac{n-k}{k-p-1}\Bigr). \mathbf{W}\mathbf{Q}\mathbf{Q}^{\mathsf{H}}\mathbf{W}^{\mathsf{H}} is a Beta matrix; its law is not used. At n = k the value is p (\mathbf{W}\mathbf{Q} has orthonormal rows). The proof writes \mathbf{W}\mathbf{Q} as \operatorname{polar}(\mathbf{G})\mathbf{V} (NLAlib.hasLaw_const_mul_of_hasLaw_haarFrame_of_hasOrthonormalCols) and the trace as p + \|\mathbf{K}^{+}\mathbf{L}\|_{\mathsf{F}}^2 for the independent Gaussian blocks \mathbf{K} = \mathbf{G}\mathbf{V}, \mathbf{L} = \mathbf{G}\mathbf{V}'. [EpperlyWebber2026, Proposition 5.6]; there the matrix \mathbb{E}\mathbf{X}^{-1} over \mathbb{R} and \mathbb{C}, here its trace over \mathbb{R}, the only part their Proposition 5.7 and Lemma 6.2 use.
Headline General form: sizes are index types
Lean statement and details
NLAlib.integral_frobNorm_pinv_const_mul_sq_of_hasLaw_haarFrame.{u_1, u_2, u_3, u_4} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_2} {k : Type u_3} {p : Type u_4} [Fintype n]
[Fintype k] [Fintype p] {X : Ω → Matrix n k ℝ} [DecidableEq k] [DecidableEq p]
(hX : HasLaw X (haarFrame n k) μ) (hkn : Fintype.card k ≤ Fintype.card n) {W : Matrix p n ℝ}
(hW : HasOrthonormalCols Wᴴ) (hpk : Fintype.card p + 2 ≤ Fintype.card k) :
∫ (ω : Ω), frobNorm (pinv (W * X ω)) ^ 2 ∂μ =
↑(Fintype.card p) *
(1 + (↑(Fintype.card n) - ↑(Fintype.card k)) / (↑(Fintype.card k) - ↑(Fintype.card p) - 1))