Execution with saved coins #
Replay is a fold of one-step calls to the shared interpreter, with each supplied coin returned by a pure program. Exhausting the list retains the complete current configuration; a halted machine ignores the remaining coins. Query handlers can still have effects.
Sampling all coins in advance preserves the joint final configuration and private oracle state, provided the original coin program denotes a stateless fair bit. The query handler may be randomized and share state across its operations. This is a semantic equality; a deterministic machine implementing replay from an encoded input and coin tape needs a separate certificate.
Main definitions #
Turing.MultiTapePTM.runConfigFromCoins: replay from an arbitrary configuration.
Main results #
Turing.MultiTapePTM.runConfigFromCoins_append: pause and resume at a tape boundary.Turing.MultiTapePTM.run_interpret_runConfigFrom_eq_coins: average fixed-coin runs, retaining the complete configuration and private state.
References #
Adapted from the cslib crypto branch's
Computability/Machines/Turing/MultiTape/Probabilistic/CoinTape.lean at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using the common interpreter and typed program API.
Replay the shared interpreter with a supplied coin per step. Only the query handler can have effects; the replay itself does not draw randomness.
Instances For
The first coin supplies one instruction before replay resumes on the tail.
A halted machine ignores all remaining coins and performs no further queries.
Concatenating tapes agrees with pausing and resuming, as an equality of typed programs.
Interpretation commutes with the replay fold, without resetting any handler state.
A single instruction can use a pre-sampled coin when the coin program is stateless and fair. The entire query handler state is retained.
Sampling the entire private coin tape in advance preserves the joint configuration and private oracle state, including randomized query handlers sharing that state.
Without private state, the clocked run is the average of its fixed-coin programs.
Observe the output of a replay program, retaining any effects of its query handler.
Instances For
Replay from blank work and communication tapes.
Instances For
Fix one Boolean branch of a closed table, retaining its original states and tapes.
Instances For
Closed replay is a deterministic fold of the selected one-step transition tables.
Instances For
A closed one-step program with a fixed coin is a pure deterministic transition.
With no oracle channels, the entire fixed-coin program is pure.
The output of a closed replay from blank tapes, as a deterministic function.
Instances For
The complete closed configuration is a deterministic function of uniform saved coins.
A closed fair-coin run is a deterministic function of a uniform tape of clock length.
Every saved tape yields a supported configuration at the corresponding clock.
Every saved tape yields a supported output, including inputs that run to the clock cutoff.