Documentation

Complexitylib.Circuits.Unrolling.Transition.Defs

Boolean formulas for one Turing-machine transition #

This file defines the proof-free formula layer for one step of a bounded nondeterministic Turing-machine trace. A TransitionCase records a complete local view of the machine, including its choice bit. Its TransitionEffect names the otherwise deeply nested components returned by NTM.δ.

The formulas read one encoded configuration block and produce the value of each atom in its halted-or-successor configuration. Input cells are preserved, writable cell zero is immutable, writes use the old head position, and head movement uses saturated subtraction at the left boundary. A right move from the largest represented head position has no represented target; clients rule out that case with HeadsLt before applying transition correctness.

A complete finite local view determining one nondeterministic transition.

  • choice : Bool

    The nondeterministic or probabilistic choice bit for this step.

  • state : tm.Q

    The current control state.

  • inputRead : Γ

    The symbol under the input head.

  • workRead : Fin kΓ

    The symbol under each work-tape head.

  • outputRead : Γ

    The symbol under the output head.

Instances For
    theorem Complexity.CircuitUnrolling.TransitionCase.ext {k : } {tm : NTM k} {x y : TransitionCase tm} (choice : x.choice = y.choice) (state : x.state = y.state) (inputRead : x.inputRead = y.inputRead) (workRead : x.workRead = y.workRead) (outputRead : x.outputRead = y.outputRead) :
    x = y
    def Complexity.CircuitUnrolling.instDecidableEqTransitionCase.decEq {k✝ : } {tm✝ : NTM k✝} (x✝ x✝¹ : TransitionCase tm✝) :
    Decidable (x✝ = x✝¹)
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Product representation used to enumerate complete local views.

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

        Complete local transition views form a finite type.

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

        Select the read symbol for a named tape from a transition case.

        Equations
        Instances For
          def Complexity.CircuitUnrolling.currentCase {k : } (tm : NTM k) (choice : Bool) (c : Cfg k tm.Q) :

          The complete local transition view presented by a configuration and choice bit.

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

            The named components of the action returned by NTM.δ for a local view.

            • nextState : tm.Q

              The successor control state.

            • workWrite : Fin kΓw

              The symbol written on each work tape before its head moves.

            • outputWrite : Γw

              The symbol written on the output tape before its head moves.

            • inputMove : Dir3

              The input-head movement.

            • workMove : Fin kDir3

              Each work-head movement.

            • outputMove : Dir3

              The output-head movement.

            Instances For
              def Complexity.CircuitUnrolling.instDecidableEqTransitionEffect.decEq {k✝ : } {tm✝ : NTM k✝} (x✝ x✝¹ : TransitionEffect tm✝) :
              Decidable (x✝ = x✝¹)
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Select the write symbol for a named writable tape.

                Equations
                Instances For

                  Unpack the transition action selected by a complete local view.

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

                    Every possible local view, in the finite ordering induced by Fintype.

                    Equations
                    Instances For
                      def Complexity.CircuitUnrolling.HeadsLt {k : } {Q : Type} (T : ) (c : Cfg k Q) :

                      Every named head lies strictly below T.

                      For the layout with head positions Fin (T + 1), this excludes the sole position whose right successor would fall outside the represented block.

                      Equations
                      Instances For
                        def Complexity.CircuitUnrolling.choiceStep {k : } (tm : NTM k) (choice : Bool) (c : Cfg k tm.Q) :
                        Cfg k tm.Q

                        Execute the halted-or-one-step semantics selected by one choice bit.

                        Equations
                        Instances For
                          noncomputable def Complexity.CircuitUnrolling.configVar {k : } (tm : NTM k) (T base : ) (atom : ConfigAtom tm T) :

                          The formula variable carrying an atom of the incoming configuration.

                          Equations
                          Instances For
                            noncomputable def Complexity.CircuitUnrolling.haltVar {k : } (tm : NTM k) (T base : ) :

                            The incoming configuration's halted-state bit.

                            Equations
                            Instances For
                              def Complexity.CircuitUnrolling.headCellPosition {T : } (position : Fin (T + 1)) :
                              Fin (T + 2)

                              Embed a represented head position into the one-cell-larger cell range.

                              Equations
                              Instances For
                                noncomputable def Complexity.CircuitUnrolling.readFormula {k : } (tm : NTM k) (T base : ) (tape : TapeSlot k) (symbol : Γ) :

                                Formula saying that a named tape reads a given symbol under its head.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  noncomputable def Complexity.CircuitUnrolling.caseFormula {k : } (tm : NTM k) (T base choiceWire : ) (view : TransitionCase tm) :

                                  Formula recognizing one complete local transition case.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    noncomputable def Complexity.CircuitUnrolling.effectFormula {k : } (tm : NTM k) (T base choiceWire : ) (selects : TransitionEffect tmBool) :

                                    Select transition cases whose named effect satisfies a Boolean test.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      noncomputable def Complexity.CircuitUnrolling.selectedStateFormula {k : } (tm : NTM k) (T base choiceWire : ) (state : tm.Q) :

                                      Formula selecting transition cases with a specified successor state.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        noncomputable def Complexity.CircuitUnrolling.selectedMoveFormula {k : } (tm : NTM k) (T base choiceWire : ) (tape : TapeSlot k) (direction : Dir3) :

                                        Formula selecting transition cases that move a named head in a given direction.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          noncomputable def Complexity.CircuitUnrolling.selectedWriteFormula {k : } (tm : NTM k) (T base choiceWire : ) (tape : WritableSlot k) (symbol : Γ) :

                                          Formula selecting transition cases that write a specified symbol.

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

                                            Numeric head position after one move, with saturated movement at zero.

                                            Equations
                                            Instances For
                                              noncomputable def Complexity.CircuitUnrolling.predecessorHeadFormula {k : } (tm : NTM k) (T base : ) (tape : TapeSlot k) (target : Fin (T + 1)) (direction : Dir3) :

                                              Incoming head positions that reach a target under one fixed direction.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                noncomputable def Complexity.CircuitUnrolling.movedHeadFormula {k : } (tm : NTM k) (T base choiceWire : ) (tape : TapeSlot k) (target : Fin (T + 1)) :

                                                Non-halted formula for a named head's next represented position.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  noncomputable def Complexity.CircuitUnrolling.headAtCellFormula {k : } (tm : NTM k) (T base : ) (tape : TapeSlot k) (position : Fin (T + 2)) :

                                                  Formula saying that the old head is at a represented cell position.

                                                  The final cell in Fin (T + 2) has no corresponding old head position and therefore produces false.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    noncomputable def Complexity.CircuitUnrolling.haltedOrFormula {k : } (tm : NTM k) (T base : ) (oldValue nextValue : BoolFormula) :

                                                    Choose the old atom when halted and a transition formula otherwise.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      noncomputable def Complexity.CircuitUnrolling.writtenCellFormula {k : } (tm : NTM k) (T base choiceWire : ) (tape : WritableSlot k) (position : Fin (T + 2)) (symbol : Γ) :

                                                      Formula for a positive writable cell after the write phase of one step.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        noncomputable def Complexity.CircuitUnrolling.nextFormula {k : } (tm : NTM k) (T base choiceWire : ) :

                                                        Formula for one atom of the halted-or-successor configuration.

                                                        Input cells never change. Writable cell zero also never changes, because Tape.write is a no-op there. Every other writable cell is updated at the old head position before the head movement represented by the head atoms.

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