Definition (Gaussian sketches and Haar frames). A standard real Gaussian matrix has independent N(0,1) entries. A Haar frame is a random orthonormal frame whose distribution is invariant under orthogonal or unitary changes of coordinates. These are different laws: orthonormalizing a Gaussian matrix changes the representation and requires the corresponding distributional result. Complex Gaussian scaling is specified separately in the relevant law.
Random matrices and sketch laws
A sketch guarantee depends on the law of the random matrix, including its scaling. Gaussian entries, orthonormal random frames, random signs, and sparse hashes preserve geometry in different ways.
Results
Theorem (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.
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))Theorem (Chevet's inequality).
for a standard Gaussian matrix \mathbf{G} and fixed \mathbf{S}, \mathbf{T}, \mathbb{E} \|\mathbf{S}\mathbf{G}\mathbf{T}\|_2 \le \|\mathbf{S}\|_2 \|\mathbf{T}\|_{\mathsf{F}} + \|\mathbf{S}\|_{\mathsf{F}} \|\mathbf{T}\|_2. [Vershynin2018, Theorem 8.7.1]; [HalkoMartinssonTropp2011, Proposition 10.1]; Vershynin states it for a general bilinear supremum over two sets, here the matrix form of Halko, Martinsson and Tropp, over any finite index types.
Lean statement and details
NLAlib.integral_specNorm_mul_mul_le_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3, u_4, u_5}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
{a : Type u_4} {b : Type u_5} [Fintype m] [Fintype n] [Fintype a] [Fintype b]
{X : Ω → Matrix m n ℝ} (hX : HasLaw X (gaussianMatrix m n) μ) (S : Matrix a m ℝ)
(T : Matrix n b ℝ) :
∫ (ω : Ω), specNorm (S * X ω * T) ∂μ ≤ specNorm S * frobNorm T + frobNorm S * specNorm TTheorem (Smallest singular value of a square complex Gaussian matrix).
(Lemma 3.1): for a standard complex Gaussian r \times r matrix \mathbf{G}, k + 1 = \lvert r \rvert and x \ge 0, \mathbb{P}[\sigma_k(\mathbf{G}) \le x] \le \lvert r \rvert^2 x^2 \,. [Shah2024, Lemma 3.1], citing [Edelman1988, Theorem 3.2]: there (\lvert r \rvert/2)x^2 (the exact law of \sigma_{\min}); this elementary bound loses a factor 2\lvert r \rvert, which costs O(\log n) bits in the precision of the eigensolver; NLAlib.measureReal_singularValues_le_le_exp_one_mul_of_hasLaw_complexGaussianMatrix loses only the factor 2e.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_singularValues_le_le_of_hasLaw_complexGaussianMatrix.{u_1, u_4} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {r : Type u_4} [Fintype r] {G : Ω → Matrix r r ℂ}
(hG : HasLaw G (complexGaussianMatrix r r) μ) {k : ℕ} (hk : k + 1 = Fintype.card r) {x : ℝ}
(hx : 0 ≤ x) : μ.real {ω | singularValues (G ω) k ≤ x} ≤ ↑(Fintype.card r) ^ 2 * x ^ 2Theorem (Norm tail of a complex Gaussian matrix).
(Lemma 3.2): for a standard complex Gaussian m \times n matrix \mathbf{G} and t \ge 0, \mathbb{P}\bigl[\sqrt2\,(\sqrt{\lvert m \rvert} + \sqrt{\lvert n \rvert} + t) \le \|\mathbf{G}\|_2\bigr] \le 2e^{-t^2/2} \,. [Shah2024, Lemma 3.2], citing [BanksKulkarniMukherjeeSrivastava2021, Lemma 2.2]: there \mathbb{P}[\|\mathbf{G}\|_2 > (2\sqrt2 + t)\sqrt n] \le 2e^{-nt^2} for square \mathbf{G}; the constant in the exponent differs.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_specNorm_ge_le_of_hasLaw_complexGaussianMatrix.{u_1, u_2, u_3} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3} [Fintype m] [Fintype n]
{G : Ω → Matrix m n ℂ} (hG : HasLaw G (complexGaussianMatrix m n) μ) {t : ℝ} (ht : 0 ≤ t) :
μ.real {ω | √2 * (√↑(Fintype.card m) + √↑(Fintype.card n) + t) ≤ specNorm (G ω)} ≤
2 * rexp (-t ^ 2 / 2)Theorem (Gaussian approximate matrix multiplication, exact error).
For a nonempty sketch, \mathbb{E}\|\mathbf{A}(\mathbf{G}\mathbf{G}^{\mathsf{H}}/\lvert k\rvert) \mathbf{B}-\mathbf{A}\mathbf{B}\|_{\mathsf{F}}^2 =\frac{\|\mathbf{A}\|_{\mathsf{F}}^2\|\mathbf{B}\|_{\mathsf{F}}^2 +\|\mathbf{A}\mathbf{B}\|_{\mathsf{F}}^2}{\lvert k\rvert}\,. [Isserlis1918, fourth-order formula]; the normalized centered Gram contraction.
General form: sizes are index types
Lean statement and details
NLAlib.integral_frobNorm_mul_smul_mul_conjTranspose_self_mul_sub_sq_of_hasLaw_gaussianMatrix.{u_1,
u_2, u_3, u_5, u_6}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {a : Type u_2} {b : Type u_3}
{n : Type u_5} {k : Type u_6} [Fintype a] [Fintype b] [Fintype n] [Fintype k] [Nonempty k]
{G : Ω → Matrix n k ℝ} (hG : HasLaw G (gaussianMatrix n k) μ) (A : Matrix a n ℝ)
(B : Matrix n b ℝ) :
∫ (ω : Ω), frobNorm (A * (↑(Fintype.card k))⁻¹ • (G ω * (G ω)ᴴ) * B - A * B) ^ 2 ∂μ =
(frobNorm A ^ 2 * frobNorm B ^ 2 + frobNorm (A * B) ^ 2) / ↑(Fintype.card k)Theorem (Fourth moment of a Gaussian sandwich).
\mathbb{E}\|\mathbf{A}\mathbf{G}\mathbf{B}\|_{\mathsf{F}}^4 = (\|\mathbf{A}\|_{\mathsf{F}}^2\|\mathbf{B}\|_{\mathsf{F}}^2)^2 +2\|\mathbf{A}^{\mathsf{H}}\mathbf{A}\|_{\mathsf{F}}^2 \|\mathbf{B}\mathbf{B}^{\mathsf{H}}\|_{\mathsf{F}}^2\,. [Isserlis1918, fourth-order formula]; here its matrix contraction.
Lean statement and details
NLAlib.integral_frobNorm_mul_mul_pow_four_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3, u_4, u_5}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {a : Type u_2} {b : Type u_3}
{m : Type u_4} {n : Type u_5} [Fintype a] [Fintype b] [Fintype m] [Fintype n]
{G : Ω → Matrix m n ℝ} (hG : HasLaw G (gaussianMatrix m n) μ) (A : Matrix a m ℝ)
(B : Matrix n b ℝ) :
∫ (ω : Ω), frobNorm (A * G ω * B) ^ 4 ∂μ =
(frobNorm A ^ 2 * frobNorm B ^ 2) ^ 2 + 2 * frobNorm (Aᴴ * A) ^ 2 * frobNorm (B * Bᴴ) ^ 2Theorem (Nyström with a rotation-invariant test matrix has the Gaussian law).
for positive semidefinite \mathbf{H} and a test matrix \mathbf{X} with a left unitarily invariant law and full column rank almost surely, \mathsf{nystrom}(\mathbf{H}, \mathbf{X}) has the law of \mathsf{nystrom}(\mathbf{H}, \mathbf{G}) for a standard Gaussian \mathbf{G}. Nyström depends on the test matrix only through the range projector \mathbf{P}_{\mathbf{H}^{1/2}\mathbf{X}} (Matrix.PosSemidef.nystrom_eq), whose law is the Gaussian one (NLAlib.hasLaw_rangeProjector_mul_of_isLeftUnitarilyInvariant). Every rotation-invariant Nyström statement is a consequence. [TroppYurtseverUdellCevher2017a, Proposition A.2 and proof of Theorem A.1]; [EpperlyWebber2026, Fact 6.1(b)]; there as "we may assume the test matrix is Gaussian", here as a law statement for every full-rank rotation-invariant law.
Lean statement and details
Matrix.PosSemidef.hasLaw_nystrom_of_isLeftUnitarilyInvariant.{u_1, u_3, u_4} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_3} {l : Type u_4} [Fintype n] [Fintype l]
{X : Ω → Matrix n l ℝ} [DecidableEq n] {ν : Measure (Matrix n l ℝ)} [IsProbabilityMeasure ν]
[IsLeftUnitarilyInvariant ν] {H : Matrix n n ℝ} (hH : H.PosSemidef) (hX : HasLaw X ν μ)
(hXr : ∀ᵐ (ω : Ω) ∂μ, Function.Injective (X ω).mulVec) :
HasLaw (fun ω ↦ nystrom H (X ω)) (Measure.map (nystrom H) (gaussianMatrix n l)) μTheorem (Gaussian concentration of Lipschitz functions).
([BoucheronLugosiMassart2013, Theorem 5.6]): for \mathbf{g} with law stdGaussian E and f L-Lipschitz, f(\mathbf{g}) - \mathbb{E} f(\mathbf{g}) is sub-Gaussian with proxy L^2.
Lean statement and details
NLAlib.hasSubgaussianMGF_sub_integral_of_lipschitzWith_of_hasLaw_stdGaussian.{u_1, u_2}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {E : Type u_2} [NormedAddCommGroup E]
[InnerProductSpace ℝ E] [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] {g : Ω → E}
{f : E → ℝ} {L : ℝ≥0} (hg : HasLaw g (stdGaussian E) μ) (hf : LipschitzWith L f) :
HasSubgaussianMGF (fun ω ↦ f (g ω) - ∫ (ω' : Ω), f (g ω') ∂μ) (L ^ 2) μTheorem (Gordon's upper bound).
\mathbb{E} \|\mathbf{G}\|_2 \le \sqrt{\lvert m \rvert} + \sqrt{\lvert n \rvert} for a standard Gaussian m \times n matrix \mathbf{G}, the case \mathbf{S} = \mathbf{I}, \mathbf{T} = \mathbf{I} of Chevet's inequality. [Vershynin2018, Theorem 7.3.1]; [DavidsonSzarek2001, Theorem II.13]; the lower bound \sqrt{\lvert m \rvert} - \sqrt{\lvert n \rvert} \le \mathbb{E} \, \sigma_{\min}(\mathbf{G}) is NLAlib.le_integral_singularValues_of_hasLaw_gaussianMatrix.
General form: sizes are index types
Lean statement and details
NLAlib.integral_specNorm_le_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3} [Fintype m] [Fintype n]
{X : Ω → Matrix m n ℝ} (hX : HasLaw X (gaussianMatrix m n) μ) :
∫ (ω : Ω), specNorm (X ω) ∂μ ≤ √↑(Fintype.card m) + √↑(Fintype.card n)Theorem (Coordinate derivative of a cutoff Gram field).
For a positive power and a real matrix with nonempty row type, take a differentiable test whose closed support lies in (0,\infty). Along the coordinate line based at the matrix, the derivative of the test times the unshifted gradient entry is the sum of the test derivative times the squared gradient entry and the test times the second coordinate coefficient. The formula holds at singular Gram matrices. No printed source. Original NLAlib atlas proof at 77514ce42a0e437d837797a063ac161f41022730.
General form: sizes are index types
Lean statement and details
NLAlib.hasDerivAt_mul_gramSoftMinGradient_single.{u_1, u_2} {ι : Type u_1} {κ : Type u_2}
[Fintype ι] [Fintype κ] [DecidableEq ι] [DecidableEq κ] [Nonempty ι] (n : ℕ) (hn : 0 < n)
(ψ : ℝ → ℝ) (hψ : Differentiable ℝ ψ) (hψs : tsupport ψ ⊆ Set.Ioi 0) (G : Matrix ι κ ℝ) (i : ι)
(j : κ) :
HasDerivAt
(fun t ↦
ψ (inversePowerSoftMin n ((G + t • single i j 1) * (G + t • single i j 1)ᴴ)) *
gramSoftMinGradient n 0 (G + t • single i j 1) i j)
(deriv ψ (inversePowerSoftMin n (G * Gᴴ)) * gramSoftMinGradient n 0 G i j ^ 2 +
ψ (inversePowerSoftMin n (G * Gᴴ)) * gramSoftMinSecond n 0 G (single i j 1))
0Theorem (The variance of a Haar compression).
for an n \times k Haar frame \mathbf{Q} with \lvert k \rvert \le \lvert n \rvert and \lvert n \rvert \ge 2, and real symmetric \mathbf{A}, \operatorname{Var}\operatorname{tr}(\mathbf{Q}^{\mathsf{H}}\mathbf{A}\mathbf{Q}) = \frac{2\lvert k \rvert(\lvert n \rvert - \lvert k \rvert)} {(\lvert n \rvert - 1)\lvert n \rvert(\lvert n \rvert + 2)} \Bigl(\|\mathbf{A}\|_{\mathsf{F}}^2 - \frac{(\operatorname{tr} \mathbf{A})^2}{\lvert n \rvert} \Bigr)\,. It vanishes for \lvert k \rvert = \lvert n \rvert (then the trace is \operatorname{tr} \mathbf{A}) and for \mathbf{A} a multiple of \mathbf{I}; with \lvert k \rvert = 1 it is the sphere's variance (NLAlib.variance_quadForm_sqrt_smul_of_hasLaw_uniformSphereVector). The multiplied form, valid for every \lvert n \rvert, is NLAlib.mul_variance_trace_conjTranspose_mul_mul_of_hasLaw_haarFrame; for nonsymmetric \mathbf{A}, NLAlib.variance_trace_conjTranspose_mul_mul_eq_hermitianPart_of_hasLaw_haarFrame. [Epperly2023, Uniform on the Real Sphere], there \lvert k \rvert = 1; here any number of orthonormal probes.
General form: sizes are index types
Lean statement and details
NLAlib.variance_trace_conjTranspose_mul_mul_of_hasLaw_haarFrame.{u_1, u_2, u_3} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_2} {k : Type u_3} [Fintype n] [Fintype k]
{X : Ω → Matrix n k ℝ} [DecidableEq k] (hX : HasLaw X (haarFrame n k) μ)
(hk : Fintype.card k ≤ Fintype.card n) (hn : 1 < Fintype.card n) {A : Matrix n n ℝ}
(hA : A.IsHermitian) :
Var[fun ω ↦ ((X ω)ᴴ * A * X ω).trace; μ] =
2 * ↑(Fintype.card k) * (↑(Fintype.card n) - ↑(Fintype.card k)) /
((↑(Fintype.card n) - 1) * ↑(Fintype.card n) * (↑(Fintype.card n) + 2)) *
(frobNorm A ^ 2 - A.trace ^ 2 / ↑(Fintype.card n))Theorem (Row blocks of a Haar frame with orthonormal rows).
for an n \times k Haar frame \mathbf{Q} with \lvert n\rvert \le \lvert k\rvert (orthonormal rows; a Haar orthogonal matrix for n = k) and a fixed \mathbf{W} with orthonormal rows, \mathbf{W}\mathbf{Q} is a p \times k Haar frame. The row twin of NLAlib.hasLaw_mul_const_of_hasLaw_haarFrame. [Meckes2019, Ch. 1]; [EpperlyWebber2026, p. 14], there the first rows of a Haar unitary.
General form: sizes are index types
Lean statement and details
NLAlib.hasLaw_const_mul_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) μ) (hnk : Fintype.card n ≤ Fintype.card k) {W : Matrix p n ℝ}
(hW : HasOrthonormalCols Wᴴ) : HasLaw (fun ω ↦ W * X ω) (haarFrame p k) μTheorem (The QR construction of the Haar frame).
the Gram–Schmidt factor of a tall standard Gaussian matrix (\lvert k \rvert \le \lvert n \rvert) is a Haar frame. [Meckes2019, Ch. 1], there for square matrices; here any tall shape.
General form: sizes are index types
Lean statement and details
NLAlib.hasLaw_gramSchmidtQ_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_2} {k : Type u_3} [Fintype n] [Fintype k]
[LinearOrder k] [LocallyFiniteOrderBot k] {G : Ω → Matrix n k ℝ}
(hG : HasLaw G (gaussianMatrix n k) μ) (hk : Fintype.card k ≤ Fintype.card n) :
HasLaw (fun ω ↦ gramSchmidtQ (G ω)) (haarFrame n k) μDefinition (A Haar frame is left orthogonally invariant).
\mathbf{U}\mathbf{Q} is a Haar frame for every orthogonal \mathbf{U}. Every shape. [Meckes2019, Ch. 1].
Lean statement and details
NLAlib.isLeftUnitarilyInvariant_haarFrame.{u_2, u_3} {n : Type u_2} {k : Type u_3} [Fintype n]
[Fintype k] [DecidableEq n] [DecidableEq k] : IsLeftUnitarilyInvariant (haarFrame n k)Theorem (The compression of a fixed matrix by a Haar frame).
\mathbb{E}[\mathbf{Q}^{\mathsf{H}}\mathbf{A}\mathbf{Q}] = \frac{\operatorname{tr} \mathbf{A}}{\lvert n \rvert}\,\mathbf{I}\,, for an n \times k Haar frame \mathbf{Q}, \lvert k \rvert \le \lvert n \rvert. [Meckes2019, Ch. 2], there entrywise; here in matrix form.
General form: sizes are index types
Lean statement and details
NLAlib.integral_conjTranspose_mul_mul_of_hasLaw_haarFrame.{u_1, u_2, u_3} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_2} {k : Type u_3} [Fintype n] [Fintype k]
{X : Ω → Matrix n k ℝ} [DecidableEq k] (hX : HasLaw X (haarFrame n k) μ)
(hk : Fintype.card k ≤ Fintype.card n) (A : Matrix n n ℝ) :
∫ (ω : Ω), (X ω)ᴴ * A * X ω ∂μ = (A.trace / ↑(Fintype.card n)) • 1Theorem (Characterization of the Haar frame).
a random matrix with almost surely orthonormal columns whose law is a left unitarily invariant probability measure is a Haar frame. No \lvert k \rvert \le \lvert n \rvert is needed: without it there are no frames, and hQ cannot hold for a probability law. [Meckes2019, Ch. 1], as uniqueness of the invariant measure on the Stiefel manifold; here proved against haarFrame n n directly.
Lean statement and details
NLAlib.hasLaw_haarFrame_of_isLeftUnitarilyInvariant.{u_1, u_2, u_3} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_2} {k : Type u_3} [Fintype n] [Fintype k]
{X : Ω → Matrix n k ℝ} [DecidableEq n] [DecidableEq k] {ν : Measure (Matrix n k ℝ)}
[IsProbabilityMeasure ν] [IsLeftUnitarilyInvariant ν] (hX : HasLaw X ν μ)
(hQ : ∀ᵐ (ω : Ω) ∂μ, HasOrthonormalCols (X ω)) : HasLaw X (haarFrame n k) μTheorem (The random orthonormal sketching identity).
for an m \times p Haar frame \mathbf{Q}, p \le m, complementary frames \mathbf{V}_1 (r columns) and \mathbf{V}_2 (\mathbf{V}_1^{\mathsf{H}}\mathbf{V}_2 = \mathbf{0}, r + \lvert s\rvert = m), r + 2 \le p and every \mathbf{B}, \mathbb{E}\|(\mathbf{Q}^{\mathsf{H}}\mathbf{V}_1)^{+}\mathbf{Q}^{\mathsf{H}}\mathbf{V}_2\mathbf{B} \|_{\mathsf{F}}^2 = \frac{m-p}{m-r}\cdot\frac{r}{p-r-1}\,\|\mathbf{B}\|_{\mathsf{F}}^2\,, the Haar twin of NLAlib.integral_frobNorm_pinv_mul_mul_sq_of_hasLaw_gaussianMatrix, smaller than the Gaussian value r/(p-r-1) by the factor (m-p)/(m-r). Unlike the Gaussian case the frames must be complementary: the proof uses \mathbf{\Omega}_1^{\mathsf{H}}\mathbf{\Omega}_1 + \mathbf{\Omega}_2^{\mathsf{H}}\mathbf{\Omega}_2 = \mathbf{Q}^{\mathsf{H}}\mathbf{Q} = \mathbf{I} for the blocks \mathbf{\Omega}_i = \mathbf{V}_i^{\mathsf{H}}\mathbf{Q}. [EpperlyWebber2026, Proposition 5.7]; there an inequality for general \mathbf{R}, equality at \mathbf{R} = \mathbf{I}, over \mathbb{R} and \mathbb{C}; here the real case at \mathbf{R} = \mathbf{I}.
General form: sizes are index types
Lean statement and details
NLAlib.integral_frobNorm_pinv_mul_mul_sq_of_hasLaw_haarFrame.{u_1, u_2, u_3, u_4, u_5, u_6}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {p : Type u_3}
{r : Type u_4} {s : Type u_5} {a : Type u_6} [Fintype m] [Fintype p] [Fintype r] [Fintype s]
[Fintype a] {Q : Ω → Matrix m p ℝ} [DecidableEq p] [DecidableEq r] [DecidableEq s]
(hQ : HasLaw Q (haarFrame m p) μ) (hpm : Fintype.card p ≤ Fintype.card m) {V₁ : Matrix m r ℝ}
{V₂ : Matrix m s ℝ} (hV₁ : HasOrthonormalCols V₁) (hV₂ : HasOrthonormalCols V₂)
(h₁₂ : V₁ᴴ * V₂ = 0) (hrs : Fintype.card r + Fintype.card s = Fintype.card m)
(hrp : Fintype.card r + 2 ≤ Fintype.card p) (B : Matrix s a ℝ) :
∫ (ω : Ω), frobNorm (pinv ((Q ω)ᴴ * V₁) * ((Q ω)ᴴ * V₂) * B) ^ 2 ∂μ =
frobNorm B ^ 2 *
((↑(Fintype.card m) - ↑(Fintype.card p)) / (↑(Fintype.card m) - ↑(Fintype.card r)) *
(↑(Fintype.card r) / (↑(Fintype.card p) - ↑(Fintype.card r) - 1)))Theorem (Girard–Hutchinson variance: real sphere probe).
for \mathbf{u} uniform on the unit sphere of \mathbb{R}^n, so that \boldsymbol{\omega} = \sqrt{\lvert n \rvert}\,\mathbf{u} is uniform on the sphere of radius \sqrt{\lvert n \rvert}, and real symmetric \mathbf{A}, \operatorname{Var}(\boldsymbol{\omega}^{\mathsf{T}}\mathbf{A}\boldsymbol{\omega}) = \frac{2\lvert n \rvert}{\lvert n \rvert + 2} \Bigl(\|\mathbf{A}\|_{\mathsf{F}}^2 - \frac{(\operatorname{tr} \mathbf{A})^2}{\lvert n \rvert} \Bigr)\,, every dimension. The case \lvert k \rvert = 1 of the Haar compression (NLAlib.mul_variance_trace_conjTranspose_mul_mul_of_hasLaw_haarFrame), by NLAlib.hasLaw_replicateCol_of_hasLaw_uniformSphereVector. For nonsymmetric \mathbf{A}, NLAlib.variance_quadForm_sqrt_smul_eq_hermitianPart_of_hasLaw_uniformSphereVector. [Epperly2023, Real-Valued Test Vectors] and [Epperly2023, Uniform on the Real Sphere]; proved there by the radius–direction decomposition of a Gaussian, here from invariance alone.
General form: sizes are index types
Lean statement and details
NLAlib.variance_quadForm_sqrt_smul_of_hasLaw_uniformSphereVector.{u_1, u_2} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_2} [Fintype n] {u : Ω → n → ℝ}
(hu : HasLaw u (uniformSphereVector n) μ) {A : Matrix n n ℝ} (hA : A.IsHermitian) :
Var[fun ω ↦ quadForm A (√↑(Fintype.card n) • u ω); μ] =
2 * ↑(Fintype.card n) / (↑(Fintype.card n) + 2) *
(frobNorm A ^ 2 - A.trace ^ 2 / ↑(Fintype.card n))Theorem (The trace tail of an inverse Wishart matrix).
for an r \times k standard Gaussian \mathbf{G}, d = \lvert k\rvert - \lvert r\rvert + 1 and t > 0, \mathbb{P}\Bigl[\|\mathbf{G}^{+}\|_{\mathsf{F}}^2 > \frac{t\lvert r\rvert}{d}\Bigr] \le \frac{2\sqrt{\lvert r\rvert}\,(d/(2t))^{d/2}}{\Gamma(d/2 + 1)}\,, the right side being gaussianPinvFrobTail |r| d t. Off a null set \|\mathbf{G}^{+}\|_{\mathsf{F}}^2 = \sum_i D_i with D_i = (\mathbf{G}\mathbf{G}^{\mathsf{H}})^{-1}_{ii} \sim 1/\chi^2_d; Markov's inequality on \min(v^d, (\sum_i D_i)^d), the power-mean inequality and the layer cake for \mathbb{E}\min(a, D_i^d) replace the parallel sum of the source. [TroppWebber2023, Lemma B.2 (B.3)], there \sqrt{\pi\lvert r\rvert/d}\,(e/t)^{d/2}, which this bound is below for every d \ge 1. Compare [HalkoMartinssonTropp2011, Proposition 10.4 (10.5)]: in their notation (k = \lvert r\rvert, p = d - 1), 4t^{-p} at \sqrt{12k/p}\,t, which this bound is below unless k > 4(12/e)^{p+1}t^2. For d = 0 the bound is at least 2; for empty r the event is empty.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_frobNorm_pinv_sq_gt_le_of_hasLaw_gaussianMatrix.{u_1, u_3, u_4} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_3} {r : Type u_4} [Fintype k] [Fintype r]
{X : Ω → Matrix r k ℝ} (hX : HasLaw X (gaussianMatrix r k) μ) {d : ℕ}
(hd : Fintype.card r + d = Fintype.card k + 1) {t : ℝ} (ht : 0 < t) :
μ.real {ω | t * ↑(Fintype.card r) / ↑d < frobNorm (pinv (X ω)) ^ 2} ≤
gaussianPinvFrobTail (Fintype.card r) d tTheorem (The projection of a uniform unit vector is Beta).
for \mathbf{u} uniform on the unit sphere of \mathbb{R}^n (law uniformSphereVector n) and \mathbf{V} with k orthonormal columns, 0 < k < n, \|\mathbf{V}^{\mathsf{H}}\mathbf{u}\|^2 \sim \mathrm{Beta}\Big(\frac{k}{2}, \frac{n-k}{2}\Big)\,. No printed source.
General form: sizes are index types
Lean statement and details
NLAlib.hasLaw_norm_conjTranspose_mulVec_sq_of_hasLaw_uniformSphereVector.{u_1, u_2, u_3}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_2} {k : Type u_3} [Fintype n]
[Fintype k] [DecidableEq k] {u : Ω → n → ℝ} {V : Matrix n k ℝ}
(hu : HasLaw u (uniformSphereVector n) μ) (hV : HasOrthonormalCols V) (hk : 0 < Fintype.card k)
(hkn : Fintype.card k < Fintype.card n) :
HasLaw (fun ω ↦ ‖WithLp.toLp 2 (Vᴴ *ᵥ u ω)‖ ^ 2)
(betaMeasure (↑(Fintype.card k) / 2) ((↑(Fintype.card n) - ↑(Fintype.card k)) / 2)) μTheorem (The sample mean of projected uniform unit vectors).
for \mathbf{u}_1, \dots, \mathbf{u}_m independent and each uniform on the unit sphere of \mathbb{R}^n (law uniformSphereVector n), \mathbf{V} with k orthonormal columns and \tau \ge 0, \mathbb{P}\Bigl[\tau \le \Bigl\lvert\frac1m\sum_j\|\mathbf{V}^{\mathsf{H}}\mathbf{u}_j\|^2 - \frac kn\Bigr\rvert\Bigr] \le 2e^{-m(n+2)\tau^2}\,. Every rank 0 \le k \le n is allowed, and for m = 0 the bound is 2. [MarchalArbel2017, Theorem 1] for the Beta proxy, then Hoeffding's inequality.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_abs_sum_norm_conjTranspose_mulVec_sq_div_card_sub_div_card_ge_le_of_hasLaw_uniformSphereVector.{u_1,
u_2, u_3, u_4}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_2} {k : Type u_3} [Fintype n]
[Fintype k] [DecidableEq k] {V : Matrix n k ℝ} {m : Type u_4} [Fintype m] {u : m → Ω → n → ℝ}
(hind : iIndepFun u μ) (hu : ∀ (j : m), HasLaw (u j) (uniformSphereVector n) μ)
(hV : HasOrthonormalCols V) {τ : ℝ} (hτ : 0 ≤ τ) :
μ.real
{ω |
τ ≤
|(∑ j, ‖WithLp.toLp 2 (Vᴴ *ᵥ u j ω)‖ ^ 2) / ↑(Fintype.card m) -
↑(Fintype.card k) / ↑(Fintype.card n)|} ≤
2 * rexp (-(↑(Fintype.card m) * (↑(Fintype.card n) + 2) * τ ^ 2))Theorem (Independent isotropic sub-Gaussian rows).
, the Gram sandwich: for an m \times n random matrix \mathbf{X} whose rows are independent, isotropic and sub-Gaussian with proxy c, with w = 24c(\sqrt{\lvert n \rvert} + t) (the constant is subgaussianRowsConstant), 0 \le t and w \le \sqrt{\lvert m \rvert}, (\sqrt{\lvert m \rvert} - w)^2 \mathbf{I} \preceq \mathbf{X}^{\mathsf{H}}\mathbf{X} \preceq (\sqrt{\lvert m \rvert} + w)^2 \mathbf{I} outside probability 2 e^{-t^2}. [Vershynin2018, Theorem 4.6.1], there for the singular values with an unspecified constant C K^2; here in Loewner form with the named constant subgaussianRowsConstant. For a standard Gaussian matrix the Gram sandwich of NLAlib/RandomMatrix/Gaussian/ExtremeSingularValues.lean is better in every regime.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_not_smul_one_le_conjTranspose_mul_self_and_le_smul_one_le_of_isSubgaussianVector.{u_1,
u_2, u_3}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3} [Fintype m]
[Fintype n] [DecidableEq n] {X : Ω → Matrix m n ℝ} {c : ℝ≥0}
(hind : iIndepFun (fun i ω ↦ X ω i) μ) (hsub : ∀ (i : m), IsSubgaussianVector (fun ω ↦ X ω i) c μ)
(hiso : ∀ (i : m), IsIsotropic (fun ω ↦ X ω i) μ) {t : ℝ} (ht : 0 ≤ t)
(hw : subgaussianRowsConstant * ↑c * (√↑(Fintype.card n) + t) ≤ √↑(Fintype.card m)) :
μ.real
{ω |
¬((√↑(Fintype.card m) - subgaussianRowsConstant * ↑c * (√↑(Fintype.card n) + t)) ^ 2 • 1 ≤
(X ω)ᴴ * X ω ∧
(X ω)ᴴ * X ω ≤
(√↑(Fintype.card m) + subgaussianRowsConstant * ↑c * (√↑(Fintype.card n) + t)) ^ 2 •
1)} ≤
2 * rexp (-t ^ 2)Theorem (A Gaussian tape draws a Gaussian matrix).
if the tape x is an i.i.d. sequence of standard Gaussians, the N \times k matrix drawn from it from position \mathit{off}, column-major, is a standard Gaussian matrix. No printed source.
Lean statement and details
NLAlib.hasLaw_tapeMatrix_of_hasLaw_iidSequence {Ω : Type} {mΩ : MeasurableSpace Ω} {μ : Measure Ω}
{x : Ω → ℕ → ℝ} (hx : HasLaw x (iidSequence (gaussianReal 0 1)) μ) (off N k : ℕ) :
HasLaw (fun ω ↦ Computation.tapeMatrix (x ω) off N k) (gaussianMatrix (Fin N) (Fin k)) μTheorem (Consecutive draws are independent).
if the tape x is an i.i.d. sequence with a probability law \nu, the N \times k matrix drawn from position 0 and the N \times \ell matrix drawn after it, from position Nk, are independent. No printed source.
Lean statement and details
NLAlib.indepFun_tapeMatrix_of_hasLaw_iidSequence {Ω : Type} {mΩ : MeasurableSpace Ω} {μ : Measure Ω}
{ν : Measure ℝ} [IsProbabilityMeasure ν] {x : Ω → ℕ → ℝ} (hx : HasLaw x (iidSequence ν) μ)
(N k ℓ : ℕ) :
(fun ω ↦ Computation.tapeMatrix (x ω) 0 N k) ⟂ᵢ[μ] fun ω ↦
Computation.tapeMatrix (x ω) (N * k) N ℓFormal definitions
- NLAlib.Computation.Dist.law
- NLAlib.Computation.isProbabilityMeasure_law
- NLAlib.Computation.isProbabilityMeasure_tapeLaw
- NLAlib.Computation.tapeLaw
- NLAlib.IsLeftUnitarilyInvariant
- NLAlib.IsRightUnitarilyInvariant
- NLAlib.PolyLogTail
- NLAlib.PolyLogTail.BoundsGinibreCondition
- NLAlib.PolyLogTail.BoundsGinibreGap
- NLAlib.PolyLogTail.normalize
- NLAlib.complexGaussian
- NLAlib.complexGaussianMatrix
- NLAlib.complexGaussianVector
- NLAlib.gaussianClippedInvMomentConstant
- NLAlib.gaussianMatrix
- NLAlib.gaussianPinvFrobTail
- NLAlib.gaussianPinvSpecNormBound
- NLAlib.gaussianProjectionFactor
- NLAlib.ginibreConditionTail
- NLAlib.ginibreGapTail
- NLAlib.haarFrame
- NLAlib.haarProjectionFactor
- NLAlib.isGaussian_gaussianMatrix
- NLAlib.isLeftUnitarilyInvariant_gaussianMatrix
- NLAlib.isLeftUnitarilyInvariant_haarFrame
- NLAlib.isProbabilityMeasure_complexGaussian
- NLAlib.isProbabilityMeasure_complexGaussianMatrix
- NLAlib.isProbabilityMeasure_complexGaussianVector
- NLAlib.isProbabilityMeasure_gaussianMatrix
- NLAlib.isProbabilityMeasure_haarFrame
- NLAlib.isProbabilityMeasure_rademacherMatrix
- NLAlib.isProbabilityMeasure_uniformSphereVector
- NLAlib.isRightUnitarilyInvariant_gaussianMatrix
- NLAlib.isRightUnitarilyInvariant_haarFrame
- NLAlib.nullSingletonClass_complexGaussian
- NLAlib.polyLogTailInverse
- NLAlib.polyLogTailScale
- NLAlib.rademacherMatrix
- NLAlib.subgaussianRowsConstant
- NLAlib.uniformSphereVector
Used by algorithms
26 algorithms using this topic or its subtopics
Stochastic Lanczos quadrature
Average Lanczos-based quadrature over random probes to estimate spectral quantities.
Range-finder approximation (RSVD)
Project the matrix onto the full range of its sketch.
Randomized subspace iteration (RSI)
Apply power iterations to the sketch, then project the matrix onto its range.
Late-truncated RSI
Complete randomized subspace iteration, then truncate the output to the target rank.
Randomized block Krylov iteration (RBKI)
Project the matrix onto a block Krylov space generated from its sketch.
Late-truncated RBKI
Complete randomized block Krylov iteration, then truncate the output to the target rank.
Filtered RSVD
Apply a polynomial filter before constructing a randomized range approximation.
Nyström approximation
Approximate a positive-semidefinite matrix using sampled or sketched columns.
Generalized Nyström (GN)
Use two sketches to construct a low-rank approximation of a general matrix.
Nyström block Krylov iteration (NysBKI)
Use a block Krylov test matrix in a Nyström approximation of a positive-semidefinite matrix.
Late-truncated NysBKI
Complete Nyström block Krylov iteration, then truncate the output to the target rank.
Nyström subspace iteration (NysSI)
Use a powered test matrix in a Nyström approximation of a positive-semidefinite matrix.
Late-truncated NysSI
Complete Nyström subspace iteration, then truncate the output to the target rank.
Girard–Hutchinson trace estimator
Estimate a trace using quadratic forms of random probes.
Hutch++
Combine a low-rank approximation with residual trace estimation.
Sketch-and-solve least squares
Solve a compressed least-squares problem produced by a sketch.
Sketch-and-precondition least squares
Build a preconditioner from a sketch before solving the original problem.
CountSketch
Use a sparse randomized embedding to compress a vector or matrix.
Subsampled randomized Hadamard transform
Combine randomized signs, a structured orthogonal transform, and sampling.
Early-and-late-truncated RSVD
Select a reduced sketch range, then truncate the projected matrix to the target rank.
Early-truncated GN
Truncate the range sketch before completing the two-sided approximation.
Early-truncated RSVD
Truncate the sketch first, then project the matrix onto that smaller range.
Hessenberg shifted QR (BGS)
The shifted QR algorithm of Banks, Garza-Vargas and Srivastava on Hessenberg matrices, with exact-arithmetic and finite-precision programs and BGS + Dense Schur (end-to-end).
Inverse iteration
Use shifted linear solves to target an eigenvector near a chosen shift.
Late-truncated GN
Complete generalized Nyström, then truncate the output to the target rank.
Late-truncated RSVD
Project onto the sketch range, then truncate the resulting approximation.