Documentation

CslibFrontier.Probability.SmallBias.Degree

Limitations on small-bias generators #

We read the bits Bool as the field GF(2) (exclusive or and conjunction, the ring structure under which the library's parities and inner products of bit strings are sums and products). If the output bits of a sample space G : σ → ι → Bool, as functions of the seed, all lie in a fixed affine translate of a subspace W of the functions σ → Bool (each output bit is a constant plus an element of W), and there are more output bits than the dimension of W, then some nonempty set of output bits has a constant sum, so G, with a uniform seed, has bias ±1 there (Cslib.BitString.exists_abs_bias_eq_one_of_finrank_lt).

This gives the limitations on small-bias generators of Goldreich, Exercise 8.37. An ε-bias generator G : {0,1}^k → {0,1}^ℓ with ε < 1 whose output bits are GF(2) polynomials of total degree at most d in the seed bits has ℓ ≤ ∑_{i=1}^d C(k, i): the polynomials, without their free terms, lie in the span of the products of between one and d seed bits (Cslib.BitString.le_sum_choose_of_isSmallBias). Whatever the degree, ℓ < 2^k, since the functions vanishing at a fixed seed form a subspace of dimension 2^k - 1 (Cslib.BitString.card_lt_card_of_isSmallBias, for any finite seed set), and if ℓ > k, then G is not a linear map (Cslib.BitString.not_exists_linearMap_of_isSmallBias, the case d = 1).

Main results #

References #

theorem Cslib.BitString.exists_abs_bias_eq_one_of_finrank_lt {σ : Type u_1} {ι : Type u_2} [Fintype σ] [Nonempty σ] [Fintype ι] [DecidableEq ι] (G : σ → ι → Bool) (W : Submodule Bool (σ → Bool)) (hW : ∀ (i : ι), ∃ (c : Bool), (fun (s : σ) => G s i) - Function.const σ c ∈ W) (hdim : Module.finrank Bool ↥W < Fintype.card ι) :

A low-dimensional span of the output bits forces a constant parity. If every output bit s ↦ G s i of a sample space is a constant plus an element of a subspace W of the functions on the seeds, and there are more output bits than the dimension of W, then some nonempty set S of output bits has a constant parity, so the bias of G at S, with a uniform seed, is ±1.

theorem Cslib.BitString.card_le_finrank_of_isSmallBias {σ : Type u_1} {ι : Type u_2} [Fintype σ] [Nonempty σ] [Fintype ι] [DecidableEq ι] {G : σ → ι → Bool} {ε : ℝ} (hε : ε < 1) (hG : IsSmallBias ε (PMF.map G (Probability.PMF.uniformOfFintype σ))) (W : Submodule Bool (σ → Bool)) (hW : ∀ (i : ι), ∃ (c : Bool), (fun (s : σ) => G s i) - Function.const σ c ∈ W) :

An ε-biased sample space with ε < 1 has its output bits outside every translate of a subspace of smaller dimension than their number.

theorem Cslib.BitString.card_lt_card_of_isSmallBias {σ : Type u_1} {ι : Type u_2} [Fintype σ] [Nonempty σ] [Fintype ι] [DecidableEq ι] {G : σ → ι → Bool} {ε : ℝ} (hε : ε < 1) (hG : IsSmallBias ε (PMF.map G (Probability.PMF.uniformOfFintype σ))) :

Corollary 1 of Goldreich, Exercise 8.37: an ε-biased sample space with ε < 1 has fewer output bits than seeds; for an ε-bias generator with k-bit seeds, ℓ(k) < 2^k, whatever the degree of its output bits.

theorem Cslib.BitString.le_sum_choose_of_isSmallBias {k ℓ : ℕ} {G : (Fin k → Bool) → Fin ℓ → Bool} {ε : ℝ} (hε : ε < 1) (hG : IsSmallBias ε (PMF.map G (Probability.PMF.uniformOfFintype (Fin k → Bool)))) {d : ℕ} (p : Fin ℓ → MvPolynomial (Fin k) Bool) (hdeg : ∀ (i : Fin ℓ), (p i).totalDegree ≤ d) (hp : ∀ (s : Fin k → Bool) (i : Fin ℓ), (MvPolynomial.eval s) (p i) = G s i) :
ℓ ≤ ∑ i ∈ Finset.Icc 1 d, k.choose i

Limitations on small-bias generators Goldreich, Exercise 8.37: if G : {0,1}^k → {0,1}^ℓ, with a uniform seed, is ε-biased for some ε < 1, and each output bit of G is a GF(2) polynomial in the seed bits of total degree at most d, then ℓ ≤ ∑_{i=1}^d C(k, i).

theorem Cslib.BitString.not_exists_linearMap_of_isSmallBias {k ℓ : ℕ} {G : (Fin k → Bool) → Fin ℓ → Bool} {ε : ℝ} (hε : ε < 1) (hG : IsSmallBias ε (PMF.map G (Probability.PMF.uniformOfFintype (Fin k → Bool)))) (hℓ : k < ℓ) :
¬∃ (L : (Fin k → Bool) →ₗ[Bool] Fin ℓ → Bool), ⇑L = G

Corollary 2 of Goldreich, Exercise 8.37: an ε-bias generator G : {0,1}^k → {0,1}^ℓ with ε < 1 and ℓ > k is not a GF(2)-linear map.