Documentation

Complexitylib.Models.RandomAccessMachine.Simulation.TMConfig.Step.Defs

A fixed structured-RAM block for one Turing-machine transition #

The finite transition function is compiled as a decision tree. The program first loads the symbols under all named heads, dispatches on the finite-state code and the n + 2 four-symbol codes, then performs the selected transition using indirect stores into the bounded tape blocks.

The construction is fixed once tm and the cell-window bound are fixed. It does not install or consult an untrusted transition-table oracle.

Input tape index.

Equations
Instances For

    Work-tape index in the named input/work/output order.

    Equations
    Instances For

      Output tape index.

      Equations
      Instances For

        Direct head register for one named tape.

        Equations
        Instances For
          def Complexity.RAM.TMConfig.Step.cellBase (n bound : ) (tape : Fin (n + 2)) :

          First cell register of one named tape's bounded block.

          Equations
          Instances For

            First scratch register beyond the represented configuration.

            Equations
            Instances For

              Constant-zero scratch register.

              Equations
              Instances For

                Constant-one scratch register used by decrementing switches and head moves.

                Equations
                Instances For

                  Destructive copy of the finite-state code used by the outer switch.

                  Equations
                  Instances For

                    Scratch register holding an indirect cell address.

                    Equations
                    Instances For

                      Scratch register holding a writable symbol code.

                      Equations
                      Instances For
                        def Complexity.RAM.TMConfig.Step.symbolReg (n bound : ) (tape : Fin (n + 2)) :

                        Scratch register holding the symbol loaded under one named head.

                        Equations
                        Instances For

                          Exclusive upper bound on every configuration and scratch register.

                          Equations
                          Instances For
                            def Complexity.RAM.TMConfig.Step.wordBound {n : } (tm : TM n) (bound : ) :

                            A uniform value bound large enough for addresses, states, symbols, and a single rightward head move.

                            Equations
                            Instances For
                              def Complexity.RAM.TMConfig.Step.wordWidth {n : } (tm : TM n) (bound : ) :

                              One-bit-cushioned width used in logarithmic-cost bounds.

                              Equations
                              Instances For
                                def Complexity.RAM.TMConfig.Step.spaceBound {n : } (tm : TM n) (bound : ) :

                                Peak-space envelope for one transition block.

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

                                  A store fits the explicit register/value envelope used by one transition block. This public predicate states the concrete boundary directly without exposing the internal resource-certificate structure.

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

                                    Decode one valid four-way switch branch as a tape symbol.

                                    Equations
                                    Instances For
                                      def Complexity.RAM.TMConfig.Step.readSymbols {n : } {Q : Type} (cfg : Complexity.Cfg n Q) :
                                      Fin (n + 2)Γ

                                      Symbols currently read by all named TM heads.

                                      Equations
                                      Instances For

                                        Load the symbol under one represented head into its dedicated scratch register.

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

                                          Initialize constants and copy the represented finite-state code.

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

                                            Initialize scratch state and load every represented head symbol.

                                            Equations
                                            Instances For

                                              Encode a writable tape symbol with the same zero-blank convention as the configuration representation.

                                              Equations
                                              Instances For

                                                Update a represented head in the indicated direction.

                                                Equations
                                                Instances For
                                                  def Complexity.RAM.TMConfig.Step.writeOps (n bound : ) (tape : Fin (n + 2)) (write : Γw) :

                                                  Write one represented work/output tape and restore the left-end marker.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    def Complexity.RAM.TMConfig.Step.writeMoveOps (n bound : ) (tape : Fin (n + 2)) (write : Γw) (direction : Dir3) :

                                                    Write one represented work/output tape and move its head.

                                                    The direct write restoring cell zero to makes this branch-free while matching Tape.write, whose write at head zero is a no-op.

                                                    Equations
                                                    Instances For
                                                      noncomputable def Complexity.RAM.TMConfig.Step.actionOps {n : } (tm : TM n) (bound : ) (state : tm.Q) (symbols : Fin (n + 2)Γ) :

                                                      Straight-line register operations implementing a statically selected TM transition case.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        noncomputable def Complexity.RAM.TMConfig.Step.action {n : } (tm : TM n) (bound : ) (state : tm.Q) (symbols : Fin (n + 2)Γ) :

                                                        Structured command for one statically selected transition case.

                                                        Equations
                                                        Instances For
                                                          noncomputable def Complexity.RAM.TMConfig.Step.dispatchSymbols {n : } (tm : TM n) (bound : ) (state : tm.Q) :
                                                          List (Fin (n + 2))(Fin (n + 2)Γ)Structured.Cmd

                                                          Recursively dispatch on the loaded symbols for the listed named tapes.

                                                          Equations
                                                          Instances For
                                                            noncomputable def Complexity.RAM.TMConfig.Step.dispatchState {n : } (tm : TM n) (bound : ) :

                                                            Dispatch on the finite-state code, then on every loaded tape symbol.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              noncomputable def Complexity.RAM.TMConfig.Step.program {n : } (tm : TM n) (bound : ) :

                                                              Fixed structured-RAM program implementing one nonhalting TM transition.

                                                              Equations
                                                              Instances For
                                                                noncomputable def Complexity.RAM.TMConfig.Step.compiled {n : } (tm : TM n) (bound : ) :

                                                                Concrete compiled RAM block for one nonhalting TM transition.

                                                                Equations
                                                                Instances For
                                                                  noncomputable def Complexity.RAM.TMConfig.Step.dispatchSteps {n : } (tm : TM n) (bound : ) (state : tm.Q) (actual : Fin (n + 2)Γ) :
                                                                  List (Fin (n + 2))

                                                                  Exact transition count through symbol dispatch for the actually read case.

                                                                  Equations
                                                                  Instances For
                                                                    noncomputable def Complexity.RAM.TMConfig.Step.stepCount {n : } (tm : TM n) (bound : ) (cfg : Complexity.Cfg n tm.Q) :

                                                                    Exact source/compiled transition count for one represented TM step.

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      noncomputable def Complexity.RAM.TMConfig.Step.dispatchCost {n : } (tm : TM n) (bound : ) (state : tm.Q) (actual : Fin (n + 2)Γ) :
                                                                      List (Fin (n + 2))

                                                                      Logarithmic-cost bound through symbol dispatch.

                                                                      Equations
                                                                      Instances For
                                                                        noncomputable def Complexity.RAM.TMConfig.Step.timeBound {n : } (tm : TM n) (bound : ) (cfg : Complexity.Cfg n tm.Q) :

                                                                        Explicit logarithmic-cost bound for one represented TM step.

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