Preparing saved coins and a buffered input #
Both closed and external-oracle replay decode an encoded pair onto disjoint tapes. The first word supplies saved coins; the second becomes the virtual input, with a separate boundary marker. These helpers describe the same deterministic preparation independently of the replay controller.
Main definitions #
Turing.MultiTapeTM.ReplayInput.prepareTapes: reserve disjoint source and preparation tapes.Turing.MultiTapeTM.ReplayInput.words: prepared coins and input before marking the boundary.
Main results #
Turing.MultiTapeTM.ReplayInput.runFrom_prepare: the pair preparer's full machine execution.Turing.MultiTapeTM.ReplayInput.runFrom_mark: the two-step virtual-input boundary marker.
References #
Extracted from MultiTape.Probabilistic.ReplayInput, adapted there from the cslib crypto branch
at 5ff69ca93402e7c947208dc56396d6d86203ccd8.
Two instructions prepare the virtual-input boundary marker.
theorem Turing.MultiTapeTM.ReplayInput.runFrom_prepare {k r : ℕ} {PrepareState : Type} (prepare : MultiTapeTM (r + 2) Bool PrepareState) (coins input outer : List Bool) (t s : ℕ) (h :
prepare.TransformsTapes
(fun (inp : List Bool) (ws : Fin (r + 2) → List Bool) => inp = outer ∧ ws = fun (x : Fin (r + 2)) => [])
(fun (x : List Bool) (x_1 ws' : Fin (r + 2) → List Bool) (emitted : List Bool) =>
ws' = Fin.append (fun (x : Fin r) => []) ![coins, input] ∧ emitted = [])
t s) :
runFrom ((prepare.extendTapes (prepareTapes k r)).initCfg outer) t = wordsCfg outer none (words k r coins input) []
Pair preparation reaches its exact output words on the reserved tapes.