Frontier-seeking clock machine for the time-bounded universal machine #
Clock initialization delivers the canonical register tape
regTape V = ⟨1, regCells V⟩ on the clock tape (clkT = work tape 6 of a
TM 7): head parked at cell 1. The clocked universal loop
(clocked_loop_simulates in SimClocked.lean) instead wants the
frontier-parked form of ClockFrontier.lean: cells regCells V, head
at max V 1. seekFrontierTM bridges the two: starting at cell 1, it
walks right over the unary 1 marks to the last mark (the frontier), or
halts immediately at cell 1 when the clock is zero (frontier read □).
Spec: seekFrontierTM_hoareTime (ghost-initial-tapes style), V + 3
steps, every other tape exactly preserved. Behavior from head 1 on
regTape V:
V = 0: cell 1 reads□, halt in 1 step, head stays at1 = max 0 1.V ≥ 1: cell 1 reads1, step right intowalk; walk right while reading1; at cellV + 1read□and step left onto the frontierV = max V 1, halting. TotalV + 1steps.
Control states of seekFrontierTM.
- first : SeekFrontierPhase
- walk : SeekFrontierPhase
- done : SeekFrontierPhase
Instances For
Equations
- One or more equations did not get rendered due to their size.
Frontier seek: with the clock head at cell 1 of the canonical
register tape regTape V, reading □ (V = 0) halts immediately;
reading any mark (V ≥ 1) steps right into walk, which walks right
over the 1 marks and, on the first □ (cell V + 1), steps left
onto the frontier mark at cell V and halts. All other tapes idle
throughout.
Equations
- One or more equations did not get rendered due to their size.
Instances For
seekFrontierTM specification (ghost-initial-tapes style).
Starting from qstart with the clock tape (clkT = work tape 6)
holding the canonical register tape regTape V (cells regCells V, head
at cell 1), and every other tape parked on a non-▷ symbol,
seekFrontierTM halts within V + 3 steps having walked the clock
head to the frontier (max V 1) with the cells untouched; the input
tape, the output tape, and every other work tape are preserved
exactly.