Input length into a register #
inputLenRegTM q scans the input tape in lockstep with register q, writing
one mark per input bit, then rewinds both heads to cell 1: from the bumped
initial configuration it puts regTape |x| in register q, restoring the input
tape exactly. This is the reduction emitter's only input-reading machine
besides the start-clause emitter, and the last hand-rolled machine of the
campaign (docs/A5-ReductionEmitter.md).
Measure the input length into register q: lockstep scan right over
the input bits writing marks, then lockstep rewind.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Complexity.TM.inputLenRegTM_hoareTime
{n : ℕ}
(q : Fin n)
(x : List Bool)
(work₀ : Fin n → Tape)
(ys : List Bool)
(hwork₀ : ∀ (i : Fin n), i ≠ q → Parked (work₀ i))
(hq : work₀ q = regTape 0)
:
inputLenRegTM Hoare specification. From the bumped initial input and
regTape 0 in q, reach regTape |x| in q, restoring the input exactly.