Documentation

CslibFrontier.Foundations.Combinatorics.AffineDisperser.Li.AffineSource

Affine sources, conditioning, block decomposition, and disperser bridges #

This module provides the foundational theory of affine sources over 𝔽₂ (Bool) needed for explicit affine condensers and extractors ([Li23], [LZ24]):

Main results #

References #

Uniform distributions on affine subspaces #

noncomputable def Cslib.AffineDisperser.Li.uniformAffine {n : ℕ} (A : AffineSubspace Bool (BitString n)) (hA : (↑A).Nonempty) :

The uniform distribution on a nonempty affine subspace of BitString n.

An (n, k) affine source over 𝔽₂: the uniform distribution on an affine subspace of BitString n of dimension k ([Li2023, Def. 3.1], [LiZhong2024, Def. 15]).

The cardinality of the Finset of points of a nonempty affine subspace of BitString n equals 2 ^ finrank Bool A.direction.

@[simp]

Pointwise mass of uniformAffine A hA.

The uniform distribution on a nonempty affine subspace A has min-entropy dim(A).

Every (n, k) affine source has min-entropy k.

An affine map pushes uniformAffine A hA forward to uniformAffine (A.map L.toAffineMap).

theorem Cslib.AffineDisperser.Li.isAffineSource_map_of_isAffine {n m k : ℕ} {X : PMF (BitString n)} (hX : IsAffineSource X k) {L : BitString n → BitString m} (hL : BitString.IsAffine L) :
∃ k' ≤ k, k' ≤ m ∧ IsAffineSource (PMF.map L X) k'

An affine image of an affine source is an affine source whose dimension is the dimension of the pushed-forward subspace.

Affine Conditioning Lemma ([Li2023, Lemma 3.9], [LiZhong2024, Lemma 8]) #

theorem Cslib.AffineDisperser.Li.affineConditioning {n m k : ℕ} {X : PMF (BitString n)} (hX : IsAffineSource X k) {L : BitString n → BitString m} (hL : BitString.IsAffine L) :
∃ (kA : ℕ) (kB : ℕ) (A : PMF (BitString n)) (B : PMF (BitString n)) (c : BitString m) (L_inv : BitString m → BitString n), IsAffineSource A kA ∧ IsAffineSource B kB ∧ k = kA + kB ∧ k ≤ kB + m ∧ (X = A.bind fun (a : BitString n) => PMF.map (fun (b : BitString n) => a + b) B) ∧ (∀ b ∈ B.support, L b = c) ∧ BitString.IsAffine L_inv ∧ (∀ a ∈ A.support, L_inv (L a) = a) ∧ ∀ ℓ ∈ (PMF.map L X).support, ∃ (Aℓ : AffineSubspace Bool (BitString n)), (↑Aℓ).Nonempty ∧ Module.finrank Bool ↥Aℓ.direction = kB ∧ ↑Aℓ = {x : BitString n | x ∈ X.support ∧ L x = ℓ}

Affine Conditioning Lemma ([Li2023, Lemma 3.9], [LiZhong2024, Lemma 8]): for any (n, k) affine source X on BitString n and affine map L : BitString n → BitString m, there exist independent affine sources A and B of dimensions kA and kB with k = kA + kB, k ≤ kB + m, a constant c, and an affine map L_inv such that X = A + B, L b = c for all b ∈ B.support, L_inv (L a) = a for all a ∈ A.support, and every fiber {x ∈ X.support | L x = ℓ} is an affine subspace of dimension kB.

Affine Block Decomposition ([Li2023, Lemma 3.10]) #

theorem Cslib.AffineDisperser.Li.affineBlockDecomposition {t r k : ℕ} {b : Fin t → ℕ} {X : PMF ((i : Fin t) → BitString (b i))} (hX : IsAffineSource (PMF.map (⇑(BitString.piBlocksLinearEquiv b).symm) X) k) (hr : ∑ i : Fin t, b i ≤ k + r) :
∃ (C : Type) (x : Fintype C) (μ : PMF C) (P : C → (i : Fin t) → PMF (BitString (b i))), (∀ (c : C) (i : Fin t), ∃ (kᵢ : ℕ), b i ≤ kᵢ + r ∧ IsAffineSource (P c i) kᵢ) ∧ X = μ.bind fun (c : C) => Probability.PMF.pi (P c)

Affine Block Decomposition ([Li2023, Lemma 3.10]): if X is an affine source over t bit-blocks ∀ i : Fin t, BitString (b i) of codimension ≤ r (i.e. (∑ i, b i) - r ≤ k), then X is a convex mixture (μ.bind) of independent product affine sources PMF.pi (P c) whose i-th block P c i is an affine source on BitString (b i) of dimension at least b i - r.

Bridges from affine and sumset extractors to IsAffineDisperser ([Li2023, Cor. 7.14]) #

A seedless (k, Îľ) affine extractor maps every (n, k) affine source to within statistical distance Îľ of the uniform distribution on BitString m ([Li23]).

def Cslib.AffineDisperser.Li.IsSumsetExtractor {n m : ℕ} (ext : BitString n → BitString m) (k₁ k₂ : ℕ) (ε : ℝ) :

A (k₁, k₂, ε) sumset extractor maps the XOR-sum A + B of any two independent sources A, B of min-entropy at least k₁ and k₂ to within statistical distance ε of uniform ([Li2023, Thm. 7.13]).

theorem Cslib.AffineDisperser.Li.isAffineDisperser_of_isAffineExtractor {n m k : ℕ} {ε : ℝ} {ext : BitString n → BitString m} (hm : 0 < m) (hε : ε < 1 / 2) (hext : IsAffineExtractor ext k ε) :
BitString.IsAffineDisperser (fun (x : BitString n) => ext x ⟨0, hm⟩) k

Extracting one bit of an m-bit affine extractor with error < 1 / 2 gives an IsAffineDisperser for dimension k.

theorem Cslib.AffineDisperser.Li.exists_independent_affine_sum_of_isAffineSource {n k k₁ k₂ : ℕ} {X : PMF (BitString n)} (hX : IsAffineSource X k) (hk : k₁ + k₂ ≤ k) :
∃ (A : PMF (BitString n)) (B : PMF (BitString n)), IsAffineSource A k₁ ∧ IsAffineSource B (k - k₁) ∧ ↑k₂ ≤ Probability.PMF.minEntropy B ∧ X = A.bind fun (a : BitString n) => PMF.map (fun (b : BitString n) => a + b) B

Splitting an (n, k) affine source with k₁ + k₂ ≤ k into a sum A + B of two independent affine sources of dimensions k₁ and k - k₁ ≥ k₂.

theorem Cslib.AffineDisperser.Li.isAffineExtractor_of_isSumsetExtractor {n m k k₁ k₂ : ℕ} {ε : ℝ} {ext : BitString n → BitString m} (hk : k₁ + k₂ ≤ k) (hext : IsSumsetExtractor ext k₁ k₂ ε) :

A (k₁, k₂, ε) sumset extractor is a (k, ε) affine extractor whenever k₁ + k₂ ≤ k ([Li2023, Cor. 7.14]).

theorem Cslib.AffineDisperser.Li.isAffineDisperser_of_isSumsetExtractor {n m k k₁ k₂ : ℕ} {ε : ℝ} {ext : BitString n → BitString m} (hm : 0 < m) (hε : ε < 1 / 2) (hk : k₁ + k₂ ≤ k) (hext : IsSumsetExtractor ext k₁ k₂ ε) :
BitString.IsAffineDisperser (fun (x : BitString n) => ext x ⟨0, hm⟩) k

A (k₁, k₂, ε) sumset extractor outputting at least one bit with ε < 1 / 2 yields an IsAffineDisperser for dimension k ≥ k₁ + k₂ ([Li2023, Cor. 7.14]).