NLA-lib Explorer

Haar subspace embedding, deterministic upper half

Library · Result group

Theorem (HasOrthonormalCols.hasSubspaceEmbedding_of_hasLaw_haarFrame). Haar subspace embedding, deterministic upper half: for \mathbf{U} with orthonormal columns and \lvert k \rvert \le \lvert n \rvert, the Haar sketch is a subspace embedding for \operatorname{range} \mathbf{U} with constants a_{\mathrm{H}} = \frac{(1 - (\sqrt{\lvert p \rvert} + t)/\sqrt{\lvert k \rvert})^2} {(1 + (\sqrt{\lvert k \rvert} + s)/\sqrt{\lvert n \rvert})^2}, \qquad \mathbf{b} = \frac{\lvert n \rvert}{\lvert k \rvert} outside probability e^{-t^2/2} + e^{-s^2/2}, for 0 \le t \le \sqrt{\lvert k \rvert} - \sqrt{\lvert p \rvert} and s \ge 0; no condition on s and \lvert k \rvert < \lvert n \rvert not needed. The lower constant is that of NLAlib.HasOrthonormalCols.hasSubspaceInjection_of_hasLaw_haarFrame. The upper half is NLAlib.ae_conjTranspose_mul_self_mul_le_smul_of_hasLaw_haarFrame. Its upper constant is exact at \lvert k \rvert = \lvert n \rvert and incomparable with the \mathbf{b}_{\mathrm{H}} of NLAlib.HasOrthonormalCols.hasSubspaceEmbedding_of_hasLaw_haarFrame_of_lt_sqrt_sub_sqrt, which is better for \lvert k \rvert small against \lvert n \rvert (rule 4).

Headline (provisional) General form: sizes are index types

Lean statement and details
NLAlib.HasOrthonormalCols.hasSubspaceEmbedding_of_hasLaw_haarFrame.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {n : Type u_3}
  {p : Type u_4} [Fintype k] [Fintype n] [Fintype p] [DecidableEq k] {Q : Ω → Matrix n k ℝ}
  {U : Matrix n p ℝ} {t s : ℝ} [DecidableEq p] (hU : HasOrthonormalCols U)
  (hQ : HasLaw Q (haarFrame n k) μ) (hk : Fintype.card k ≤ Fintype.card n) (ht : 0 ≤ t)
  (htk : t ≤ √↑(Fintype.card k) - √↑(Fintype.card p)) (hs : 0 ≤ s) :
  HasSubspaceEmbedding (fun ω ↦ √(↑(Fintype.card n) / ↑(Fintype.card k)) • (Q ω)ᴴ) U
    ((1 - (√↑(Fintype.card p) + t) / √↑(Fintype.card k)) ^ 2 /
      (1 + (√↑(Fintype.card k) + s) / √↑(Fintype.card n)) ^ 2)
    (↑(Fintype.card n) / ↑(Fintype.card k)) (rexp (-t ^ 2 / 2) + rexp (-s ^ 2 / 2)) μ

Full source on GitHub

Copy link

Other forms

Theorem (HasOrthonormalCols.hasSubspaceEmbedding_of_hasLaw_haarFrame_of_card_add_eq). Haar subspace embedding near \lvert k \rvert = \lvert n \rvert: with c the codimension, \lvert k \rvert + c = \lvert n \rvert, and \mathbf{U} with orthonormal columns, the Haar sketch is a subspace embedding for \operatorname{range} \mathbf{U} with constants a = \frac{\lvert n \rvert}{\lvert k \rvert} \Bigl(1 - \frac{(\sqrt{c} + \sqrt{\lvert p \rvert} + t)^2} {(\sqrt{\lvert n \rvert} - \sqrt{c} - s)^2}\Bigr), \qquad \mathbf{b} = \frac{\lvert n \rvert}{\lvert k \rvert} outside probability e^{-t^2/2} + e^{-s^2/2}, for t \ge 0 and 0 \le s < \sqrt{\lvert n \rvert} - \sqrt{c}. The lower constant is that of NLAlib.HasOrthonormalCols.hasSubspaceInjection_of_hasLaw_haarFrame_of_card_add_eq, the upper one is deterministic, and both tend to 1 as c / \lvert n \rvert \to 0.

General form: sizes are index types

Lean statement and details
NLAlib.HasOrthonormalCols.hasSubspaceEmbedding_of_hasLaw_haarFrame_of_card_add_eq.{u_1, u_2, u_3,
    u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {n : Type u_3}
  {p : Type u_4} [Fintype k] [Fintype n] [Fintype p] [DecidableEq k] {Q : Ω → Matrix n k ℝ}
  {U : Matrix n p ℝ} {t s : ℝ} [DecidableEq p] (hU : HasOrthonormalCols U)
  (hQ : HasLaw Q (haarFrame n k) μ) {c : ℕ} (hc : Fintype.card k + c = Fintype.card n) (ht : 0 ≤ t)
  (hs : 0 ≤ s) (hsc : s < √↑(Fintype.card n) - √↑c) :
  HasSubspaceEmbedding (fun ω ↦ √(↑(Fintype.card n) / ↑(Fintype.card k)) • (Q ω)ᴴ) U
    (↑(Fintype.card n) / ↑(Fintype.card k) *
      (1 - (√↑c + √↑(Fintype.card p) + t) ^ 2 / (√↑(Fintype.card n) - √↑c - s) ^ 2))
    (↑(Fintype.card n) / ↑(Fintype.card k)) (rexp (-t ^ 2 / 2) + rexp (-s ^ 2 / 2)) μ

Full source on GitHub

Copy link

Theorem (HasOrthonormalCols.hasSubspaceEmbedding_of_hasLaw_haarFrame_of_lt_sqrt_sub_sqrt). Haar subspace embedding, Gaussian upper half: for \mathbf{U} with orthonormal columns, constants a_{\mathrm{H}} and \mathbf{b}_{\mathrm{H}} = \frac{(1 + (\sqrt{\lvert p \rvert} + t)/\sqrt{\lvert k \rvert})^2} {(1 - (\sqrt{\lvert k \rvert} + s)/\sqrt{\lvert n \rvert})^2} outside probability 2 e^{-t^2/2} + 2 e^{-s^2/2}, for 0 \le t \le \sqrt{\lvert k \rvert} - \sqrt{\lvert p \rvert} and 0 \le s < \sqrt{\lvert n \rvert} - \sqrt{\lvert k \rvert}; four tails, two for \mathbf{G}^{\mathsf{H}}\mathbf{U} and two for \mathbf{G}, with NLAlib.Matrix.PosDef.inv_le_inv_of_le on \mathbf{G}^{\mathsf{H}}\mathbf{G}. Better than the upper constant \lvert n \rvert / \lvert k \rvert of NLAlib.HasOrthonormalCols.hasSubspaceEmbedding_of_hasLaw_haarFrame for \lvert k \rvert small against \lvert n \rvert, worse near \lvert k \rvert = \lvert n \rvert (rule 4).

General form: sizes are index types

Lean statement and details
NLAlib.HasOrthonormalCols.hasSubspaceEmbedding_of_hasLaw_haarFrame_of_lt_sqrt_sub_sqrt.{u_1, u_2,
    u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {n : Type u_3}
  {p : Type u_4} [Fintype k] [Fintype n] [Fintype p] [DecidableEq k] {Q : Ω → Matrix n k ℝ}
  {U : Matrix n p ℝ} {t s : ℝ} [DecidableEq p] (hU : HasOrthonormalCols U)
  (hQ : HasLaw Q (haarFrame n k) μ) (hk : Fintype.card k ≤ Fintype.card n) (ht : 0 ≤ t)
  (htk : t ≤ √↑(Fintype.card k) - √↑(Fintype.card p)) (hs : 0 ≤ s)
  (hsk : s < √↑(Fintype.card n) - √↑(Fintype.card k)) :
  HasSubspaceEmbedding (fun ω ↦ √(↑(Fintype.card n) / ↑(Fintype.card k)) • (Q ω)ᴴ) U
    ((1 - (√↑(Fintype.card p) + t) / √↑(Fintype.card k)) ^ 2 /
      (1 + (√↑(Fintype.card k) + s) / √↑(Fintype.card n)) ^ 2)
    ((1 + (√↑(Fintype.card p) + t) / √↑(Fintype.card k)) ^ 2 /
      (1 - (√↑(Fintype.card k) + s) / √↑(Fintype.card n)) ^ 2)
    (2 * rexp (-t ^ 2 / 2) + 2 * rexp (-s ^ 2 / 2)) μ

Full source on GitHub

Copy link

Theorem (isObliviousSubspaceEmbedding_of_hasLaw_haarFrame). The Haar OSE, deterministic upper half: an oblivious subspace embedding for dimension d with constants \frac{(1 - (\sqrt{d} + t)/\sqrt{\lvert k \rvert})^2} {(1 + (\sqrt{\lvert k \rvert} + s)/\sqrt{\lvert n \rvert})^2} \quad \text{and} \quad \frac{\lvert n \rvert}{\lvert k \rvert} \,, failure probability e^{-t^2/2} + e^{-s^2/2}, for 0 \le t \le \sqrt{\lvert k \rvert} - \sqrt{d} and s \ge 0. Incomparable with NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_haarFrame_of_lt_sqrt_sub_sqrt (rule 4).

General form: sizes are index types

Lean statement and details
NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_haarFrame.{u_1, u_2, u_3} {Ω : Type u_1}
  {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {n : Type u_3} [Fintype k] [Fintype n]
  [DecidableEq k] {Q : Ω → Matrix n k ℝ} {t s : ℝ} (hQ : HasLaw Q (haarFrame n k) μ)
  (hk : Fintype.card k ≤ Fintype.card n) (d : ℕ) (ht : 0 ≤ t) (htd : t ≤ √↑(Fintype.card k) - √↑d)
  (hs : 0 ≤ s) :
  IsObliviousSubspaceEmbedding (fun ω ↦ √(↑(Fintype.card n) / ↑(Fintype.card k)) • (Q ω)ᴴ) d
    ((1 - (√↑d + t) / √↑(Fintype.card k)) ^ 2 /
      (1 + (√↑(Fintype.card k) + s) / √↑(Fintype.card n)) ^ 2)
    (↑(Fintype.card n) / ↑(Fintype.card k)) (rexp (-t ^ 2 / 2) + rexp (-s ^ 2 / 2)) μ

Full source on GitHub

Copy link

Theorem (isObliviousSubspaceEmbedding_of_hasLaw_haarFrame_of_jlDim_le). The Haar OSE by JL and a net, sample-size form: for \lvert k\rvert \le \lvert n\rvert, 0 < \varepsilon < 15/8, \delta > 0 and at least <!-- value jlDim (4\varepsilon/5) (\delta/21^d) --> \log(2/(\delta/21^d))/((4\varepsilon/5)^2/4 - (4\varepsilon/5)^3/6) rows (jlDim (4ε/5) (δ/21^d)), the Haar sketch \mathbf{S} = \sqrt{\lvert n\rvert/\lvert k\rvert}\,\mathbf{Q}^{\mathsf{H}} is an oblivious subspace embedding for dimension d with constants 1 \mp \varepsilon and failure probability \delta, the sign sketch's size. [Woodruff2014, Theorem 6] (Gaussian entries, \Theta((d + \log(1/\delta))\varepsilon^{-2}) rows, unspecified constants); [Vershynin2018, Lemma 5.3.2] for the Haar JL fact. Asymptotic form: NLAlib.exists_forall_isObliviousSubspaceEmbedding_of_hasLaw_haarFrame.

General form: sizes are index types

Lean statement and details
NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_haarFrame_of_jlDim_le.{u_1, u_2, u_3} {Ω : Type u_1}
  {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {n : Type u_3} [Fintype k] [Fintype n]
  [DecidableEq k] {Q : Ω → Matrix n k ℝ} {ε δ : ℝ} (hQ : HasLaw Q (haarFrame n k) μ)
  (hk : Fintype.card k ≤ Fintype.card n) {d : ℕ} (hε : 0 < ε) (hε3 : ε < 15 / 8) (hδ : 0 < δ)
  (hk' : jlDim (4 * ε / 5) (δ / 21 ^ d) ≤ ↑(Fintype.card k)) :
  IsObliviousSubspaceEmbedding (fun ω ↦ √(↑(Fintype.card n) / ↑(Fintype.card k)) • (Q ω)ᴴ) d (1 - ε)
    (1 + ε) δ μ

Full source on GitHub

Copy link

Theorem (isObliviousSubspaceEmbedding_of_hasLaw_haarFrame_of_lt_sqrt_sub_sqrt). The Haar OSE, Gaussian upper half: an oblivious subspace embedding for dimension d with constants \frac{(1 \mp (\sqrt{d} + t)/\sqrt{\lvert k \rvert})^2} {(1 \pm (\sqrt{\lvert k \rvert} + s)/\sqrt{\lvert n \rvert})^2} and failure probability 2 e^{-t^2/2} + 2 e^{-s^2/2}, for 0 \le t \le \sqrt{\lvert k \rvert} - \sqrt{d} and 0 \le s < \sqrt{\lvert n \rvert} - \sqrt{\lvert k \rvert}. Better than NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_haarFrame for \lvert k \rvert small against \lvert n \rvert (rule 4).

General form: sizes are index types

Lean statement and details
NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_haarFrame_of_lt_sqrt_sub_sqrt.{u_1, u_2, u_3}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {n : Type u_3} [Fintype k]
  [Fintype n] [DecidableEq k] {Q : Ω → Matrix n k ℝ} {t s : ℝ} (hQ : HasLaw Q (haarFrame n k) μ)
  (hk : Fintype.card k ≤ Fintype.card n) (d : ℕ) (ht : 0 ≤ t) (htd : t ≤ √↑(Fintype.card k) - √↑d)
  (hs : 0 ≤ s) (hsk : s < √↑(Fintype.card n) - √↑(Fintype.card k)) :
  IsObliviousSubspaceEmbedding (fun ω ↦ √(↑(Fintype.card n) / ↑(Fintype.card k)) • (Q ω)ᴴ) d
    ((1 - (√↑d + t) / √↑(Fintype.card k)) ^ 2 /
      (1 + (√↑(Fintype.card k) + s) / √↑(Fintype.card n)) ^ 2)
    ((1 + (√↑d + t) / √↑(Fintype.card k)) ^ 2 /
      (1 - (√↑(Fintype.card k) + s) / √↑(Fintype.card n)) ^ 2)
    (2 * rexp (-t ^ 2 / 2) + 2 * rexp (-s ^ 2 / 2)) μ

Full source on GitHub

Copy link

Theorem (isObliviousSubspaceEmbedding_one_sub_one_add_of_hasLaw_haarFrame). The Haar OSE by JL and a net: for \varepsilon \ge 0 and \lvert k \rvert \le \lvert n \rvert, the Haar sketch \mathbf{S} = \sqrt{\lvert n\rvert/\lvert k\rvert}\,\mathbf{Q}^{\mathsf{H}}, \mathbf{Q} an n \times k Haar frame, is an oblivious subspace embedding for dimension d with constants 1 \mp \varepsilon and failure probability 2\cdot 21^d \exp\Bigl(-\lvert k\rvert\Bigl(\frac{4\varepsilon^2}{25} - \frac{32\varepsilon^3}{375}\Bigr)\Bigr)\,. It is the Haar JL tail through NLAlib.HasJLProperty.isObliviousSubspaceEmbedding at 4\varepsilon/5. Incomparable with Gordon's NLAlib.isObliviousSubspaceEmbedding_of_hasLaw_haarFrame (rule 4): this one reaches 1 \mp \varepsilon at every \lvert k\rvert \le \lvert n\rvert, that one is sharper in its constants for \lvert k\rvert \ll \lvert n\rvert. [Vershynin2018, Lemma 5.3.2] for the Haar JL fact, unspecified constant (2020 draft).

General form: sizes are index types

Lean statement and details
NLAlib.isObliviousSubspaceEmbedding_one_sub_one_add_of_hasLaw_haarFrame.{u_1, u_2, u_3}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {k : Type u_2} {n : Type u_3} [Fintype k]
  [Fintype n] [DecidableEq k] {Q : Ω → Matrix n k ℝ} {ε : ℝ} (hQ : HasLaw Q (haarFrame n k) μ)
  (hk : Fintype.card k ≤ Fintype.card n) (d : ℕ) (hε : 0 ≤ ε) :
  IsObliviousSubspaceEmbedding (fun ω ↦ √(↑(Fintype.card n) / ↑(Fintype.card k)) • (Q ω)ᴴ) d (1 - ε)
    (1 + ε) (2 * 21 ^ d * rexp (-(↑(Fintype.card k) * (4 * ε ^ 2 / 25 - 32 * ε ^ 3 / 375)))) μ

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.