Internal clocks for probabilistic machines #
The common clock controller preserves the source distribution when coin draws leave private interpreter state unchanged. The law may be biased; fair-coin semantics is a special case. This hypothesis is needed because clock bookkeeping consumes extra discarded coin draws. Query programs may still update arbitrary shared private state.
The budget tape must already be prepared. Its construction and runtime are a separate obligation.
Main definitions #
Turing.MultiTapePTM.withClock: the common clock consumer with Boolean-indexed transitions.
Main results #
Turing.MultiTapePTM.run_interpret_runConfigFrom_withClock_add: a prepared budget reproduces the clocked source's tapes and private state and halts, allowing extra time after exhaustion.
References #
The common proof in MultiTape.Machine.Clock adapts the cslib crypto branch's
MultiTape/Oracle/Clock.lean at 5ff69ca93402e7c947208dc56396d6d86203ccd8.
The common unary-budget controller specialized to Boolean-indexed transitions.
Instances For
A prepared budget implements the externally clocked run and then halts. Coin draws must be stateless, whereas the query program may modify arbitrary shared private state.