Documentation

Complexitylib.Models.TuringMachine.Combinators.ForInput.Defs

Read-only-input loop combinator — definitions #

TM.forInputTM body scans the Boolean input from left to right and invokes body after each bit. When body preserves the input tape, this is exactly one invocation per original input bit. The input itself is the loop fuel, so the combinator does not materialize a linear-size unary counter on an auxiliary tape.

Driver states for the read-only-input loop.

Instances For
    def Complexity.TM.forInputTM {n : } (body : TM n) :
    TM n

    Advance over a Boolean input symbol and run body.

    The driver skips an initial left-end marker, advances the read-only input by one cell before each body invocation, and halts whenever scanning encounters a blank. Work and output tapes take the structurally safe read-back/idle action in driver states. Nonhalting body transitions are embedded exactly, so the usual once-per-original-symbol behavior requires the body to preserve the input tape.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Complexity.TM.forInputLoopTime (bodyTime : ) (value : ) :

      Exact remaining time for an input-driven loop whose body takes bodyTime value steps on iteration value. The terminal input-blank exit takes one step. Each nonterminal iteration takes one scanner step, the body run, and one loopback step.

      Equations
      Instances For
        structure Complexity.TM.ForInputLoopSpec {n : } (body : TM n) (bodyTime : ) (total : ) :

        Wrapper-free certificate for the exact control flow of an input-driven loop. All configurations use the public state type of forInputTM body, so clients need not mention the internal body-state embedding.

        total is the first scanner index whose input symbol is blank.

        Instances For
          structure Complexity.TM.ForInputLoopSpaceSpec {n : } {body : TM n} {bodyTime : } {total : } (spec : body.ForInputLoopSpec bodyTime total) (inputLength spaceBound : ) :

          Space obligations needed to turn a ForInputLoopSpec into an all-prefix auxiliary-space certificate. The body obligation concerns only prefixes of its advertised exact run; later combined-machine execution may already have crossed the loopback seam.

          Instances For