Formula well-formedness decided in two-phase quadratic plus linear time by Turing machine
OpenCookLevin.isFormulaStringB_machine_composedcompositionisformulastringbquadratic-timeturing-machineverifier
There exists a multi-tape Turing machine with tape count and alphabet size that decides whether an input string is a valid binary encoding of a CNF formula within a two-phase running time:
within at most steps for constants .
The decision procedure operates in two successive phases:
- Transduction Phase: The machine decodes into a CNF formula and re-encodes it onto a dedicated work tape, taking steps.
- Comparison Phase: The machine traverses tape 0 (holding ) and the work tape simultaneously, checking character-by-character equality and writing the final decision bit to the verdict tape in steps.
Preamble
import Definitions.Def_CookLevin_Verifier
Formal statement
namespace CookLevin
theorem isFormulaStringB_machine_composed :
∃ (M : Machine) (k G : Nat) (c1 c2 : Nat),
TuringMachine k G M ∧
∀ x w : List Bool,
DecidesIn M k (boolsToSymbols x) (boolsToSymbols w)
(c1 * (x.length + 1) ^ 2 + c2 * (x.length + 1))
(isFormulaStringB x) := by sorry
end CookLevinSource