A uniform word sampler #
One fixed machine with one control state and no work tapes scans its input, emitting a fresh fair
bit per symbol and halting at the right boundary. On an input of length n it writes a uniform
word of length n in exactly n + 1 transitions. The last transition samples and discards a coin,
as the common interpreter does on every live instruction; the results below concern closed
distributions, not equality of programs with different numbers of coin queries.
Main definitions #
Turing.MultiTapePTM.uniformListMachine: the finite uniform scanner.
Main results #
Turing.MultiTapePTM.eval_uniformListMachine: uniform output at the linear clock.Turing.MultiTapePTM.uniformListMachine_halted: every run has halted at that clock.
References #
Adapted from Cslib/Computability/Probabilistic/Sampling.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using the common machine and input length.
Emit one fair bit per input symbol, then halt without using work tapes.
Instances For
The final configuration retains the generated word and has halted at the right boundary.
The scanner outputs a uniform word of the input length in a linear number of transitions.
Every supported configuration has actually halted by the linear clock.