Sketch-and-solve: tail bound for the relative residual
Library · Result group
Theorem (measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_gaussianMatrix).Gaussian sketch-and-solve, relative residual with high probability: for a standard Gaussian p\times m sketch \mathbf{G}, r=\operatorname{rank}\mathbf{A} and \varepsilon,\delta>0, if <!-- value gaussianInjectionDim r (1/2) (\delta/2) --> p\ge\frac{4(\sqrt{r}+\sqrt{2\log(1/(\delta/2))})^2}{(1/2)^2} and p\ge16(r+1)/(\varepsilon\delta), then \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{G}, \mathbf{B})\|_{\mathsf{F}}^2\bigr]\le\delta\,. No full-rank assumption on \mathbf{A} is needed; \mathbf{B} may have several columns. The first size is NLAlib.gaussianInjectionDim A.rank (1 / 2) (δ / 2). [Woodruff2014, proof of Theorem 23]; the injection-plus-multiplication route there, here with a Gaussian sketch's second JL moment and a squared matrix residual. This is a sufficient second-moment rate, rather than an optimal Gaussian failure dependence. Incomparable with its \log(1/\delta) twin measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_gaussianMatrix_of_jlMomentDim_le (rule 4): this one needs fewer rows at constant \delta, the twin for small \delta; the asymptotic form exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_gaussianMatrix is proved from the twin.
HeadlineGeneral form: sizes are index types
Lean statement and details
NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_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}
{r : Type u_4} {p : Type u_5} [Fintype m] [Fintype n] [Fintype r] [Fintype p] [DecidableEq m]
{G : Ω → Matrix p m ℝ} (hG : HasLaw G (gaussianMatrix p m) μ) (A : Matrix m n ℝ)
(B : Matrix m r ℝ) {ε δ : ℝ} (hε : 0 < ε) (hδ : 0 < δ)
(hp : gaussianInjectionDim A.rank (1 / 2) (δ / 2) ≤ ↑(Fintype.card p))
(hp' : 16 * (↑A.rank + 1) ≤ ε * δ * ↑(Fintype.card p)) :
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (G ω) B) ^ 2} ≤
δ
Theorem (HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le).Sketch-and-solve to relative error through approximate multiplication: if the real sketch \mathbf{S} injects \operatorname{range}\mathbf{A} with constant a > 0 except with probability \delta and has the (\varepsilon, \delta', p) JL moment property, \varepsilon > 0, p \ge 2, \delta' \ge 0, then \|\mathbf{B} - \mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A}, \mathbf{S}, \mathbf{B}) \|_{\mathsf{F}}^2 \le \Bigl(1 + \frac{\operatorname{rank}(\mathbf{A})\,\varepsilon^2}{a^2}\Bigr) \|(\mathbf{I} - \mathbf{P}_{\mathbf{A}})\mathbf{B}\|_{\mathsf{F}}^2 except with probability \delta + \delta'. Its neighbour without the moment property, NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_mul_pinv_mul_sq_gt_le, has the constant factor 1 + t/a at failure probability \delta + 1/t; this one reaches 1 + \varepsilon when the moment's \delta' decays with the sketch size. [Woodruff2014, Theorem 23]; there sparse embeddings, a vector right-hand side and the unsquared objective; here any injection and JL moment, a matrix right-hand side.
Lean statement and details
NLAlib.HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le.{u_1, u_3, u_5, u_7, u_8}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_3} {n : Type u_5}
{q : Type u_7} {r : Type u_8} [Fintype k] [Fintype n] [Fintype q] [Fintype r] [DecidableEq n]
{a δ : ℝ} {S : Ω → Matrix k n ℝ} [IsFiniteMeasure μ] {A : Matrix n q ℝ} {ε δ' p : ℝ}
(hJL : HasJLMoment S ε δ' p μ) (h : HasSubspaceInjection S A a δ μ) (hS : AEMeasurable S μ)
(ha : 0 < a) (hε : 0 < ε) (hp : 2 ≤ p) (hδ' : 0 ≤ δ') (B : Matrix n r ℝ) :
μ.real
{ω |
(1 + ↑A.rank * ε ^ 2 / a ^ 2) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (S ω) B) ^ 2} ≤
δ + δ'
Theorem (HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_indepFun).Sketch-and-solve to relative error with a random design: for a real OSI \mathbf{S} for dimension d (constant a > 0, failure probability \delta) with the (\varepsilon, \delta', p) JL moment property, \varepsilon > 0, p \ge 2, \delta' \ge 0, independent of a random design \mathbf{Y} of rank at most d and a right-hand side \mathbf{B}, \|\mathbf{B} - \mathbf{Y}\,\mathsf{sketchAndSolve}(\mathbf{Y}, \mathbf{S}, \mathbf{B}) \|_{\mathsf{F}}^2 \le \Bigl(1 + \frac{d\,\varepsilon^2}{a^2}\Bigr) \|(\mathbf{I} - \mathbf{P}_{\mathbf{Y}})\mathbf{B}\|_{\mathsf{F}}^2 except with probability \delta + \delta'. The random-design form of NLAlib.HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le; its constant-factor neighbour is NLAlib.IsObliviousSubspaceInjection.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_indepFun. [Woodruff2014, Theorem 23, and proof of Theorem 47]; there a fixed design.
Lean statement and details
NLAlib.HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_indepFun.{u_1, u_3, u_5,
u_7, u_8}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_3} {n : Type u_5}
{q : Type u_7} {r : Type u_8} [Fintype k] [Fintype n] [Fintype q] [Fintype r] [DecidableEq n]
{a δ : ℝ} {d : ℕ} {S : Ω → Matrix k n ℝ} [IsProbabilityMeasure μ] {ε δ' p : ℝ}
(hJL : HasJLMoment S ε δ' p μ) (h : IsObliviousSubspaceInjection S d a δ μ) (ha : 0 < a)
(hε : 0 < ε) (hp : 2 ≤ p) (hδ' : 0 ≤ δ') {Y : Ω → Matrix n q ℝ} {B : Ω → Matrix n r ℝ}
(hind : S ⟂ᵢ[μ] fun ω ↦ (Y ω, B ω)) (hS : AEMeasurable S μ) (hY : AEMeasurable Y μ)
(hB : AEMeasurable B μ) (hrank : ∀ᵐ (ω : Ω) ∂μ, (Y ω).rank ≤ d) :
μ.real
{ω |
(1 + ↑d * ε ^ 2 / a ^ 2) * frobNorm ((1 - rangeProjector (Y ω)) * B ω) ^ 2 <
frobNorm (B ω - Y ω * sketchAndSolve (Y ω) (S ω) (B ω)) ^ 2} ≤
δ + δ'
Theorem (HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_one_add_mul_le).Sketch-and-solve to relative error 1 + \varepsilon through approximate multiplication: for a real sketch \mathbf{S} and a scale c \ne 0, if c\,\mathbf{S} injects \operatorname{range}\mathbf{A} with constant a \ge 1/2 except with probability \delta and has the (\sqrt{\varepsilon/(4(r + 1))}, \delta', p) JL moment property, r = \operatorname{rank}\mathbf{A}, \varepsilon > 0, p \ge 2, \delta' \ge 0, then \|\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 except with probability \delta + \delta'. The solution at c\,\mathbf{S} is the solution at \mathbf{S}, so the analysis runs at a family's normalised sketch and the conclusion is about the sketch the user applies; the factor 1 + r\varepsilon/(r + 1) \le 1 + \varepsilon comes from NLAlib.HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le. The dense family statements of sketch-and-solve instantiate it. [Woodruff2014, Theorem 23]; there sparse embeddings, a vector right-hand side and the unsquared objective.
Lean statement and details
NLAlib.HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_one_add_mul_le.{u_1, u_3, u_5,
u_7, u_8}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_3} {n : Type u_5}
{q : Type u_7} {r : Type u_8} [Fintype k] [Fintype n] [Fintype q] [Fintype r] [DecidableEq n]
{a δ : ℝ} {S : Ω → Matrix k n ℝ} [IsFiniteMeasure μ] {A : Matrix n q ℝ} {c ε δ' p : ℝ}
(hJL : HasJLMoment (fun ω ↦ c • S ω) (√(ε / (4 * (↑A.rank + 1)))) δ' p μ)
(h : HasSubspaceInjection (fun ω ↦ c • S ω) A a δ μ) (hS : AEMeasurable S μ) (hc : c ≠ 0)
(ha : 1 / 2 ≤ a) (hε : 0 < ε) (hp : 2 ≤ p) (hδ' : 0 ≤ δ') (B : Matrix n r ℝ) :
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (S ω) B) ^ 2} ≤
δ + δ'
Theorem (HasSubspaceInjection.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_one_add_mul_le).Sketch-and-solve to relative error from an approximate-multiplication tail: let \mathbf{C}=(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B}. If \mathbf{S} injects \operatorname{range}\mathbf{A} with constant a>0 except with probability \delta, \varepsilon\ge0, and \mathbb{P}\bigl[a\sqrt{\varepsilon}\|\mathbf{C}\|_{\mathsf{F}}< \|\mathbf{P}_{\mathbf{A}}\mathbf{S}^{\mathsf{H}}\mathbf{S}\mathbf{C}\|_{\mathsf{F}}\bigr] \le\delta'\,, then \mathbb{P}\bigl[(1+\varepsilon)\|\mathbf{C}\|_{\mathsf{F}}^2< \|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{S},\mathbf{B}) \|_{\mathsf{F}}^2\bigr]\le\delta+\delta'\,. Over any RCLike field, with a matrix right-hand side. The family-specific multiplication tail is an input; the real JL-moment instance is NLAlib.HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le. [Woodruff2014, proof of Theorem 23]; there real vector regression and a constant embedding, here any injection constant and a supplied multiplication tail.
Lean statement and details
NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_one_add_mul_le.{u_1,
u_2, u_3, u_5, u_7, u_8}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3}
{n : Type u_5} {q : Type u_7} {r : Type u_8} [Fintype k] [Fintype n] [Fintype q] [Fintype r]
[DecidableEq n] {S : Ω → Matrix k n 𝕜} {A : Matrix n q 𝕜} {a δ : ℝ} [IsFiniteMeasure μ] {δ' ε : ℝ}
(h : HasSubspaceInjection S A a δ μ) (ha : 0 < a) (hε : 0 ≤ ε) (B : Matrix n r 𝕜)
(hAMM :
μ.real
{ω |
a * √ε * frobNorm ((1 - rangeProjector A) * B) <
frobNorm (rangeProjector A * (S ω)ᴴ * S ω * ((1 - rangeProjector A) * B))} ≤
δ') :
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (S ω) B) ^ 2} ≤
δ + δ'
Theorem (HasSubspaceInjection.measureReal_norm_sub_mulVec_sq_gt_le).Sketch-and-solve with an OSI: if \mathbf{S} is isotropic and a subspace injection for \operatorname{range}\mathbf{A} with constant a > 0 and failure probability \delta, and \mathbf{x}(\omega) is (almost surely) a minimizer of \|\mathbf{S}\mathbf{A}\mathbf{x} - \mathbf{S}\mathbf{y}\|, then for t > 0\|\mathbf{y} - \mathbf{A}\mathbf{x}\|^2 \le \Bigl(1 + \frac{t}{a}\Bigr) \|(\mathbf{I} - \mathbf{P}_{\mathbf{A}})\mathbf{y}\|^2 except with probability \delta + 1 / t. [CamanoEpperlyMeyerTropp2025, Theorem 2.7]; there for an OSI, the minimum-norm solution and a fixed t, here a tail in t for every minimizer.
Lean statement and details
NLAlib.HasSubspaceInjection.measureReal_norm_sub_mulVec_sq_gt_le.{u_1, u_2, u_3, u_5, u_7}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3}
{n : Type u_5} {q : Type u_7} [Fintype k] [Fintype n] [Fintype q] [DecidableEq n]
{S : Ω → Matrix k n 𝕜} {A : Matrix n q 𝕜} {a δ t : ℝ} [IsFiniteMeasure μ]
(h : HasSubspaceInjection S A a δ μ) (hiso : IsIsotropicSketch S μ) (ha : 0 < a) (ht : 0 < t)
(y : n → 𝕜) {x : Ω → q → 𝕜}
(hx : ∀ᵐ (ω : Ω) ∂μ, IsLeastSquaresSolution (S ω * A) (S ω *ᵥ y) (x ω)) :
μ.real
{ω |
(1 + t / a) * ‖WithLp.toLp 2 ((1 - rangeProjector A) *ᵥ y)‖ ^ 2 <
‖WithLp.toLp 2 (y - A *ᵥ x ω)‖ ^ 2} ≤
δ + 1 / t
Theorem (IsObliviousSubspaceInjection.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_indepFun).Sketch-and-solve with an OSI and a random design: if \mathbf{S} is an OSI for dimension d with constant a > 0 and failure probability \delta, independent of a random design \mathbf{Y} of rank at most d and a right-hand side \mathbf{B}, then for t > 0\|\mathbf{B} - \mathbf{Y}\,\mathsf{sketchAndSolve}(\mathbf{Y}, \mathbf{S}, \mathbf{B}) \|_{\mathsf{F}}^2 \le \Bigl(1 + \frac{t}{a}\Bigr) \|(\mathbf{I} - \mathbf{P}_{\mathbf{Y}})\mathbf{B}\|_{\mathsf{F}}^2 except with probability \delta + 1/t. The fixed-design form is NLAlib.IsObliviousSubspaceInjection.measureReal_frobNorm_sub_mul_pinv_mul_sq_gt_le. It is the completion step of generalized Nyström and of its early-truncated form with a structured co-range sketch. [CamanoEpperlyMeyerTropp2025, Theorem 2.7 and proof of Corollary 2.8]; there a fixed design, a vector right-hand side and probability 9/10.
Lean statement and details
NLAlib.IsObliviousSubspaceInjection.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_indepFun.{u_1,
u_2, u_3, u_5, u_7, u_8}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3}
{n : Type u_5} {q : Type u_7} {r : Type u_8} [Fintype k] [Fintype n] [Fintype q] [Fintype r]
[DecidableEq n] {S : Ω → Matrix k n 𝕜} {a δ t : ℝ} {d : ℕ} [IsProbabilityMeasure μ]
(h : IsObliviousSubspaceInjection S d a δ μ) (ha : 0 < a) (ht : 0 < t) {Y : Ω → Matrix n q 𝕜}
{B : Ω → Matrix n r 𝕜} (hind : S ⟂ᵢ[μ] fun ω ↦ (Y ω, B ω)) (hS : AEMeasurable S μ)
(hY : AEMeasurable Y μ) (hB : AEMeasurable B μ) (hrank : ∀ᵐ (ω : Ω) ∂μ, (Y ω).rank ≤ d) :
μ.real
{ω |
(1 + t / a) * frobNorm ((1 - rangeProjector (Y ω)) * B ω) ^ 2 <
frobNorm (B ω - Y ω * sketchAndSolve (Y ω) (S ω) (B ω)) ^ 2} ≤
δ + 1 / t
Theorem (IsSubspaceEmbedding.norm_sub_mulVec_sq_le).Sketch-and-solve. If \mathbf{S} is a subspace embedding with constants a > 0, \mathbf{b} for a subspace \operatorname{range}\mathbf{U} containing \operatorname{range}\mathbf{A} and \mathbf{y}, every minimizer \mathbf{x} of \|\mathbf{S}\mathbf{A}\mathbf{x} - \mathbf{S}\mathbf{y}\| satisfies \|\mathbf{y} - \mathbf{A}\mathbf{x}\|^2 \le \frac{\mathbf{b}}{a} \|(\mathbf{I} - \mathbf{P}_{\mathbf{A}})\mathbf{y}\|^2, the last being the optimal residual. [Woodruff2014, proof of Theorem 21], there (1 + \varepsilon) / (1 - \varepsilon) in squared norms; [MartinssonTropp2020, §10.3], there \|\mathbf{A}\hat{\mathbf{x}} - \mathbf{b}\| \le (1 + \varepsilon) \|\mathbf{A}\mathbf{x}_\star - \mathbf{b}\|, unsquared (after Sarlós). Here any constants and any subspace containing \operatorname{range}\mathbf{A} and \mathbf{y}.
Lean statement and details
NLAlib.IsSubspaceEmbedding.norm_sub_mulVec_sq_le.{u_1, u_2, u_4, u_5, u_6} {𝕜 : Type u_1} [RCLike 𝕜]
{k : Type u_2} {n : Type u_4} {p : Type u_5} {q : Type u_6} [Fintype k] [Fintype n] [Fintype p]
[Fintype q] {S : Matrix k n 𝕜} {U : Matrix n p 𝕜} {A : Matrix n q 𝕜} {y : n → 𝕜} {x : q → 𝕜}
{a b : ℝ} [DecidableEq n] (h : IsSubspaceEmbedding S U a b) (ha : 0 < a)
(hA : A.mulVecLin.range ≤ U.mulVecLin.range) (hy : y ∈ U.mulVecLin.range)
(hx : IsLeastSquaresSolution (S * A) (S *ᵥ y) x) :
‖WithLp.toLp 2 (y - A *ᵥ x)‖ ^ 2 ≤ b / a * ‖WithLp.toLp 2 ((1 - rangeProjector A) *ᵥ y)‖ ^ 2
Theorem (exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_countSketch).CountSketch regression, asymptotic relative residual with high probability: O(((r+1)^2+(r+1)/\varepsilon)/\delta) rows suffice, where r=\operatorname{rank}\mathbf{A}: there are absolute C,\varepsilon_0>0 such that a CountSketch with p\ge C((r+1)^2+(r+1)/\varepsilon)/\delta, 0<\varepsilon\le\varepsilon_0 and \delta>0 satisfies \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{S}, \mathbf{B})\|_{\mathsf{F}}^2\bigr]\le\delta\,. Over any RCLike field; rank zero and matrix right-hand sides are included. All constants precede dimensions and data. Proved from NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_countSketch with C=16, \varepsilon_0=1. [Woodruff2014, proof of Theorem 23]; here explicit failure dependence, squared matrix residuals, complex support and separate injection/multiplication sample budgets.
General form: sizes are index types
Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_countSketch :
∃ C ε₀,
0 < C ∧
0 < ε₀ ∧
∀ {Ω 𝕜 m n r p : Type} [inst : MeasurableSpace Ω] [inst_1 : RCLike 𝕜] [inst_2 : Fintype m]
[inst_3 : Fintype n] [inst_4 : Fintype r] [inst_5 : Fintype p] [inst_6 : DecidableEq m]
[inst_7 : DecidableEq p] (μ : Measure Ω) (S : Ω → Matrix p m 𝕜) (A : Matrix m n 𝕜)
(B : Matrix m r 𝕜) (ε δ : ℝ),
HasLaw S (countSketch p m) μ →
0 < ε →
ε ≤ ε₀ →
0 < δ →
C * (((↑A.rank + 1) ^ 2 + (↑A.rank + 1) / ε) / δ) ≤ ↑(Fintype.card p) →
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (S ω) B) ^ 2} ≤
δ
Theorem (exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_gaussianMatrix).Gaussian sketch-and-solve, asymptotic relative residual with high probability: O((r+1)\log(1/\delta)/\varepsilon) rows suffice, with r=\operatorname{rank}\mathbf{A}: there are absolute C,\varepsilon_0>0 such that a standard Gaussian p\times m sketch with p\ge C(r+1)\log(1/\delta)/\varepsilon, 0<\varepsilon\le\varepsilon_0 and 0<\delta\le1/2 satisfies \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{G}, \mathbf{B})\|_{\mathsf{F}}^2\bigr]\le\delta\,. Rank zero and matrix right-hand sides are included; all constants precede dimensions and data. Proved from measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_gaussianMatrix_of_jlMomentDim_le with \varepsilon_0 = 1. [Woodruff2014, proof of Theorem 23]; here the Gaussian JL-moment route, without a claim of optimal failure dependence.
General form: sizes are index types
Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_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 Ω)
(G : Ω → Matrix p m ℝ) (A : Matrix m n ℝ) (B : Matrix m r ℝ) (ε δ : ℝ),
HasLaw G (gaussianMatrix p m) μ →
0 < ε →
ε ≤ ε₀ →
0 < δ →
δ ≤ 1 / 2 →
C * ((↑A.rank + 1) * Real.log (1 / δ) / ε) ≤ ↑(Fintype.card p) →
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (G ω) B) ^ 2} ≤
δ
Theorem (exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_haarFrame).Haar sketch-and-solve, asymptotic relative residual with high probability: O((r+1)\log(1/\delta)/\varepsilon) rows suffice, with r=\operatorname{rank}\mathbf{A}: there are absolute C,\varepsilon_0>0 such that for an m \times k Haar frame \mathbf{Q}, k nonempty, \lvert k\rvert \le \lvert m\rvert, \lvert k\rvert \ge C(r+1)\log(1/\delta)/\varepsilon, 0<\varepsilon\le\varepsilon_0 and 0<\delta\le1/2, \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\, \mathsf{sketchAndSolve}(\mathbf{A},\mathbf{Q}^{\mathsf{H}},\mathbf{B})\|_{\mathsf{F}}^2\bigr] \le\delta\,. All constants precede dimensions and data. Proved from NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_haarFrame with \varepsilon_0 = 1. [Woodruff2014, proof of Theorem 23].
General form: sizes are index types
Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_haarFrame :
∃ C ε₀,
0 < C ∧
0 < ε₀ ∧
∀ {Ω k m n r : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype k] [inst_2 : Fintype m]
[inst_3 : Fintype n] [inst_4 : Fintype r] [inst_5 : DecidableEq k]
[inst_6 : DecidableEq m] [Nonempty k] (μ : Measure Ω) (Q : Ω → Matrix m k ℝ)
(A : Matrix m n ℝ) (B : Matrix m r ℝ) (ε δ : ℝ),
HasLaw Q (haarFrame m k) μ →
Fintype.card k ≤ Fintype.card m →
0 < ε →
ε ≤ ε₀ →
0 < δ →
δ ≤ 1 / 2 →
C * ((↑A.rank + 1) * Real.log (1 / δ) / ε) ≤ ↑(Fintype.card k) →
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (Q ω)ᴴ B) ^ 2} ≤
δ
Theorem (exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_srht).SRHT sketch-and-solve, asymptotic relative residual with high probability: O(\beta(r + \log(\lvert m\rvert/\delta))\log(r/\delta) + \beta^2(r+1)/(\varepsilon\delta)) rows suffice, with r = \operatorname{rank}\mathbf{A}: there are absolute C, \varepsilon_0 > 0 such that for a real bounded orthonormal \mathbf{F} with constant \beta, its SRHT \mathbf{S} with k nonempty and \lvert k\rvert \le \lvert m\rvert rows above that threshold times C, 0 < \varepsilon \le \varepsilon_0 and 0 < \delta \le 1/2, \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{S}, \mathbf{B})\|_{\mathsf{F}}^2\bigr]\le\delta\,. The constants come before every dimension and before \beta. Proved from NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_srht with \varepsilon_0 = 1. [Woodruff2014, Theorem 23].
General form: sizes are index types
Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_srht :
∃ C ε₀,
0 < C ∧
0 < ε₀ ∧
∀ {Ω k m n r : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype k] [inst_2 : Fintype m]
[inst_3 : Fintype n] [inst_4 : Fintype r] [inst_5 : DecidableEq m] [Nonempty k]
(μ : Measure Ω) (S : Ω → Matrix k m ℝ) (F : Matrix m m ℝ) (β : ℝ) (A : Matrix m n ℝ)
(B : Matrix m r ℝ) (ε δ : ℝ),
IsBoundedOrthonormal F β →
HasLaw S (srht k F) μ →
Fintype.card k ≤ Fintype.card m →
0 < ε →
ε ≤ ε₀ →
0 < δ →
δ ≤ 1 / 2 →
C *
(β * (↑A.rank + Real.log (↑(Fintype.card m) / δ)) *
Real.log (↑A.rank / δ) +
β ^ 2 * (↑A.rank + 1) / (ε * δ)) ≤
↑(Fintype.card k) →
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (S ω) B) ^ 2} ≤
δ
Theorem (exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_isSubgaussianVector).Sub-Gaussian sketch-and-solve, asymptotic relative residual with high probability: O(c^2(r+1)\log(1/\delta)/\varepsilon) rows suffice, with r=\operatorname{rank}\mathbf{A}: there are absolute C,\varepsilon_0>0 such that for a random \mathbf{X} \in \mathbb{R}^{k \times m} with independent rows, each isotropic and sub-Gaussian with proxy c, k \ge Cc^2(r+1)\log(1/\delta)/\varepsilon, 0<\varepsilon\le\varepsilon_0 and 0<\delta\le1/2, \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{X}, \mathbf{B})\|_{\mathsf{F}}^2\bigr]\le\delta\,; the proxy stays in the threshold. Proved from NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_isSubgaussianVector with \varepsilon_0 = 1; isotropy forces c \ge 1 once there is a column. [Woodruff2014, proof of Theorem 23].
General form: sizes are index types
Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_isSubgaussianVector :
∃ C ε₀,
0 < C ∧
0 < ε₀ ∧
∀ {Ω k m n r : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype k] [inst_2 : Fintype m]
[inst_3 : Fintype n] [inst_4 : Fintype r] [inst_5 : DecidableEq m] [Nonempty k]
(μ : Measure Ω) (X : Ω → Matrix k m ℝ) (c : ℝ≥0) (A : Matrix m n ℝ) (B : Matrix m r ℝ)
(ε δ : ℝ),
iIndepFun (fun i ω ↦ X ω i) μ →
(∀ (i : k), IsSubgaussianVector (fun ω ↦ X ω i) c μ) →
(∀ (i : k), IsIsotropic (fun ω ↦ X ω i) μ) →
0 < ε →
ε ≤ ε₀ →
0 < δ →
δ ≤ 1 / 2 →
C * (↑c ^ 2 * (↑A.rank + 1) * Real.log (1 / δ) / ε) ≤ ↑(Fintype.card k) →
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (X ω) B) ^ 2} ≤
δ
Theorem (measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_countSketch).CountSketch regression, relative residual with high probability: for a CountSketch \mathbf{S} with p rows, r=\operatorname{rank}\mathbf{A} and \varepsilon,\delta>0, if <!-- value countSketchEmbeddingDim r (1/2) (\delta/2) --> p\ge\frac{r^2+r}{(\delta/2)(1/2)^2} and p\ge16(r+1)/(\varepsilon\delta), then \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{S}, \mathbf{B})\|_{\mathsf{F}}^2\bigr]\le\delta\,. Over any RCLike field, for any rank of \mathbf{A} and a matrix right-hand side. The first size is NLAlib.countSketchEmbeddingDim A.rank (1 / 2) (δ / 2); the sketch is unscaled, with one sign per column. [Woodruff2014, proof of Theorem 23]; there real vector regression and constant success probability, here squared matrix residuals with a separate injection and multiplication budget, and complex support from the direct CountSketch moment identity. Asymptotic form: NLAlib.exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_countSketch.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_countSketch.{u_1, u_2, u_3,
u_4, u_5, u_6}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
{n : Type u_4} {r : Type u_5} {p : Type u_6} [Fintype m] [Fintype n] [Fintype r] [Fintype p]
[DecidableEq m] [DecidableEq p] {S : Ω → Matrix p m 𝕜} (hS : HasLaw S (countSketch p m) μ)
(A : Matrix m n 𝕜) (B : Matrix m r 𝕜) {ε δ : ℝ} (hε : 0 < ε) (hδ : 0 < δ)
(hp : countSketchEmbeddingDim A.rank (1 / 2) (δ / 2) ≤ ↑(Fintype.card p))
(hp' : 16 * (↑A.rank + 1) ≤ ε * δ * ↑(Fintype.card p)) :
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (S ω) B) ^ 2} ≤
δ
Theorem (measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_gaussianMatrix_of_jlMomentDim_le).Gaussian sketch-and-solve, relative residual with high probability, \log(1/\delta) size form: for a standard Gaussian p\times m sketch \mathbf{G}, r=\operatorname{rank}\mathbf{A}, 0 < \varepsilon \le 4, \delta > 0, if <!-- value gaussianInjectionDim r (1/2) (\delta/2) --> p\ge\frac{4(\sqrt{r}+\sqrt{2\log(1/(\delta/2))})^2}{(1/2)^2} and <!-- value jlMomentDim {\sqrt{\varepsilon/(4(r + 1))}} (\delta/2) --> p \ge 128\max(2, \log(1/(\delta/2)))/\sqrt{\varepsilon/(4(r + 1))}^2\,, that is p \ge 512(r + 1)\max(2, \log(2/\delta))/\varepsilon, then \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{G}, \mathbf{B})\|_{\mathsf{F}}^2\bigr]\le\delta\,. The sizes are NLAlib.gaussianInjectionDim A.rank (1 / 2) (δ / 2) and NLAlib.jlMomentDim (√(ε / (4 * (A.rank + 1)))) (δ / 2): the JL moment at p = \max(2, \log(2/\delta)) (NLAlib.hasJLMoment_of_hasLaw_gaussianMatrix_of_jlMomentDim_le) in place of the second moment, for which the JL budget \sqrt{\varepsilon/(4(r+1))} must be at most 1, hence \varepsilon \le 4. Incomparable with NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_gaussianMatrix (rule 4). [Woodruff2014, proof of Theorem 23]; the injection-plus-multiplication route there, here with the Gaussian JL moment at p = \log(1/\delta). The product (r + 1)\log(1/\delta) is what this route gives; the optimal Gaussian rate needs more than JL moments. Asymptotic form: exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_gaussianMatrix.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_gaussianMatrix_of_jlMomentDim_le.{u_1,
u_2, u_3, u_4, u_5}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
{r : Type u_4} {p : Type u_5} [Fintype m] [Fintype n] [Fintype r] [Fintype p] [DecidableEq m]
{G : Ω → Matrix p m ℝ} (hG : HasLaw G (gaussianMatrix p m) μ) (A : Matrix m n ℝ)
(B : Matrix m r ℝ) {ε δ : ℝ} (hε : 0 < ε) (hε4 : ε ≤ 4) (hδ : 0 < δ)
(hp : gaussianInjectionDim A.rank (1 / 2) (δ / 2) ≤ ↑(Fintype.card p))
(hp' : jlMomentDim (√(ε / (4 * (↑A.rank + 1)))) (δ / 2) ≤ ↑(Fintype.card p)) :
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (G ω) B) ^ 2} ≤
δ
Theorem (measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_haarFrame).Haar sketch-and-solve, relative residual with high probability: for an m \times k Haar frame \mathbf{Q}, k nonempty, \lvert k\rvert \le \lvert m\rvert, r = \operatorname{rank}\mathbf{A}, 0 < \varepsilon \le 4 and \delta > 0, if <!-- value jlDim (2/5) (\delta/2/21^r) --> \lvert k\rvert \ge \log(2/(\delta/2/21^r))/((2/5)^2/4 - (2/5)^3/6) and <!-- value jlMomentDim {\sqrt{\varepsilon/(4(r + 1))}} (\delta/2) --> \lvert k\rvert \ge 128\max(2, \log(1/(\delta/2)))/\sqrt{\varepsilon/(4(r + 1))}^2\,, then \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\, \mathsf{sketchAndSolve}(\mathbf{A},\mathbf{Q}^{\mathsf{H}},\mathbf{B})\|_{\mathsf{F}}^2\bigr] \le\delta\,. The sizes are jlDim (2 / 5) (δ / 2 / 21 ^ A.rank) and jlMomentDim (√(ε / (4 * (A.rank + 1)))) (δ / 2); the sketch is unnormalized, the scaling cancels in NLAlib.sketchAndSolve. The route: the OSI at constant 1/2 and failure \delta/2 (NLAlib.isObliviousSubspaceInjection_of_hasLaw_haarFrame_of_jlDim_le), the JL moment NLAlib.hasJLMoment_of_hasLaw_haarFrame_of_jlMomentDim_le at \sqrt{\varepsilon/(4(r+1))} with failure \delta/2, and NLAlib.HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le. Its expectation twin is NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_of_hasLaw_haarFrame. [Woodruff2014, proof of Theorem 23]; the injection-plus-multiplication route there, here with a Haar sketch. Asymptotic form: NLAlib.exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_haarFrame.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_haarFrame.{u_1, u_2, u_3, u_4,
u_5}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {m : Type u_3}
{n : Type u_4} [Fintype k] [Fintype m] [Fintype n] [DecidableEq k] [DecidableEq m]
{Q : Ω → Matrix m k ℝ} [Nonempty k] (hQ : HasLaw Q (haarFrame m k) μ)
(hkm : Fintype.card k ≤ Fintype.card m) (A : Matrix m n ℝ) {r : Type u_5} [Fintype r]
(B : Matrix m r ℝ) {ε δ : ℝ} (hε : 0 < ε) (hε4 : ε ≤ 4) (hδ : 0 < δ)
(hk : jlDim (2 / 5) (δ / 2 / 21 ^ A.rank) ≤ ↑(Fintype.card k))
(hk' : jlMomentDim (√(ε / (4 * (↑A.rank + 1)))) (δ / 2) ≤ ↑(Fintype.card k)) :
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (Q ω)ᴴ B) ^ 2} ≤
δ
Theorem (measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_srht).SRHT sketch-and-solve, relative residual with high probability: for a real bounded orthonormal \mathbf{F} \in \mathbb{R}^{m \times m} with constant \beta, the SRHT \mathbf{S} built from it (independent random signs and an independent uniform choice of \lvert k\rvert distinct rows), k nonempty, \lvert k\rvert \le \lvert m\rvert, r = \operatorname{rank}\mathbf{A}, \varepsilon, \delta > 0, at least <!-- value samplingInjectionDim r L (1/2) (\delta/4) --> \lvert k\rvert \ge \frac{2L\log(r/(\delta/4))}{(1/2)^2} rows, where the flattened coherence <!-- value srhtRowBound {\lvert m \rvert} r (\delta/4) --> L = \beta\,\bigl(r + 2\sqrt{r \log(\lvert m \rvert/(\delta/4))} + 2 \log(\lvert m \rvert/(\delta/4))\bigr) is \beta times NLAlib.srhtRowBound (card m) A.rank (δ / 4) (the size is NLAlib.samplingInjectionDim A.rank L (1 / 2) (δ / 4), the OSI at constant 1/2 and failure \delta/2), and \lvert k\rvert \ge 8(3\beta^2 - 1)(r + 1)/(\varepsilon\delta), \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{S}, \mathbf{B})\|_{\mathsf{F}}^2\bigr]\le\delta\,. The JL moment NLAlib.hasJLMoment_of_hasLaw_srht at \sqrt{\varepsilon/(4(r+1))} with failure \delta/2 and NLAlib.HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le. [Woodruff2014, Theorem 23], there for sparse embeddings; the injection-plus-multiplication route. Asymptotic form: NLAlib.exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_srht.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_hasLaw_srht.{u_1, u_3, u_4, u_5, u_6}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_3} {m : Type u_4}
{n : Type u_5} [Fintype k] [Fintype m] [Fintype n] [DecidableEq m] {β : ℝ} [Nonempty k]
{S : Ω → Matrix k m ℝ} {F : Matrix m m ℝ} (hF : IsBoundedOrthonormal F β)
(hS : HasLaw S (srht k F) μ) (hkm : Fintype.card k ≤ Fintype.card m) (A : Matrix m n ℝ)
{r : Type u_6} [Fintype r] (B : Matrix m r ℝ) {ε δ : ℝ} (hε : 0 < ε) (hδ : 0 < δ)
(hk :
samplingInjectionDim A.rank (β * srhtRowBound (Fintype.card m) A.rank (δ / 4)) (1 / 2) (δ / 4) ≤
↑(Fintype.card k))
(hk' : 8 * (3 * β ^ 2 - 1) * (↑A.rank + 1) ≤ ε * δ * ↑(Fintype.card k)) :
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (S ω) B) ^ 2} ≤
δ
Theorem (measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_isSubgaussianVector).Sub-Gaussian sketch-and-solve, relative residual with high probability: for a random \mathbf{X} \in \mathbb{R}^{k \times m} with independent rows, each isotropic and sub-Gaussian with proxy c, k nonempty, r = \operatorname{rank}\mathbf{A}, 0 < \varepsilon \le 4 and \delta > 0, if <!-- value subgaussianEmbeddingDim c r (1/2) (\delta/2) --> k \ge 25 c^2 (r \log 21 + \log(2/(\delta/2)))/(16C (1/2)^2) and <!-- value subgaussianJLMomentDim c {\sqrt{\varepsilon/(4(r + 1))}} (\delta/2) --> k \ge 16c^2\max(2, \log(1/(\delta/2)))/(C\sqrt{\varepsilon/(4(r + 1))}^2)\,, with <!-- value subgaussianJLConstant -->C = 1/36 the constant subgaussianJLConstant, then \mathbb{P}\bigl[(1+\varepsilon)\|(\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B} \|_{\mathsf{F}}^2<\|\mathbf{B}-\mathbf{A}\,\mathsf{sketchAndSolve}(\mathbf{A},\mathbf{X}, \mathbf{B})\|_{\mathsf{F}}^2\bigr]\le\delta\,. The sizes are subgaussianEmbeddingDim c A.rank (1 / 2) (δ / 2) and subgaussianJLMomentDim c (√(ε / (4 * (A.rank + 1)))) (δ / 2); the sketch is unnormalized, the scaling cancels in NLAlib.sketchAndSolve. The route: the OSI at constant 1/2 and failure \delta/2, the JL moment NLAlib.hasJLMoment_of_isSubgaussianVector_of_subgaussianJLMomentDim_le at \sqrt{\varepsilon/(4(r+1))} \le 1 \le c with failure \delta/2, and NLAlib.HasJLMoment.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le. No 1/\delta form is stated: it would be dominated. [Woodruff2014, proof of Theorem 23]; the injection-plus-multiplication route there, here with sub-Gaussian rows. Sign sketches are the case c = 1. Asymptotic form: NLAlib.exists_forall_measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_isSubgaussianVector.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_frobNorm_sub_mul_sketchAndSolve_sq_gt_le_of_isSubgaussianVector.{u_1, u_2, u_3,
u_4, u_5}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {m : Type u_3}
{n : Type u_4} [Fintype k] [Fintype m] [Fintype n] [DecidableEq m] {X : Ω → Matrix k m ℝ}
{c : ℝ≥0} [Nonempty k] (hind : iIndepFun (fun i ω ↦ X ω i) μ)
(hsub : ∀ (i : k), IsSubgaussianVector (fun ω ↦ X ω i) c μ)
(hiso : ∀ (i : k), IsIsotropic (fun ω ↦ X ω i) μ) (A : Matrix m n ℝ) {r : Type u_5} [Fintype r]
(B : Matrix m r ℝ) {ε δ : ℝ} (hε : 0 < ε) (hε4 : ε ≤ 4) (hδ : 0 < δ)
(hk : subgaussianEmbeddingDim (↑c) A.rank (1 / 2) (δ / 2) ≤ ↑(Fintype.card k))
(hk' : subgaussianJLMomentDim (↑c) (√(ε / (4 * (↑A.rank + 1)))) (δ / 2) ≤ ↑(Fintype.card k)) :
μ.real
{ω |
(1 + ε) * frobNorm ((1 - rangeProjector A) * B) ^ 2 <
frobNorm (B - A * sketchAndSolve A (X ω) B) ^ 2} ≤
δ
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.