Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Probabilistic.Replay.WithOracleInput

Saved-coin replay from a complete encoded input #

Pair preparation, a virtual-input boundary marker, and the two-phase controller implement replay from an ordinary input encoding of saved coins and source input. All preparation instructions are charged. The compiler retains the original word-oracle channels, so it does not copy arbitrarily long replies into an encoded machine configuration.

Main results #

References #

An original composition of the existing deterministic pair preparer, virtual-input compiler, saved-coin controller, and common machine sequencing law. The extracted pair preparer's original source credit is recorded in MultiTape.Plumbing.PrepareReplay.

theorem Turing.MultiTapePTM.exists_oracleReplay {k : ℕ} {State Oracle : Type} [Finite State] [DecidableEq Oracle] (machine : MultiTapePTM k Bool State Oracle) :
∃ (k' : ℕ) (State' : Type) (_ : Finite State') (target : MultiTapePTM k' Bool State' Oracle) (c : ℕ), ∀ (coins input : List Bool) (Query Store : Type) (spec : Cslib.OracleSpec Query) (coin : Cslib.OracleComp spec Bool) (query : Oracle → List Bool → Cslib.OracleComp spec (List Bool)) (oracle : (q : Query) → StateT Store PMF (spec q)) (coinLaw : PMF Bool), (∀ (s : Store), (Cslib.OracleComp.interpret oracle coin).run s = PMF.map (fun (bit : Bool) => (bit, s)) coinLaw) → ∀ (s : Store), (Cslib.OracleComp.interpret oracle (target.run coin query (c * (((MultiTapeTM.encPair MultiTapeTM.encBits MultiTapeTM.encBits) (coins, input)).length + 1)) ((MultiTapeTM.encPair MultiTapeTM.encBits MultiTapeTM.encBits) (coins, input)))).run s = (Cslib.OracleComp.interpret oracle (machine.runCoins query coins input)).run s ∧ ∀ result ∈ ((Cslib.OracleComp.interpret oracle (target.runConfigFrom coin query (c * (((MultiTapeTM.encPair MultiTapeTM.encBits MultiTapeTM.encBits) (coins, input)).length + 1)) (MultiTapeMachine.initialConfig target ((MultiTapeTM.encPair MultiTapeTM.encBits MultiTapeTM.encBits) (coins, input))))).run s).support, result.1.tapes.state = none

A finite-control native machine replays saved coins from an encoded pair in linear time. The bound includes pair preparation, virtual-input marking, every replay instruction, and halting. The whole external state is preserved for every query interpreter and stateless native coin law; the external handler's computation retains its abstract oracle cost.