The Fourier coefficients of majority #
The majority of an odd number n = 2 m + 1 of bits, read as signs, has Fourier coefficient 0 on
every set of even size, and on a set of odd size k = 2 j + 1 the coefficient
(-1) ^ j C(m, j) / C(2 m, 2 j) · C(2 m, m) / 4 ^ m
(BitString.fourierCoeff_signVal_majority_of_even,
BitString.fourierCoeff_signVal_majority_of_card_eq) O'Donnell, Theorem 5.19. In
the book's notation this is (-1) ^ ((k - 1) / 2) C((n - 1) / 2, (k - 1) / 2) / C(n - 1, k - 1) · 2 / 2 ^ n · C(n - 1, (n - 1) / 2).
The even coefficients vanish because majority is odd (BitString.isOdd_majority): it has no ties
(majority_eq_strictMajority in Data.BitString.Threshold). For the odd ones, the derivative of
majority in a coordinate i is the indicator that the other 2 m bits tie
(BitString.derivative_signVal_majority), so the coefficient on S ∋ i is the coefficient of that
indicator on S \ {i}. A function of the weight has the same coefficient on all sets of a given
size (BitString.fourierCoeff_eq_of_card_eq), so it suffices to sum the coefficients over all
2 j-subsets T of the other coordinates. At a string with m true and m false bits among the
other 2 m coordinates, the characters of these sets sum to the coefficient of X ^ (2 m - 2 j) in
(X - 1) ^ m (X + 1) ^ m = (X ^ 2 - 1) ^ m by Vieta's formula, which is (-1) ^ j C(m, j); such
strings have density C(2 m, m) / 4 ^ m
(BitString.expect_ite_card_filter_eq in Data.BitString.AgreeExpect). The book instead compares
two expansions of the noise operator applied to the tie indicator.
For an even number 2 m of bits, ties are accepted by majority. Pairing each string with its
complement shows that the constant Fourier coefficient is -C(2 m, m) / 4 ^ m
(BitString.fourierCoeff_signVal_majority_two_mul_empty).
From the explicit formula, no coefficient exceeds the one on a singleton, C(2 m, m) / 4 ^ m,
since C(m, j) ≤ C(2 m, 2 j), and up to size m the coefficients decrease in size, by the ratio
|S| / (2 m - |S|) from |S| to |S| + 2
(BitString.fourierCoeff_signVal_majority_singleton,
BitString.abs_fourierCoeff_signVal_majority_le_singleton,
BitString.abs_fourierCoeff_signVal_majority_le_of_card_le)
O'Donnell, Exercise 5.21. The exercise's asymptotic
C(2 m, m) / 4 ^ m ∼ √(2 / (n π)) is, squared, the degree-one case W^1[Maj_n] → 2 / π of
BitString.tendsto_levelWeight_signVal_majority. The coefficients on sets S, T with
|S| + |T| = n + 1 agree up to the sign (-1) ^ ((n - 1) / 2), so (n - k + 1) W^{n-k+1} = k W^k
(BitString.fourierCoeff_signVal_majority_of_card_add_card,
BitString.card_mul_levelWeight_signVal_majority)
O'Donnell, Corollary 5.20. The weight W^k on each odd level k strictly
decreases as n grows (BitString.levelWeight_signVal_majority_succ_lt)
O'Donnell, Corollary 5.21. Hence the noise stability
Stab_ρ[Maj_n] = ∑_k ρ ^ k W^k strictly decreases from n to n + 2 for 0 < ρ < 1
(BitString.noiseStability_signVal_majority_succ_lt): the weight lost on the levels up to n
moves to the new top level n + 2, where ρ ^ k is smaller
O'Donnell, Theorem 5.18. The limits of the level weights and of the noise
stability (Theorems 5.22 and 2.45) and the bounds of Theorem 5.18 are in
CslibFrontier.Foundations.BooleanAnalysis.MajorityStability.
Usage #
Majority of n = 2 m + 1 bits read as signs is fun x => signVal (majority (2 * m + 1) x) on
Fin (2 * m + 1) → Bool, the book's Maj_n with true read as −1; the statements write odd set
sizes as 2 * j + 1. On a concrete set, discharge the size hypothesis of
BitString.fourierCoeff_signVal_majority_of_card_eq by decide or simp and evaluate the right
side with norm_num [Nat.choose]. Level weights are levelWeight k f from
BooleanAnalysis.LevelWeight, and BitString.noiseStability_eq_sum_levelWeight there turns noise
stability into a sum over levels. Import BooleanAnalysis.TransitiveSymmetric as well to use
BitString.fourierCoeff_eq_of_card_eq, which this module imports privately. The checked clients
in
CslibFrontierTests/BooleanAnalysisMajorityFourier.lean
compute the coefficients of majority of three and five bits, check two of them by brute force,
check each step of the proof on small cases, compare the level weights and noise stability of
majority of three and five bits, and follow the size of the coefficients of majority of seven bits
across the levels.
Main results #
Cslib.BitString.isOdd_majority,Cslib.BitString.derivative_signVal_majority: majority of an odd number of bits is odd, and its derivative is the tie indicator.Cslib.BitString.fourierCoeff_signVal_majority_of_even,Cslib.BitString.fourierCoeff_signVal_majority_of_card_eq: the Fourier coefficients of majority.Cslib.BitString.fourierCoeff_signVal_majority_two_mul_empty: the constant coefficient for an even number of inputs, with ties accepted.Cslib.BitString.fourierCoeff_signVal_majority_singleton,Cslib.BitString.abs_fourierCoeff_signVal_majority_le_singleton,Cslib.BitString.abs_fourierCoeff_signVal_majority_le_of_card_le: the largest coefficients of majority are on singletons, and the odd coefficients decrease in size up to levelm + 2.Cslib.BitString.levelWeight_signVal_majority_of_odd,Cslib.BitString.levelWeight_signVal_majority_of_even: the level weights of majority.Cslib.BitString.fourierCoeff_signVal_majority_of_card_add_card,Cslib.BitString.card_mul_levelWeight_signVal_majority: Corollary 5.20.Cslib.BitString.levelWeight_signVal_majority_succ_lt: Corollary 5.21.Cslib.BitString.noiseStability_signVal_majority_succ_lt: the noise stability of majority decreases inn, the monotonicity claim of Theorem 5.18.
References #
The constant Fourier coefficient of majority on 2 m bits is the negative probability of
a tie: complementary inputs cancel except when both have weight m, where both are accepted.
The derivative of majority in i, read as signs, is the indicator that exactly half of
the other 2 m bits are true, that is, that i is pivotal
O'Donnell, proof of Theorem 5.19.
The even Fourier coefficients of majority vanish O'Donnell, Theorem 5.19: majority of an odd number of bits, read as signs, is odd.
The odd Fourier coefficients of majority O'Donnell, Theorem 5.19: for
majority of 2 m + 1 bits read as signs, the coefficient on a set of size 2 j + 1 is
(-1) ^ j C(m, j) / C(2 m, 2 j) · C(2 m, m) / 4 ^ m.
Levels of majority #
The level weights of majority: the Fourier weight W^{2 j + 1} of majority of 2 m + 1
bits, read as signs, is C(2 m + 1, 2 j + 1) times the square of the coefficient on a set of size
2 j + 1.
The Fourier coefficient of majority of 2 m + 1 bits, read as signs, on a singleton is
C(2 m, m) / 4 ^ m.
The largest Fourier coefficients of majority are on singletons
O'Donnell, Exercise 5.21: ‖Maĵ‖_∞ = Maĵ({i}). Every coefficient of majority of
2 m + 1 bits, read as signs, is at most the coefficient C(2 m, m) / 4 ^ m on a singleton in
absolute value, since C(m, j) ≤ C(2 m, 2 j). The exercise's asymptotic √(2 / (n π)) is not
formalized.
The Fourier coefficients of majority decrease in size
O'Donnell, Exercise 5.21: for majority of 2 m + 1 bits and sets S, T of odd
sizes |S| ≤ |T| ≤ m + 2, the coefficient on T is at most the one on S in absolute value. Each
step from |S| to |S| + 2 multiplies the size by |S| / (2 m - |S|), so the book's range
|T| ≤ m extends to m + 2, with equality at the last step from m.
Complementary levels of majority O'Donnell, Corollary 5.20: for majority of
n = 2 m + 1 bits read as signs, the coefficients on sets S, T with |S| + |T| = n + 1 agree
up to the sign (-1) ^ m = (-1) ^ ((n - 1) / 2).
Complementary level weights of majority O'Donnell, Corollary 5.20: for
majority of n = 2 m + 1 bits and k = 2 j + 1, (n - k + 1) W^{n-k+1} = k W^k. The book's
W^{n-k+1} = k / (n - k + 1) W^k is stated multiplied out, and only for odd k: for even k both
levels are even and both sides vanish by BitString.levelWeight_signVal_majority_of_even.
The level weights of majority decrease O'Donnell, Corollary 5.21: for odd
k = 2 j + 1 ≤ n = 2 m + 1, the weight of majority on level k is strictly smaller on n + 2 bits
than on n bits. Their ratio is (2 m + 3) (2 m + 1 - 2 j) / ((2 m + 2 - 2 j) (2 m + 2)) < 1.
The noise stability of majority decreases in n O'Donnell, Theorem 5.18:
for 0 < ρ < 1, Stab_ρ[Maj_n] is strictly smaller on n + 2 = 2 m + 3 bits than on
n = 2 m + 1 bits. At the endpoints the two agree: both are 0 at ρ = 0 (majority is
unbiased) and 1 at ρ = 1. The bounds of Theorem 5.18 by (2 / π) arcsin ρ are
BitString.le_noiseStability_signVal_majority and
BitString.noiseStability_signVal_majority_le. The levels up to n lose weight, which the new
top level n + 2 gains, and ρ ^ k ≥ ρ ^ n > ρ ^ (n + 2) there.