NLA-lib Explorer

NLAlib.countSketch

Library · def

The CountSketch law: the pushforward by NLAlib.countSketchMatrix of i.i.d. uniform hash values (NLAlib.samplingMeasure at weights 1/\lvert k \rvert, which is Mathlib's uniformOn Set.univ by NLAlib.samplingMeasure_const_inv_card; by uniformOn_pi, a uniform function n \to k) and independent Rademacher signs (NLAlib.rademacherVector n). The measurable space on k is ⊤ inside the definition, so no statement carries an instance on k; NLAlib.countSketch_eq_map restates it under any measurable space on k with measurable singletons. Junk value: the zero measure when k is empty and n is not. [Woodruff2014, §2.1]; [CamanoEpperlyMeyerTropp2025, (B.1)].

NLAlib.countSketch.{u_2, u_3, u_4} {𝕜 : Type u_2} [RCLike 𝕜] (k : Type u_3) (n : Type u_4)
  [Fintype k] [Fintype n] [DecidableEq k] : Measure (Matrix k n 𝕜)

Full source on GitHub

Import NLAlib.Sketching.Sparse.CountSketch.