Documentation

Complexitylib.Models.TuringMachine.Experimental.BinaryRoutine.Arithmetic.Defs

Arithmetic leaves for proof-carrying binary routines -- definitions #

These adapters expose the remaining framed binary subroutines through the pure value-vector interface. Static index separation and reusable-zero requirements remain explicit in BinaryRoutine.requires.

Clear one canonical binary work value to zero.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def Complexity.BinaryRoutine.addConst {n : } (idx : Fin n) (constant : ) :

    Add one hardwired natural to a canonical binary value.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Complexity.BinaryRoutine.set {n : } (idx : Fin n) (value : ) :

      Replace one canonical binary value by a hardwired natural.

      Equations
      Instances For
        def Complexity.BinaryRoutine.add {n : } (srcIdx dstIdx counterIdx : Fin n) :

        Add a preserved source into a destination and restore a private counter.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Complexity.BinaryRoutine.mulAdd {n : } (leftIdx rightIdx accIdx mulCounterIdx addCounterIdx : Fin n) :

          Add the product of two preserved values into an accumulator and restore both private counters.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def Complexity.BinaryRoutine.evalPolynomial {n : } (inputIdx resultIdx scratchIdx mulCounterIdx addCounterIdx : Fin n) (p : Polynomial ) :

            Evaluate one fixed natural polynomial from a preserved input into a zero result tape, restoring the alternate accumulator and both counters.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def Complexity.BinaryRoutine.emitNatCode {n : } (counterIdx valueIdx : Fin n) :

              Emit the terminated-unary code of a preserved value, restoring the zero scratch counter and leaving all pure values unchanged.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                def Complexity.BinaryRoutine.emitRawGate {n : } (op : AndOrOp) (negated₀ negated₁ : Bool) (emitCounterIdx input₀Idx input₁Idx : Fin n) :

                Emit one raw gate without advancing any pure value. This is the loop body used when the surrounding binary driver itself advances the wire frontier.

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