isFormulaStringB is PolyTimeDecidable
ProvedCookLevin.isFormulaStringB_polyTimeDecidablepolynomial-timeturing-machineverifier
The formula-string check is polynomial-time decidable.
isFormulaStringB x tests whether the binary string is a valid encoding of a CNF formula by decoding into a formula and re-encoding it, then comparing the result with . Both decoding and encoding traverse the input once, so the entire check runs in time (quadratic due to the list equality comparison).
A multi-tape Turing machine implementing this check uses one tape for the input , additional work tapes for the intermediate encoding, and writes the verdict on the output tape. Since the check depends only on (the certificate is ignored), the machine runs in at most steps for suitable constants .
Preamble
import Definitions.Def_CookLevin_Verifier
Formal statement
namespace CookLevin
theorem isFormulaStringB_polyTimeDecidable :
PolyTimeDecidable (fun x _w => isFormulaStringB x) := by sorry
end CookLevinSource