Little-endian binary successor #
This module exposes the canonical semantics and compositional contracts for
TM.binarySuccTM. Natural numbers use Nat.bits, with the least significant
bit first and zero represented by the empty string. Successor propagates carry
through the initial one bits, appends on overflow, and rewinds the target work
tape to cell one.
Main results #
BinarySucc.ripple_natBits— the pure ripple function computes successor.TM.binarySuccTM_reachesIn_frame— exact execution with a full tape frame.TM.binarySuccTM_hoareTimeSpace_frame— terminating and all-reachable space contract.TM.binarySuccTM_isTransducer— the output head never moves left.
HasBinaryNat determines the entire canonical initialized tape, including
its head position, left marker, digits, and blank tail.
The standard initialized natural-number tape satisfies HasBinaryNat.
The exact successor running time is at most twice the standard binary size of the input value, plus two.
Starting on a canonical rewound natural number, binarySuccTM halts after
exactly binarySuccTime value transitions with the canonical representation
of value + 1. Input, output, and every unrelated work tape are preserved
exactly. The off-marker hypotheses are precisely what makes the structurally
mandatory idle moves preserve those tape heads.
Time-bounded compositional form of binarySuccTM_reachesIn_frame.
Time-and-space contract for canonical successor. The space component
bounds every reachable configuration, not just the terminal one. Starting
from auxiliary-space budget initialSpace, one cell per possible transition
gives the explicit bound initialSpace + binarySuccTime value.
binarySuccTM never moves the output head left, so it is safe to use in
one-way-output, space-bounded compositions.