Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Complexity.LogSpace.ConfigurationGraph.Tape

Ternary registers for binary work tapes #

A normalized StackTape Bool is a base-three natural number, with the cell nearest the head as its least significant digit. Blank is zero, false is one, and true is two. Normalization of the stored tail is essential: appending a blank at the far end does not change the code. The arithmetic push, pop and observation operations below agree with StackTape operations.

Main definitions #

Main results #

References #

Uses Bolton Bailey's normalized StackTape and BiTape APIs.

Blank, false and true are the ternary digits zero, one and two.

Instances For

    Little-endian base-three evaluation of a finite cell list.

    Instances For

      The ternary code of a normalized stack.

      Instances For

        The normalizing push still has the usual base-three arithmetic meaning.

        The digit under the stack head is its least significant ternary digit.

        Removing the head divides the stack register by three.

        A stack with l stored cells has a ternary code smaller than 3^l.

        The registers of a bidirectional tape, in head/left/right order.

        Instances For

          Execute an optional write and a signed move on the three tape registers.

          Instances For

            Arithmetic tape instructions agree with the native finite tape action.