Documentation

Complexitylib.SAT.Tseitin.Machine.Controller

Streaming controller for the CNF-to-3CNF reduction machine #

validEmitterTM is the concrete valid-input controller for the buffer and emission layer. It reads the already-validated input in two-bit tokens, keeps literal signs and the number of pending literals in finite control, and stores all unbounded variable indices in unary work registers.

The controller invokes three families of child machines:

The latter two child-state types depend on pending, so the controller state uses sigma types. Each child is run to its halt state before the controller resumes reading at the next input token. reductionTM installs this controller in the validation-first total assembly from Machine.Defs.

This file defines the machine. Its simulation invariant and polynomial-time accounting live in proof-only internal modules and are exposed publicly by Complexitylib.SAT.Tseitin.Machine.

Controller state #

Parser mode after tokenization. A literal sign is retained in finite control while its unary variable body accumulates in currentReg.

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

        The controller alternates between the first and second bit of each token.

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

              State of an in-progress unary-register increment, paired with the parser mode to restore when the child machine halts.

              Equations
              Instances For
                @[reducible, inline]

                State of an in-progress literal commit. The child state type depends on the pending-sign shape selected at the call site.

                Equations
                Instances For
                  @[implicit_reducible]

                  Equality decision for the pending-dependent commit child state.

                  Equations
                  Instances For
                    @[implicit_reducible]

                    Equality decision for the pending-dependent clause-close child state.

                    Equations
                    Instances For
                      @[reducible, inline]

                      Finite controller states: reading, one of three dependent child calls, or the unique halt state.

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

                        Inject a read phase into the controller state.

                        Equations
                        Instances For

                          Inject an increment child state into the controller state.

                          Equations
                          Instances For

                            Inject a pending-dependent commit child state into the controller state.

                            Equations
                            Instances For

                              Inject a pending-dependent clause-close child state.

                              Equations
                              Instances For

                                Schedule the operation denoted by a complete token. Invalid cases halt; they are unreachable after the preceding successful validation pass.

                                Equations
                                Instances For

                                  Concrete controller #

                                  Stream over a validated concrete CNF encoding and emit its exact-3 Tseitin transformation. The input must begin at cell one, freshReg must hold the first fresh variable, all literal buffers must be zero registers, and the output must be an empty append-only accumulator.

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

                                    Final concrete machine for the total encoded reduction. It initializes the fresh counter, validates before emission, clears the validator verdict on the selected branch, runs validEmitterTM on valid inputs, and emits the fixed fallback on malformed inputs.

                                    Equations
                                    Instances For