Cook–Levin machines: complete cell time block
ProvedCookLevin.machine_emit_cell_time_blockcomplexitycook-levinloopsturing-machines
For fixed tape and symbol bounds, a well-formed machine emits every actual cell-symbol constraint at one tableau time. It iterates over all tapes and positions, appends the encoded blocks to existing output, restores the position fuel, and advances the unary counter to time t+1. Its runtime is tapes*((T+1)(Aa(t+1)+B+6)+4+8*symbols). Zero tape and symbol bounds are included.
Preamble
import Definitions.Def_CookLevin_Tableau import Definitions.Def_CookLevin_Complexity open CookLevin set_option autoImplicit false
Formal statement
theorem CookLevin.machine_emit_cell_time_block {k G : Nat} (hk : 4 ≤ k)
(hG : 4 ≤ G) (tapes symbols : Nat) :
∃ R : Machine, ∃ A B : Nat, TuringMachine k G R ∧
∀ (sh : Shape) (t : Nat) (input : Tape) (bits : List Bool)
(fuel : Nat → Symbol) (saved : List Tape),
sh.k = tapes → sh.G = symbols → saved.length + 4 = k →
fuel 0 ≠ oneSymbol →
(∀ i, i < sh.T + 1 → fuel (1 + i) = oneSymbol) →
fuel (1 + (sh.T + 1)) ≠ oneSymbol →
let a := fun t => literalN (.Neg (sh.cellVar t 0 0 blankSymbol))
let chunk := (List.range sh.k).flatMap fun j =>
(List.range (sh.T + 1)).flatMap fun p =>
(encodeFormula (exactlyOneOf (List.range sh.G) (sh.cellVar t j p))).dropLast
Transforms R
(input :: (contents (boolsToSymbols (List.replicate (a t) true)), 1 + a t) ::
(contents (boolsToSymbols bits), 1 + bits.length) :: (fuel, 1) :: saved)
(tapes * ((sh.T + 1) * (A * a (t + 1) + B + 6) + 4 + 8 * symbols))
(input :: (contents (boolsToSymbols (List.replicate (a (t + 1)) true)), 1 + a (t + 1)) ::
(contents (boolsToSymbols (bits ++ chunk)), 1 + (bits ++ chunk).length) ::
(fuel, 1) :: saved) := by sorrySource
Compose a fixed number of cell tape blocks, prove the concatenated output invariant, and identify the final counter with the next time offset.