A one-work-tape installer writes the exact decoded frame with a quadratic clock
ProvedPvsNP.BareFrameWriter.writes_framecomplexity-theoryformal-verification
Given w Boolean packets, stored starting one cell to the right of the work head, the local installer writes a near marker, exactly w decoded payload cells, and a far marker. It returns to the starting head, clears the packet plane, and follows an exact 5w²+16w+6 transition clock. The addressed stamping and clearing laws preserve all other cell information.
Preamble
import Definitions.Def_BarePacketFrameWriter
set_option autoImplicit false
set_option maxHeartbeats 4200000
open PvsNP PvsNP.BareFrameWriter
open WorkBoundarySplice OnlineWindowShift
variable {C P : Type}
Formal statement
theorem PvsNP.BareFrameWriter.writes_frame (stamp : ℤ → Option Bool → C)
(readBit : C → Option Bool) (clearBit : C → C) (decode : Packet → P)
(readLaw : ∀ i b, readBit (stamp i b) = b)
(clearLaw : ∀ i b, clearBit (stamp i b) = stamp i none)
(p : ℤ) (packets : List Packet) (payload : ℕ → P)
(payloadOk : ∀ j : ℕ, j < packets.length → (packets.map decode)[j]? = some (payload j)) :
Steps (machine readBit clearBit decode)
⟨.start,p,tracks (stampLine stamp p (packetBits packets)) (fun _ => .blank)⟩
⟨.done,p,tracks (fun i => stamp i none) (frame p packets.length payload)⟩
(clock packets.length) := by sorrySource
Exact finite tape transition count for the packet-to-frame handoff.