Heads that idle never drift outward #
Space accounting for the phase machinery of the combinators rests on one fact. Between phases,
and throughout the rewind and check phases, every tape is moved by idleDir — and on a tape
carrying its left marker that sends the head to exactly max head 1: it bounces off cell 0
and otherwise stands still. So however many steps a rewind takes, no head drifts outward, and a
space bound established before the phase survives it with no additive slack.
The output tape is the exception: it is walked left to the marker and then one cell right, which
is still within max head 1.
Main results #
TM.head_writeAndMove_idleDir_le_max— an idle write-and-move stays withinmax head 1TM.seq_head_bound— the stepseqTMinterposes between its two simulations idles every tapeTM.loop_head_bound— every phase ofloopTMoutside the two simulations keeps every head withinmax head 1TM.if_head_bound— the same forifTMTM.loop_idle_step_state,TM.if_idle_step_state— an interposed step lands only at another interposed phase or at a start stateTM.loopTM_rewind_loop_frame— the rewind phase ofloopTMleaves the input and work tapes identical, heads included
The same for a write followed by a move: writing does not move the head.
An idle write-and-move never leaves max head 1.
The single step seqTM interposes between its two simulations idles every tape.
Outside its two simulation phases, loopTM never grows a head beyond max head 1.
The phase transitions and the rewind and check phases all idle the input and work tapes, and
move the output head right only off the left marker.
Outside its three simulation phases, ifTM never grows a head beyond max head 1.
Outside its three simulations, ifTM steps only to an interposed phase or to a branch's
start state.
From one of the interposed phases, loopTM moves either to another such phase or back to the
body's start state.
An interposed step lands at a start state or at another interposed phase. So the only way back into the body or the test is through their start states — which is what lets a loop invariant be re-established once per iteration.
The rewind phase leaves the input and work tapes alone #
One leftward rewind step of loopTM, framed: the input and work tapes are untouched.
The final rewind step of loopTM, framed.
The rewind phase of loopTM, framed. From rewindOut with the output head at p, the
machine reaches check in p + 1 steps with the output head at cell 1, the output cells
unchanged, and the input and work tapes identical — heads included. This is what lets a loop
invariant on the work tapes survive the phase and be re-established for the next iteration.