Documentation

CslibFrontier.Probability.StatisticalDistance.Polarization

Polarization of statistical distance #

The Polarization Lemma of Sahai and Vadhan [SahaiVadhan2003, Lemma 3.3 and the remark after its proof] turns a pair of distributions whose statistical distance is either at least α or at most β, with β < α², into a pair whose distance is either at least 1 - 2⁻ᵏ or at most 2⁻ᵏ. It alternates the XOR construction (Cslib.Probability.PMF.xorMix), which pushes small distances to 0, with independent repetition (Cslib.Probability.PMF.iid), which pushes large distances to 1:

polarize p₀ p₁ λ ℓ k c = xorMix (iid (xorMix p₀ p₁ λ false) ℓ) (iid (xorMix p₀ p₁ λ true) ℓ) k c.

For δ = dist p₀ p₁ the distance of the polarized pair is at most (ℓ δ^λ)^k (dist_polarize_le) and, for λ, k ≥ 1, at least 1 - 2 k exp (-ℓ δ^(2λ) / 2) (one_sub_two_mul_mul_exp_le_dist_polarize). With λ = m (⌊log₂ k⌋ + 1) and ℓ = 2 ^ (b (⌊log₂ k⌋ + 1)) for constants m, b depending only on α and β, both parameters are polynomial in k and the two bounds give the error 2⁻ᵏ on each side (exists_polarization). Clients obtain the constants with obtain ⟨m, b, hm, hlam, hell, h⟩ := exists_polarization hβ hβα hα hα1.

This file works with explicit distributions on finite types. The efficient version on pairs of circuits, where the polarized pair is computed from the input pair in polynomial time, is in CslibFrontier.Computability.Complexity.Problems.StatisticalDifference.PolyTime. The source states Lemma 3.3 for the thresholds 2/3 and 1/3, and extends it to thresholds α² > β in the remark after its proof. Its proof applies the XOR construction (Lemma 3.5), independent repetition (Lemma 3.4) and the XOR construction again, as polarize does, with different parameters.

Main definitions #

Main results #

References #

noncomputable def Cslib.Probability.PMF.polarize {Ω : Type u_1} [Fintype Ω] (p₀ p₁ : PMF Ω) (lam ell k : ℕ) (c : Bool) :
PMF (Fin k → Fin ell → Fin lam → Ω)

The polarization construction [SahaiVadhan2003, proof of Lemma 3.3]: the XOR construction on k coordinates applied to ℓ independent copies of the XOR construction on λ coordinates.

theorem Cslib.Probability.PMF.dist_polarize_le {Ω : Type u_1} [Fintype Ω] (p₀ p₁ : PMF Ω) (lam ell k : ℕ) :
dist (polarize p₀ p₁ lam ell k false) (polarize p₀ p₁ lam ell k true) ≤ (↑ell * dist p₀ p₁ ^ lam) ^ k

Polarization, upper bound: the polarized pair is at distance at most (ℓ δ^λ)^k, where δ = dist p₀ p₁.

theorem Cslib.Probability.PMF.one_sub_two_mul_mul_exp_le_dist_polarize {Ω : Type u_1} [Fintype Ω] (p₀ p₁ : PMF Ω) {lam : ℕ} (hlam : lam ≠ 0) (ell : ℕ) {k : ℕ} (hk : k ≠ 0) :
1 - 2 * ↑k * Real.exp (-(↑ell * dist p₀ p₁ ^ (2 * lam)) / 2) ≤ dist (polarize p₀ p₁ lam ell k false) (polarize p₀ p₁ lam ell k true)

Polarization, lower bound: for λ, k ≥ 1 the polarized pair is at distance at least 1 - 2 k exp (-ℓ δ^(2λ) / 2), where δ = dist p₀ p₁.

theorem Cslib.Probability.PMF.exists_polarization {α β : ℝ} (hβ : 0 ≤ β) (hβα : β < α ^ 2) (hα : 0 ≤ α) (hα1 : α ≤ 1) :
∃ (m : ℕ) (b : ℕ), m ≠ 0 ∧ (PolynomiallyBounded fun (k : ℕ) => m * (Nat.log 2 k + 1)) ∧ (PolynomiallyBounded fun (k : ℕ) => 2 ^ (b * (Nat.log 2 k + 1))) ∧ ∀ {Ω : Type u} [inst : Fintype Ω] (p₀ p₁ : PMF Ω) (k : ℕ), (α ≤ dist p₀ p₁ → 1 - (1 / 2) ^ k ≤ dist (polarize p₀ p₁ (m * (Nat.log 2 k + 1)) (2 ^ (b * (Nat.log 2 k + 1))) k false) (polarize p₀ p₁ (m * (Nat.log 2 k + 1)) (2 ^ (b * (Nat.log 2 k + 1))) k true)) ∧ (dist p₀ p₁ ≤ β → dist (polarize p₀ p₁ (m * (Nat.log 2 k + 1)) (2 ^ (b * (Nat.log 2 k + 1))) k false) (polarize p₀ p₁ (m * (Nat.log 2 k + 1)) (2 ^ (b * (Nat.log 2 k + 1))) k true) ≤ (1 / 2) ^ k)

Polarization Lemma [SahaiVadhan2003, Lemma 3.3 and the remark after its proof], for constant thresholds 0 ≤ β < α² ≤ 1: there are constants m ≥ 1 and b such that, with λ = m (⌊log₂ k⌋ + 1) and ℓ = 2 ^ (b (⌊log₂ k⌋ + 1)), both polynomially bounded in k, every pair at distance at least α polarizes to distance at least 1 - 2⁻ᵏ and every pair at distance at most β polarizes to distance at most 2⁻ᵏ.