Documentation

CslibFrontier.Foundations.BooleanAnalysis.Monotone

Influences of monotone and unate Boolean functions #

The derivative in i of a Boolean function read as signs takes the values 0 and ±1, so its square is its absolute value (BitString.sq_derivative_signVal). The coefficient of a function on {i} is the average of its derivative in i, so for every Boolean function it is at most the influence of i in absolute value (BitString.abs_fourierCoeff_singleton_le_influence). With the order false < true on bits and the signs signVal false = 1, signVal true = -1, the derivative of a monotone function is nonnegative, so its influences are its degree-one coefficients (BitString.influence_eq_fourierCoeff_singleton_of_monotone) O'Donnell, Section 2.2; for an antitone function they are their negatives.

A Boolean function is unate in direction i (BitString.IsUnateIn) if raising bit i either never lowers its value or never raises it, and unate (BitString.IsUnate) if it is unate in every direction O'Donnell, Exercise 2.5; monotone and antitone functions are unate (Monotone.isUnate, Antitone.isUnate). The derivative in i, read as signs, has a constant sign exactly when f is unate in direction i, that is, exactly when the influence of i, the average of the absolute value of the derivative, equals the absolute value of the coefficient on {i}, the average of the derivative (BitString.abs_fourierCoeff_singleton_eq_influence_iff) O'Donnell, Exercise 2.5(a).

The degree-one coefficients carry at most the variance (BitString.sum_fourierCoeff_singleton_sq_le), so by the Cauchy–Schwarz inequality their absolute values sum to at most √(n σ²) (BitString.sq_sum_abs_fourierCoeff_singleton_le). A unate function on n coordinates with variance σ² therefore has total influence at most √(n σ²) (BitString.IsUnate.totalInfluence_le_sqrt_card_mul), in particular at most √n (BitString.IsUnate.totalInfluence_le_sqrt_card) O'Donnell, Exercise 2.23; so do monotone and antitone functions (BitString.totalInfluence_le_sqrt_card_mul_of_monotone, BitString.totalInfluence_le_sqrt_card_of_monotone). Linear threshold functions are unate (CslibFrontier.Foundations.BooleanAnalysis.Unate).

Main definitions #

Main results #

References #

theorem Cslib.BitString.derivative_signVal_nonneg_iff {ι : Type u_1} [DecidableEq ι] (f : (ι → Bool) → Bool) (i : ι) (x : ι → Bool) :
0 ≤ derivative i (fun (x : ι → Bool) => signVal (f x)) x ↔ f (Function.update x i false) ≤ f (Function.update x i true)

The derivative in i of a Boolean function read as signs is nonnegative at x exactly when raising bit i of x from false (sign 1) to true (sign -1) does not lower the value.

theorem Cslib.BitString.derivative_signVal_nonpos_iff {ι : Type u_1} [DecidableEq ι] (f : (ι → Bool) → Bool) (i : ι) (x : ι → Bool) :
derivative i (fun (x : ι → Bool) => signVal (f x)) x ≤ 0 ↔ f (Function.update x i true) ≤ f (Function.update x i false)

The derivative in i of a Boolean function read as signs is nonpositive at x exactly when raising bit i of x does not raise the value.

theorem Cslib.BitString.derivative_signVal_nonneg_of_monotone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} (hf : Monotone f) (i : ι) (x : ι → Bool) :
0 ≤ derivative i (fun (x : ι → Bool) => signVal (f x)) x

The derivative of a monotone Boolean function read as signs is nonnegative: raising bit i from false (sign 1) to true (sign -1) can only raise the value.

theorem Cslib.BitString.derivative_signVal_nonpos_of_antitone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} (hf : Antitone f) (i : ι) (x : ι → Bool) :
derivative i (fun (x : ι → Bool) => signVal (f x)) x ≤ 0

The derivative of an antitone Boolean function read as signs is nonpositive.

def Cslib.BitString.IsUnateIn {ι : Type u_1} [DecidableEq ι] (i : ι) (f : (ι → Bool) → Bool) :

f is unate in direction i: changing bit i from false to true either never lowers the value of f or never raises it O'Donnell, Exercise 2.5.

def Cslib.BitString.IsUnate {ι : Type u_1} [DecidableEq ι] (f : (ι → Bool) → Bool) :

f is unate: it is unate in every direction O'Donnell, Exercise 2.5; equivalently (not proved here), it is monotone up to negating some of its input bits.

theorem Monotone.isUnate {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} (hf : Monotone f) :

A monotone function is unate.

theorem Antitone.isUnate {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} (hf : Antitone f) :

An antitone function is unate.

theorem Cslib.BitString.abs_fourierCoeff_singleton_le_influence {ι : Type u_1} [DecidableEq ι] [Fintype ι] (f : (ι → Bool) → Bool) (i : ι) :
|fourierCoeff (fun (x : ι → Bool) => signVal (f x)) {i}| ≤ influence i fun (x : ι → Bool) => signVal (f x)

The coefficient of a Boolean function, read as signs, on {i} is at most the influence of i in absolute value.

theorem Cslib.BitString.influence_eq_fourierCoeff_singleton_of_monotone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Monotone f) (i : ι) :
(influence i fun (x : ι → Bool) => signVal (f x)) = fourierCoeff (fun (x : ι → Bool) => signVal (f x)) {i}

The influences of a monotone Boolean function are its degree-one coefficients: for a monotone function read as signs, the influence of i is the coefficient on {i} O'Donnell, Section 2.2.

theorem Cslib.BitString.influence_eq_neg_fourierCoeff_singleton_of_antitone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Antitone f) (i : ι) :
(influence i fun (x : ι → Bool) => signVal (f x)) = -fourierCoeff (fun (x : ι → Bool) => signVal (f x)) {i}

The influences of an antitone Boolean function read as signs are the negatives of its degree-one coefficients.

theorem Cslib.BitString.fourierCoeff_singleton_nonneg_of_monotone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Monotone f) (i : ι) :
0 ≤ fourierCoeff (fun (x : ι → Bool) => signVal (f x)) {i}

A monotone Boolean function read as signs has nonnegative degree-one coefficients.

theorem Cslib.BitString.fourierCoeff_singleton_nonpos_of_antitone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Antitone f) (i : ι) :
fourierCoeff (fun (x : ι → Bool) => signVal (f x)) {i} ≤ 0

An antitone Boolean function read as signs has nonpositive degree-one coefficients.

theorem Cslib.BitString.sum_fourierCoeff_singleton_sq_le {ι : Type u_1} [DecidableEq ι] [Fintype ι] (g : (ι → Bool) → ℝ) :
∑ i : ι, fourierCoeff g {i} ^ 2 ≤ Finset.univ.expect fun (x : ι → Bool) => (g x - Finset.univ.expect fun (y : ι → Bool) => g y) ^ 2

The degree-one weight is at most the variance: the squared coefficients on the singletons sum to at most the variance.

theorem Cslib.BitString.sq_sum_abs_fourierCoeff_singleton_le {ι : Type u_1} [DecidableEq ι] [Fintype ι] (g : (ι → Bool) → ℝ) :
(∑ i : ι, |fourierCoeff g {i}|) ^ 2 ≤ ↑(Fintype.card ι) * Finset.univ.expect fun (x : ι → Bool) => (g x - Finset.univ.expect fun (y : ι → Bool) => g y) ^ 2

The degree-one coefficients sum to at most √(n σ²) in absolute value, in squared form: (∑ i, |ĝ({i})|) ^ 2 ≤ n σ², by Cauchy–Schwarz, since the degree-one weight is at most the variance σ².

theorem Cslib.BitString.abs_fourierCoeff_singleton_eq_influence_iff {ι : Type u_1} [DecidableEq ι] [Fintype ι] (f : (ι → Bool) → Bool) (i : ι) :
(|fourierCoeff (fun (x : ι → Bool) => signVal (f x)) {i}| = influence i fun (x : ι → Bool) => signVal (f x)) ↔ IsUnateIn i f

The influence of a unate direction O'Donnell, Exercise 2.5(a): for a Boolean function read as signs, the influence of i equals the absolute value of the coefficient on {i} exactly when the function is unate in direction i. The inequality ≤ always holds (BitString.abs_fourierCoeff_singleton_le_influence).

theorem Cslib.BitString.sum_influence_sq_le_of_monotone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Monotone f) :
∑ i : ι, (influence i fun (x : ι → Bool) => signVal (f x)) ^ 2 ≤ Finset.univ.expect fun (x : ι → Bool) => (signVal (f x) - Finset.univ.expect fun (y : ι → Bool) => signVal (f y)) ^ 2

For a monotone Boolean function read as signs, the squared influences sum to at most the variance.

theorem Cslib.BitString.totalInfluence_eq_sum_fourierCoeff_singleton_of_monotone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Monotone f) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) = ∑ i : ι, fourierCoeff (fun (x : ι → Bool) => signVal (f x)) {i}

The total influence of a monotone function is the sum of its degree-one Fourier coefficients, read as signs O'Donnell, Proposition 2.31.

theorem Cslib.BitString.totalInfluence_eq_neg_sum_fourierCoeff_singleton_of_antitone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Antitone f) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) = -∑ i : ι, fourierCoeff (fun (x : ι → Bool) => signVal (f x)) {i}

The total influence of an antitone function is minus the sum of its degree-one Fourier coefficients, read as signs.

theorem Cslib.BitString.IsUnate.totalInfluence_le_sqrt_card_mul {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : IsUnate f) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) ≤ √(↑(Fintype.card ι) * Finset.univ.expect fun (x : ι → Bool) => (signVal (f x) - Finset.univ.expect fun (y : ι → Bool) => signVal (f y)) ^ 2)

Unate functions have total influence at most √(n σ²): a unate Boolean function on n coordinates, read as signs with variance σ², has total influence at most √(n σ²), refining O'Donnell, Exercise 2.23. Its influences are its degree-one coefficients in absolute value, which sum to at most √(n σ²) by Cauchy–Schwarz.

theorem Cslib.BitString.IsUnate.totalInfluence_le_sqrt_card {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : IsUnate f) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) ≤ √↑(Fintype.card ι)

Unate functions have total influence at most √n: a unate Boolean function on n coordinates, read as signs, has total influence at most √n, since its variance is at most one O'Donnell, Exercise 2.23.

theorem Cslib.BitString.totalInfluence_le_sqrt_card_mul_of_monotone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Monotone f) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) ≤ √(↑(Fintype.card ι) * Finset.univ.expect fun (x : ι → Bool) => (signVal (f x) - Finset.univ.expect fun (y : ι → Bool) => signVal (f y)) ^ 2)

Monotone functions have total influence at most √(n σ²): a monotone Boolean function on n coordinates, read as signs with variance σ², has total influence at most √(n σ²), refining O'Donnell, Exercise 2.23.

theorem Cslib.BitString.totalInfluence_le_sqrt_card_mul_of_antitone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Antitone f) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) ≤ √(↑(Fintype.card ι) * Finset.univ.expect fun (x : ι → Bool) => (signVal (f x) - Finset.univ.expect fun (y : ι → Bool) => signVal (f y)) ^ 2)

Antitone functions have total influence at most √(n σ²): an antitone Boolean function on n coordinates, read as signs with variance σ², has total influence at most √(n σ²).

theorem Cslib.BitString.totalInfluence_le_sqrt_card_of_monotone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Monotone f) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) ≤ √↑(Fintype.card ι)

Monotone functions have total influence at most √n: a monotone Boolean function on n coordinates, read as signs, has total influence at most √n O'Donnell, Exercise 2.23.

theorem Cslib.BitString.totalInfluence_le_sqrt_card_of_antitone {ι : Type u_1} [DecidableEq ι] {f : (ι → Bool) → Bool} [Fintype ι] (hf : Antitone f) :
(totalInfluence fun (x : ι → Bool) => signVal (f x)) ≤ √↑(Fintype.card ι)

Antitone functions have total influence at most √n: an antitone Boolean function on n coordinates, read as signs, has total influence at most √n.