Polynomial-time binary transducers transfer to the CookLevin multitape model
ProvedCookLevin.isPolyTimeComputable_of_multitapecomplexity-theoryturing-machines
Let be a function from bit strings to bit strings. Suppose a finite-state deterministic multitape machine with two-sided binary work tapes, read-only input and append-only output computes in polynomial time, using the identity encoding for input and output. Then a well-formed CookLevin multitape machine computes the same function in polynomial time:
This transfers polynomial-time certificates for string algorithms to the machine and output convention used by the CookLevin and n-Queens missions.
Preamble
import Mathlib import Definitions.Def_Complexitylib_0ebd467_Computability_Machines_Turing_MultiTape_PolyTime import Definitions.Def_Complexitylib_0ebd467_Computability_Machines_Turing_MultiTape_Deterministic import Definitions.Def_CookLevin_Complexity
Formal statement
theorem CookLevin.isPolyTimeComputable_of_multitape (f : List Bool → List Bool)
(hf : Turing.MultiTapeTM.ComputableInPolyTime f
(Function.Embedding.refl _) (Function.Embedding.refl _)) :
CookLevin.IsPolyTimeComputable f := by sorrySource
The standard folded-tape simulation in S. Arora and B. Barak, Computational Complexity: A Modern Approach (2009), Chapter 1, Claim 1.4, applied to the two-sided work tapes of the cslib Configuration module. Source and target conventions are the Prove2Me modules Cslib_254e30e_Computability_Machines_Turing_MultiTape_Configuration and CookLevin_Basic / CookLevin_Cost. https://theory.cs.princeton.edu/complexity/