Documentation

Complexitylib.Models.TuringMachine.Subroutines.BinaryBump.Defs

The zero-extending increment — definitions #

⚠️ Unreviewed by Bolton

TM.binarySuccTM increments the number a tape holds: a carry that runs off the end appends a new high 1. This module defines the same scan with one write changed — the carry appends a 0 — which increments the string a tape holds, one place wider each time it overflows.

That is the enumeration of all bitstrings in order of length: [], 0, 1, 00, 10, …. It is the increment of a fixed-width counter that widens instead of wrapping, and it is what a machine enumerating the witnesses of a bounded existential advances each iteration.

Ripple one carry through a little-endian bit string, widening the string when the carry runs off its end.

Equations
Instances For

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

    Equations
    Instances For

      Finite phases of the zero-extending increment.

      Instances For

        Exact running time of the zero-extending increment on a bit string.

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

          Advance the little-endian bit string on work tape idx to the next one.

          The carry phase turns initial one bits into zero bits. The first zero becomes one; if the carry reaches the terminating blank, a zero is appended there — one place wider, all zeros — which is the only difference from TM.binarySuccTM. 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