Documentation

Complexitylib.Metacomplexity.NisanWigderson.Encoding.Defs

Canonical encodings of Nisan--Wigderson designs -- definitions #

Every coordinate of every ordered design block is encoded in the canonical clog_2(seedLength)-bit Fin representation. A fixed lexicographic order on output coordinate, input coordinate, and bit position turns the entire design into one flat bit string.

@[reducible, inline]
abbrev Complexity.NWDesign.CoordinateBitIndex (outputLength inputLength seedLength : ) :

Index of one bit in the complete coordinate table of an NW design.

Equations
Instances For
    def Complexity.NWDesign.coordinateBitIndexEquiv (outputLength inputLength seedLength : ) :
    CoordinateBitIndex outputLength inputLength seedLength Fin (outputLength * inputLength * Fin.bitWidth seedLength)

    Row-major equivalence between coordinate-bit table indices and flat bit positions.

    Equations
    Instances For
      def Complexity.NWDesign.coordinateBitTable {outputLength inputLength seedLength : } (design : NWDesign outputLength inputLength seedLength) :
      CoordinateBitIndex outputLength inputLength seedLengthBool

      Boolean table underlying the canonical NW-design encoding.

      Equations
      Instances For
        def Complexity.NWDesign.encode {outputLength inputLength seedLength : } (design : NWDesign outputLength inputLength seedLength) :

        Canonical flat encoding of every coordinate in every ordered design block.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Complexity.NWDesign.decodeCoordinate? (outputLength inputLength seedLength : ) (bits : List Bool) (output : Fin outputLength) (input : Fin inputLength) :
          Option (Fin seedLength)

          Decode the fixed-width coordinate at one output/input position of an encoded design. A malformed total length or an out-of-range coordinate is rejected.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def Complexity.NWDesign.decodedCoordinates (outputLength inputLength seedLength : ) (bits : List Bool) (hvalid : ∀ (output : Fin outputLength) (input : Fin inputLength), (decodeCoordinate? outputLength inputLength seedLength bits output input).isSome = true) :
            Fin outputLengthFin inputLengthFin seedLength

            Total coordinate table extracted from bits whose every coordinate decodes. The proof is erased from executable code.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def Complexity.NWDesign.decode? (outputLength inputLength seedLength : ) (bits : List Bool) :
              Option (NWDesign outputLength inputLength seedLength)

              Decode a canonical NW-design bit string. Besides length and coordinate-range checks, this rejects any block whose decoded coordinate map is not injective.

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

                All numeric parameters and the design needed by one uniform NW decoder invocation. Recording inputLength explicitly lets a parser recover the raw coordinate-table dimensions without evaluating a code-family function.

                • messageLength :

                  Source-message length used by the list-code family.

                • inverseAccuracy :

                  Inverse list-decoding accuracy.

                • outputLength :

                  Number of NW output coordinates.

                • inputLength :

                  Number of seed coordinates read by each design block.

                • seedLength :

                  Total NW seed length.

                • The parameterized NW design.

                Instances For

                  Canonical self-describing encoding of a uniform-decoder instance. Five framed minimal binary naturals precede the fixed-width design table.

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

                    Parse a self-describing uniform-decoder instance, rejecting noncanonical natural codes, malformed pair boundaries, and invalid design tables.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def Complexity.NWDesign.decoderInstance {outputLength inputLength seedLength : } (messageLength inverseAccuracy : ) (design : NWDesign outputLength inputLength seedLength) :

                      Package a design with the two list-code parameters needed by a uniform decoder.

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