A deterministic controller for saved-coin replay #
The controller reads the supplied coins from a fresh last work tape. Each stored bit supplies
one source instruction. After the source halts, only the coin head continues moving; the first
blank coin cell halts the controller. Thus a tape of t coins takes exactly t + 1 transitions,
even if the source does not halt within its supplied clock.
This module accounts for execution from preloaded tapes. Writing the coins and preparing the input are separate machine computations, not free initial data in a complexity certificate.
Main definitions #
Turing.MultiTapePTM.replay: deterministic replay with one additional read-only work tape.
Main results #
Turing.MultiTapePTM.runFrom_replay: agreement with fixed-coin execution and actual halting.
References #
Adapted from the cslib crypto branch's Oracle/Replay.lean at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using the common closed machine directly.
A lifted action updates the source tapes and consumes one stored coin.
A deterministic replay controller. Its control is finite whenever the source control is.
Instances For
An available coin supplies exactly one deterministic source transition.
The first blank saved-coin cell halts the controller.
Replay a stored sequence starting at any coin position. The source may halt early or remain live when the supplied sequence ends; the controller reaches the following blank in either case.
From preloaded coins and blank source tapes, replay agrees with the fixed-coin interpreter and halts in the number of coins plus one transitions.