decRegTM: decrement a register #
decRegTM q erases the last mark of the unary register q: scan right
over the marks, erase the final one, rewind. From regTape d to
regTape (d - 1) (truncated: the zero register is left unchanged) in
2d + 4 steps. The missing primitive for descending loop fuels — the
pairwise at-most-one families iterate over shrinking suffixes.
Mirror of incRegTM (RegisterOps.lean) with an erase phase.
DecPhase is a finite type, as required by the TM structure.
Equations
- One or more equations did not get rendered due to their size.
Decrement register q: scan right over the marks, erase the last
one, rewind to cell 1. From regTape d to regTape (d - 1) in 2d + 4
steps; every other tape untouched. The zero register is unchanged.
Equations
- One or more equations did not get rendered due to their size.
Instances For
decRegTM Hoare specification. From regTape d in register q, reach
regTape (d - 1) in 2d + 4 steps (regTape 0 is left unchanged); the input,
output, and every other work tape are untouched.