NLA-lib Explorer

NLAlib.conjTranspose_countSketchMatrix_mul_self_sub_one

Library · theorem

The hollow Gram identity. For signs with \sigma_i^2 = 1, the Gram error \mathbf{S}^{\mathsf{H}}\mathbf{S} - \mathbf{I} of a CountSketch has zero diagonal, and entry \sigma_i \sigma_j at i \ne j when h(i) = h(j), 0 otherwise. The deferred sparse families (SparseStack, a stack of independent CountSketches) expand their Gram errors through it. [Woodruff2014, proof of Theorem 14] (the same expansion, for \|\mathbf{S}\mathbf{x}\|^2); [CamanoEpperlyMeyerTropp2025, proof of Lemma B.1].

NLAlib.conjTranspose_countSketchMatrix_mul_self_sub_one.{u_2, u_3, u_4} {𝕜 : Type u_2} [RCLike 𝕜]
  {k : Type u_3} {n : Type u_4} [Fintype k] [DecidableEq k] [DecidableEq n] (h : n → k) {σ : n → ℝ}
  (hσ : ∀ (i : n), σ i ^ 2 = 1) :
  (countSketchMatrix h σ)ᴴ * countSketchMatrix h σ - 1 =
    of fun i j ↦ if i ≠ j ∧ h i = h j then ↑(σ i * σ j) else 0

Full source on GitHub

Import NLAlib.Sketching.Sparse.CountSketch.