Theorem (isObliviousSubspaceEmbedding_of_hasLaw_countSketch).CountSketch OSE: for \varepsilon > 0, a CountSketch is an oblivious subspace embedding for dimension d with constants 1 \mp \varepsilon and failure probability \frac{d^2 + d}{\lvert k \rvert \varepsilon^2}\,. [Woodruff2014, Theorem 9] (there O(d^2/(\delta\varepsilon^2)) rows, after Meng and Mahoney and Nelson and Nguyen; Woodruff's own route through Theorems 13 and 14 reaches 18 d^2/(\delta\varepsilon^2)). The constant is the proof's; the second-moment route is Meng and Mahoney 2013 and Nelson and Nguyen 2013 (Woodruff, Theorem 9), neither in hand, so the constant is not attributed.
Headline (provisional)General form: sizes are index types
Lean statement and details
NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_countSketch.{u_1, u_2, u_3, u_4} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3} {n : Type u_4}
[Fintype k] [Fintype n] [DecidableEq k] {S : Ω → Matrix k n 𝕜} {ε : ℝ}
(hS : HasLaw S (countSketch k n) μ) (d : ℕ) (hε : 0 < ε) :
IsObliviousSubspaceEmbedding S d (1 - ε) (1 + ε) ((↑d ^ 2 + ↑d) / (↑(Fintype.card k) * ε ^ 2)) μ
Theorem (isObliviousSubspaceEmbedding_of_hasLaw_countSketch_of_countSketchEmbeddingDim_le).CountSketch OSE, size form: with <!-- value countSketchEmbeddingDim d \varepsilon \delta --> \lvert k \rvert \ge (d^2 + d)/(\delta \varepsilon^2) rows (NLAlib.countSketchEmbeddingDim d ε δ), for \varepsilon, \delta > 0, a CountSketch is an oblivious subspace embedding for dimension d with constants 1 \mp \varepsilon and failure probability \delta. [Woodruff2014, Theorem 9] (there O(d^2/(\delta\varepsilon^2)) rows). Asymptotic form: NLAlib.exists_forall_isObliviousSubspaceEmbedding_of_hasLaw_countSketch.
General form: sizes are index types
Lean statement and details
NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_countSketch_of_countSketchEmbeddingDim_le.{u_1, u_2,
u_3, u_4}
{Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3}
{n : Type u_4} [Fintype k] [Fintype n] [DecidableEq k] {S : Ω → Matrix k n 𝕜} {ε δ : ℝ}
(hS : HasLaw S (countSketch k n) μ) (d : ℕ) (hε : 0 < ε) (hδ : 0 < δ)
(hk : countSketchEmbeddingDim d ε δ ≤ ↑(Fintype.card k)) :
IsObliviousSubspaceEmbedding S d (1 - ε) (1 + ε) δ μ
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.