Compatible tile visits replay with independently interleaved sequential ports
ProvedPvsNP.PortStreamReplay.replay_tiled_visitscomplexity-theoryformal-verification
Consider an ordered sequence of work-tape tile visits and a shared boundary stamp at every handoff. Each visit can be taken from its own donor trace. Suppose the donor matches both boundary stamps and the active tile contents, all inactive tile contents are unchanged during that visit, and the hybrid stream at each port agrees with the donor at offsets between that port’s entry and exit counters. Then the hybrid machine reaches the prescribed final configuration from the prescribed initial configuration. Matching elapsed times or matching the order of reads across different ports is unnecessary.
Preamble
import Definitions.Def_MultiplePortTiledTrace open PvsNP.PortStreamReplay
Formal statement
theorem PvsNP.PortStreamReplay.replay_tiled_visits {Port Read Q Γ K : Type} [DecidableEq Port] [DecidableEq K] {n : ℕ} (M : Program Port Read Q Γ)
(tileOf : ℤ → K) (owner : Fin n → K) (stamps : Fin (n + 1) → Stamp Port Q)
(history : K → Fin (n + 1) → ℤ → Γ) (source : Fin n → Word Port Read)
(whole : Word Port Read)
(frozen : ∀ i p, tileOf p ≠ owner i →
history (tileOf p) i.castSucc p = history (tileOf p) i.succ p)
(visit : ∀ i, ∃ (a b : Cursor Port Q Γ) (reads : List (Port × ℕ)),
a.stamp = stamps i.castSucc ∧ b.stamp = stamps i.succ ∧
(∀ p, tileOf p = owner i → a.work.tape p = history (owner i) i.castSucc p) ∧
(∀ p, tileOf p = owner i → b.work.tape p = history (owner i) i.succ p) ∧
Segment M (source i) (fun p => decide (tileOf p = owner i)) true a b reads)
(agree : ∀ i port j, (stamps i.castSucc).next port ≤ j → j < (stamps i.succ).next port →
source i port j = whole port j) :
Run M whole (tiledCursor tileOf stamps history 0) (tiledCursor tileOf stamps history (Fin.last n)) := by sorrySource
Duration-free tile replay for exact low-degree completion with arbitrary interleaving of probe reads and monitored append events.