Documentation

Complexitylib.Models.RandomAccessMachine.Simulation.RegisterStore.Machine.Instruction.Defs

Concrete sparse-store arithmetic instruction kernel #

This layer joins the width-efficient arithmetic machines to encoded sparse update. The destination address and two looked-up operands are supplied on canonical work tapes; the arithmetic result is written directly to the update controller's replacement tape, so no value-sized bridge is hidden between the two phases.

The three arithmetic operations shared by RAM register instructions.

Instances For

    Eighteen pairwise-distinct tapes used by arithmetic followed by sparse update. Slots 0..12 are the update controller, slots 13 and 14 are the operands, and slots 15..17 are multiplication scratch.

    Instances For

      The thirteen-tape sparse-update view.

      Equations
      Instances For

        First looked-up arithmetic operand.

        Equations
        Instances For

          Second looked-up arithmetic operand.

          Equations
          Instances For

            Multiplication's shifted-multiplicand scratch tape.

            Equations
            Instances For

              Multiplication's first alternating scratch tape.

              Equations
              Instances For

                Multiplication's second alternating scratch tape.

                Equations
                Instances For
                  theorem Complexity.RAM.RegisterStore.Machine.BinaryInstructionTapes.ne {n : } (tapes : BinaryInstructionTapes n) {i j : Fin 18} (hne : i j) :
                  tapes.idx i tapes.idx j

                  Parent-slot inequality gives physical tape inequality.

                  Parent slots for a reusable lookup whose destination is lhs.

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

                    Reusable sparse lookup view targeting the first operand.

                    Equations
                    Instances For

                      Parent slots for a reusable lookup whose destination is rhs.

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

                        Reusable sparse lookup view targeting the second operand.

                        Equations
                        Instances For

                          Parent slots for a loaded indirect read. The first operand supplies the runtime address and the update replacement tape receives the loaded value.

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

                            Multiplication-role parent slots. The accumulator deliberately aliases the update replacement slot 10.

                            Equations
                            Instances For

                              Six-tape multiplication view, with its accumulator on update replacement.

                              Equations
                              Instances For

                                The addition/subtraction operands and result are pairwise distinct.

                                The same physical inequalities as a subtraction certificate.

                                The arithmetic/store ABI together with one disjoint canonical program- counter tape. Nineteen work tapes suffice for every RAM instruction.

                                • The complete data-instruction assignment.

                                • pc : Fin n

                                  Canonical binary program counter.

                                • pc_ne (slot : Fin 18) : self.pc self.data.idx slot

                                  The program counter aliases no data-instruction role.

                                Instances For

                                  Every data-instruction role is distinct from the program counter.

                                  The first loaded operand is distinct from the program counter.

                                  The program counter is distinct from the first loaded operand.

                                  No tape owned by the first lookup aliases the program counter.

                                  Concrete arithmetic phase selected in finite control.

                                  Equations
                                  Instances For
                                    structure Complexity.RAM.RegisterStore.Machine.BinaryInstructionArithmeticResult {n : } (tapes : BinaryInstructionTapes n) (op : BinaryInstrOp) (lhs rhs : ) (initialWork finalWork : Fin nTape) :

                                    Uniform endpoint of the selected arithmetic phase.

                                    Instances For
                                      def Complexity.RAM.RegisterStore.Machine.BinaryInstructionUpdateResult {n : } (tapes : BinaryInstructionTapes n) (op : BinaryInstrOp) (store : Store) (address lhs rhs : ) (initialWork finalWork : Fin nTape) :

                                      Uniform endpoint of arithmetic followed by encoded sparse update.

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

                                        Arithmetic followed immediately by the fixed sparse update controller.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          def Complexity.RAM.RegisterStore.Machine.directBinaryInstructionTM {n : } (tapes : BinaryInstructionTapes n) (op : BinaryInstrOp) (destination source₀ source₁ : ) :
                                          TM n

                                          Load two direct register operands, prepare the direct destination address, then run arithmetic and sparse update.

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

                                            Load an address register, perform the loaded indirect read into the update replacement tape, synthesize the direct destination, and update the store.

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

                                              Synthesize an immediate value and direct destination, then update the sparse store.

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

                                                Load the indirect destination and direct source, copy both into the update ABI, and update the sparse store.

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

                                                  Replace the canonical binary program counter by a fixed literal.

                                                  Equations
                                                  Instances For

                                                    Conditional-zero control instruction. The fixed sparse read is cleared after branching so the reusable lookup ABI is restored at the endpoint.

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

                                                      Halt is represented by a one-step exact no-op instruction kernel. The outer run controller detects halt before beginning another iteration.

                                                      Equations
                                                      Instances For
                                                        structure Complexity.RAM.RegisterStore.Machine.ControlInstructionReady {n : } (tapes : ControlInstructionTapes n) (store : Store) (pcValue : ) (work : Fin nTape) :

                                                        Canonical entry boundary for a control instruction.

                                                        Instances For
                                                          structure Complexity.RAM.RegisterStore.Machine.ControlInstructionResult {n : } (tapes : ControlInstructionTapes n) (store : Store) (pcValue : ) (initialWork finalWork : Fin nTape) :

                                                          Semantic endpoint shared by the three control-only instruction forms.

                                                          Instances For

                                                            Runtime for replacing a canonical program counter by a literal.

                                                            Equations
                                                            Instances For

                                                              Runtime for conditional-zero control, including lookup and operand reset.

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                def Complexity.RAM.RegisterStore.Machine.DirectBinaryOperandsResult {n : } (tapes : BinaryInstructionTapes n) (store : Store) (source₀ source₁ : ) (initialWork finalWork : Fin nTape) :

                                                                Boundary after the two direct source-register lookups.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For
                                                                  def Complexity.RAM.RegisterStore.Machine.DirectBinaryAddressResult {n : } (tapes : BinaryInstructionTapes n) (store : Store) (destination source₀ source₁ : ) (initialWork finalWork : Fin nTape) :

                                                                  Boundary after the direct destination literal has been synthesized on the update query tape.

                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For
                                                                    structure Complexity.RAM.RegisterStore.Machine.DirectBinaryUpdateReady {n : } (tapes : BinaryInstructionTapes n) (store : Store) (destination source₀ source₁ : ) (work : Fin nTape) :

                                                                    Exact update-controller ABI established by the lookup and address-loading prefix of a direct arithmetic instruction.

                                                                    Instances For
                                                                      def Complexity.RAM.RegisterStore.Machine.DirectBinaryInstructionResult {n : } (tapes : BinaryInstructionTapes n) (op : BinaryInstrOp) (store : Store) (destination source₀ source₁ : ) (initialWork finalWork : Fin nTape) :

                                                                      Semantic endpoint of a complete direct arithmetic instruction.

                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For
                                                                        def Complexity.RAM.RegisterStore.Machine.IndirectLoadInstructionResult {n : } (tapes : BinaryInstructionTapes n) (store : Store) (destination addressRegister : ) (initialWork finalWork : Fin nTape) :

                                                                        Semantic endpoint of a complete indirect load.

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For
                                                                          def Complexity.RAM.RegisterStore.Machine.ImmediateInstructionResult {n : } (tapes : BinaryInstructionTapes n) (store : Store) (destination value : ) (initialWork finalWork : Fin nTape) :

                                                                          Semantic endpoint of one immediate assignment.

                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            def Complexity.RAM.RegisterStore.Machine.IndirectStoreInstructionResult {n : } (tapes : BinaryInstructionTapes n) (store : Store) (addressRegister source : ) (initialWork finalWork : Fin nTape) :

                                                                            Semantic endpoint of one indirect store.

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

                                                                              Complete arithmetic-plus-update budget, including the composition seam.

                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              Instances For
                                                                                def Complexity.RAM.RegisterStore.Machine.directBinaryInstructionTime {n : } (tapes : BinaryInstructionTapes n) (op : BinaryInstrOp) (store : Store) (destination source₀ source₁ : ) :

                                                                                Complete direct arithmetic-instruction budget.

                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For
                                                                                  def Complexity.RAM.RegisterStore.Machine.indirectLoadInstructionTime {n : } (tapes : BinaryInstructionTapes n) (store : Store) (destination addressRegister : ) :

                                                                                  Complete indirect-load instruction budget.

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

                                                                                    Complete immediate-assignment instruction budget.

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

                                                                                      Complete indirect-store instruction budget.

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