Documentation

Complexity.Computability.Probabilistic.Sampling

Certified fair-bit and word sampling #

The finite-uniform Boolean program has a one-instruction machine realization. This primitive is independent of the input and is registered with fun_prop. Uniform words are sampled by one fixed scanner with a linear clock. A runtime sample length must itself be computed in unary, so the certificate includes the cost of writing the sampled word. Finite uniformity alone does not imply strict fair-coin PPT.

Main results #

References #

Adapted from Cslib/Computability/Probabilistic/Sampling.lean on the cslib crypto branch at 5ff69ca93402e7c947208dc56396d6d86203ccd8, using the existing encodings and common machine.

Sampling one fair bit is strict PPT for every fixed input encoding.

Uniform words have one finite fair-coin implementation for all unary input lengths.

theorem Turing.MultiTapeTM.ComputableTidilyInPolyTime.sampleList {α : Type} {input : α ↪ List Bool} {count : α → ℕ} (hcount : ComputableTidilyInPolyTime count input encUnary) :

Sample an efficiently computed number of independent fair bits, charging the count in unary.