Documentation

CslibFrontier.Foundations.BooleanAnalysis.SpectralSample

The spectral sample #

By Parseval's identity, the squared Fourier coefficients of a Boolean function read as signs sum to one, so they are the probabilities of a distribution on sets of coordinates: the spectral sample 𝒮_f (BitString.spectralSample), which draws S with probability f̂(S) ^ 2 O'Donnell, Definition 1.18. The size of the spectral sample is k with probability the Fourier weight W^k[f] at degree k (BitString.spectralSample_map_card_apply).

Main definitions #

Main results #

References #

noncomputable def Cslib.BitString.spectralSample {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → Bool) :
PMF (Finset ι)

The spectral sample of a Boolean function f read as signs: the distribution on sets of coordinates that draws S with probability f̂(S) ^ 2 O'Donnell, Definition 1.18.

theorem Cslib.BitString.spectralSample_apply {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → Bool) (S : Finset ι) :
(spectralSample f) S = ENNReal.ofReal (fourierCoeff (fun (x : ι → Bool) => signVal (f x)) S ^ 2)

The spectral sample draws S with probability f̂(S) ^ 2.

theorem Cslib.BitString.spectralSample_map_card_apply {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → Bool) (k : ℕ) :

The size of the spectral sample is k with probability the Fourier weight W^k[f] at degree k O'Donnell, Definition 1.19.