Theorem (integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_of_hasLaw_gaussianMatrix).Gaussian sketch-and-solve, expected relative residual: for a standard Gaussian p\times m sketch \mathbf{S}, r=\operatorname{rank}\mathbf{A}, r+2\le p and a real \varepsilon with r\le\varepsilon(p-r-1) (for \varepsilon>0: p\ge r+1+r/\varepsilon), \mathbb{E}\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{S},\mathbf{B}) \|_{\mathsf{F}}^2\le(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2\,. The right side uses the optimal squared residual, for any rank of \mathbf{A} and any matrix right-hand side. [EpperlyWebber2026, Theorem 2.1 and §2.1]; the real Gaussian identity there, here its sufficient-size corollary. Integrability is NLAlib.integrable_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_gaussianMatrix. Asymptotic form: NLAlib.exists_forall_integral_frobNorm_sub_mul_sketchAndSolve_sq_le_of_hasLaw_gaussianMatrix.
HeadlineGeneral form: sizes are index types
Lean statement and details
NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_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}
{p : Type u_4} {r : Type u_5} [Fintype m] [Fintype n] [Fintype p] [Fintype r] [DecidableEq m]
{S : Ω → Matrix p m ℝ} (hS : HasLaw S (gaussianMatrix p m) μ) (A : Matrix m n ℝ)
(B : Matrix m r ℝ) {ε : ℝ} (hA : A.rank + 2 ≤ Fintype.card p)
(hp : ↑A.rank ≤ ε * (↑(Fintype.card p) - ↑A.rank - 1)) :
∫ (ω : Ω), frobNorm (B - A * sketchAndSolve A (S ω) B) ^ 2 ∂μ ≤
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2
Theorem (exists_forall_integral_frobNorm_sub_mul_sketchAndSolve_sq_le_of_hasLaw_gaussianMatrix).Gaussian sketch-and-solve, asymptotic expected relative residual: O((r+1)/\varepsilon) Gaussian rows suffice, where r=\operatorname{rank}\mathbf{A}: for 0<\varepsilon\le\varepsilon_0 and absolute constants C,\varepsilon_0>0, a standard Gaussian p\times m sketch with p\ge C(r+1)/\varepsilon satisfies \mathbb{E}\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{S},\mathbf{B}) \|_{\mathsf{F}}^2\le(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2\,. No positive-rank hypothesis is needed. The constants precede every dimension and matrix. Proved from NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_of_hasLaw_gaussianMatrix with C=3, \varepsilon_0=1. [EpperlyWebber2026, Theorem 2.1 and §2.1]; the source gives the explicit sufficient size, here a rank-zero-safe asymptotic corollary.
General form: sizes are index types
Lean statement and details
NLAlib.exists_forall_integral_frobNorm_sub_mul_sketchAndSolve_sq_le_of_hasLaw_gaussianMatrix :
∃ C ε₀,
0 < C ∧
0 < ε₀ ∧
∀ {Ω m n r p : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype m] [inst_2 : Fintype n]
[inst_3 : Fintype r] [inst_4 : Fintype p] [inst_5 : DecidableEq m] (μ : Measure Ω)
(S : Ω → Matrix p m ℝ) (A : Matrix m n ℝ) (B : Matrix m r ℝ) (ε : ℝ),
HasLaw S (gaussianMatrix p m) μ →
0 < ε →
ε ≤ ε₀ →
C * ((↑A.rank + 1) / ε) ≤ ↑(Fintype.card p) →
∫ (ω : Ω), frobNorm (B - A * sketchAndSolve A (S ω) B) ^ 2 ∂μ ≤
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2
Theorem (exists_forall_integral_frobNorm_sub_mul_sketchAndSolve_sq_le_of_hasLaw_haarFrame).Haar sketch-and-solve, asymptotic expected relative residual: O((r+1)/\varepsilon) orthonormal sketch rows suffice, where r=\operatorname{rank}\mathbf{A}: for 0<\varepsilon\le\varepsilon_0 and absolute constants C,\varepsilon_0>0, an m\times p Haar frame with C(r+1)/\varepsilon\le p\le m satisfies \mathbb{E}\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{Q}^{\mathsf{H}}, \mathbf{B})\|_{\mathsf{F}}^2\le(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2\,. No positive-rank hypothesis is needed. The constants precede every dimension and matrix. Proved from NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_of_hasLaw_haarFrame with C=3, \varepsilon_0=1. [EpperlyWebber2026, Theorem 2.1 and §2.1]; here the uniform sufficient Gaussian size also bounds the smaller Haar factor.
General form: sizes are index types
Lean statement and details
NLAlib.exists_forall_integral_frobNorm_sub_mul_sketchAndSolve_sq_le_of_hasLaw_haarFrame :
∃ C ε₀,
0 < C ∧
0 < ε₀ ∧
∀ {Ω m n r p : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype m] [inst_2 : Fintype n]
[inst_3 : Fintype r] [inst_4 : Fintype p] [inst_5 : DecidableEq m]
[inst_6 : DecidableEq p] (μ : Measure Ω) (Q : Ω → Matrix m p ℝ) (A : Matrix m n ℝ)
(B : Matrix m r ℝ) (ε : ℝ),
HasLaw Q (haarFrame m p) μ →
Fintype.card p ≤ Fintype.card m →
0 < ε →
ε ≤ ε₀ →
C * ((↑A.rank + 1) / ε) ≤ ↑(Fintype.card p) →
∫ (ω : Ω), frobNorm (B - A * sketchAndSolve A (Q ω)ᴴ B) ^ 2 ∂μ ≤
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2
Theorem (integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_gaussianMatrix).The Gaussian completion identity: for a standard Gaussian p \times m sketch \mathbf{S}, every fixed \mathbf{X} with \operatorname{rank}\mathbf{X} + 2 \le p and every \mathbf{B}, writing q = \operatorname{rank}\mathbf{X}, <!-- value gaussianProjectionFactor q p --> \mathbb{E}\|(\mathbf{I}-\mathbf{\Pi}_{\mathbf{X},\mathbf{S}})\mathbf{B}\|_{\mathsf{F}}^2 = \Bigl(1 + \frac{q}{p - q - 1}\Bigr)\|(\mathbf{I}-\mathbf{P}_{\mathbf{X}})\mathbf{B}\|_{\mathsf{F}}^2 \,: the oblique projection inflates the orthogonal projection's error by exactly the factor gaussianProjectionFactor q p. No full rank of \mathbf{X} is assumed. [EpperlyWebber2026, Theorem 2.1 and Lemma 5.1]; [TroppYurtseverUdellCevher2017, Lemma A.5]; there for \mathbf{X} = \mathbf{A} (EW) or an orthonormal \mathbf{Q} (TYUC), here any basis of any rank.
General form: sizes are index types
Lean statement and details
NLAlib.integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_gaussianMatrix.{u_1, u_2, u_4,
u_5, u_6}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {p : Type u_4}
{r : Type u_5} {s : Type u_6} [Fintype m] [Fintype p] [Fintype r] [Fintype s] [DecidableEq m]
{S : Ω → Matrix p m ℝ} (hS : HasLaw S (gaussianMatrix p m) μ) (X : Matrix m s ℝ)
(hX : X.rank + 2 ≤ Fintype.card p) (B : Matrix m r ℝ) :
∫ (ω : Ω), frobNorm ((1 - obliqueProjector X (S ω)) * B) ^ 2 ∂μ =
gaussianProjectionFactor X.rank (Fintype.card p) * frobNorm ((1 - rangeProjector X) * B) ^ 2
Theorem (integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_haarFrame).The Haar completion identity: for an m \times p Haar frame \mathbf{Q} with p \le m, the sketch \mathbf{Q}^{\mathsf{H}}, every fixed \mathbf{X} with \operatorname{rank}\mathbf{X} + 2 \le p and every \mathbf{B}, writing q = \operatorname{rank}\mathbf{X}, <!-- value haarProjectionFactor m p q --> \mathbb{E}\|(\mathbf{I}-\mathbf{\Pi}_{\mathbf{X},\mathbf{Q}^{\mathsf{H}}})\mathbf{B} \|_{\mathsf{F}}^2 = \Bigl(1 + \frac{m - p}{m - q}\cdot\frac{q}{p - q - 1}\Bigr) \|(\mathbf{I}-\mathbf{P}_{\mathbf{X}})\mathbf{B}\|_{\mathsf{F}}^2\,, No full rank of \mathbf{X} is assumed. For p > m the formula is false (the sketch is then an isometry and the error is the orthogonal one), hence p \le m. The Gaussian twin is NLAlib.integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_gaussianMatrix. [EpperlyWebber2026, Theorem 2.1 and Proposition 5.7]; there for \mathbf{X} = \mathbf{A}, here any basis of any rank.
General form: sizes are index types
Lean statement and details
NLAlib.integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_haarFrame.{u_1, u_2, u_4, u_5,
u_6}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {p : Type u_4}
{r : Type u_5} {s : Type u_6} [Fintype m] [Fintype p] [Fintype r] [Fintype s] [DecidableEq m]
{Q : Ω → Matrix m p ℝ} [DecidableEq p] (hQ : HasLaw Q (haarFrame m p) μ)
(hpm : Fintype.card p ≤ Fintype.card m) (X : Matrix m s ℝ) (hX : X.rank + 2 ≤ Fintype.card p)
(B : Matrix m r ℝ) :
∫ (ω : Ω), frobNorm ((1 - obliqueProjector X (Q ω)ᴴ) * B) ^ 2 ∂μ =
haarProjectionFactor (Fintype.card m) (Fintype.card p) X.rank *
frobNorm ((1 - rangeProjector X) * B) ^ 2
Theorem (integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_of_hasLaw_haarFrame).Haar sketch-and-solve, expected relative residual: for an m\times p Haar frame \mathbf{Q}, the sketch \mathbf{Q}^{\mathsf{H}}, r=\operatorname{rank}\mathbf{A}, r+2\le p\le m and a real \varepsilon with r\le\varepsilon(p-r-1) (for \varepsilon>0: p\ge r+1+r/\varepsilon), \mathbb{E}\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{Q}^{\mathsf{H}}, \mathbf{B})\|_{\mathsf{F}}^2\le(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2\,. The right side uses the optimal squared residual, for any rank of \mathbf{A} and any matrix right-hand side. [EpperlyWebber2026, Theorem 2.1 and §2.1]; the real orthonormal identity there, here a sufficient-size corollary using its factor's upper bound by the Gaussian factor. Integrability is NLAlib.integrable_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_haarFrame. Asymptotic form: NLAlib.exists_forall_integral_frobNorm_sub_mul_sketchAndSolve_sq_le_of_hasLaw_haarFrame.
General form: sizes are index types
Lean statement and details
NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_of_hasLaw_haarFrame.{u_1, u_2,
u_3, u_4, u_5}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
{p : Type u_4} {r : Type u_5} [Fintype m] [Fintype n] [Fintype p] [Fintype r] [DecidableEq m]
[DecidableEq p] {Q : Ω → Matrix m p ℝ} (hQ : HasLaw Q (haarFrame m p) μ)
(hpm : Fintype.card p ≤ Fintype.card m) (A : Matrix m n ℝ) (B : Matrix m r ℝ) {ε : ℝ}
(hA : A.rank + 2 ≤ Fintype.card p) (hp : ↑A.rank ≤ ε * (↑(Fintype.card p) - ↑A.rank - 1)) :
∫ (ω : Ω), frobNorm (B - A * sketchAndSolve A (Q ω)ᴴ B) ^ 2 ∂μ ≤
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2
Theorem (integral_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_gaussianMatrix).Exact mean squared residual of Gaussian sketch-and-solve: for a standard Gaussian p \times m sketch \mathbf{S} and r = \operatorname{rank}\mathbf{A} with r + 2 \le p, <!-- value gaussianProjectionFactor r p --> \mathbb{E}\|\mathbf{B} - \mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A}, \mathbf{S}, \mathbf{B}) \|_{\mathsf{F}}^2 = \Bigl(1 + \frac{r}{p - r - 1}\Bigr)\min_{\mathbf{Y}} \|\mathbf{B}-\mathbf{A}\mathbf{Y}\|_{\mathsf{F}}^2\,, the minimum being \|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B}\|_{\mathsf{F}}^2. Its integrand is that of NLAlib.integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_gaussianMatrix at \mathbf{X} = \mathbf{A} (NLAlib.mul_sketchAndSolve), whose integrability companion applies. [EpperlyWebber2026, Theorem 2.1 (Gaussian)]; real case, \alpha_{\mathbb{R}} = 1; first proved by Bartan and Pilanci, as EW report.
General form: sizes are index types
Lean statement and details
NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_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}
{p : Type u_4} {r : Type u_5} [Fintype m] [Fintype n] [Fintype p] [Fintype r] [DecidableEq m]
{S : Ω → Matrix p m ℝ} (hS : HasLaw S (gaussianMatrix p m) μ) {A : Matrix m n ℝ}
(hA : A.rank + 2 ≤ Fintype.card p) (B : Matrix m r ℝ) :
∫ (ω : Ω), frobNorm (B - A * sketchAndSolve A (S ω) B) ^ 2 ∂μ =
gaussianProjectionFactor A.rank (Fintype.card p) * frobNorm ((1 - rangeProjector A) * B) ^ 2
Theorem (integral_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_haarFrame).Exact mean squared residual of sketch-and-solve with a random orthonormal sketch: for an m \times p Haar frame \mathbf{Q} with p \le m, the sketch \mathbf{Q}^{\mathsf{H}} and r = \operatorname{rank}\mathbf{A} with r + 2 \le p, <!-- value haarProjectionFactor m p r --> \mathbb{E}\|\mathbf{B} - \mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A}, \mathbf{Q}^{\mathsf{H}}, \mathbf{B})\|_{\mathsf{F}}^2 = \Bigl(1 + \frac{m - p}{m - r}\cdot\frac{r}{p - r - 1}\Bigr) \min_{\mathbf{Y}}\|\mathbf{B}-\mathbf{A}\mathbf{Y}\|_{\mathsf{F}}^2\,, the minimum being \|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B}\|_{\mathsf{F}}^2 and the factor haarProjectionFactor m p r. Its integrand is that of NLAlib.integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_haarFrame at \mathbf{X} = \mathbf{A} (NLAlib.mul_sketchAndSolve), whose integrability companion applies. [EpperlyWebber2026, Theorem 2.1 (random orthonormal)]; real case, \alpha_{\mathbb{R}} = 1.
General form: sizes are index types
Lean statement and details
NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_haarFrame.{u_1, u_2, u_3, u_4, u_5}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
{p : Type u_4} {r : Type u_5} [Fintype m] [Fintype n] [Fintype p] [Fintype r] [DecidableEq m]
{Q : Ω → Matrix m p ℝ} [DecidableEq p] (hQ : HasLaw Q (haarFrame m p) μ)
(hpm : Fintype.card p ≤ Fintype.card m) {A : Matrix m n ℝ} (hA : A.rank + 2 ≤ Fintype.card p)
(B : Matrix m r ℝ) :
∫ (ω : Ω), frobNorm (B - A * sketchAndSolve A (Q ω)ᴴ B) ^ 2 ∂μ =
haarProjectionFactor (Fintype.card m) (Fintype.card p) A.rank *
frobNorm ((1 - rangeProjector A) * B) ^ 2
Theorem (integral_sketchAndSolve_of_hasLaw_gaussianMatrix).Gaussian sketch-and-solve is unbiased: for a standard Gaussian p \times m sketch \mathbf{S} and \operatorname{rank}\mathbf{A} + 1 \le p, \mathbb{E}\,\mathsf{sketchAndSolve}(\mathbf{A}, \mathbf{S}, \mathbf{B}) = \mathbf{A}^{+}\mathbf{B}\,. At \mathbf{A} = \mathbf{Q} with orthonormal columns this is the unbiasedness of the sketched core of generalized Nyström. The reflection 2\mathbf{P}_{\mathbf{A}} - \mathbf{I} preserves the law of \mathbf{S}, fixes \mathbf{A} and negates the residual; at p = \operatorname{rank} \mathbf{A} the solution need not be integrable. [EpperlyWebber2026, Theorem 2.1]; [TroppYurtseverUdellCevher2017, Lemma A.5]; there with \operatorname{rank}\mathbf{A} + 2 \le p.
General form: sizes are index types
Lean statement and details
NLAlib.integral_sketchAndSolve_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} {p : Type u_4}
{r : Type u_5} [Fintype m] [Fintype n] [Fintype p] [Fintype r] {S : Ω → Matrix p m ℝ}
[DecidableEq r] (hS : HasLaw S (gaussianMatrix p m) μ) {A : Matrix m n ℝ}
(hA : A.rank + 1 ≤ Fintype.card p) (B : Matrix m r ℝ) :
∫ (ω : Ω), sketchAndSolve A (S ω) B ∂μ = pinv A * B
Theorem (integral_sketchAndSolve_of_hasLaw_haarFrame).Sketch-and-solve with a random orthonormal sketch is unbiased: for an m \times p Haar frame \mathbf{Q} with p \le m and \operatorname{rank}\mathbf{A} + 2 \le p, \mathbb{E}\,\mathsf{sketchAndSolve}(\mathbf{A}, \mathbf{Q}^{\mathsf{H}}, \mathbf{B}) = \mathbf{A}^{+}\mathbf{B}\,. The reflection 2\mathbf{P}_{\mathbf{A}} - \mathbf{I}, acting on the left of the frame, preserves its law, fixes \mathbf{A} and negates the residual. The Gaussian twin is NLAlib.integral_sketchAndSolve_of_hasLaw_gaussianMatrix. [EpperlyWebber2026, Theorem 2.1]; real case.
General form: sizes are index types
Lean statement and details
NLAlib.integral_sketchAndSolve_of_hasLaw_haarFrame.{u_1, u_2, u_3, u_4, u_5} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3} {p : Type u_4}
{r : Type u_5} [Fintype m] [Fintype n] [Fintype p] [Fintype r] {Q : Ω → Matrix m p ℝ}
[DecidableEq p] [DecidableEq r] (hQ : HasLaw Q (haarFrame m p) μ)
(hpm : Fintype.card p ≤ Fintype.card m) {A : Matrix m n ℝ} (hA : A.rank + 2 ≤ Fintype.card p)
(B : Matrix m r ℝ) : ∫ (ω : Ω), sketchAndSolve A (Q ω)ᴴ B ∂μ = pinv A * B
General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.