Documentation

CslibFrontier.Foundations.BooleanAnalysis.SpectralNorm

Fourier spectral bounds #

Every affine Boolean function has Fourier spectral norm one, and every Boolean function on at most two coordinates has spectral norm at most two.

Suppose every character of a vector of Boolean functions has Fourier spectral norm at most B. Adjoining a Boolean function of selected coordinates multiplies this joint bound by at most the spectral norm of the function being adjoined. The selection can repeat coordinates.

The joint hypothesis accounts for shared intermediate values in circuits: the Fourier expansion of one new gate produces products of old characters, which are again old characters. Thus a gate is charged once, however its predecessors are reused.

Multiplying a real function f by a character χ_T shifts its coefficients by T ∆ · (BitString.fourierCoeff_chi_mul), so expanding f in characters writes each coefficient of the pointwise product f g as ∑ T, f̂ T * ĝ (T ∆ S) (BitString.fourierCoeff_mul). Since S ↦ T ∆ S permutes the sets, the spectral norm ‖f̂‖₁ = ∑ S, |f̂ S| is submultiplicative, ‖(f g)^‖₁ ≤ ‖f̂‖₁ ‖ĝ‖₁ (BitString.sum_abs_fourierCoeff_mul_le) O'Donnell, Exercise 3.6; in particular ‖(f²)^‖₁ ≤ ‖f̂‖₁² (BitString.sum_abs_fourierCoeff_sq_le_sq). A character has spectral norm one (BitString.sum_abs_fourierCoeff_chi), and multiplying by a character keeps the spectral norm (BitString.sum_abs_fourierCoeff_chi_mul).

The coefficient on S of the restriction fixing the coordinates outside J to z sums the coefficients f̂(U) with U ∩ J = S, each times χ_{U \ J}(z) (BitString.fourierCoeff_piecewise). Hence the restriction has spectral norm at most ‖f̂‖₁ (BitString.sum_abs_fourierCoeff_piecewise_le) O'Donnell, Exercise 3.7(a), and so has the function z ↦ f_{J|z}^(S), O'Donnell's F_{S|J} f (BitString.sum_abs_fourierCoeff_fourierCoeff_piecewise_le), a consequence of O'Donnell, Proposition 3.21.

Main results #

Usage #

Open Cslib.BitString. The statements on products, characters and restrictions are about the spectral norm ∑ S, |fourierCoeff f S| of a real f : (ι → Bool) → ℝ; a Boolean function enters as fun x => signVal (f x). For a product, fourierCoeff_mul f g S expands a coefficient of fun x => f x * g x, and sum_abs_fourierCoeff_mul_le f g and sum_abs_fourierCoeff_sq_le_sq f bound its spectral norm. A restriction is written fun x => f (J.piecewise x z): the coordinates in J stay free and the others are fixed to z. Small-bias distributions fool functions of small spectral norm and their squares (Cslib.BitString.IsSmallBias.fools, Cslib.BitString.IsSmallBias.fools_sq in CslibFrontier.Probability.Fooling), which is how the derandomized BLR test and the deterministic Fourier estimates use these bounds. The checked clients in CslibFrontierTests/BooleanAnalysisSpectralNorm.lean show that a character has spectral norm 1 and that ‖(χ_S²)^‖₁ ≤ ‖χ̂_S‖₁² is attained. For χ_{0} + χ_{1} on two bits, of spectral norm 2, they bound by 2 the spectral norms of its product with χ_{0}, of its restrictions and of the coefficient of a restriction as a function of the fixed bits.

References #

theorem Cslib.BitString.sum_abs_fourierCoeff_chi {ι : Type u_1} [Fintype ι] [DecidableEq ι] (T : Finset ι) :
∑ S : Finset ι, |fourierCoeff (chi ℝ T) S| = 1

A character has spectral norm one: ‖χ̂_T‖₁ = 1.

theorem Cslib.BitString.sum_abs_fourierCoeff_signVal_eq_one_of_isAffine {ι : Type u_1} [Fintype ι] [DecidableEq ι] {f : (ι → Bool) → Bool} (hf : IsAffine f) :
∑ S : Finset ι, |fourierCoeff (fun (x : ι → Bool) => signVal (f x)) S| = 1

An affine Boolean function has spectral norm one: its sign function is a character multiplied by the sign of its constant term.

theorem Cslib.BitString.sum_abs_fourierCoeff_signVal_le_two_of_card_le_two {ι : Type u_1} [Fintype ι] [DecidableEq ι] (hι : Fintype.card ι ≤ 2) (f : (ι → Bool) → Bool) :
∑ S : Finset ι, |fourierCoeff (fun (x : ι → Bool) => signVal (f x)) S| ≤ 2

A Boolean function on at most two coordinates has spectral norm at most two, by Cauchy–Schwarz and Parseval's identity.

theorem Cslib.BitString.sum_abs_fourierCoeff_sum_mul_le {ι : Type u_1} {α : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype α] (c : α → ℝ) (f : α → (ι → Bool) → ℝ) :
∑ S : Finset ι, |fourierCoeff (fun (x : ι → Bool) => ∑ i : α, c i * f i x) S| ≤ ∑ i : α, |c i| * ∑ S : Finset ι, |fourierCoeff (f i) S|

The spectral norm of a finite linear combination is at most the corresponding weighted sum of spectral norms.

theorem Cslib.BitString.sum_abs_fourierCoeff_chi_append_le {ι : Type u_1} {α : Type u_2} {κ : Type u_3} [Fintype ι] [DecidableEq ι] [Fintype α] [DecidableEq α] [Finite κ] (v : (ι → Bool) → κ → Bool) (φ : (α → Bool) → Bool) (args : α → κ) {B : ℝ} (hbound : ∀ (T : Finset κ), ∑ U : Finset ι, |fourierCoeff (fun (x : ι → Bool) => chi ℝ T (v x)) U| ≤ B) (S : Finset (Option κ)) :
∑ U : Finset ι, |fourierCoeff (fun (x : ι → Bool) => chi ℝ S fun (o : Option κ) => o.elim (φ (v x ∘ args)) (v x)) U| ≤ (∑ T : Finset α, |fourierCoeff (fun (y : α → Bool) => signVal (φ y)) T|) * B

Adjoining a Boolean function of selected coordinates multiplies a uniform spectral bound for all characters by at most the spectral norm of the adjoined function. The map args may repeat coordinates.

Products, characters and restrictions #

theorem Cslib.BitString.fourierCoeff_mul {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f g : (ι → Bool) → ℝ) (S : Finset ι) :
fourierCoeff (fun (x : ι → Bool) => f x * g x) S = ∑ T : Finset ι, fourierCoeff f T * fourierCoeff g (symmDiff T S)

The Fourier coefficients of a pointwise product: (f g)^(S) = ∑_T f̂(T) ĝ(T ∆ S).

theorem Cslib.BitString.sum_abs_fourierCoeff_mul_le {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f g : (ι → Bool) → ℝ) :
∑ S : Finset ι, |fourierCoeff (fun (x : ι → Bool) => f x * g x) S| ≤ (∑ S : Finset ι, |fourierCoeff f S|) * ∑ S : Finset ι, |fourierCoeff g S|

The spectral norm is submultiplicative: ‖(f g)^‖₁ ≤ ‖f̂‖₁ ‖ĝ‖₁ O'Donnell, Exercise 3.6.

theorem Cslib.BitString.sum_abs_fourierCoeff_sq_le_sq {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → ℝ) :
∑ S : Finset ι, |fourierCoeff (fun (x : ι → Bool) => f x ^ 2) S| ≤ (∑ S : Finset ι, |fourierCoeff f S|) ^ 2

The spectral norm of a square: ‖(f²)^‖₁ ≤ ‖f̂‖₁², the case g = f of O'Donnell, Exercise 3.6.

theorem Cslib.BitString.sum_abs_fourierCoeff_chi_mul {ι : Type u_1} [Fintype ι] [DecidableEq ι] (U : Finset ι) (f : (ι → Bool) → ℝ) :
∑ S : Finset ι, |fourierCoeff (fun (x : ι → Bool) => chi ℝ U x * f x) S| = ∑ S : Finset ι, |fourierCoeff f S|

Multiplying by a character keeps the spectral norm: ‖(χ_U f)^‖₁ = ‖f̂‖₁, since the coefficients of χ_U f are those of f shifted by U ∆ ·.

theorem Cslib.BitString.sum_abs_fourierCoeff_piecewise_le {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → ℝ) (J : Finset ι) (z : ι → Bool) :
∑ S : Finset ι, |fourierCoeff (fun (x : ι → Bool) => f (J.piecewise x z)) S| ≤ ∑ U : Finset ι, |fourierCoeff f U|

Restrictions do not increase the spectral norm: fixing the coordinates outside J to z gives a function of spectral norm at most ‖f̂‖₁ O'Donnell, Exercise 3.7(a).

theorem Cslib.BitString.sum_abs_fourierCoeff_fourierCoeff_piecewise_le {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → ℝ) (J S : Finset ι) :
∑ V : Finset ι, |fourierCoeff (fun (z : ι → Bool) => fourierCoeff (fun (x : ι → Bool) => f (J.piecewise x z)) S) V| ≤ ∑ U : Finset ι, |fourierCoeff f U|

The coefficient of a restriction, as a function of the fixed bits, has small spectral norm: the coefficient on S of the restriction fixing the coordinates outside J to z, as a function of z (O'Donnell's F_{S|J} f), has spectral norm at most ‖f̂‖₁, a consequence of O'Donnell, Proposition 3.21.