Body machine: step reduction #
The single lemma every phase proof of the body correctness uses:
bodyTM.step on a non-halted configuration, when the transition arm is a
mkAct (they all are, by bodyδ_shape), produces the configuration whose
work tapes act per acts, whose real input idles, and whose real output
write-backs — in closed form.
Closed form of one bodyTM step whose transition arm is mkAct q' acts
(every arm is — bodyδ_shape). The real input tape idle-moves, the real
output tape write-backs and idle-moves, and work tape i performs
acts i (with the ▷ ⇒ right sanitization) or idles.
An idle work tape is exactly preserved by a mkAct step when it reads
a non-▷ symbol (its action is precisely transitionTape).
Closed form of a step whose arm is act1 (one active tape).
Closed form of a step whose arm is act2 (two active tapes).
Closed form of a step whose arm is act3 (three active tapes).
Generic rewind loop for any pair of states whose transition is
rewStep cur next · t: from state cur with work-tape-t head at p
(cells W, well-formed), reach state next with head 1 in p + 1
steps; tape t's cells and every other tape are exactly preserved.
Generic blank-rewind loop for any pair of states whose transition is
blankRewStep cur next · t: from state cur with work-tape-t head at
p, reach state next with head 1 in p + 1 steps, with cells 1..p
blanked; every other tape exactly preserved.
Generic scan-right loop for any pair of states whose transition is
act1 (if □ then next else cur) · t readBack right — the machine walks
right to the first □ and steps past it. k is the distance to that
□. Cells are preserved exactly; every other tape untouched.
The default path's state-tape blanking: from dfBlank with the state
head at h ≥ 1 and the first □ at distance k, blank cells
h..h+k-1 and stop on the □ (head at h + k, one idle transition
step) in k + 1 steps. All other tapes exactly preserved.
The default path's qhalt-field copy: from dfCopy with the state head
at a ≥ 1 and the desc head at b ≥ 1, where the desc field ends at
distance k (first □), copy the field onto state cells a..a+k-1
and stop (one idle transition on the □) in k + 1 steps. Desc cells
and all other tapes exactly preserved.