Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.BlockComputation.QueryReplayMotionCorrect

All-head correctness of native movement verification #

The finite displacement check is exactly the native block-index check, including the input head's negative coordinate at the left blank boundary. Work origins are proof-only translations of the stored relative positions.

theorem Turing.MultiTapePTM.BlockComputation.QueryReplay.Motion.inputMatches_iff (b positive negative position : ℕ) [NeZero b] (label : SignType) :
inputMatches b positive negative position label = true ↔ (↑position - 1) / ↑b = ↑positive - ↑negative + ↑label

The native input-direction test checks its signed block coordinate, including position zero.

theorem Turing.MultiTapePTM.BlockComputation.QueryReplay.Motion.workMatches_iff (b relative : ℕ) [NeZero b] (origin : ℤ) (label : SignType) :
workMatches b relative label = true ↔ (↑b * (origin - 1) + ↑relative) / ↑b = origin + ↑label

A relative work-head position checks the same block as its translated native coordinate.

theorem Turing.MultiTapePTM.BlockComputation.QueryReplay.Motion.valid_iff {k : ℕ} {Q : Type} {w : List Bool} {b : ℕ} [NeZero b] (positive negative : ℕ) (expected : Option (Fin k) → SignType) (q : Config k Q) (c : Cfg k Bool Q w) (J : Option (Fin k) → ℤ) (hwidth : q.width = b) (hinput : J none = ↑positive - ↑negative) (hrep : Represents q c fun (h : Fin k) => ↑b * (J (some h) - 1)) :
valid (positive, negative, expected, q) = true ↔ ∀ (head : Option (Fin k)), Cfg.blockIndex b c head = J head + ↑(expected head)

Native movement verification validates the input head and every work head against the same expected schedule row as the functional block gate.