Documentation

CslibFrontier.Foundations.BooleanAnalysis.FourierDegree

Functions of low degree: influence and Schwartz–Zippel on the cube #

A real function g on the cube has degree at most d when g ∈ BitString.lowDegree ℝ ι d, equivalently when its Fourier coefficients vanish on the sets of more than d coordinates (BitString.mem_lowDegree_iff_fourierCoeff_eq_zero), as in DecisionTree.comp_eval_mem_lowDegree and DecisionTree.fourierCoeff_eq_zero_of_depth_lt.

By the spectral formula for the total influence, such a function has total influence at most d times its mean square (BitString.totalInfluence_le_mul_expect_sq_of_degree), so a Boolean function of degree at most d, read as signs, has total influence at most d (BitString.totalInfluence_signVal_le_of_degree) O'Donnell, Chapter 3. In degree one, equality holds in the Poincaré inequality if and only if the function has degree at most one (BitString.totalInfluence_eq_expect_sub_expect_sq_iff_mem_lowDegree), and a Boolean function has degree at most one (equivalently, total influence equal to its variance) if and only if it is constant or a literal x ↦ b ^^ x i (BitString.mem_lowDegree_one_signVal_iff, BitString.totalInfluence_signVal_eq_expect_sub_expect_sq_iff); for balanced Boolean functions this characterizes average sensitivity one (BitString.totalInfluence_signVal_eq_one_iff_of_expect_eq_zero) O'Donnell, Exercise 1.19 and Proposition 2.40 Arora–Barak, Chapter 19, Exercise 5(b).

Schwartz–Zippel on the cube: a nonzero function of degree at most k is nonzero on at least a 2 ^ (-k) fraction of the cube (BitString.one_le_two_pow_mul_dens_ne_zero, BitString.two_pow_card_le_two_pow_mul_card_ne_zero) O'Donnell, Chapter 3. Take a set S of the Fourier support that is maximal for inclusion. Differentiating in a coordinate of S keeps S minus that coordinate maximal in the support of the derivative, while a derivative is nonzero on at most twice as many points as the function (averaging over one bit); after differentiating in every coordinate of S, the derivative is a nonzero constant.

Main results #

References #

theorem Cslib.BitString.totalInfluence_le_mul_expect_sq_of_fourierCoeff_eq_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) {d : ℕ} (hdeg : ∀ (S : Finset ι), d < S.card → fourierCoeff g S = 0) :
totalInfluence g ≤ ↑d * Finset.univ.expect fun (x : ι → Bool) => g x ^ 2

Total influence at most the degree times the mean square, Fourier-coefficient form: a real function whose Fourier coefficients vanish above degree d has total influence at most d times its mean square.

theorem Cslib.BitString.totalInfluence_le_mul_expect_sq_of_degree {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) {d : ℕ} (hdeg : g ∈ lowDegree ℝ ι d) :
totalInfluence g ≤ ↑d * Finset.univ.expect fun (x : ι → Bool) => g x ^ 2

Total influence at most the degree times the mean square: a real function of degree at most d has total influence at most d times its mean square.

theorem Cslib.BitString.totalInfluence_signVal_le_of_fourierCoeff_eq_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → Bool) {d : ℕ} (hdeg : ∀ (S : Finset ι), d < S.card → fourierCoeff (fun (x : ι → Bool) => signVal (f x)) S = 0) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) ≤ ↑d

Total influence at most the degree, Fourier-coefficient form: a Boolean function whose Fourier coefficients, read as signs, vanish above degree d has total influence at most d O'Donnell, Chapter 3.

theorem Cslib.BitString.totalInfluence_signVal_le_of_degree {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → Bool) {d : ℕ} (hdeg : (fun (x : ι → Bool) => signVal (f x)) ∈ lowDegree ℝ ι d) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) ≤ ↑d

Total influence at most the degree: a Boolean function of degree at most d, read as signs, has total influence at most d O'Donnell, Chapter 3.

theorem Cslib.BitString.dens_derivative_ne_zero_le {ι : Type u_1} [Fintype ι] [DecidableEq ι] (h : (ι → Bool) → ℝ) (i : ι) :
↑{x : ι → Bool | derivative i h x ≠ 0}.dens ≤ 2 * ↑{x : ι → Bool | h x ≠ 0}.dens

A derivative is nonzero at most twice as often as the function: the density of the points where the derivative of h in i is nonzero is at most twice the density of the points where h is nonzero.

theorem Cslib.BitString.one_le_two_pow_mul_dens_ne_zero_of_fourierCoeff_eq_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) {k : ℕ} (hdeg : ∀ (S : Finset ι), k < S.card → fourierCoeff g S = 0) (hg : g ≠ 0) :
1 ≤ 2 ^ k * ↑{x : ι → Bool | g x ≠ 0}.dens

Schwartz–Zippel on the cube, Fourier-coefficient form: a nonzero real function whose Fourier coefficients vanish above degree k is nonzero on at least a 2 ^ (-k) fraction of the cube.

theorem Cslib.BitString.one_le_two_pow_mul_dens_ne_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) {k : ℕ} (hdeg : g ∈ lowDegree ℝ ι k) (hg : g ≠ 0) :
1 ≤ 2 ^ k * ↑{x : ι → Bool | g x ≠ 0}.dens

Schwartz–Zippel on the cube: a nonzero real function of degree at most k is nonzero on at least a 2 ^ (-k) fraction of the cube.

theorem Cslib.BitString.two_pow_card_le_two_pow_mul_card_ne_zero_of_fourierCoeff_eq_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) {k : ℕ} (hdeg : ∀ (S : Finset ι), k < S.card → fourierCoeff g S = 0) (hg : g ≠ 0) :
2 ^ Fintype.card ι ≤ 2 ^ k * {x : ι → Bool | g x ≠ 0}.card

Schwartz–Zippel on the cube, counting and Fourier-coefficient form: a nonzero real function whose Fourier coefficients vanish above degree k on n coordinates is nonzero on at least 2 ^ (n - k) points of the cube.

theorem Cslib.BitString.two_pow_card_le_two_pow_mul_card_ne_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) {k : ℕ} (hdeg : g ∈ lowDegree ℝ ι k) (hg : g ≠ 0) :
2 ^ Fintype.card ι ≤ 2 ^ k * {x : ι → Bool | g x ≠ 0}.card

Schwartz–Zippel on the cube, counting form: a nonzero real function of degree at most k on n coordinates is nonzero on at least 2 ^ (n - k) points of the cube.

Equality in the Poincaré inequality and degree-one Boolean functions #

theorem Cslib.BitString.totalInfluence_eq_expect_sub_expect_sq_iff_fourierCoeff_eq_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) :
(totalInfluence g = Finset.univ.expect fun (x : ι → Bool) => (g x - Finset.univ.expect fun (y : ι → Bool) => g y) ^ 2) ↔ ∀ (S : Finset ι), 1 < S.card → fourierCoeff g S = 0

Equality in the Poincaré inequality, Fourier-coefficient form: the total influence equals the variance if and only if the Fourier coefficients vanish above degree one O'Donnell, Proposition 2.40.

theorem Cslib.BitString.totalInfluence_le_expect_sub_expect_sq_iff_fourierCoeff_eq_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) :
(totalInfluence g ≤ Finset.univ.expect fun (x : ι → Bool) => (g x - Finset.univ.expect fun (y : ι → Bool) => g y) ^ 2) ↔ ∀ (S : Finset ι), 1 < S.card → fourierCoeff g S = 0

Equality in the Poincaré inequality, inequality and Fourier-coefficient form: the total influence is at most the variance if and only if the Fourier coefficients vanish above degree one O'Donnell, Proposition 2.40.

theorem Cslib.BitString.totalInfluence_eq_expect_sub_expect_sq_iff_mem_lowDegree {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) :
(totalInfluence g = Finset.univ.expect fun (x : ι → Bool) => (g x - Finset.univ.expect fun (y : ι → Bool) => g y) ^ 2) ↔ g ∈ lowDegree ℝ ι 1

Equality in the Poincaré inequality: a real function has total influence equal to its variance if and only if it has degree at most one O'Donnell, Proposition 2.40.

theorem Cslib.BitString.totalInfluence_le_expect_sub_expect_sq_iff_mem_lowDegree {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) :
(totalInfluence g ≤ Finset.univ.expect fun (x : ι → Bool) => (g x - Finset.univ.expect fun (y : ι → Bool) => g y) ^ 2) ↔ g ∈ lowDegree ℝ ι 1

Equality in the Poincaré inequality, inequality form: a real function has total influence at most its variance if and only if it has degree at most one O'Donnell, Proposition 2.40.

theorem Cslib.BitString.derivative_eq_fourierCoeff_singleton_of_fourierCoeff_eq_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] (g : (ι → Bool) → ℝ) (hdeg : ∀ (S : Finset ι), 1 < S.card → fourierCoeff g S = 0) (i : ι) (x : ι → Bool) :

For a function whose Fourier coefficients vanish above degree one, the derivative in i is the constant fourierCoeff g {i}.

theorem Cslib.BitString.fourierCoeff_signVal_eq_zero_of_sq_eq_one {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → Bool) {S T : Finset ι} (hS : fourierCoeff (fun (x : ι → Bool) => signVal (f x)) S ^ 2 = 1) (hTS : T ≠ S) :
fourierCoeff (fun (x : ι → Bool) => signVal (f x)) T = 0

If a Boolean function read as signs has squared Fourier coefficient 1 on S, then all its other Fourier coefficients vanish.

theorem Cslib.BitString.eq_xor_of_fourierCoeff_signVal_singleton_sq_eq_one {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → Bool) {i : ι} (hi : fourierCoeff (fun (x : ι → Bool) => signVal (f x)) {i} ^ 2 = 1) (x : ι → Bool) :
f x = (f 0 ^^ x i)

If a Boolean function read as signs has squared Fourier coefficient 1 on {i}, then it is the literal x ↦ f 0 ^^ x i.

theorem Cslib.BitString.fourierCoeff_signVal_eq_zero_iff_eq_const_or_exists_eq_xor {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → Bool) :
(∀ (S : Finset ι), 1 < S.card → fourierCoeff (fun (x : ι → Bool) => signVal (f x)) S = 0) ↔ (∃ (b : Bool), f = Function.const (ι → Bool) b) ∨ ∃ (i : ι) (b : Bool), f = fun (x : ι → Bool) => b ^^ x i

Boolean functions of degree at most one are constants or literals, Fourier-coefficient form: the Fourier coefficients of signVal ∘ f vanish above degree one if and only if f is constant or a literal x ↦ b ^^ x i O'Donnell, Exercise 1.19.

theorem Cslib.BitString.mem_lowDegree_one_signVal_iff {ι : Type u_1} [Finite ι] (f : (ι → Bool) → Bool) :
(fun (x : ι → Bool) => signVal (f x)) ∈ lowDegree ℝ ι 1 ↔ (∃ (b : Bool), f = Function.const (ι → Bool) b) ∨ ∃ (i : ι) (b : Bool), f = fun (x : ι → Bool) => b ^^ x i

Boolean functions of degree at most one are constants or literals: signVal ∘ f has degree at most one if and only if f is constant or a literal x ↦ b ^^ x i O'Donnell, Exercise 1.19.

theorem Cslib.BitString.totalInfluence_signVal_eq_expect_sub_expect_sq_iff {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → Bool) :
((totalInfluence fun (x : ι → Bool) => signVal (f x)) = Finset.univ.expect fun (x : ι → Bool) => (signVal (f x) - Finset.univ.expect fun (y : ι → Bool) => signVal (f y)) ^ 2) ↔ (∃ (b : Bool), f = Function.const (ι → Bool) b) ∨ ∃ (i : ι) (b : Bool), f = fun (x : ι → Bool) => b ^^ x i

Equality in the Poincaré inequality for Boolean functions: a Boolean function read as signs has total influence equal to its variance if and only if it is constant or a literal x ↦ b ^^ x i O'Donnell, Proposition 2.40.

theorem Cslib.BitString.totalInfluence_signVal_le_expect_sub_expect_sq_iff {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → Bool) :
((totalInfluence fun (x : ι → Bool) => signVal (f x)) ≤ Finset.univ.expect fun (x : ι → Bool) => (signVal (f x) - Finset.univ.expect fun (y : ι → Bool) => signVal (f y)) ^ 2) ↔ (∃ (b : Bool), f = Function.const (ι → Bool) b) ∨ ∃ (i : ι) (b : Bool), f = fun (x : ι → Bool) => b ^^ x i

Equality in the Poincaré inequality for Boolean functions, inequality form: a Boolean function read as signs has total influence at most its variance if and only if it is constant or a literal x ↦ b ^^ x i O'Donnell, Proposition 2.40.

theorem Cslib.BitString.expect_sub_expect_sq_signVal_of_expect_eq_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] {f : (ι → Bool) → Bool} (hbal : (Finset.univ.expect fun (x : ι → Bool) => signVal (f x)) = 0) :
(Finset.univ.expect fun (x : ι → Bool) => (signVal (f x) - Finset.univ.expect fun (y : ι → Bool) => signVal (f y)) ^ 2) = 1

Balanced Boolean functions have variance one.

theorem Cslib.BitString.totalInfluence_signVal_eq_one_iff_of_expect_eq_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] {f : (ι → Bool) → Bool} (hbal : (Finset.univ.expect fun (x : ι → Bool) => signVal (f x)) = 0) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) = 1 ↔ ∃ (i : ι) (b : Bool), f = fun (x : ι → Bool) => b ^^ x i

Balanced Boolean functions of average sensitivity one are literals: for a balanced Boolean function (𝔼 x, signVal (f x) = 0), the total influence (average sensitivity) equals one if and only if the function is a literal x ↦ b ^^ x i Arora–Barak, Chapter 19, Exercise 5(b) O'Donnell, Proposition 2.40.

theorem Cslib.BitString.totalInfluence_signVal_le_one_iff_of_expect_eq_zero {ι : Type u_1} [Fintype ι] [DecidableEq ι] {f : (ι → Bool) → Bool} (hbal : (Finset.univ.expect fun (x : ι → Bool) => signVal (f x)) = 0) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) ≤ 1 ↔ ∃ (i : ι) (b : Bool), f = fun (x : ι → Bool) => b ^^ x i

Balanced Boolean functions of average sensitivity at most one are literals: for a balanced Boolean function (𝔼 x, signVal (f x) = 0), the total influence (average sensitivity) is at most one if and only if the function is a literal x ↦ b ^^ x i Arora–Barak, Chapter 19, Exercise 5(b) O'Donnell, Proposition 2.40.