NLA-lib Explorer

Randomized SVD: tail bounds

Library · Result group

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix). The tail of the randomized SVD, Frobenius norm: for \mathbf{A} \in \mathbb{R}^{m \times n}, a test matrix \mathbf{X} \in \mathbb{R}^{n \times \ell} with independent standard Gaussian entries (HasLaw X (gaussianMatrix n l) μ), a target rank k with d = \ell - k + 1 (hd : k + d = Fintype.card l + 1), s \ge 0 and t > 0, <!-- value gaussianPinvFrobTail k d t --> \mathbb{P}\Bigl[\|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{X})\|_{\mathsf{F}}^2 > \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 + \frac{tk}{d}\bigl( \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}} + s\,\sigma_k(\mathbf{A})\bigr)^2\Bigr] \le e^{-s^2/2} + \frac{2\sqrt{k}\,(d/(2t))^{d/2}}{\Gamma(d/2 + 1)}\,, the second failure term being gaussianPinvFrobTail k d t. [TroppWebber2023, Theorem 8.1 (RSVD1)]; there at p = 2, with the noise term (utk/d)\|\mathbf{E}\|_{\mathsf{F}}^2 and the failure probability e^{-(u-2)/4} + \sqrt{\pi k}\,(t/e)^{-d/2}, which follow from this bound at s = \sqrt{u} - 1.

Headline General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k d : ℕ} (hd : k + d = Fintype.card l + 1) {s t : ℝ}
  (hs : 0 ≤ s) (ht : 0 < t) :
  μ.real
      {ω |
        frobNorm (A - truncatedSVD A k) ^ 2 +
            t * ↑k / ↑d * (frobNorm (A - truncatedSVD A k) + s * singularValues A k) ^ 2 <
          frobNorm (A - rsvd A (X ω)) ^ 2} ≤
    rexp (-s ^ 2 / 2) + gaussianPinvFrobTail k d t

Full source on GitHub

Copy link

Other forms

Theorem (HasJLMoment.measureReal_frobNorm_sub_rsvd_sq_gt_le). The randomized SVD to relative error through approximate multiplication: if the real sketch \mathbf{\Omega}^{\mathsf{H}} injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} 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{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le \Bigl(1 + \frac{k\varepsilon^2}{a^2}\Bigr) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + \delta'. Its neighbour without the moment property is NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_rsvd_sq_gt_le, with the constant factor 1 + t/a; this one reaches 1 + \varepsilon at \ell = O(k/(\varepsilon\delta')) for the dense families. [Woodruff2014, Lemma 45]; there constants 1 \pm 1/3 and the (\sqrt{\varepsilon/k}, 9/10, \ell) moment; here any injection constant, explicit.

Lean statement and details
NLAlib.HasJLMoment.measureReal_frobNorm_sub_rsvd_sq_gt_le.{u_1, u_3, u_4, u_5} {Ω : Type u_1}
  {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_3} {n : Type u_4} {l : Type u_5} [Fintype m]
  [Fintype n] [Fintype l] [IsFiniteMeasure μ] {X : Ω → Matrix n l ℝ} {A : Matrix m n ℝ} {k : ℕ}
  {a δ ε δ' p : ℝ} (hJL : HasJLMoment (fun ω ↦ (X ω)ᴴ) ε δ' p μ)
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ a δ μ) (hX : AEMeasurable X μ)
  (ha : 0 < a) (hε : 0 < ε) (hp : 2 ≤ p) (hδ' : 0 ≤ δ') :
  μ.real
      {ω |
        (1 + ↑k * ε ^ 2 / a ^ 2) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - rsvd A (X ω)) ^ 2} ≤
    δ + δ'

Full source on GitHub

Copy link

Theorem (HasJLMoment.measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_le). The rank-k randomized SVD to relative error through approximate multiplication: if the real sketch \mathbf{\Omega}^{\mathsf{H}} injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} 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{A} - \llbracket\mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\rrbracket_k\|_{\mathsf{F}}^2 \le \Bigl(1 + \frac{k\varepsilon^2}{a^2}\Bigr) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + \delta'. Its neighbour without the moment property, NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_le, has the constant factor 1 + t/a at failure probability \delta + 1/t; this one reaches 1 + \varepsilon when \delta' decays with the sketch size. [Woodruff2014, Lemmas 44 and 45]; there constants 1 \pm 1/3 and the (\sqrt{\varepsilon/k}, 9/10, \ell) moment; here any injection constant, explicit.

Lean statement and details
NLAlib.HasJLMoment.measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_le.{u_1, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_3} {n : Type u_4}
  {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [IsFiniteMeasure μ] {X : Ω → Matrix n l ℝ}
  {A : Matrix m n ℝ} {k : ℕ} {a δ ε δ' p : ℝ} (hJL : HasJLMoment (fun ω ↦ (X ω)ᴴ) ε δ' p μ)
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ a δ μ) (hX : AEMeasurable X μ)
  (ha : 0 < a) (hε : 0 < ε) (hp : 2 ≤ p) (hδ' : 0 ≤ δ') :
  μ.real
      {ω |
        (1 + ↑k * ε ^ 2 / a ^ 2) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - truncatedSVD (rsvd A (X ω)) k) ^ 2} ≤
    δ + δ'

Full source on GitHub

Copy link

Theorem (HasSubspaceInjection.measureReal_frobNorm_sub_rsvd_sq_gt_le). The randomized SVD with a subspace injection: if \mathbf{\Omega}^{\mathsf{H}} is isotropic and injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} with constant a > 0 except with probability \delta, then for t > 0 \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le \Bigl(1 + \frac{t}{a}\Bigr)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + 1/t. The OSI form is NLAlib.IsObliviousSubspaceInjection.measureReal_frobNorm_sub_rsvd_sq_gt_le. [CamanoEpperlyMeyerTropp2025, Theorem 2.2]; there an OSI and C/\alpha at probability 9/10; here one fixed subspace, the factor and the failure probability explicit in t.

Lean statement and details
NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_rsvd_sq_gt_le.{u_1, u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n]
  {X : Ω → Matrix n l 𝕜} [IsFiniteMeasure μ] {A : Matrix m n 𝕜} {k : ℕ} {a δ t : ℝ}
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ a δ μ)
  (hiso : IsIsotropicSketch (fun ω ↦ (X ω)ᴴ) μ) (ha : 0 < a) (ht : 0 < t) :
  μ.real {ω | (1 + t / a) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - rsvd A (X ω)) ^ 2} ≤
    δ + 1 / t

Full source on GitHub

Copy link

Theorem (HasSubspaceInjection.measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_add_le). The rank-k randomized SVD through an approximate-multiplication tail, any field: if \mathbf{\Omega}^{\mathsf{H}} injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} with constant a > 0 except with probability \delta, and the tail–head multiplication error \|(\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k)\mathbf{\Omega}\mathbf{\Omega}^{\mathsf{H}} \mathbf{P}_{\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}}}\|_{\mathsf{F}} exceeds \eta with probability at most \delta', then \|\mathbf{A} - \llbracket\mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\rrbracket_k\|_{\mathsf{F}}^2 \le \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 + \frac{\eta^2}{a^2} except with probability \delta + \delta'. The form a family with its own multiplication tail uses; the JL-moment form is NLAlib.HasJLMoment.measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_le. [Woodruff2014, proof of Lemma 45]; there constants 1 \pm 1/3, here any injection constant and any multiplication tail.

Lean statement and details
NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_add_le.{u_1, u_2, u_3,
    u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l 𝕜}
  [IsFiniteMeasure μ] {A : Matrix m n 𝕜} {k : ℕ} {a δ η δ' : ℝ}
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ a δ μ) (ha : 0 < a)
  (hχ :
    μ.real
        {ω |
          η <
            frobNorm ((A - truncatedSVD A k) * X ω * (X ω)ᴴ * rangeProjector (truncatedSVD A k)ᴴ)} ≤
      δ') :
  μ.real
      {ω |
        frobNorm (A - truncatedSVD A k) ^ 2 + η ^ 2 / a ^ 2 <
          frobNorm (A - truncatedSVD (rsvd A (X ω)) k) ^ 2} ≤
    δ + δ'

Full source on GitHub

Copy link

Theorem (HasSubspaceInjection.measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_le). The rank-k randomized SVD with a subspace injection: for \mathbf{A} \in \Bbbk^{m \times n}, a target rank k, a finite measure \mathbb{P} and a random test matrix \mathbf{\Omega} \in \Bbbk^{n \times \ell} whose sketch \mathbf{\Omega}^{\mathsf{H}} is isotropic (square-integrable entries and \mathbb{E}[\mathbf{\Omega}\mathbf{\Omega}^{\mathsf{H}}] = \mathbf{I}, IsIsotropicSketch) and injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} with constant a > 0 except with probability \delta (the event that a\|\mathbf{y}\|^2 \le \|\mathbf{\Omega}^{\mathsf{H}}\mathbf{y}\|^2 fails for some \mathbf{y} in that range has probability at most \delta, HasSubspaceInjection), and any t > 0, \mathbb{P}\Bigl[ \|\mathbf{A} - \llbracket\mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\rrbracket_k\|_{\mathsf{F}}^2 > \Bigl(1 + \frac{t}{a}\Bigr)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2\Bigr] \le \delta + \frac{1}{t}\,, the same constant as the untruncated output (NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_rsvd_sq_gt_le). [CamanoEpperlyMeyerTropp2025, remark after Theorem 1.3]; there by HMT Theorem 9.3, which is spectral only; here in the Frobenius norm through the rank-k competitor of [Woodruff2014, Lemma 48].

Lean statement and details
NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_le.{u_1, u_2, u_3, u_4,
    u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n]
  {X : Ω → Matrix n l 𝕜} [IsFiniteMeasure μ] {A : Matrix m n 𝕜} {k : ℕ} {a δ t : ℝ}
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ a δ μ)
  (hiso : IsIsotropicSketch (fun ω ↦ (X ω)ᴴ) μ) (ha : 0 < a) (ht : 0 < t) :
  μ.real
      {ω |
        (1 + t / a) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - truncatedSVD (rsvd A (X ω)) k) ^ 2} ≤
    δ + 1 / t

Full source on GitHub

Copy link

Theorem (HasSubspaceInjection.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le). The tail of the randomized SVD under a subspace injection, Gram form: if \mathbf{\Omega}^{\mathsf{H}} is isotropic and injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} with constant a > 0 except with probability \delta, then for every unitarily invariant norm and t > 0 \bigl\|(\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega}))^{\mathsf{H}} (\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega}))\bigr\|_{\Phi} \le \bigl\|(\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k)^{\mathsf{H}} (\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k)\bigr\|_{\Phi} + \Phi(\mathbf{e}_0)\,\frac{t}{a}\, \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + 1/t, with \mathbf{e}_0 the first unit coordinate sequence. An OSI for dimension k supplies both hypotheses. [CamanoEpperlyMeyerTropp2025, Theorem 2.2]; there an OSI, the Frobenius norm and C/\alpha with probability 9/10; here one fixed subspace, every quadratic unitarily invariant norm, the factor and the failure probability explicit in t; the shape of [TroppWebber2023, Theorem 8.1 (RSVD1)].

Lean statement and details
NLAlib.HasSubspaceInjection.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le.{u_1, u_2,
    u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n]
  {X : Ω → Matrix n l 𝕜} [IsFiniteMeasure μ] {A : Matrix m n 𝕜} {k : ℕ} {a δ t : ℝ}
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ a δ μ)
  (hiso : IsIsotropicSketch (fun ω ↦ (X ω)ᴴ) μ) (ha : 0 < a) (ht : 0 < t) (Φ : SymmetricGauge) :
  μ.real
      {ω |
        Φ.matrixNorm ((A - truncatedSVD A k)ᴴ * (A - truncatedSVD A k)) +
            Φ (Finsupp.single 0 1) * (t / a) * frobNorm (A - truncatedSVD A k) ^ 2 <
          Φ.matrixNorm ((A - rsvd A (X ω))ᴴ * (A - rsvd A (X ω)))} ≤
    δ + 1 / t

Full source on GitHub

Copy link

Theorem (HasSubspaceInjection.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_specNorm_le). The randomized SVD with a bounded sketch: if \mathbf{\Omega}^{\mathsf{H}} injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} with constant a > 0 except with probability \delta and \|\mathbf{\Omega}\|_2 \le L almost surely, then for every unitarily invariant norm \bigl\|(\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega}))^{\mathsf{H}} (\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega}))\bigr\|_{\Phi} \le \Bigl(1 + \frac{L^2}{a}\Bigr)\bigl\|(\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k)^{\mathsf{H}} (\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k)\bigr\|_{\Phi} except with probability \delta; at the spectral gauge the right side is (1 + L^2/a)\,\sigma_k(\mathbf{A})^2. No isotropy and no Markov step. Its neighbour NLAlib.HasSubspaceInjection.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le needs isotropy and no bound on the sketch, and pays \delta + 1/t. [HalkoMartinssonTropp2011, Theorem 11.2]; there the SRFT, L^2 = n/\ell, factor 1 + 7n/\ell in the spectral and Frobenius norms and failure probability O(k^{-1}); here any sketch, every quadratic unitarily invariant norm; at the SRHT a sharper factor (1 + 2n/\ell), an explicit failure probability and an incomparable size condition.

Lean statement and details
NLAlib.HasSubspaceInjection.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_specNorm_le.{u_1,
    u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l 𝕜}
  [IsFiniteMeasure μ] {A : Matrix m n 𝕜} {k : ℕ} {a δ L : ℝ}
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ a δ μ) (ha : 0 < a)
  (hL : ∀ᵐ (ω : Ω) ∂μ, specNorm (X ω) ≤ L) (Φ : SymmetricGauge) :
  μ.real
      {ω |
        (1 + L ^ 2 / a) * Φ.matrixNorm ((A - truncatedSVD A k)ᴴ * (A - truncatedSVD A k)) <
          Φ.matrixNorm ((A - rsvd A (X ω))ᴴ * (A - rsvd A (X ω)))} ≤
    δ

Full source on GitHub

Copy link

Theorem (HasSubspaceInjection.measureReal_specNorm_sub_rsvd_sq_gt_le). The randomized SVD with a subspace injection, spectral norm: for \mathbf{A} \in \Bbbk^{m \times n}, a target rank k, a finite measure \mathbb{P} and a random test matrix \mathbf{\Omega} \in \Bbbk^{n \times \ell} whose sketch \mathbf{\Omega}^{\mathsf{H}} is isotropic (square-integrable entries and \mathbb{E}[\mathbf{\Omega}\mathbf{\Omega}^{\mathsf{H}}] = \mathbf{I}, IsIsotropicSketch) and injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} with constant a > 0 except with probability \delta (the event that a\|\mathbf{y}\|^2 \le \|\mathbf{\Omega}^{\mathsf{H}}\mathbf{y}\|^2 fails for some \mathbf{y} in that range has probability at most \delta, HasSubspaceInjection), and any t > 0, \mathbb{P}\Bigl[\|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_2^2 > \sigma_k(\mathbf{A})^2 + \frac{t}{a}\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 \Bigr] \le \delta + \frac{1}{t}\,, singular values indexed from 0. The spectral-norm companion of NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_rsvd_sq_gt_le. Its neighbour without isotropy and without the Frobenius term is the bounded-sketch form HasSubspaceInjection.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_specNorm_le at the spectral gauge. [CamanoEpperlyMeyerTropp2025, Theorem 2.2], here in the spectral norm; the shape of [TroppWebber2023, Theorem 8.1 (RSVD1)].

Lean statement and details
NLAlib.HasSubspaceInjection.measureReal_specNorm_sub_rsvd_sq_gt_le.{u_1, u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n]
  {X : Ω → Matrix n l 𝕜} [IsFiniteMeasure μ] {A : Matrix m n 𝕜} {k : ℕ} {a δ t : ℝ}
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ a δ μ)
  (hiso : IsIsotropicSketch (fun ω ↦ (X ω)ᴴ) μ) (ha : 0 < a) (ht : 0 < t) :
  μ.real
      {ω |
        singularValues A k ^ 2 + t / a * frobNorm (A - truncatedSVD A k) ^ 2 <
          specNorm (A - rsvd A (X ω)) ^ 2} ≤
    δ + 1 / t

Full source on GitHub

Copy link

Theorem (IsObliviousSubspaceInjection.measureReal_frobNorm_sub_rsvd_sq_gt_le). The randomized SVD with an oblivious subspace injection: if \mathbf{\Omega}^{\mathsf{H}} is an OSI for dimension k with constant a > 0 and failure probability \delta, then for t > 0 \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le \Bigl(1 + \frac{t}{a}\Bigr)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + 1/t. The fixed-subspace form, which also covers row sampling, is NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_rsvd_sq_gt_le. [CamanoEpperlyMeyerTropp2025, Theorem 2.2]; there C/\alpha at probability 9/10.

Lean statement and details
NLAlib.IsObliviousSubspaceInjection.measureReal_frobNorm_sub_rsvd_sq_gt_le.{u_1, u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n]
  {X : Ω → Matrix n l 𝕜} [IsFiniteMeasure μ] {A : Matrix m n 𝕜} {k : ℕ} {a δ t : ℝ}
  (h : IsObliviousSubspaceInjection (fun ω ↦ (X ω)ᴴ) k a δ μ) (ha : 0 < a) (ht : 0 < t) :
  μ.real {ω | (1 + t / a) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - rsvd A (X ω)) ^ 2} ≤
    δ + 1 / t

Full source on GitHub

Copy link

Theorem (SymmetricGauge.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_hasLaw_gaussianMatrix). The tail of the randomized SVD, Gram form: for a standard Gaussian n \times \ell test matrix \mathbf{X}, d = \ell - k + 1, every unitarily invariant norm, s \ge 0 and t > 0, \bigl\|(\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{X}))^{\mathsf{H}} (\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{X}))\bigr\|_{\Phi} \le \|\mathbf{E}^{\mathsf{H}}\mathbf{E}\|_{\Phi} + \Phi(\mathbf{e}_0)\,\frac{tk}{d}\, \bigl(\|\mathbf{E}\|_{\mathsf{F}} + s\,\sigma_k(\mathbf{A})\bigr)^2\,,\qquad \mathbf{E} = \mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\,, outside probability <!-- value gaussianPinvFrobTail k d t --> e^{-s^2/2} + 2\sqrt{k}\,(d/(2t))^{d/2}/\Gamma(d/2 + 1) (the second term is gaussianPinvFrobTail k d t), with \mathbf{e}_0 the first unit coordinate sequence. [TroppWebber2023, Theorem 8.1 (RSVD1)]; there for squared Schatten norms, p \ge 2, with the noise term (utk/d)\|\mathbf{E}\|_{\mathsf{F}}^2 and the failure probability e^{-(u-2)/4} + \sqrt{\pi k}\,(t/e)^{-d/2}, which follow from this bound at s = \sqrt{u} - 1 (since \sigma_k(\mathbf{A}) \le \|\mathbf{E}\|_{\mathsf{F}} and e^{-(\sqrt{u}-1)^2/2} \le e^{-(u-2)/4}). Here every quadratic unitarily invariant norm, the deviation measured with the Lipschitz constant \|\mathbf{S}\|_2\|\mathbf{G}_1^{+}\|_2 in place of their \|\mathbf{S}\|_{\mathsf{F}}\|\mathbf{G}_1^{+}\|_{\mathsf{F}}, and a smaller second failure term. For d = 0 the bound is at least 1.

General form: sizes are index types

Lean statement and details
NLAlib.SymmetricGauge.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_hasLaw_gaussianMatrix.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (Φ : SymmetricGauge)
  (A : Matrix m n ℝ) (hX : HasLaw X (gaussianMatrix n l) μ) {k d : ℕ}
  (hd : k + d = Fintype.card l + 1) {s t : ℝ} (hs : 0 ≤ s) (ht : 0 < t) :
  μ.real
      {ω |
        Φ.matrixNorm ((A - truncatedSVD A k)ᴴ * (A - truncatedSVD A k)) +
            Φ (Finsupp.single 0 1) * (t * ↑k / ↑d) *
              (frobNorm (A - truncatedSVD A k) + s * singularValues A k) ^ 2 <
          Φ.matrixNorm ((A - rsvd A (X ω))ᴴ * (A - rsvd A (X ω)))} ≤
    rexp (-s ^ 2 / 2) + gaussianPinvFrobTail k d t

Full source on GitHub

Copy link

Theorem (SymmetricGauge.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_hasLaw_haarFrame). The tail of the randomized SVD with a Haar test matrix, Gram form: for an n \times \ell Haar frame \mathbf{\Omega}, d = \ell - k + 1, every unitarily invariant norm, s \ge 0 and t > 0, \bigl\|(\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega}))^{\mathsf{H}} (\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega}))\bigr\|_{\Phi} \le \|\mathbf{E}^{\mathsf{H}}\mathbf{E}\|_{\Phi} + \Phi(\mathbf{e}_0)\,\frac{tk}{d}\, \bigl(\|\mathbf{E}\|_{\mathsf{F}} + s\,\sigma_k(\mathbf{A})\bigr)^2\,,\qquad \mathbf{E} = \mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\,, outside probability <!-- value gaussianPinvFrobTail k d t --> e^{-s^2/2} + 2\sqrt{k}\,(d/(2t))^{d/2}/\Gamma(d/2 + 1) (the second term is gaussianPinvFrobTail k d t), with \mathbf{e}_0 the first unit coordinate sequence: the bound of the Gaussian statement measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_hasLaw_gaussianMatrix (in this namespace) verbatim, since the range of \mathbf{A}\mathbf{\Omega} has the same law for both (NLAlib.hasLaw_rangeProjector_mul_of_hasLaw_haarFrame). [TroppWebber2023, Theorem 8.1 (RSVD1)]; there for Gaussian test matrices and squared Schatten norms, with the noise term (utk/d)\|\mathbf{E}\|_{\mathsf{F}}^2 and the failure probability e^{-(u-2)/4} + \sqrt{\pi k}\,(t/e)^{-d/2}, which follow from this bound at s = \sqrt{u} - 1.

General form: sizes are index types

Lean statement and details
NLAlib.SymmetricGauge.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_hasLaw_haarFrame.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} [DecidableEq l]
  (Φ : SymmetricGauge) (A : Matrix m n ℝ) (hX : HasLaw X (haarFrame n l) μ) {k d : ℕ}
  (hd : k + d = Fintype.card l + 1) {s t : ℝ} (hs : 0 ≤ s) (ht : 0 < t) :
  μ.real
      {ω |
        Φ.matrixNorm ((A - truncatedSVD A k)ᴴ * (A - truncatedSVD A k)) +
            Φ (Finsupp.single 0 1) * (t * ↑k / ↑d) *
              (frobNorm (A - truncatedSVD A k) + s * singularValues A k) ^ 2 <
          Φ.matrixNorm ((A - rsvd A (X ω))ᴴ * (A - rsvd A (X ω)))} ≤
    rexp (-s ^ 2 / 2) + gaussianPinvFrobTail k d t

Full source on GitHub

Copy link

Theorem (SymmetricGauge.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_hasLaw_srht). The randomized SVD with an SRHT test matrix, bounded-sketch form (HMT's SRFT theorem): if the sketch \mathbf{\Omega}^{\mathsf{H}} is the SRHT without replacement of a bounded orthonormal \mathbf{F} with bound \beta, \ell \ge 1, \ell \le n, \delta > 0 and \ell is at least <!-- value samplingInjectionDim k L (1/2) (\delta/2) --> \frac{2 L \log(k/(\delta/2))}{(1/2)^2}\,, where the flattened coherence <!-- value srhtRowBound {\lvert n \rvert} k (\delta/2) --> L = \beta\,\bigl(k + 2\sqrt{k \log(\lvert n \rvert/(\delta/2))} + 2 \log(\lvert n \rvert/(\delta/2))\bigr) is \beta times srhtRowBound (Fintype.card n) k (δ / 2) and the size is samplingInjectionDim k L (1 / 2) (δ / 2), then for every unitarily invariant norm \bigl\|(\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega}))^{\mathsf{H}} (\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega}))\bigr\|_{\Phi} \le \Bigl(1 + \frac{2n}{\ell}\Bigr)\bigl\|(\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k)^{\mathsf{H}} (\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k)\bigr\|_{\Phi} except with probability \delta: in spectral norm \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_2^2 \le (1 + 2n/\ell)\,\sigma_k(\mathbf{A})^2, in Frobenius norm the same factor against \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2. The injection-route neighbour, factor 1 + 2t at failure probability \delta + 1/t, is NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht; this one is better when n/\ell < t, and needs no Markov step. In O(\cdot) form the size is the family's injection size (NLAlib.exists_forall_isObliviousSubspaceInjection_of_hasLaw_srht). [HalkoMartinssonTropp2011, Theorem 11.2]; there the spectral and Frobenius norms, factor 1 + 7n/\ell, failure probability O(k^{-1}) and \ell of order (k + \log n)\log k; here a sharper factor (1 + 2n/\ell against 1 + 7n/\ell), an explicit failure probability and an incomparable size condition.

General form: sizes are index types

Lean statement and details
NLAlib.SymmetricGauge.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_hasLaw_srht.{u_1,
    u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n]
  {X : Ω → Matrix n l 𝕜} [Nonempty l] (Φ : SymmetricGauge) {F : Matrix n n 𝕜} {β : ℝ}
  (hF : IsBoundedOrthonormal F β) (A : Matrix m n 𝕜) (hX : HasLaw (fun ω ↦ (X ω)ᴴ) (srht l F) μ)
  (hln : Fintype.card l ≤ Fintype.card n) {k : ℕ} {δ : ℝ} (hδ : 0 < δ)
  (hl :
    samplingInjectionDim k (β * srhtRowBound (Fintype.card n) k (δ / 2)) (1 / 2) (δ / 2) ≤
      ↑(Fintype.card l)) :
  μ.real
      {ω |
        (1 + 2 * ↑(Fintype.card n) / ↑(Fintype.card l)) *
            Φ.matrixNorm ((A - truncatedSVD A k)ᴴ * (A - truncatedSVD A k)) <
          Φ.matrixNorm ((A - rsvd A (X ω))ᴴ * (A - rsvd A (X ω)))} ≤
    δ

Full source on GitHub

Copy link

Theorem (SymmetricGauge.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_isLeftUnitarilyInvariant). The tail of the randomized SVD, Gram form, rotation-invariant test matrices: for a test matrix \mathbf{X} with a left unitarily invariant law and full column rank almost surely, d = \ell - k + 1, every unitarily invariant norm, s \ge 0 and t > 0, \bigl\|(\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{X}))^{\mathsf{H}} (\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{X}))\bigr\|_{\Phi} \le \|\mathbf{E}^{\mathsf{H}}\mathbf{E}\|_{\Phi} + \Phi(\mathbf{e}_0)\,\frac{tk}{d}\, \bigl(\|\mathbf{E}\|_{\mathsf{F}} + s\,\sigma_k(\mathbf{A})\bigr)^2\,,\qquad \mathbf{E} = \mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\,, outside probability <!-- value gaussianPinvFrobTail k d t --> e^{-s^2/2} + 2\sqrt{k}\,(d/(2t))^{d/2}/\Gamma(d/2 + 1), the tail of the Gaussian test matrix (in this namespace, measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_hasLaw_gaussianMatrix). [TroppWebber2023, Theorem 8.1 (RSVD1)]; there for Gaussian test matrices and Schatten norms p \ge 2, with the noise term (utk/d)\|\mathbf{E}\|_{\mathsf{F}}^2 and the failure probability e^{-(u-2)/4} + \sqrt{\pi k}\,(t/e)^{-d/2}, which follow from this bound at s = \sqrt{u} - 1; the library's second failure term is smaller.

General form: sizes are index types

Lean statement and details
NLAlib.SymmetricGauge.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_isLeftUnitarilyInvariant.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} [DecidableEq n]
  {ν : Measure (Matrix n l ℝ)} [IsProbabilityMeasure ν] [IsLeftUnitarilyInvariant ν]
  (Φ : SymmetricGauge) (A : Matrix m n ℝ) (hX : HasLaw X ν μ)
  (hXr : ∀ᵐ (ω : Ω) ∂μ, Function.Injective (X ω).mulVec) {k d : ℕ} (hd : k + d = Fintype.card l + 1)
  {s t : ℝ} (hs : 0 ≤ s) (ht : 0 < t) :
  μ.real
      {ω |
        Φ.matrixNorm ((A - truncatedSVD A k)ᴴ * (A - truncatedSVD A k)) +
            Φ (Finsupp.single 0 1) * (t * ↑k / ↑d) *
              (frobNorm (A - truncatedSVD A k) + s * singularValues A k) ^ 2 <
          Φ.matrixNorm ((A - rsvd A (X ω))ᴴ * (A - rsvd A (X ω)))} ≤
    rexp (-s ^ 2 / 2) + gaussianPinvFrobTail k d t

Full source on GitHub

Copy link

Theorem (exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_mul_of_isSubgaussianVector). O(c^2(k + \log(1/\delta))) sub-Gaussian columns suffice for the randomized SVD to a constant factor: there is an absolute constant C > 0 such that if the sketch \mathbf{\Omega}^{\mathsf{H}} of an n \times \ell test matrix \mathbf{\Omega} has independent, isotropic, sub-Gaussian rows with proxy c, 0 < \delta \le 1/2 and \ell \ge Cc^2(k + \log(1/\delta)), then <!-- value subgaussianRangeFinderFactor c --> \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + 5c/2) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the factor is subgaussianRangeFinderFactor c, and the proxy stays in the threshold. The asymptotic form of NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_mul_of_isSubgaussianVector, proved from it with C = 2064. [MeyerMuscoMuscoWoodruff2021, §3, proof of Theorem 1]; there for a random sign sketch with O(k + \log(1/\delta)) columns and the factor 2, citing Musco and Musco (2020).

General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_mul_of_isSubgaussianVector :
  ∃ C,
    0 < C ∧
      ∀ {Ω m n l : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype m] [inst_2 : Fintype n]
        [inst_3 : Fintype l] [inst_4 : DecidableEq n] [Nonempty l] (μ : Measure Ω)
        (A : Matrix m n ℝ) (X : Ω → Matrix n l ℝ) (c : ℝ≥0) (k : ℕ) (δ : ℝ),
        iIndepFun (fun i ω ↦ (X ω)ᴴ i) μ →
          (∀ (i : l), IsSubgaussianVector (fun ω ↦ (X ω)ᴴ i) c μ) →
            (∀ (i : l), IsIsotropic (fun ω ↦ (X ω)ᴴ i) μ) →
              0 < δ →
                δ ≤ 1 / 2 →
                  C * (↑c ^ 2 * (↑k + Real.log (1 / δ))) ≤ ↑(Fintype.card l) →
                    μ.real
                        {ω |
                          subgaussianRangeFinderFactor ↑c * frobNorm (A - truncatedSVD A k) ^ 2 <
                            frobNorm (A - rsvd A (X ω)) ^ 2} ≤
                      δ

Full source on GitHub

Copy link

Theorem (exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_countSketch). O((k^2 + k/\varepsilon)/\delta) CountSketch columns suffice for the randomized SVD: there are absolute constants C, \varepsilon_0 > 0 such that if the sketch \mathbf{\Omega}^{\mathsf{H}} of an n \times \ell test matrix \mathbf{\Omega} is a CountSketch, 0 < \varepsilon \le \varepsilon_0, \delta > 0 and \ell \ge C(k^2 + k + k/\varepsilon)/\delta, then \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + \varepsilon) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta, over any RCLike field. The asymptotic form of NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_countSketch, proved from it with C = 16 and \varepsilon_0 = 1. [Woodruff2014, Remark 46]; there O(k^2 + k/\varepsilon) rows of a sparse embedding matrix at constant failure probability, real.

General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_countSketch :
  ∃ C ε₀,
    0 < C ∧
      0 < ε₀ ∧
        ∀ {Ω 𝕜 m n l : Type} [inst : MeasurableSpace Ω] [inst_1 : RCLike 𝕜] [inst_2 : Fintype m]
          [inst_3 : Fintype n] [inst_4 : Fintype l] [inst_5 : DecidableEq l] (μ : Measure Ω)
          (A : Matrix m n 𝕜) (X : Ω → Matrix n l 𝕜) (k : ℕ) (ε δ : ℝ),
          HasLaw (fun ω ↦ (X ω)ᴴ) (countSketch l n) μ →
            0 < ε →
              ε ≤ ε₀ →
                0 < δ →
                  C * ((↑k ^ 2 + ↑k + ↑k / ε) / δ) ≤ ↑(Fintype.card l) →
                    μ.real
                        {ω |
                          (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
                            frobNorm (A - rsvd A (X ω)) ^ 2} ≤
                      δ

Full source on GitHub

Copy link

Theorem (exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht). O(\beta(k + \log(n/\delta))\log(k/\delta) + \beta^2 k/(\varepsilon\delta)) SRHT columns suffice for the randomized SVD: there are absolute constants C, \varepsilon_0 > 0 such that for a real bounded orthonormal \mathbf{F} with constant \beta and a test matrix \mathbf{\Omega} whose sketch \mathbf{\Omega}^{\mathsf{H}} is its SRHT without replacement, \ell nonempty, \ell \le n, 0 < \varepsilon \le \varepsilon_0, 0 < \delta \le 1/2 and \ell at least C times that threshold, \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + \varepsilon) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the constants come before every dimension and before \beta. Proved from NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht_of_le_card with \varepsilon_0 = 1. [Woodruff2014, Lemma 45 and Remark 46].

General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht :
  ∃ C ε₀,
    0 < C ∧
      0 < ε₀ ∧
        ∀ {Ω m n l : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype m] [inst_2 : Fintype n]
          [inst_3 : Fintype l] [inst_4 : DecidableEq n] [Nonempty l] (μ : Measure Ω)
          (A : Matrix m n ℝ) (X : Ω → Matrix n l ℝ) (F : Matrix n n ℝ) (β : ℝ) (k : ℕ) (ε δ : ℝ),
          IsBoundedOrthonormal F β →
            HasLaw (fun ω ↦ (X ω)ᴴ) (srht l F) μ →
              Fintype.card l ≤ Fintype.card n →
                0 < ε →
                  ε ≤ ε₀ →
                    0 < δ →
                      δ ≤ 1 / 2 →
                        C *
                              (β * (↑k + Real.log (↑(Fintype.card n) / δ)) * Real.log (↑k / δ) +
                                β ^ 2 * ↑k / (ε * δ)) ≤
                            ↑(Fintype.card l) →
                          μ.real
                              {ω |
                                (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
                                  frobNorm (A - rsvd A (X ω)) ^ 2} ≤
                            δ

Full source on GitHub

Copy link

Theorem (exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector). O(c^2k\log(1/\delta)/\varepsilon) sub-Gaussian columns suffice for the randomized SVD: there are absolute constants C, \varepsilon_0 > 0 such that if the sketch \mathbf{\Omega}^{\mathsf{H}} of an n \times \ell test matrix \mathbf{\Omega} has independent, isotropic, sub-Gaussian rows with proxy c, 0 < \varepsilon \le \varepsilon_0, 0 < \delta \le 1/2 and \ell \ge Cc^2k\log(1/\delta)/\varepsilon, then \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + \varepsilon) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta (k = 0 is trivial); the proxy stays in the threshold. The asymptotic form of measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector_of_subgaussianJLMomentDim_le, proved from it with \varepsilon_0 = 1; the injection size O(c^2(k + \log(1/\delta))) is dominated there for k \ge 1. [Woodruff2014, Lemma 45 and Remark 46]; there O(k/\varepsilon) i.i.d. normal rows at constant failure probability; here any isotropic sub-Gaussian rows.

General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector :
  ∃ C ε₀,
    0 < C ∧
      0 < ε₀ ∧
        ∀ {Ω m n l : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype m] [inst_2 : Fintype n]
          [inst_3 : Fintype l] [inst_4 : DecidableEq n] [Nonempty l] (μ : Measure Ω)
          (A : Matrix m n ℝ) (X : Ω → Matrix n l ℝ) (c : ℝ≥0) (k : ℕ) (ε δ : ℝ),
          iIndepFun (fun i ω ↦ (X ω)ᴴ i) μ →
            (∀ (i : l), IsSubgaussianVector (fun ω ↦ (X ω)ᴴ i) c μ) →
              (∀ (i : l), IsIsotropic (fun ω ↦ (X ω)ᴴ i) μ) →
                0 < ε →
                  ε ≤ ε₀ →
                    0 < δ →
                      δ ≤ 1 / 2 →
                        C * (↑c ^ 2 * ↑k * Real.log (1 / δ) / ε) ≤ ↑(Fintype.card l) →
                          μ.real
                              {ω |
                                (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
                                  frobNorm (A - rsvd A (X ω)) ^ 2} ≤
                            δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_gaussianPinvSpecNormBound_le_of_hasLaw_gaussianMatrix). Deviation bound for the Frobenius error of the randomized SVD: for a standard Gaussian n \times \ell test matrix, k < \ell, d = \ell - k + 1, u \ge 0 and t > 0, <!-- value gaussianPinvSpecNormBound k \ell --> \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{X})\|_{\mathsf{F}}^2 \le \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 + \Bigl(t\sqrt{k/d}\, \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}} + ut\,\frac{e}{\ell - k}\sqrt{(\ell + k - 1)/2}\,\sigma_k(\mathbf{A})\Bigr)^2 outside probability <!-- value gaussianPinvFrobTail k d t^2 --> t^{-(\ell - k)} + 2\sqrt{k}\,(d/(2t^2))^{d/2}/\Gamma(d/2 + 1) + e^{-u^2/2}; the constant is gaussianPinvSpecNormBound k ℓ, the second failure term gaussianPinvFrobTail k d (t ^ 2). The structural bound is Pythagorean (\|\mathbf{E}\|_{\mathsf{F}}^2 + \|\mathbf{M}\|_{\mathsf{F}}^2 for the noise term \mathbf{M}), so the noise enters squared: in relative-error use the factor is 1 + O(\mathbf{x}^2) where the triangle form gives 1 + O(\mathbf{x}). [HalkoMartinssonTropp2011, Theorem 10.7] prints the triangle form (1 + t\sqrt{12k/p})\|\mathbf{E}\|_{\mathsf{F}} + ut\,e\sqrt{k+p}/(p+1)\,\sigma_k(\mathbf{A}) with failure 5t^{-p} + 2e^{-u^2/2} for p = \ell - k \ge 4 and u, t \ge 1, from their Proposition 10.4, whose tails are not reached here; this bound implies the triangle form with the library's constants, (1 + t\sqrt{k/d})\|\mathbf{E}\|_{\mathsf{F}} + ut\,e\sqrt{(\ell + k - 1)/2}/(\ell - k)\,\sigma_k(\mathbf{A}), by \sqrt{a^2 + \mathbf{b}^2} \le a + \mathbf{b}. The Frobenius part of this failure term is below HMT's in every practical regime, the spectral part loses one power of t. Given hd, hkl is d \ge 2. Incomparable with NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix (Tropp and Webber's form): this one is better for a large oversampling \ell - k, where its coefficient of \sigma_k(\mathbf{A}) is below that one's \sqrt{k/d} (at t^2); that one has no spectral failure term t^{-(\ell - k)}.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_gaussianPinvSpecNormBound_le_of_hasLaw_gaussianMatrix.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k d : ℕ} (hd : k + d = Fintype.card l + 1)
  (hkl : k < Fintype.card l) {u t : ℝ} (hu : 0 ≤ u) (ht : 0 < t) :
  μ.real
      {ω |
        frobNorm (A - truncatedSVD A k) ^ 2 +
            (t * √(↑k / ↑d) * frobNorm (A - truncatedSVD A k) +
                u * t * gaussianPinvSpecNormBound k (Fintype.card l) * singularValues A k) ^
              2 <
          frobNorm (A - rsvd A (X ω)) ^ 2} ≤
    t ^ (-(↑(Fintype.card l) - ↑k)) + gaussianPinvFrobTail k d (t ^ 2) + rexp (-u ^ 2 / 2)

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_le_mul_of_isSubgaussianVector). The randomized SVD with a sub-Gaussian test matrix, constant factor: if the sketch \mathbf{\Omega}^{\mathsf{H}} has independent, isotropic, sub-Gaussian rows with proxy c, \delta > 0 and <!-- value subgaussianEmbeddingDim c k (1/2) (\delta/2) --> \ell \ge 25 c^2 (k \log 21 + \log(2/(\delta/2)))/(16C (1/2)^2), with <!-- value subgaussianJLConstant -->C = 1/36, then <!-- value subgaussianRangeFinderFactor c --> \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + 5c/2) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the size is subgaussianEmbeddingDim c k (1 / 2) (δ / 2), C is subgaussianJLConstant and the factor is subgaussianRangeFinderFactor c. That is \ell = O(c^2(k + \log(1/\delta))) columns for a constant factor, against the 1/\delta in the size of the relative-error form NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector. The route, with \mathbf{E} = \mathbf{A} - \llbracket\mathbf{A}\rrbracket_k: the OSI at constant 1/2 and failure \delta/2 for the normalised sketch \ell^{-1/2}\mathbf{\Omega}^{\mathsf{H}}; the structural bound NLAlib.IsSubspaceInjection.frobNorm_sub_rsvd_sq_le, giving \|\mathbf{E}\|_{\mathsf{F}}^2 + 2\|\mathbf{E}\mathbf{\Omega}\|_{\mathsf{F}}^2/\ell; and the Hsu–Kakade–Zhang tail NLAlib.IsSubgaussianVector.measureReal_norm_mulVec_sq_ge_le for \|\mathbf{E}\mathbf{\Omega}\|_{\mathsf{F}}^2 = \|(\mathbf{I}_\ell \otimes \mathbf{E}) \operatorname{vec}\mathbf{\Omega}\|^2 at t = \log(2/\delta) (the vectorization has proxy c by NLAlib.IsSubgaussianVector.uncurry_of_iIndepFun), which gives \|\mathbf{E}\mathbf{\Omega}\|_{\mathsf{F}}^2 < (5/4)c\ell\|\mathbf{E}\|_{\mathsf{F}}^2 except with probability \delta/2. The condition 225\log(2/\delta) \le \ell that step needs follows from the size hypothesis, since isotropy forces c \ge 1 (NLAlib.IsSubgaussianVector.one_le_of_isIsotropic). Asymptotic form: NLAlib.exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_mul_of_isSubgaussianVector. [MeyerMuscoMuscoWoodruff2021, §3, proof of Theorem 1]; there as the range-finder step of Hutch++, with the factor 2 at an unspecified sample size, citing Musco and Musco (2020, Corollary 7 and Claim 1); here by a different route, with the factor and the size explicit (the route's floor is 1 + 2c).

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_mul_of_isSubgaussianVector.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  [Nonempty l] (A : Matrix m n ℝ) {c : ℝ≥0} (hind : iIndepFun (fun i ω ↦ (X ω)ᴴ i) μ)
  (hsub : ∀ (i : l), IsSubgaussianVector (fun ω ↦ (X ω)ᴴ i) c μ)
  (hiso : ∀ (i : l), IsIsotropic (fun ω ↦ (X ω)ᴴ i) μ) {k : ℕ} {δ : ℝ} (hδ : 0 < δ)
  (hl : subgaussianEmbeddingDim (↑c) k (1 / 2) (δ / 2) ≤ ↑(Fintype.card l)) :
  μ.real
      {ω |
        subgaussianRangeFinderFactor ↑c * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - rsvd A (X ω)) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_countSketch). The randomized SVD with a CountSketch test matrix, relative error: if the sketch \mathbf{\Omega}^{\mathsf{H}} is a CountSketch, \varepsilon, \delta > 0, \ell is at least <!-- value countSketchEmbeddingDim k (1/2) (\delta/2) --> (k^2 + k)/((\delta/2)(1/2)^2) (countSketchEmbeddingDim k (1 / 2) (δ / 2)) and \ell \ge 16k/(\varepsilon\delta), then \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + \varepsilon) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta, over any RCLike field. The route: the OSI at constant 1/2 and failure \delta/2, the tail–head multiplication tail at accuracy \sqrt{\varepsilon/(4k)} and NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_add_le. Asymptotic form: NLAlib.exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_countSketch. [Woodruff2014, Remark 46]; there O(k^2 + k/\varepsilon) rows at constant probability, real.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_countSketch.{u_1, u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq l]
  {X : Ω → Matrix n l 𝕜} (A : Matrix m n 𝕜) (hX : HasLaw (fun ω ↦ (X ω)ᴴ) (countSketch l n) μ)
  {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hδ : 0 < δ)
  (hl : countSketchEmbeddingDim k (1 / 2) (δ / 2) ≤ ↑(Fintype.card l))
  (hl' : 16 * ↑k ≤ ε * δ * ↑(Fintype.card l)) :
  μ.real {ω | (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - rsvd A (X ω)) ^ 2} ≤ δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_samplingSketch). Column sampling at the rank-k leverage scores: if the sketch \mathbf{\Omega}^{\mathsf{H}} samples \ell columns of \mathbf{A} independently with positive probabilities p_i summing to 1, the leverage scores of \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} satisfy \tau_i \le Lp_i, \ell nonempty, \delta, t > 0 and \ell is at least <!-- value samplingInjectionDim k L (1/2) \delta --> 2 L \log(k/\delta)/(1/2)^2 (samplingInjectionDim k L (1 / 2) δ), then \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + 2t) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + 1/t. The size is at the target rank k, an upper bound on the rank of the head. In O(\cdot) form it is the family's injection size, O(L\log(k/\delta)) (NLAlib.exists_forall_hasSubspaceInjection_of_hasLaw_samplingSketch); a constant-factor result has no asymptotic form of its own. The without-replacement form is NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_samplingSketchWithoutReplacement. [CamanoEpperlyMeyerTropp2025, Theorem 2.2] with a fixed-subspace injection; the instance is not stated there.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_samplingSketch.{u_1, u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n]
  {X : Ω → Matrix n l 𝕜} [Nonempty l] (A : Matrix m n 𝕜) {p : n → ℝ≥0}
  (hX : HasLaw (fun ω ↦ (X ω)ᴴ) (samplingSketch l p) μ) (hp : ∑ i, p i = 1)
  (hpos : ∀ (i : n), 0 < p i) {k : ℕ} {L δ t : ℝ}
  (hdom : ∀ (i : n), leverageScore (truncatedSVD A k)ᴴ i ≤ L * ↑(p i)) (hδ : 0 < δ) (ht : 0 < t)
  (hl : samplingInjectionDim k L (1 / 2) δ ≤ ↑(Fintype.card l)) :
  μ.real {ω | (1 + 2 * t) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - rsvd A (X ω)) ^ 2} ≤
    δ + 1 / t

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_samplingSketchWithoutReplacement). Uniform column sampling without replacement at the rank-k coherence: if the sketch \mathbf{\Omega}^{\mathsf{H}} samples \ell \le n distinct columns of \mathbf{A} uniformly, the leverage scores of \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} satisfy \tau_i \le L/n, \ell nonempty, \delta, t > 0 and \ell is at least <!-- value samplingInjectionDim k L (1/2) \delta --> 2 L \log(k/\delta)/(1/2)^2 (samplingInjectionDim k L (1 / 2) δ), then \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + 2t) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + 1/t. In O(\cdot) form the size is the family's injection size, O(L\log(k/\delta)) (NLAlib.exists_forall_hasSubspaceInjection_of_hasLaw_samplingSketchWithoutReplacement); a constant-factor result has no asymptotic form of its own. The with-replacement form, at any positive probabilities, is NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_samplingSketch. [CamanoEpperlyMeyerTropp2025, Theorem 2.2] with a fixed-subspace injection; the instance is not stated there.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_samplingSketchWithoutReplacement.{u_1, u_2,
    u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n]
  {X : Ω → Matrix n l 𝕜} [Nonempty l] (A : Matrix m n 𝕜)
  (hX : HasLaw (fun ω ↦ (X ω)ᴴ) (samplingSketchWithoutReplacement l n) μ)
  (hln : Fintype.card l ≤ Fintype.card n) {k : ℕ} {L δ t : ℝ}
  (hdom : ∀ (i : n), leverageScore (truncatedSVD A k)ᴴ i ≤ L * (↑(Fintype.card n))⁻¹) (hδ : 0 < δ)
  (ht : 0 < t) (hl : samplingInjectionDim k L (1 / 2) δ ≤ ↑(Fintype.card l)) :
  μ.real {ω | (1 + 2 * t) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - rsvd A (X ω)) ^ 2} ≤
    δ + 1 / t

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht). The randomized SVD with an SRHT test matrix: if the sketch \mathbf{\Omega}^{\mathsf{H}} is the SRHT without replacement of a bounded orthonormal \mathbf{F} with bound \beta, \ell nonempty, \ell \le n, \delta, t > 0 and \ell is at least <!-- value samplingInjectionDim k L (1/2) (\delta/2) --> \frac{2 L \log(k/(\delta/2))}{(1/2)^2}\,, where the flattened coherence <!-- value srhtRowBound {\lvert n \rvert} k (\delta/2) --> L = \beta\,\bigl(k + 2\sqrt{k \log(\lvert n \rvert/(\delta/2))} + 2 \log(\lvert n \rvert/(\delta/2))\bigr) is \beta times srhtRowBound (Fintype.card n) k (δ / 2) and the size is samplingInjectionDim k L (1 / 2) (δ / 2), then \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + 2t) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + 1/t. Its bounded-sketch neighbour, failure probability \delta and factor 1 + 2n/\ell in every quadratic unitarily invariant norm, is NLAlib.SymmetricGauge.measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_hasLaw_srht; this one is better when t < n/\ell. In O(\cdot) form the size is the family's injection size, O(\beta(k + \log(n/\delta))\log(k/\delta)) (NLAlib.exists_forall_isObliviousSubspaceInjection_of_hasLaw_srht); a constant-factor result has no asymptotic form of its own. [CamanoEpperlyMeyerTropp2025, Theorem 2.2]; there an OSI and C/\alpha at probability 9/10.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht.{u_1, u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n]
  {X : Ω → Matrix n l 𝕜} [Nonempty l] {F : Matrix n n 𝕜} {β : ℝ} (hF : IsBoundedOrthonormal F β)
  (A : Matrix m n 𝕜) (hX : HasLaw (fun ω ↦ (X ω)ᴴ) (srht l F) μ)
  (hln : Fintype.card l ≤ Fintype.card n) {k : ℕ} {δ t : ℝ} (hδ : 0 < δ) (ht : 0 < t)
  (hl :
    samplingInjectionDim k (β * srhtRowBound (Fintype.card n) k (δ / 2)) (1 / 2) (δ / 2) ≤
      ↑(Fintype.card l)) :
  μ.real {ω | (1 + 2 * t) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - rsvd A (X ω)) ^ 2} ≤
    δ + 1 / t

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srhtWithReplacement). The randomized SVD with an SRHT test matrix, with replacement: if the sketch \mathbf{\Omega}^{\mathsf{H}} is the SRHT with i.i.d. uniform row indices of a bounded orthonormal \mathbf{F} with bound \beta, \ell and n nonempty, \delta, t > 0 and \ell is at least <!-- value samplingInjectionDim k L (1/2) (\delta/2) --> \frac{2 L \log(k/(\delta/2))}{(1/2)^2}\,, where the flattened coherence <!-- value srhtRowBound {\lvert n \rvert} k (\delta/2) --> L = \beta\,\bigl(k + 2\sqrt{k \log(\lvert n \rvert/(\delta/2))} + 2 \log(\lvert n \rvert/(\delta/2))\bigr) is \beta times srhtRowBound (Fintype.card n) k (δ / 2) and the size is samplingInjectionDim k L (1 / 2) (δ / 2), then \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + 2t) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + 1/t. No \ell \le n, and no bounded-sketch twin: with replacement \|\mathbf{\Omega}\|_2 is not constant. The without-replacement form is NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht. In O(\cdot) form the size is the family's injection size (NLAlib.exists_forall_isObliviousSubspaceInjection_of_hasLaw_srhtWithReplacement); a constant-factor result has no asymptotic form of its own. [CamanoEpperlyMeyerTropp2025, Theorem 2.2]; there an OSI and C/\alpha at probability 9/10.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srhtWithReplacement.{u_1, u_2, u_3, u_4,
    u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n]
  {X : Ω → Matrix n l 𝕜} [Nonempty l] [Nonempty n] {F : Matrix n n 𝕜} {β : ℝ}
  (hF : IsBoundedOrthonormal F β) (A : Matrix m n 𝕜)
  (hX : HasLaw (fun ω ↦ (X ω)ᴴ) (srhtWithReplacement l F) μ) {k : ℕ} {δ t : ℝ} (hδ : 0 < δ)
  (ht : 0 < t)
  (hl :
    samplingInjectionDim k (β * srhtRowBound (Fintype.card n) k (δ / 2)) (1 / 2) (δ / 2) ≤
      ↑(Fintype.card l)) :
  μ.real {ω | (1 + 2 * t) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - rsvd A (X ω)) ^ 2} ≤
    δ + 1 / t

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht_of_le_card). The randomized SVD with an SRHT test matrix, relative error: for a real bounded orthonormal \mathbf{F} with constant \beta, a test matrix \mathbf{\Omega} whose sketch \mathbf{\Omega}^{\mathsf{H}} is the SRHT of \mathbf{F} without replacement, \ell nonempty, \ell \le n, \varepsilon, \delta > 0, at least <!-- value samplingInjectionDim k L (1/2) (\delta/4) --> \ell \ge \frac{2 L \log(k/(\delta/4))}{(1/2)^2}\,, where the flattened coherence <!-- value srhtRowBound {\lvert n \rvert} k (\delta/4) --> L = \beta\,\bigl(k + 2\sqrt{k \log(\lvert n \rvert/(\delta/4))} + 2 \log(\lvert n \rvert/(\delta/4))\bigr) is \beta times srhtRowBound (Fintype.card n) k (δ / 4) (the size is samplingInjectionDim k L (1 / 2) (δ / 4), the injection at constant 1/2 and failure \delta/2), and \ell \ge 8(3\beta^2 - 1)k/(\varepsilon\delta), \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + \varepsilon) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta. The route of NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector, with the SRHT JL moment NLAlib.hasJLMoment_of_hasLaw_srht at \sqrt{\varepsilon/(4k)}; the name carries _of_le_card to tell it apart from the constant-factor NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht. Asymptotic form: NLAlib.exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht. [Woodruff2014, Lemma 45 and Remark 46]; there for dense sketches, constants unspecified.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_hasLaw_srht_of_le_card.{u_1, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_3} {n : Type u_4}
  {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n] [Nonempty l]
  {X : Ω → Matrix n l ℝ} {F : Matrix n n ℝ} {β : ℝ} (hF : IsBoundedOrthonormal F β)
  (A : Matrix m n ℝ) (hX : HasLaw (fun ω ↦ (X ω)ᴴ) (srht l F) μ)
  (hln : Fintype.card l ≤ Fintype.card n) {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hδ : 0 < δ)
  (hl :
    samplingInjectionDim k (β * srhtRowBound (Fintype.card n) k (δ / 4)) (1 / 2) (δ / 4) ≤
      ↑(Fintype.card l))
  (hl' : 8 * (3 * β ^ 2 - 1) * ↑k ≤ ε * δ * ↑(Fintype.card l)) :
  μ.real {ω | (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - rsvd A (X ω)) ^ 2} ≤ δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector). The randomized SVD with a sub-Gaussian test matrix, relative error: for \ell nonempty, if the sketch \mathbf{\Omega}^{\mathsf{H}} has independent, isotropic, sub-Gaussian rows with proxy c, \varepsilon, \delta > 0, <!-- value subgaussianEmbeddingDim c k (1/2) (\delta/2) --> \ell \ge 25 c^2 (k \log 21 + \log(2/(\delta/2)))/(16C (1/2)^2), with <!-- value subgaussianJLConstant -->C = 1/36, and \ell \ge 8(16c^2 - 1)k/(\varepsilon\delta), then \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + \varepsilon) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the first size is subgaussianEmbeddingDim c k (1 / 2) (δ / 2) and C is subgaussianJLConstant. The route: the OSI at constant 1/2 and failure \delta/2, the JL moment property at \sqrt{\varepsilon/(4k)} and NLAlib.HasJLMoment.measureReal_frobNorm_sub_rsvd_sq_gt_le. Incomparable with its \log(1/\delta) twin measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector_of_subgaussianJLMomentDim_le (rule 4): this one needs fewer columns at constant \delta, the twin for small \delta; the asymptotic form exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector is proved from the twin. [Woodruff2014, Lemma 45 and Remark 46]; there for dense sign and Gaussian sketches, constants unspecified.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  [Nonempty l] (A : Matrix m n ℝ) {c : ℝ≥0} (hind : iIndepFun (fun i ω ↦ (X ω)ᴴ i) μ)
  (hsub : ∀ (i : l), IsSubgaussianVector (fun ω ↦ (X ω)ᴴ i) c μ)
  (hiso : ∀ (i : l), IsIsotropic (fun ω ↦ (X ω)ᴴ i) μ) {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hδ : 0 < δ)
  (hl : subgaussianEmbeddingDim (↑c) k (1 / 2) (δ / 2) ≤ ↑(Fintype.card l))
  (hl' : 8 * (16 * ↑c ^ 2 - 1) * ↑k ≤ ε * δ * ↑(Fintype.card l)) :
  μ.real {ω | (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - rsvd A (X ω)) ^ 2} ≤ δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector_of_subgaussianJLMomentDim_le). The randomized SVD with a sub-Gaussian test matrix, relative error, \log(1/\delta) size form: for 0 < \varepsilon \le 4, \delta > 0, \ell \ge 1 and a sketch \mathbf{\Omega}^{\mathsf{H}} with independent, isotropic, sub-Gaussian rows with proxy c, if <!-- value subgaussianEmbeddingDim c k (1/2) (\delta/2) --> \ell \ge 25 c^2 (k \log 21 + \log(2/(\delta/2)))/(16C (1/2)^2) and <!-- value subgaussianJLMomentDim c {\sqrt{\varepsilon/(4k)}} (\delta/2) --> \ell \ge 16c^2\max(2, \log(1/(\delta/2)))/(C\sqrt{\varepsilon/(4k)}^2), with <!-- value subgaussianJLConstant -->C = 1/36, then \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{\Omega})\|_{\mathsf{F}}^2 \le (1 + \varepsilon) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the sizes are subgaussianEmbeddingDim c k (1 / 2) (δ / 2) and subgaussianJLMomentDim c (√(ε / (4 * k))) (δ / 2), and C is subgaussianJLConstant. The route of NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector, with the JL moment at p = \max(2, \log(2/\delta)) (NLAlib.hasJLMoment_of_isSubgaussianVector_of_subgaussianJLMomentDim_le, whose budget \sqrt{\varepsilon/(4k)} \le 1 \le c needs \varepsilon \le 4); incomparable with it (rule 4). Asymptotic form: NLAlib.exists_forall_measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector. [Woodruff2014, Lemma 45 and Remark 46]; there for dense sign and Gaussian sketches, constants unspecified.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_rsvd_sq_gt_le_of_isSubgaussianVector_of_subgaussianJLMomentDim_le.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  [Nonempty l] (A : Matrix m n ℝ) {c : ℝ≥0} (hind : iIndepFun (fun i ω ↦ (X ω)ᴴ i) μ)
  (hsub : ∀ (i : l), IsSubgaussianVector (fun ω ↦ (X ω)ᴴ i) c μ)
  (hiso : ∀ (i : l), IsIsotropic (fun ω ↦ (X ω)ᴴ i) μ) {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hε4 : ε ≤ 4)
  (hδ : 0 < δ) (hl : subgaussianEmbeddingDim (↑c) k (1 / 2) (δ / 2) ≤ ↑(Fintype.card l))
  (hl' : subgaussianJLMomentDim (↑c) (√(ε / (4 * ↑k))) (δ / 2) ≤ ↑(Fintype.card l)) :
  μ.real {ω | (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - rsvd A (X ω)) ^ 2} ≤ δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix). The tail of the truncated randomized SVD, Frobenius norm: for \mathbf{A} \in \mathbb{R}^{m \times n}, a test matrix \mathbf{X} \in \mathbb{R}^{n \times \ell} with independent standard Gaussian entries (HasLaw X (gaussianMatrix n l) μ), a target rank k with d = \ell - k + 1 (hd : k + d = Fintype.card l + 1), s \ge 0 and t > 0, <!-- value gaussianPinvFrobTail k d t --> \mathbb{P}\Bigl[ \|\mathbf{A} - \llbracket\mathsf{rsvd}(\mathbf{A}, \mathbf{X})\rrbracket_k\|_{\mathsf{F}}^2 > \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 + \frac{tk}{d}\bigl( \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}} + s\,\sigma_k(\mathbf{A})\bigr)^2\Bigr] \le e^{-s^2/2} + \frac{2\sqrt{k}\,(d/(2t))^{d/2}}{\Gamma(d/2 + 1)}\,, the second failure term being gaussianPinvFrobTail k d t. The bound is that of the untruncated output, for every choice of the truncation: the late truncation costs nothing. The error does not depend on the choice (NLAlib.frobNorm_sub_truncatedSVD_rsvd_sq), so the failure event is measurable. [TroppWebber2023, Theorem 8.1 (RSVD1)] with [Woodruff2014, Lemma 48]; composed here (they print the noise term (utk/d)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 and the failure term e^{-(u-2)/4}, the case s = \sqrt{u} - 1 of this one).

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_truncatedSVD_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3,
    u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k d : ℕ} (hd : k + d = Fintype.card l + 1) {s t : ℝ}
  (hs : 0 ≤ s) (ht : 0 < t) :
  μ.real
      {ω |
        frobNorm (A - truncatedSVD A k) ^ 2 +
            t * ↑k / ↑d * (frobNorm (A - truncatedSVD A k) + s * singularValues A k) ^ 2 <
          frobNorm (A - truncatedSVD (rsvd A (X ω)) k) ^ 2} ≤
    rexp (-s ^ 2 / 2) + gaussianPinvFrobTail k d t

Full source on GitHub

Copy link

Theorem (measureReal_schattenNorm_sub_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix). The tail of the randomized SVD, Schatten norms: for 2 \le p \le \infty, with the hypotheses of the Gram form above (measureReal_matrixNorm_conjTranspose_mul_self_sub_rsvd_gt_le_of_hasLaw_gaussianMatrix in the namespace NLAlib.SymmetricGauge), \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{X})\|_{S_p}^2 \le \|\mathbf{E}\|_{S_p}^2 + \frac{tk}{d}\, \bigl(\|\mathbf{E}\|_{\mathsf{F}} + s\,\sigma_k(\mathbf{A})\bigr)^2 outside probability <!-- value gaussianPinvFrobTail k d t --> e^{-s^2/2} + 2\sqrt{k}\,(d/(2t))^{d/2}/\Gamma(d/2 + 1) (the second term is gaussianPinvFrobTail k d t). [TroppWebber2023, Theorem 8.1 (RSVD1)]; there with the noise term (utk/d)\|\mathbf{E}\|_{\mathsf{F}}^2 and the failure probability e^{-(u-2)/4} + \sqrt{\pi k}\,(t/e)^{-d/2}, which follow from this bound at s = \sqrt{u} - 1.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_schattenNorm_sub_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k d : ℕ} (hd : k + d = Fintype.card l + 1) {p : ℝ≥0∞}
  (hp : 2 ≤ p) {s t : ℝ} (hs : 0 ≤ s) (ht : 0 < t) :
  μ.real
      {ω |
        schattenNorm p (A - truncatedSVD A k) ^ 2 +
            t * ↑k / ↑d * (frobNorm (A - truncatedSVD A k) + s * singularValues A k) ^ 2 <
          schattenNorm p (A - rsvd A (X ω)) ^ 2} ≤
    rexp (-s ^ 2 / 2) + gaussianPinvFrobTail k d t

Full source on GitHub

Copy link

Theorem (measureReal_specNorm_sub_rsvd_sq_gt_gaussianPinvSpecNormBound_le_of_hasLaw_gaussianMatrix). Deviation bound for the spectral error of the randomized SVD: for \mathbf{A} \in \mathbb{R}^{m \times n}, a test matrix \mathbf{X} \in \mathbb{R}^{n \times \ell} with independent standard Gaussian entries (HasLaw X (gaussianMatrix n l) μ), a target rank k < \ell (hkl) with d = \ell - k + 1 (hd : k + d = Fintype.card l + 1), u \ge 0 and t > 0, <!-- value gaussianPinvSpecNormBound k \ell --> <!-- value gaussianPinvFrobTail k d t^2 --> \begin{aligned}&\mathbb{P}\Bigl[\|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{X})\|_2^2 > \sigma_k(\mathbf{A})^2 + \Bigl(t\sqrt{k/d}\,\sigma_k(\mathbf{A}) + t\,\frac{e}{\ell - k}\sqrt{(\ell + k - 1)/2}\, \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}} \\ &\qquad + ut\,\frac{e}{\ell - k}\sqrt{(\ell + k - 1)/2}\,\sigma_k(\mathbf{A})\Bigr)^2\Bigr] \le t^{-(\ell - k)} + \frac{2\sqrt{k}\,(d/(2t^2))^{d/2}}{\Gamma(d/2 + 1)} + e^{-u^2/2}\,, \end{aligned} singular values indexed from 0; the constant is gaussianPinvSpecNormBound k ℓ, the second failure term gaussianPinvFrobTail k d (t ^ 2). The structural bound is Pythagorean (\sigma_k(\mathbf{A})^2 + \|\mathbf{M}\|_2^2 for the noise term \mathbf{M}). [HalkoMartinssonTropp2011, Theorem 10.8] prints the triangle form (1 + t\sqrt{12k/p})\sigma_k(\mathbf{A}) + t\,e\sqrt{k+p}/(p+1)\,\|\mathbf{E}\|_{\mathsf{F}} + ut\,e\sqrt{k+p}/(p+1)\,\sigma_k(\mathbf{A}) with failure 5t^{-p} + e^{-u^2/2} for p = \ell - k \ge 4 and u, t \ge 1, from their Proposition 10.4, whose tails are not reached here; this bound implies the triangle form with the library's constants by \sqrt{a^2 + \mathbf{b}^2} \le a + \mathbf{b}. The Frobenius part of this failure term is below HMT's in every practical regime, the spectral part loses one power of t. Given hd, hkl is d \ge 2. Incomparable with NLAlib.measureReal_specNorm_sub_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix (Tropp and Webber's form).

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_specNorm_sub_rsvd_sq_gt_gaussianPinvSpecNormBound_le_of_hasLaw_gaussianMatrix.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k d : ℕ} (hd : k + d = Fintype.card l + 1)
  (hkl : k < Fintype.card l) {u t : ℝ} (hu : 0 ≤ u) (ht : 0 < t) :
  μ.real
      {ω |
        singularValues A k ^ 2 +
            (t * √(↑k / ↑d) * singularValues A k +
                  t * gaussianPinvSpecNormBound k (Fintype.card l) *
                    frobNorm (A - truncatedSVD A k) +
                u * t * gaussianPinvSpecNormBound k (Fintype.card l) * singularValues A k) ^
              2 <
          specNorm (A - rsvd A (X ω)) ^ 2} ≤
    t ^ (-(↑(Fintype.card l) - ↑k)) + gaussianPinvFrobTail k d (t ^ 2) + rexp (-u ^ 2 / 2)

Full source on GitHub

Copy link

Theorem (measureReal_specNorm_sub_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix). The tail of the randomized SVD, spectral norm: for \mathbf{A} \in \mathbb{R}^{m \times n}, a test matrix \mathbf{X} \in \mathbb{R}^{n \times \ell} with independent standard Gaussian entries (HasLaw X (gaussianMatrix n l) μ), a target rank k with d = \ell - k + 1 (hd : k + d = Fintype.card l + 1), s \ge 0 and t > 0, <!-- value gaussianPinvFrobTail k d t --> \mathbb{P}\Bigl[\|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, \mathbf{X})\|_2^2 > \sigma_k(\mathbf{A})^2 + \frac{tk}{d}\bigl(\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}} + s\,\sigma_k(\mathbf{A})\bigr)^2\Bigr] \le e^{-s^2/2} + \frac{2\sqrt{k}\,(d/(2t))^{d/2}}{\Gamma(d/2 + 1)}\,, the second failure term being gaussianPinvFrobTail k d t. Singular values are indexed from 0. [TroppWebber2023, Theorem 8.1 (RSVD1)]; there at p = \infty, with the noise term (utk/d)\|\mathbf{E}\|_{\mathsf{F}}^2 and the failure probability e^{-(u-2)/4} + \sqrt{\pi k}\,(t/e)^{-d/2}, which follow from this bound at s = \sqrt{u} - 1. Incomparable with NLAlib.measureReal_specNorm_sub_rsvd_sq_gt_gaussianPinvSpecNormBound_le_of_hasLaw_gaussianMatrix (Halko, Martinsson and Tropp's form), which is better for a large oversampling \ell - k; this one has no spectral failure term t^{-(\ell - k)}.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_specNorm_sub_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k d : ℕ} (hd : k + d = Fintype.card l + 1) {s t : ℝ}
  (hs : 0 ≤ s) (ht : 0 < t) :
  μ.real
      {ω |
        singularValues A k ^ 2 +
            t * ↑k / ↑d * (frobNorm (A - truncatedSVD A k) + s * singularValues A k) ^ 2 <
          specNorm (A - rsvd A (X ω)) ^ 2} ≤
    rexp (-s ^ 2 / 2) + gaussianPinvFrobTail k d t

Full source on GitHub

Copy link

Theorem (measureReal_specNorm_sub_sq_gt_le_of_isBestRankApprox_of_hasLaw_gaussianMatrix). The tail of the truncated randomized SVD, spectral norm, for any best rank-k approximations: for \mathbf{A} \in \mathbb{R}^{m \times n}, a test matrix \mathbf{X} \in \mathbb{R}^{n \times \ell} with independent standard Gaussian entries (HasLaw X (gaussianMatrix n l) μ), a target rank k with d = \ell - k + 1 (hd : k + d = Fintype.card l + 1), any \mathbf{Y}(\omega) \in \mathbb{R}^{m \times n} that is, for every \omega, a best rank-k approximation of \mathsf{rsvd}(\mathbf{A}, \mathbf{X}(\omega)) (hY; no measurability is assumed), s \ge 0 and t > 0, <!-- value gaussianPinvFrobTail k d t --> \mathbb{P}\Bigl[\|\mathbf{A} - \mathbf{Y}\|_2^2 > \sigma_k(\mathbf{A})^2 + \frac{tk}{d}\bigl(\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}} + s\,\sigma_k(\mathbf{A})\bigr)^2\Bigr] \le e^{-s^2/2} + \frac{2\sqrt{k}\,(d/(2t))^{d/2}}{\Gamma(d/2 + 1)}\,, the second failure term being gaussianPinvFrobTail k d t. This is the bound of the untruncated output; singular values are indexed from 0. The event may be non-measurable; μ.real is then the outer measure, so this bound says exactly that the failure event lies in a measurable event of at most this probability (MeasureTheory.exists_measurable_superset), and such bounds compose by MeasureTheory.measureReal_union_le. The success-set form, probability at least 1 - \delta for the good event, does not follow without measurability (MeasureTheory.measureReal_compl needs MeasurableSet). [TroppWebber2023, Theorem 8.1 (RSVD1)] with [Gu2015, Theorem 3.4]; composed here (they print the noise term (utk/d)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 and the failure term e^{-(u-2)/4}, the case s = \sqrt{u} - 1 of this one).

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_specNorm_sub_sq_gt_le_of_isBestRankApprox_of_hasLaw_gaussianMatrix.{u_1, u_2,
    u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k d : ℕ} (hd : k + d = Fintype.card l + 1)
  {Y : Ω → Matrix m n ℝ} (hY : ∀ (ω : Ω), IsBestRankApprox (rsvd A (X ω)) k (Y ω)) {s t : ℝ}
  (hs : 0 ≤ s) (ht : 0 < t) :
  μ.real
      {ω |
        singularValues A k ^ 2 +
            t * ↑k / ↑d * (frobNorm (A - truncatedSVD A k) + s * singularValues A k) ^ 2 <
          specNorm (A - Y ω) ^ 2} ≤
    rexp (-s ^ 2 / 2) + gaussianPinvFrobTail k d t

Full source on GitHub

Copy link

Theorem (measureReal_specNorm_sub_truncatedSVD_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix). The tail of the truncated randomized SVD, spectral norm, for the output truncatedSVD (rsvd A (X ω)) k: for \mathbf{A} \in \mathbb{R}^{m \times n}, a test matrix \mathbf{X} \in \mathbb{R}^{n \times \ell} with independent standard Gaussian entries (HasLaw X (gaussianMatrix n l) μ), a target rank k with d = \ell - k + 1 (hd : k + d = Fintype.card l + 1), s \ge 0 and t > 0, <!-- value gaussianPinvFrobTail k d t --> \mathbb{P}\Bigl[ \|\mathbf{A} - \llbracket\mathsf{rsvd}(\mathbf{A}, \mathbf{X})\rrbracket_k\|_2^2 > \sigma_k(\mathbf{A})^2 + \frac{tk}{d}\bigl(\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}} + s\,\sigma_k(\mathbf{A})\bigr)^2\Bigr] \le e^{-s^2/2} + \frac{2\sqrt{k}\,(d/(2t))^{d/2}}{\Gamma(d/2 + 1)}\,, the second failure term being gaussianPinvFrobTail k d t. Singular values are indexed from 0. The event may be non-measurable (the truncation is a choice); μ.real is then the outer measure, and the bound says that the failure event lies in a measurable event of at most this probability. The success-set form, probability at least 1 - \delta for the good event, does not follow without measurability (MeasureTheory.measureReal_compl needs MeasurableSet). [TroppWebber2023, Theorem 8.1 (RSVD1)] with [Gu2015, Theorem 3.4]; composed here (they print the noise term (utk/d)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 and the failure term e^{-(u-2)/4}, the case s = \sqrt{u} - 1 of this one).

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_specNorm_sub_truncatedSVD_rsvd_sq_gt_le_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3,
    u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k d : ℕ} (hd : k + d = Fintype.card l + 1) {s t : ℝ}
  (hs : 0 ≤ s) (ht : 0 < t) :
  μ.real
      {ω |
        singularValues A k ^ 2 +
            t * ↑k / ↑d * (frobNorm (A - truncatedSVD A k) + s * singularValues A k) ^ 2 <
          specNorm (A - truncatedSVD (rsvd A (X ω)) k) ^ 2} ≤
    rexp (-s ^ 2 / 2) + gaussianPinvFrobTail k d t

Full source on GitHub

Copy link

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.