A unary budget tape implements exact bounded machine acceptance
ProvedSipserGacsLautemann.unary_budget_simulation_reports_bounded_acceptanceLet be any deterministic finite-state machine with tapes. There is one finite-state machine with tapes that works for every input and every natural-number budget . Its first tapes contain the original input; its last tape contains exactly copies of the bit true, supplying a unary clock.
After steps, has halted and reports true exactly when accepts within steps. It reports false when rejects by that time or has not halted by that time. Acceptance on the -th simulated step is included. The result also holds for and for machines that halt immediately. No termination assumption on is required.
The clock is input data, so the same finite machine works for every . This is the timeout simulation primitive needed for an explicit-budget SGL scheduler. Constructing the required polynomial-size clock from the scheduler's original input, and integrating it into that scheduler, are separate obligations.
import Definitions.Def_sipser_gacs_lautemann import Definitions.Def_sgl_machine_infrastructure open SipserGacsLautemann
theorem SipserGacsLautemann.unary_budget_simulation_reports_bounded_acceptance
{tapes states : Nat} (machine : Machine tapes states) :
∃ (State : Type) (_ : Fintype State)
(clocked : TypedMachine (tapes + 1) State),
∀ (input : Fin tapes → List Bool) (budget : Nat),
clocked.result
(clocked.run
(Fin.lastCases (List.replicate budget true) input)
(budget + 1)).state =
some (@decide (machine.acceptsWithin input budget)
(Classical.propDecidable _)) := by
sorry