Documentation

CslibFrontier.Foundations.BooleanAnalysis.MajorityStability

The limits of the spectrum and the noise stability of majority #

For majority of n = 2 m + 1 bits, read as signs, the Fourier weight at each odd level k = 2 j + 1 converges as m → ∞: W^k[Maj_n] → [ρ^k] (2/π) arcsin ρ = (2/π) C(2j, j) / (4^j (2j + 1)) (BitString.tendsto_levelWeight_signVal_majority) O'Donnell, Theorem 5.22. At level one, W^1[Maj_n] = (2m + 1) (C(2m, m) / 4^m)² is the reciprocal of the m-th Wallis product, which tends to π/2. From one odd level to the next the weights change by the factor (2m - 2j) (2j + 1)² / ((2j + 2)(2j + 3)(2m - 2j - 1)), which tends to the ratio (2j + 1)² / ((2j + 2)(2j + 3)) of consecutive coefficients of (2/π) arcsin. The weights decrease in n (BitString.levelWeight_signVal_majority_succ_lt, Corollary 5.21), so each is at least its limit (BitString.le_levelWeight_signVal_majority), the lower half of the book's error bound (5.15). For the upper half, the weight at level k = 2j + 1 is (π/2) n c_{m-j} c_m times its limit, with c_a = C(2a, a)/4^a; Wallis's product gives c_a² ≤ 1/(πa), so for k < n/2 the weight is at most (1 + 2k/n) times its limit (BitString.levelWeight_signVal_majority_le). The same Wallis bounds place the limit between (2/π)^(3/2) k^(-3/2) and (1 + 1/k) times it (Real.two_div_pi_mul_centralBinom_div_mem_Icc, Exercise 5.27(a)), so for n ≥ 2k² the weight is (2/π)^(3/2) k^(-3/2) (1 ± O(1/k)) (BitString.levelWeight_signVal_majority_mem_Icc, the first statement of Corollary 5.23). The limits sum to (2/π) arcsin 1 = 1, and their tail above k telescopes to (2/π)^(3/2) k^(-1/2) (1 ± O(1/k)) (Real.one_sub_sum_two_div_pi_mul_centralBinom_div_mem_Icc), which gives the weight above level k (BitString.sum_Ioc_levelWeight_signVal_majority_le, BitString.le_sum_Ioc_levelWeight_signVal_majority, the second statement) and the concentration of the spectrum up to degree 8/(π³ε²) + O(1) (BitString.sum_fourierCoeff_sq_signVal_majority_le).

Summing over the levels, with the weights bounded by 1 and the geometric bound |ρ|^k for |ρ| < 1 (Tannery's theorem), and using the Maclaurin series of arcsin (Real.hasSum_arcsin), the noise stability of majority converges: Stab_ρ[Maj_n] → (2/π) arcsin ρ for every ρ ∈ [-1, 1] (BitString.tendsto_noiseStability_signVal_majority) O'Donnell, Theorem 2.45. At ρ = 1 every function read as signs has Stab_1 = 1, and at ρ = -1 majority, being odd, has Stab_{-1} = -1. For 0 ≤ ρ ≤ 1 the noise stability decreases in n (Theorem 5.18), so it is at least its limit (BitString.le_noiseStability_signVal_majority); summing the error bound (5.15) over the levels below n/2 and bounding the levels above by ρ^((n+1)/2) gives Stab_ρ[Maj_n] ≤ (2/π) arcsin ρ + 3 / √((1 - ρ²) n) for 0 ≤ ρ < 1 (BitString.noiseStability_signVal_majority_le), the rest of Theorem 5.18. Equivalently, for δ ∈ [0, 1], NS_δ[Maj_n] → arccos(1 - 2δ) / π (BitString.tendsto_noiseSensitivity_majority).

This is the Fourier route of the book's Section 5.3 (the book first proves Theorem 2.45 through the multidimensional central limit theorem in Section 5.2 and deduces Theorem 5.22 from it, then proves Theorem 5.22 directly); no central limit theorem is used.

Combining the exact equal-coefficient bound n W^1[f] ≤ E[|x₁ + ⋯ + xₙ|]² (BitString.card_mul_levelWeight_one_le_of_fourierCoeff_singleton_eq in BooleanAnalysis.Majority), monotonicity of E[|x₁ + ⋯ + xₙ|] in n, and W^1[Maj_n] → 2/π proves Proposition 2.58 (BitString.eventually_levelWeight_one_le_of_fourierCoeff_singleton_eq) O'Donnell, Section 2.5: every Boolean function on n bits with all degree-one Fourier coefficients equal satisfies W^1[f] ≤ 2/π + o_n(1). Exercise 2.24's rate O(1/n) is not formalized (#2131).

Main results #

Usage #

Majority of 2 m + 1 bits read as signs is fun x => signVal (majority (2 * m + 1) x); the limits are along m → ∞, the book's n → ∞ through the odd numbers. The book's sign convention differs (true reads as -1), which changes neither level weights nor noise stability. The book's form (4 / (π k 2^k)) C(k - 1, (k - 1)/2) of the limiting weight is 2 / π * (Nat.centralBinom j / 4 ^ j / (2 * j + 1)) at k = 2 j + 1, and (2/π)^(3/2) k^(-3/2) is written 2 / π * √(2 / π) / (k * √k). The weight above level k is the Ioc sum ∑ i ∈ Ioc k (2 * m + 1), levelWeight i _, the book's W^{>k}. In Proposition 2.58, the o_n(1) term is stated uniformly in f: for every ε > 0, eventually in n, every Boolean function on n bits with equal degree-one coefficients satisfies W^1[f] ≤ 2/π + ε.

References #

The level weights of majority #

theorem Cslib.BitString.tendsto_levelWeight_signVal_majority (j : ℕ) :
Filter.Tendsto (fun (m : ℕ) => levelWeight (2 * j + 1) fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)) Filter.atTop (nhds (2 / Real.pi * (↑j.centralBinom / 4 ^ j / (2 * ↑j + 1))))

The limit of the spectrum of majority O'Donnell, Theorem 5.22: for each j, the Fourier weight of majority of 2 m + 1 bits, read as signs, at level k = 2 j + 1 tends to [ρ^k] (2/π) arcsin ρ = (2/π) C(2j, j) / (4^j (2j + 1)) as m → ∞. The two halves of the book's error bound (5.15) are BitString.le_levelWeight_signVal_majority and BitString.levelWeight_signVal_majority_le.

theorem Cslib.BitString.le_levelWeight_signVal_majority {m j : ℕ} (hj : j ≤ m) :
2 / Real.pi * (↑j.centralBinom / 4 ^ j / (2 * ↑j + 1)) ≤ levelWeight (2 * j + 1) fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)

The level weights of majority are at least their limits: for j ≤ m, the Fourier weight of majority of 2 m + 1 bits at level 2 j + 1 is at least (2/π) C(2j, j) / (4^j (2j + 1)), the lower half of O'Donnell, (5.15). The weights decrease in m (Corollary 5.21) towards this limit (Theorem 5.22).

theorem Cslib.BitString.levelWeight_signVal_majority_le {m j : ℕ} (h : 2 * (2 * j + 1) < 2 * m + 1) :
(levelWeight (2 * j + 1) fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)) ≤ (1 + 2 * (2 * ↑j + 1) / (2 * ↑m + 1)) * (2 / Real.pi * (↑j.centralBinom / 4 ^ j / (2 * ↑j + 1)))

The upper error bound for the spectrum of majority [O'Donnell, Theorem 5.22, (5.15)] [OD14]: for k = 2j + 1 < n/2, with n = 2m + 1, the Fourier weight of majority at level k is at most (1 + 2k/n) times its limit (2/π) C(2j, j) / (4^j (2j + 1)). The weight is (π/2) n c_{m-j} c_m times its limit for c_a = C(2a, a)/4^a; Wallis's product bounds c_a² ≤ 1/(πa), so the factor is at most n / √((n - k)(n - 1)) ≤ 1 + 2k/n (Exercise 5.24).

theorem Cslib.BitString.levelWeight_signVal_majority_mem_Icc {m j : ℕ} (h : 2 * (2 * j + 1) ^ 2 ≤ 2 * m + 1) :
(2 / Real.pi * √(2 / Real.pi) / ((2 * ↑j + 1) * √(2 * ↑j + 1)) ≤ levelWeight (2 * j + 1) fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)) ∧ (levelWeight (2 * j + 1) fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)) ≤ 2 / Real.pi * √(2 / Real.pi) / ((2 * ↑j + 1) * √(2 * ↑j + 1)) * (1 + 1 / (2 * ↑j + 1)) ^ 2

The asymptotic level weights of majority [O'Donnell, Corollary 5.23, first statement] [OD14]: for odd k = 2j + 1 and n = 2m + 1 ≥ 2k², the weight of majority of n bits at level k is (2/π)^(3/2) k^(-3/2) (1 ± O(1/k)): it lies between (2/π)^(3/2) k^(-3/2) and (2/π)^(3/2) k^(-3/2) (1 + 1/k)². The second statement of the corollary, on W^{>k}, is BitString.sum_Ioc_levelWeight_signVal_majority_le, BitString.le_sum_Ioc_levelWeight_signVal_majority, and BitString.sum_fourierCoeff_sq_signVal_majority_le.

The weight of majority above a level #

theorem Cslib.BitString.sum_Ioc_levelWeight_signVal_majority_le (m J : ℕ) :
(∑ i ∈ Finset.Ioc (2 * J + 1) (2 * m + 1), levelWeight i fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)) ≤ 2 / Real.pi * √(2 / Real.pi) * (1 + 1 / (2 * ↑J + 1)) / √(2 * ↑J + 1)

The weight of majority above level k, upper bound O'Donnell, Corollary 5.23, second statement: for odd k = 2J + 1 and every n = 2m + 1, W^{>k}[Maj_n] ≤ (2/π)^(3/2) k^(-1/2) (1 + 1/k), written with (2/π)^(3/2) k^(-1/2) = (2/π) √(2/π) / √k. The weights up to k are at least their limits, which sum to 1, and the tail of the limits telescopes against 1/√(2i - 1) - 1/√(2i + 1) (Real.one_sub_sum_two_div_pi_mul_centralBinom_div_mem_Icc).

theorem Cslib.BitString.le_sum_Ioc_levelWeight_signVal_majority {m J : ℕ} (h : 2 * (2 * J + 1) ^ 2 ≤ 2 * m + 1) :
2 / Real.pi * √(2 / Real.pi) * (1 - 3 / (2 * ↑J + 1)) / √(2 * ↑J + 1) ≤ ∑ i ∈ Finset.Ioc (2 * J + 1) (2 * m + 1), levelWeight i fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)

The weight of majority above level k, lower bound O'Donnell, Corollary 5.23, second statement: for odd k = 2J + 1 and n = 2m + 1 ≥ 2k², W^{>k}[Maj_n] ≥ (2/π)^(3/2) k^(-1/2) (1 - 3/k). Together with BitString.sum_Ioc_levelWeight_signVal_majority_le this is the book's W^{>k}[Maj_n] = (2/π)^(3/2) k^(-1/2) (1 ± O(1/k)).

theorem Cslib.BitString.sum_fourierCoeff_sq_signVal_majority_le {ε : ℝ} (hε : 0 < ε) {d : ℕ} (hd : 8 / (Real.pi ^ 3 * ε ^ 2) + 4 ≤ ↑d) (m : ℕ) :
∑ S : Finset (Fin (2 * m + 1)) with d < S.card, fourierCoeff (fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)) S ^ 2 ≤ ε

Majority's spectrum is concentrated up to degree 8/(π³ε²) + O(1) O'Donnell, Corollary 5.23: for every ε > 0 and every degree d ≥ 8/(π³ε²) + 4, majority of any odd number of bits has Fourier weight at most ε above degree d.

The noise stability of majority #

theorem Cslib.BitString.tendsto_noiseStability_signVal_majority {ρ : ℝ} (h₁ : -1 ≤ ρ) (h₂ : ρ ≤ 1) :
Filter.Tendsto (fun (m : ℕ) => noiseStability ρ fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)) Filter.atTop (nhds (2 / Real.pi * Real.arcsin ρ))

The noise stability of majority O'Donnell, Theorem 2.45: for every ρ ∈ [-1, 1], the noise stability of majority of 2 m + 1 bits, read as signs, tends to (2/π) arcsin ρ = 1 - (2/π) arccos ρ as m → ∞.

theorem Cslib.BitString.le_noiseStability_signVal_majority {ρ : ℝ} (h₀ : 0 ≤ ρ) (h₁ : ρ ≤ 1) (m : ℕ) :
2 / Real.pi * Real.arcsin ρ ≤ noiseStability ρ fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)

The noise stability of majority is at least its limit O'Donnell, Theorem 5.18, lower bound: for 0 ≤ ρ ≤ 1, (2/π) arcsin ρ ≤ Stab_ρ[Maj_n] for majority of every odd number n = 2 m + 1 of bits. For 0 < ρ < 1 the noise stability decreases in n (BitString.noiseStability_signVal_majority_succ_lt) towards its limit (Theorem 2.45); it is 0 at ρ = 0 and 1 at ρ = 1. The upper bound is BitString.noiseStability_signVal_majority_le.

theorem Cslib.BitString.noiseStability_signVal_majority_le {ρ : ℝ} (h₀ : 0 ≤ ρ) (h₁ : ρ < 1) (m : ℕ) :
(noiseStability ρ fun (x : Fin (2 * m + 1) → Bool) => signVal (majority (2 * m + 1) x)) ≤ 2 / Real.pi * Real.arcsin ρ + 3 / √((1 - ρ ^ 2) * (2 * ↑m + 1))

The upper bound on the noise stability of majority O'Donnell, Theorem 5.18, upper bound; Exercise 5.23: for 0 ≤ ρ < 1, majority of n = 2 m + 1 bits has Stab_ρ[Maj_n] ≤ (2/π) arcsin ρ + 3 / √((1 - ρ²) n), the book's O(1 / (√(1 - ρ²) √n)) with the constant 3. The levels k < n/2 contribute at most (1 + 2k/n) times their limits (BitString.levelWeight_signVal_majority_le), which sum to (2/π) arcsin ρ + (2/n) (2/π) ρ / √(1 - ρ²); the levels k ≥ n/2 contribute at most ρ^((n+1)/2) ≤ √(2 / ((1 - ρ²) n)).

theorem Cslib.BitString.tendsto_noiseSensitivity_majority {δ : ℝ} (h₀ : 0 ≤ δ) (h₁ : δ ≤ 1) :

The noise sensitivity of majority O'Donnell, Theorem 2.45, in its equivalent form: for every δ ∈ [0, 1], the noise sensitivity of majority of 2 m + 1 bits tends to arccos(1 - 2δ) / π as m → ∞.

Equal degree-one coefficients #

theorem Cslib.BitString.eventually_levelWeight_one_le_of_fourierCoeff_singleton_eq {ε : ℝ} (hε : 0 < ε) :
∀ᶠ (n : ℕ) in Filter.atTop, ∀ (f : BooleanFunction n), (∀ (i j : Fin n), fourierCoeff (fun (x : Fin n → Bool) => signVal (f x)) {i} = fourierCoeff (fun (x : Fin n → Bool) => signVal (f x)) {j}) → (levelWeight 1 fun (x : Fin n → Bool) => signVal (f x)) ≤ 2 / Real.pi + ε

Proposition 2.58 O'Donnell, Section 2.5: Boolean functions with all degree-one Fourier coefficients equal have W^1[f] ≤ 2/π + o_n(1). For every ε > 0, eventually in n, every such function on n bits, read as signs, has W^1[f] ≤ 2/π + ε.