Documentation

CslibFrontier.Probability.TupleSampler

Uniform tuples as samplers #

A uniformly random tuple b : ι → U samples every [0, 1]-valued function F on U well: the sum ∑ i, F (b i) falls to half its expectation for at most an exp (-μ #ι / 8) fraction of the tuples, where μ is a lower bound on the mean of F (Cslib.Probability.card_filter_sum_le_half_le_exp). This is the multiplicative Chernoff bound Cslib.Probability.PMF.pi_sum_le_one_sub_mul at relative deviation 1 / 2, stated by counting.

Two consequences describe the bipartite graph joining each point x : U to each pair (b, i) with b i = x, restricted to a family W of tuples.

Resampling one coordinate of a uniform tuple at a uniform value leaves it uniform, so drawing a point and planting it at a fixed coordinate of a uniform tuple is the same as drawing a uniform tuple and reading the point off that coordinate (Cslib.Probability.sum_sum_update_eq_card_nsmul_sum). Likewise, overwriting a uniform tuple with b₀ on a set P yields each tuple that agrees with b₀ on P from #U ^ #P tuples (Cslib.Probability.sum_piecewise_eq_card_pow_nsmul_sum). In terms of the decoder of Impagliazzo, Jaiswal, Kabanets and Wigderson (preprint numbering), with uniform tuples as the library form of their k-sets: the lower tail is the one-sided part of their Lemma 2.12 sampler property (their Definition 2.9 also bounds the upper deviation, which is not proved here), and the weight bound is of the type of their Lemma 2.13. Their Lemma 2.14 is not proved here. The decoder module (CslibFrontier.Computability.Circuit.Boolean.HardnessAmplification.DirectProduct.Decode) uses the weight bound and the regrouping over the free positions to prove its analogue of their Lemma 3.9, and does without Lemma 2.14.

Main results #

References #

theorem Cslib.Probability.card_filter_sum_le_half_le_exp {U : Type u_1} {ι : Type u_2} [Fintype U] [Fintype ι] [DecidableEq ι] [Nonempty U] (F : U → ℝ) (hF : ∀ (x : U), F x ∈ Set.Icc 0 1) {μ : ℝ} (hμ : μ * ↑(Fintype.card U) ≤ ∑ x : U, F x) :
↑{b : ι → U | ∑ i : ι, F (b i) ≤ μ * ↑(Fintype.card ι) / 2}.card ≤ ↑(Fintype.card U) ^ Fintype.card ι * Real.exp (-(μ * ↑(Fintype.card ι) / 8))

The lower tail for uniform tuples: if F takes values in [0, 1] and has mean at least μ, at most an exp (-μ #ι / 8) fraction of the tuples b : ι → U have ∑ i, F (b i) ≤ μ #ι / 2.

theorem Cslib.Probability.sum_sum_update_eq_card_nsmul_sum {U : Type u_1} {ι : Type u_2} [Fintype U] [Fintype ι] [DecidableEq ι] {M : Type u_3} [AddCommMonoid M] (j : ι) (H : U → (ι → U) → M) :
∑ x : U, ∑ r : ι → U, H x (Function.update r j x) = Fintype.card U • ∑ b : ι → U, H (b j) b

Planting a point: summing over a point x and a tuple r with x written at coordinate j counts every tuple b once for each value r j it overwrote, with x = b j.

theorem Cslib.Probability.sum_piecewise_eq_card_pow_nsmul_sum {U : Type u_1} {ι : Type u_2} [Fintype U] [Fintype ι] [DecidableEq ι] {M : Type u_3} [AddCommMonoid M] (P : Finset ι) (b₀ : ι → U) [DecidablePred fun (y : ι → U) => ∀ i ∈ P, y i = b₀ i] (H : (ι → U) → M) :
∑ r : ι → U, H (P.piecewise b₀ r) = Fintype.card U ^ P.card • ∑ y : ι → U with ∀ i ∈ P, y i = b₀ i, H y

Fibres of overwriting on P: summing H over the tuples r overwritten by b₀ on P counts each tuple that agrees with b₀ on P once for each of the #U ^ #P values r had there.

theorem Cslib.Probability.sub_mul_le_two_mul_sum_sum {U : Type u_1} {ι : Type u_2} [Fintype U] [Fintype ι] [Nonempty U] (F : U → ℝ) (hF : ∀ (x : U), F x ∈ Set.Icc 0 1) {μ : ℝ} (hμ0 : 0 ≤ μ) (hμ : μ * ↑(Fintype.card U) ≤ ∑ x : U, F x) (W : Finset (ι → U)) :
(↑W.card - ↑(Fintype.card U) ^ Fintype.card ι * Real.exp (-(μ * ↑(Fintype.card ι) / 8))) * (μ * ↑(Fintype.card ι)) ≤ 2 * ∑ b ∈ W, ∑ i : ι, F (b i)

Edges into a dense family: if F takes values in [0, 1] and has mean at least μ, the entries of the tuples in any family W carry total weight at least (#W - #U ^ #ι exp (-μ #ι / 8)) μ #ι / 2.

theorem Cslib.Probability.sub_mul_le_two_mul_sum_sum_compl {U : Type u_1} {ι : Type u_2} [Fintype U] [Fintype ι] [DecidableEq ι] [Nonempty U] (F : U → ℝ) (hF : ∀ (x : U), F x ∈ Set.Icc 0 1) {μ : ℝ} (hμ0 : 0 ≤ μ) (hμ : μ * ↑(Fintype.card U) ≤ ∑ x : U, F x) (P : Finset ι) (b₀ : ι → U) (S : Finset (ι → U)) (hS : ∀ y ∈ S, ∀ i ∈ P, y i = b₀ i) :
(↑S.card - ↑(Fintype.card U) ^ Pᶜ.card * Real.exp (-(μ * ↑Pᶜ.card / 8))) * (μ * ↑Pᶜ.card) ≤ 2 * ∑ y ∈ S, ∑ j ∈ Pᶜ, F (y j)

Edges into a dense slice: for a family S of tuples that agree on P, the entries outside P carry weight at least (#S - #U ^ w exp (-μ w / 8)) μ w / 2, where w = #Pᶜ. This is sub_mul_le_two_mul_sum_sum for the coordinates outside P.

theorem Cslib.Probability.sum_sum_comp_eq_sum_nsmul {U : Type u_1} {ι : Type u_2} [Fintype U] [DecidableEq U] {M : Type u_3} [AddCommMonoid M] (F : U → M) (W : Finset (ι → U)) (s : Finset ι) :
∑ b ∈ W, ∑ i ∈ s, F (b i) = ∑ x : U, {p ∈ W ×ˢ s | p.1 p.2 = x}.card • F x

Regrouping by points: summing F over the entries at positions s of the tuples in W is summing F x weighted by the number of pairs (b, i) with b ∈ W, i ∈ s and b i = x.

theorem Cslib.Probability.sum_sum_comp_eq_sum_mul {U : Type u_1} {ι : Type u_2} [Fintype U] [Fintype ι] [DecidableEq U] (F : U → ℝ) (W : Finset (ι → U)) :
∑ b ∈ W, ∑ i : ι, F (b i) = ∑ x : U, ↑{p ∈ W ×ˢ Finset.univ | p.1 p.2 = x}.card * F x

Regrouping by points, real form over all positions: summing F over the entries of the tuples in W is summing F x weighted by the number of pairs (b, i) with b ∈ W and b i = x.