Polynomial-time binary deciders admit a one-pass implementation with one work tape
ProvedPvsNP.polyDecider_has_one_work_tape_descriptioncomplexity-theoryformal-verification
Every polynomial-time binary decider in the mission has a native transition table with one work tape and a physical input head whose position never decreases. On every binary word, the machine halts with exactly the intended output bit by a fixed power of input length plus two.
Preamble
import Definitions.Def_PvsNP import Definitions.Def_Complexitylib_0ebd467_Computability_Machines_Turing_MultiTape_Universal_Basic import Mathlib open PvsNP Turing Turing.MultiTapeTM.Universal
Formal statement
theorem PvsNP.polyDecider_has_one_work_tape_description (f : Str → Bool) (poly : PolyTimeDecider f) :
∃ (d : Desc) (k : ℕ), d.tapes = 1 ∧
(∀ x c, c.inputPos ≤ (step d x c).1.inputPos) ∧
∀ (w : Str) (t : ℕ), (w.length+2)^k ≤ t →
simulate d (w.map Bool.toNat) t = ([(f w).toNat],true) := by sorrySource
An exact polynomially bounded simulation between Mathlib and the Complexitylib native universal Turing machine.