Documentation

Complexitylib.Models.TuringMachine.Composition.Defs

Sequential composition after function computation #

This file fixes the tape layout and executable phase pipeline used to feed one deterministic function computation into a second machine. Proofs of correctness and time bounds live in the internal and public theorem layers.

For a function-computing tmF : TM nf and a second machine tmG : TM ng, the composite has nf + 1 + (ng + 1) work tapes:

The raw output is rewound and copied to the fresh virtual-input tape before tmG resumes after its compulsory first transition off the left-end markers.

@[reducible, inline]

Work-tape count of the sequential composition machine.

Equations
Instances For

    Physical work tape holding the raw redirected output of the first machine.

    Equations
    Instances For

      Physical work tape holding the canonical virtual input of the second machine.

      Equations
      Instances For

        The two pipeline tapes occupy distinct physical coordinates.

        The raw-output coordinate is the placed last work tape of tmF.retargetOutput.

        The virtual-input coordinate is the placed last work tape of retargetInputStarted tmG.

        Physical coordinate of work tape i of the first computation.

        Equations
        Instances For
          @[simp]
          theorem Complexity.TM.compositionPrefixIdx_val (nf ng : ) (i : Fin nf) :
          (compositionPrefixIdx nf ng i) = i

          Physical coordinate of source work tape j of the second computation.

          Equations
          Instances For
            @[simp]
            theorem Complexity.TM.compositionSecondWorkIdx_val (nf ng : ) (j : Fin ng) :
            (compositionSecondWorkIdx nf ng j) = nf + 1 + j
            def Complexity.TM.compositionFirstTM {nf : } (tmF : TM nf) (ng : ) :

            The first phase redirects tmF's output into the raw-output tape and parks the work-tape suffix reserved for the second computation.

            Equations
            Instances For
              def Complexity.TM.compositionSecondTM {ng : } (nf : ) (tmG : TM ng) :

              The last phase places the already-started virtual-input wrapper for tmG after the first computation's work and raw-output tapes.

              Equations
              Instances For

                Pipeline after the first computation: rewind its raw output, copy it onto a clean virtual-input tape, rewind that tape, and run the second computation.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Complexity.TM.compositionTM {nf ng : } (tmF : TM nf) (tmG : TM ng) :

                  Executable sequential composition of a function computation with a second deterministic machine.

                  Equations
                  Instances For