Sampling the XOR construction from uniform bits #
The XOR construction xorMix p₀ p₁ k c draws its selector uniformly among the bit strings of
parity c. A sampler that only has uniform bits draws k - 1 of them, r, and completes them to
parityComplete c r = Fin.snoc r (c ⊕ parity r), the unique string of parity c extending r.
This is a bijection between BitString (k - 1) and the selectors of parity c
(parityCompleteEquiv), so the completed selector is uniform among them
(uniformOfFintype_map_parityComplete). When p₀ and p₁ are themselves images of uniform seeds
under f₀ and f₁, the whole construction is the image of uniform selector bits and seeds
(xorMix_map_uniform). This is the form in which a circuit computes the XOR construction of two
samplers [SahaiVadhan2003, Lemma 3.5]. The XOR construction also commutes with images
(xorMix_map).
Main definitions #
Cslib.BitString.parityCompleteandCslib.BitString.parityCompleteEquiv, used below, are defined inCslibFrontier/Foundations/Data/BitString/Parity/Complete.lean.
Main results #
Cslib.Probability.PMF.xorMix_map: naturality of the XOR construction.Cslib.Probability.PMF.uniformOfFintype_map_parityComplete, used below, is proved inCslibFrontier/Probability/BitString/Parity.lean.Cslib.Probability.PMF.xorMix_map_uniform: the XOR construction of two images of uniform seeds is an image of uniform selector bits and seeds.
References #
The XOR construction from uniform bits: on j + 1 coordinates, the XOR construction of
the images of a uniform seed under f₀ and f₁ is the image of j uniform selector bits r and
j + 1 uniform seeds s under i ↦ f_{b i} (s i), where b = parityComplete c r.