Documentation

Complexitylib.Models.TuringMachine.Subroutines.BinarySucc.Defs

Little-endian binary successor — definitions #

This module defines the canonical tape representation and finite controller for ripple-carry successor. Natural numbers use Nat.bits, whose least significant bit comes first and whose representation of zero is empty. Overflow therefore appends one new high bit at the first blank cell.

Exact number of transitions used by binarySuccTM on a canonical bit string. It is twice the successor of the number of initial low-order one bits.

Equations
Instances For

    A rewound tape containing the canonical little-endian representation of one natural number, including its immutable left-end marker.

    Equations
    Instances For

      Finite phases of ripple-carry successor.

      Instances For

        Exact running time of canonical successor on value.bits.

        Equations
        Instances For
          def Complexity.TM.binarySuccTM {n : } (idx : Fin n) :
          TM n

          Increment the canonical little-endian natural on work tape idx.

          The carry phase turns initial one bits into zero bits. The first zero becomes one; if the carry reaches the terminating blank, one is appended there. The machine then rewinds to cell one. Input, output, and unrelated work tapes use the structurally safe read-back/idle action.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For