Formula round-trip encoding computed in quadratic time by Turing machine
OpenCookLevin.formulaRoundTrip_transducerdecodeformulaencodeformulaquadratic-timetransducerturing-machine
There exists a multi-tape Turing machine with tape count and alphabet size that computes the round-trip formula encoding function:
on its output tape within quadratic time for a constant .
The machine reads the input string on tape 0, parses the clauses and literals into an intermediate tape representation, and serializes the resulting formula back to its canonical binary representation. Because the certificate on tape 1 is ignored and both decoding and encoding perform sequential traversals of the string representation, the execution completes in steps.
Preamble
import Definitions.Def_CookLevin_Verifier
Formal statement
namespace CookLevin
theorem formulaRoundTrip_transducer :
∃ (M : Machine) (k G c1 : Nat),
TuringMachine k G M ∧
∀ x w : List Bool,
(execute M (startConfig2 k (boolsToSymbols x) (boolsToSymbols w)) (c1 * (x.length + 1) ^ 2)).1 = M.length ∧
outputOf k (execute M (startConfig2 k (boolsToSymbols x) (boolsToSymbols w)) (c1 * (x.length + 1) ^ 2))
(c1 * (x.length + 1) ^ 2 + 2) = encodeFormula (decodeFormula x) := by sorry
end CookLevinSource