An end-marker shuttle advances input by twice its width
ProvedPvsNP.round_trip_advances_inputcomplexity-theoryformal-verification
A frame tracks a work head, a one-way input head and a direction bit. Each outward step moves both heads one cell forward until the work head reaches the far marker. Its next step reverses the work direction and starts the return. Each return step still advances the input. Starting at the near marker, a positive-width shuttle takes exactly twice its width to return, advancing the input by that same distance.
Preamble
import Lean.Elab.Tactic.Omega import Mathlib.Logic.Function.Iterate set_option autoImplicit false
Formal statement
theorem PvsNP.round_trip_advances_input (width input : ℕ) (positive : 0 < width)
(tick : ℕ × ℕ × Bool → ℕ × ℕ × Bool)
(towardFar : ∀ work pos, work < width → tick (work, pos, false) = (work + 1, pos + 1, false))
(atFar : ∀ pos, tick (width, pos, false) = (width - 1, pos + 1, true))
(towardNear : ∀ work pos, 0 < work → tick (work, pos, true) = (work - 1, pos + 1, true)) :
tick^[2 * width] (0, input, false) = (0, input + 2 * width, true) := by sorrySource
Local transition clock for a unary shuttle used by a single-work-head sampler.