Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.BlockComputation.QueryReplayLoadCorrect

Correctness of native local replay initialization #

Explicit canonical windows agree with the existing embedded configuration's three blocks. The work origins belong only to the semantic correspondence; loading retains relative cells.

Canonical local buffers have exactly three blocks and use only the three cell codes.

theorem Turing.MultiTapePTM.BlockComputation.QueryReplay.Load.load_eq_loadView {k : ℕ} {Q : Type} (N b positive negative : ℕ) [NeZero b] (raw : RawResult k Q) (hcanonical : CanonicalWindows b raw) (J : Option (Fin k) → ℤ) (hinput : J none = ↑positive - ↑negative) :
load (N, b, (positive, negative), raw) = loadView N b J (RawResult.toView b raw)

Native loading is exactly the semantic view loader. Only the input block origin is stored at runtime; work origins merely locate the unchanged relative windows in the correctness proof.

The decoder constructs canonical explicit windows from every successful input label.

Canonical-code validation also provides the loader's concrete window invariants.

theorem Turing.MultiTapePTM.BlockComputation.QueryReplay.Load.load_label_ofFn {k s : ℕ} {Q : Type} (e : Q ≃ Fin s) (N b positive negative : ℕ) [NeZero b] (bits : Cslib.BitString (Encoding.width k s b)) (J : Option (Fin k) → ℤ) (hinput : J none = ↑positive - ↑negative) :

Checked label loading agrees exactly with semantic loading after the tree gate's canonical-code guard. FAIL and noncanonical labels never initialize a replay state.

theorem Turing.MultiTapePTM.BlockComputation.QueryReplay.Load.length_runFrom_load_le {k : ℕ} {Q : Type} [Finite Q] (M : MultiTapeTM k Bool Q) (w : List Bool) (b positive negative : ℕ) [NeZero b] (raw : RawResult k Q) (hcanonical : CanonicalWindows b raw) (J : Option (Fin k) → ℤ) (hinput : J none = ↑positive - ↑negative) (t : ℕ) :

Every physical clock of native-loaded canonical data has the proved local replay bound.