Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Expected squared Frobenius norm of a pseudo-inverted Gaussian matrix: E∥G†∥F2=rk−r−1\mathbb E\|G^{\dagger}\|_F^2=\frac{r}{k-r-1}E∥G†∥F2​=k−r−1r​

Proved
GaussianMatrix.pinv_frobenius_moment

by tc · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

gaussian-matrixprobabilityrandom-matrix-theoryrandomized-numerical-linear-algebra

Let G∈Rr×kG\in\mathbb R^{r\times k}G∈Rr×k be a standard Gaussian matrix with k−r≥2k-r\ge2k−r≥2, and let G†=GT(GGT)−1G^{\dagger}=G^{\mathsf T}(GG^{\mathsf T})^{-1}G†=GT(GGT)−1 be its pseudoinverse. Then ∥G†∥F2\|G^{\dagger}\|_F^2∥G†∥F2​ is integrable and

E ∥G†∥F2=rk−r−1.\mathbb E\,\|G^{\dagger}\|_F^2=\frac{r}{k-r-1}.E∥G†∥F2​=k−r−1r​.

In the notation of Halko–Martinsson–Tropp, GGG is k×(k+p)k\times(k+p)k×(k+p) and the right-hand side reads k/(p−1)k/(p-1)k/(p−1): this is the inverse moment that enters the expected Frobenius error bound (1+kp−1)1/2∥Σ2∥F\bigl(1+\tfrac{k}{p-1}\bigr)^{1/2}\|\Sigma_2\|_F(1+p−1k​)1/2∥Σ2​∥F​ of the randomized SVD, and more generally every expected-error bound for Gaussian sketching with oversampling.

Formalization Note. G†G^{\dagger}G† is pinvR, which is 000 on the null set where GGTGG^{\mathsf T}GGT is singular; the conclusion is the conjunction of integrability and the identity. No lower bound on rrr is needed (r=0r=0r=0 gives 0=00=00=0).

Preamble
import Definitions.Def_GaussianMatrix_basic

open MeasureTheory ProbabilityTheory
open scoped Matrix
Formal statement
namespace GaussianMatrix
theorem pinv_frobenius_moment {r k : ℕ} (hrk : r + 2 ≤ k) :
    Integrable (fun G : Fin r → Fin k → ℝ => frobSq (pinvR (Matrix.of G))) (gaussianMatrix r k) ∧
    ∫ G, frobSq (pinvR (Matrix.of G)) ∂(gaussianMatrix r k) = (r : ℝ) / ((k : ℝ) - r - 1) := by sorry
end GaussianMatrix
Source
N. Halko, P.-G. Martinsson, J. A. Tropp, *Finding structure with randomness: probabilistic algorithms for constructing approximate matrix decompositions*, SIAM Review 53(2), 2011, https://arxiv.org/abs/0909.4061 (v2), §10.1 p. 55, Proposition 10.2 eq. (10.3) (k×(k+p)k\times(k+p)k×(k+p), p≥2p\ge2p≥2) and Appendix A.2 p. 65, Proposition A.5 (m×nm\times nm×n, n−m≥2n-m\ge2n−m≥2: E∥G†∥F2=mn−m−1\mathbb E\|G^\dagger\|_F^2=\frac{m}{n-m-1}E∥G†∥F2​=n−m−1m​); also J. A. Tropp, R. J. Webber, *Randomized algorithms for low-rank matrix approximation: design, analysis, and applications*, 2023, https://arxiv.org/abs/2306.12418 (v1), Appendix B p. 51, Lemma B.2 (trace of the first formula).
Read-back

What the Lean code literally says, in plain math · claude-fable-5-1

Throughout, μr,k\mu_{r,k}μr,k​ denotes the measure called gaussianMatrix r k: the product measure on the function space {0,…,r−1}×{0,…,k−1}→R\{0,\dots,r-1\}\times\{0,\dots,k-1\}\to\mathbb{R}{0,…,r−1}×{0,…,k−1}→R in which every one of the rkrkrk coordinates is an independent standard normal N(0,1)\mathcal N(0,1)N(0,1); it is a probability measure, and a sample GGG is viewed as the real r×kr\times kr×k matrix with entries GijG_{ij}Gij​. Matrix inversion (⋅)−1(\cdot)^{-1}(⋅)−1 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. For an r×kr\times kr×k matrix GGG, write

G†  :=  G⊤ (GG⊤)−1,G^{\dagger} \;:=\; G^{\top}\,\big(G G^{\top}\big)^{-1},G†:=G⊤(GG⊤)−1,

a k×rk\times rk×r real matrix (this is the bundle's pinvR); when GG⊤GG^{\top}GG⊤ is singular, G†G^{\dagger}G† is the zero k×rk\times rk×r matrix. The bundle's frobSq of a matrix AAA is ∑i∑jAij2=∥A∥F2\sum_{i}\sum_{j} A_{ij}^{2} = \|A\|_F^{2}∑i​∑j​Aij2​=∥A∥F2​ (the squared Frobenius norm), a sum over all entries.

Statement. Let r,kr,kr,k be natural numbers with r+2≤kr+2\le kr+2≤k. The theorem asserts the conjunction of:

  1. Integrability. The function G↦∥G†∥F2=∑i=0k−1∑j=0r−1(G⊤(GG⊤)−1)ij2G\mapsto \|G^{\dagger}\|_F^{2} = \sum_{i=0}^{k-1}\sum_{j=0}^{r-1}\big(G^{\top}(GG^{\top})^{-1}\big)_{ij}^{2}G↦∥G†∥F2​=∑i=0k−1​∑j=0r−1​(G⊤(GG⊤)−1)ij2​ is integrable with respect to μr,k\mu_{r,k}μr,k​.

  2. Value.

∫∥G⊤(GG⊤)−1∥F2  dμr,k(G)  =  rk−r−1,\int \big\|G^{\top}(GG^{\top})^{-1}\big\|_F^{2}\;d\mu_{r,k}(G) \;=\; \frac{r}{k - r - 1},∫​G⊤(GG⊤)−1​F2​dμr,k​(G)=k−r−1r​,

where rrr, kkk are cast to real numbers and k−r−1≥1k-r-1\ge 1k−r−1≥1 by the hypothesis, so the division is ordinary.

Edge cases. The integral is the real Bochner integral (which would be 000 for a non-integrable integrand, but integrability is asserted in part 1). When r=0r=0r=0 the inner sum is empty, so the integrand is identically 000, and the right-hand side is 0/(k−1)=00/(k-1) = 00/(k−1)=0; the hypothesis is then 2≤k2 \le k2≤k. The sum in frobSq runs over the k×rk\times rk×r index set of G†G^{\dagger}G† (not r×kr\times kr×k).

Human review
  • Endorsed by Shuze Chen · Oct 9, 2026

    Confirmed by the moderator at approval.

  • Endorsed by tc · Oct 9, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me