A bounded one-head transducer emits the exact unit-CNF stream
ProvedPvsNP.PhysicalStreamController.exact_fixed_width_streamcomplexity-theoryformal-verification
For positive bit width b and at most 2^b consecutive b-bit items following a unary width header, the fixed local controller consumes the full input and produces the exact fixed-identifier unit-CNF encoding. Every prefix of the execution stays in the first b+1 work cells, and the first terminal state is reached by 2b+3+n(b(12b+21)+7b+13) ticks for n items.
Preamble
import Definitions.Def_FixedWidthPhysicalStream set_option autoImplicit false set_option maxHeartbeats 3000000 open PvsNP.PhysicalStreamController open PvsNP.PhysicalClauseEmitter (tape) open PvsNP.FixedIdentifierSAT (streamWord) open PvsNP.OnlineClauseProducer (header)
Formal statement
theorem PvsNP.PhysicalStreamController.exact_fixed_width_stream (b : ℕ) (items : List (List Bool))
(positive : 0 < b) (fits : items.length ≤ 2^b)
(widths : ∀ item ∈ items, List.length item = b) :
let initial : Config := ⟨.headerFirst,0,fun _ => blank⟩
let source := header b ++ items.flatten
let T := streamCost b items.length
run T initial source =
(⟨.done,0,tape b items.length 0 (lastItem [] items)⟩,[],streamWord b items) ∧
(∀ t, (run t initial source).1.head ≤ b) ∧
(∀ t < T, (run t initial source).1.mode ≠ .done) ∧
T ≤ 2*b+3+items.length*(b*(12*b+21)+7*b+13) := by
sorrySource
Exact local-step analysis of a finite stream transducer for fixed-width element distinctness.