Documentation

Complexitylib.Circuits.BarringtonCompiler.Defs

An executable Barrington compiler -- definitions #

The original existence proof chooses conjugators and commutator factors inside Prop. This module instead searches the finite group S₅ explicitly, making the target-cycle decomposition and the resulting formula compiler executable.

A computable enumeration of every permutation of Fin n, obtained from the recursive decomposition S_(n+1) ≃ Fin (n+1) × S_n.

Equations
Instances For
    def Complexity.isConjugator5 (source target g : Equiv.Perm (Fin 5)) :

    Test whether g conjugates source to target.

    Equations
    Instances For

      The first conjugator in the canonical finite enumeration of S₅, or the identity if no conjugator exists.

      Equations
      Instances For

        The first fixed 5-cycle in the explicit Barrington commutator.

        Equations
        Instances For

          The second fixed 5-cycle in the explicit Barrington commutator.

          Equations
          Instances For

            The fixed target cycle obtained as the commutator of the two base cycles.

            Equations
            Instances For

              Canonically search for a permutation conjugating the fixed target cycle to target.

              Equations
              Instances For

                The left factor in the canonical commutator decomposition of target.

                Equations
                Instances For

                  The right factor in the canonical commutator decomposition of target.

                  Equations
                  Instances For
                    def Complexity.BP.commutatorProgram {w : } (p q : BP w) :
                    BP w

                    The four-block program commutator p q p⁻¹ q⁻¹.

                    Equations
                    Instances For

                      Compile a Boolean formula to a width-5 permutation branching program representing it through target.

                      The definition is total for every target permutation. Its correctness theorem assumes that target is a 5-cycle. Binary gates use the executable canonical commutator decomposition above; no choice from an existential proof remains.

                      Equations
                      Instances For