Documentation

Complexitylib.Circuits.BranchingProgramEncoding.Defs

Machine-facing encoding of width-five branching programs #

This file defines a deterministic, proof-free bit format for the width-5 permutation branching programs produced by Barrington's theorem. Permutations are represented by their rank in the computable S₅ enumeration, using seven bits because |S₅| = 120 < 2^7. Variable indices and the instruction count use the existing terminated-unary circuit codec.

An instruction is encoded as its variable field followed by two fixed-width permutation fields. A program starts with its instruction count, so exact decoding rejects truncation and trailing garbage.

Number of bits in the canonical rank encoding of an S₅ permutation.

Equations
Instances For

    The fixed computable table used to rank and unrank S₅.

    Equations
    Instances For

      The canonical table position of a permutation.

      Equations
      Instances For

        Encode an S₅ permutation by its seven-bit table position.

        Equations
        Instances For

          Decode one fixed-width permutation field and return the unused suffix.

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

            Encode one width-5 instruction as a terminated-unary variable followed by its two seven-bit permutation ranks.

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

              Decode one instruction prefix and return the unused suffix.

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

                Decode exactly count instruction prefixes and return the unused suffix.

                Equations
                Instances For

                  Canonically encode a width-5 branching program.

                  Equations
                  Instances For

                    Decode one complete program prefix and return the unused suffix.

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

                      Decode exactly one width-5 branching program. Trailing bits are rejected.

                      Equations
                      Instances For