Independent bits with given means #
Draw each bit a i of a string a : ι → Bool independently so that its sign signVal (a i) has
mean μ i ∈ [-1, 1], that is a i = true (the sign -1) with probability (1 - μ i) / 2. The
string a then has probability ∏ i, (1 + signVal (a i) μ i) / 2 (BitString.meanWeight),
nonnegative for means in [-1, 1] (BitString.meanWeight_nonneg), and the total probability is
one (BitString.sum_meanWeight). At the signs of a string x this is the point mass at x
(BitString.meanWeight_signVal). With every mean 1 - 2 p it is the Bernoulli mask of rate p
(BitString.meanWeight_const). In the coordinates (1 - μ i) / 2, the probabilities that the
bits are true, it is the indicator polynomial of a
(BitString.meanWeight_eq_eval_indicatorPoly), so the expectation of f is its multilinear
extension BitString.multilinearExtension at that point
(BitString.sum_meanWeight_mul_eq_eval_multilinearExtension).
The character of S has expectation ∏_{i ∈ S} μ i (BitString.sum_meanWeight_mul_chi), so the
expectation of any real function f is its Fourier expansion ∑_S f̂(S) ∏_{i ∈ S} μ i evaluated
at the point μ (BitString.sum_meanWeight_mul_eq_sum_fourierCoeff)
O'Donnell, Exercise 1.4. This is how O'Donnell, Exercise 7.20(c)
evaluates a constraint at a randomized assignment.
Usage #
Open Cslib.BitString. The means are a function μ : ι → ℝ; for concrete means on Fin n
write them as a vector such as ![1 / 2, -1 / 3]. To evaluate a weight, rewrite with
BitString.meanWeight_def and expand the product (Fin.prod_univ_two). The identities
BitString.sum_meanWeight, BitString.sum_meanWeight_mul_chi and
BitString.sum_meanWeight_mul_eq_sum_fourierCoeff hold for every real μ; only
BitString.meanWeight_nonneg needs |μ i| ≤ 1. A sum ∑ a, meanWeight μ a * f a is then
computed from the Fourier coefficients of f, or, through
BitString.sum_meanWeight_mul_eq_eval_multilinearExtension, from its multilinear extension
in the {0, 1} coordinates. The checked clients in
CslibFrontierTests/BooleanAnalysisHastadTest.lean
evaluate a weight at means 1/2, 0, the point mass at signs, the Bernoulli mask at equal means,
Exercise 1.4 for the parity of two bits, and the indicator polynomial and multilinear extension
at the matching {0, 1} point.
Main definitions #
Cslib.BitString.meanWeight: the probability of a string whose bits are independent with given means.
Main results #
Cslib.BitString.meanWeight_nonneg,Cslib.BitString.sum_meanWeight,Cslib.BitString.meanWeight_signVal,Cslib.BitString.meanWeight_const: the weights form a distribution, the point mass at the signs of a string, and the Bernoulli mask at equal means.Cslib.BitString.meanWeight_eq_eval_indicatorPoly,Cslib.BitString.sum_meanWeight_mul_eq_eval_multilinearExtension: the same in the{0, 1}coordinates ofBitString.multilinearExtension.Cslib.BitString.sum_meanWeight_mul_chi,Cslib.BitString.sum_meanWeight_mul_eq_sum_fourierCoeff: the expectation of a character, and of any function through its Fourier expansion.
References #
The probability of the string a when its bits are independent and the sign of bit i has
mean μ i: bit i is true, the sign -1, with probability (1 - μ i) / 2. The weights are
nonnegative when every |μ i| ≤ 1.
The defining formula of meanWeight.
With every mean 1 - 2 p, the weights are those of the Bernoulli mask of rate p.
In the coordinates (1 - μ i) / 2, the probabilities that the bits are true, the weight of
a is the value of its indicator polynomial.
The expectation of a function under independent bits with means μ is the value of its
multilinear extension at the point (1 - μ i) / 2 of the probabilities that the bits are
true.
The expectation of a character under independent bits with means μ is
∏_{i ∈ S} μ i.
The weights of independent bits with means μ sum to one.
The expectation of a function under independent bits with means μ is its Fourier
expansion ∑_S f̂(S) ∏_{i ∈ S} μ i, the multilinear extension of f at the point μ
O'Donnell, Exercise 1.4.