Documentation

Complexitylib.Metacomplexity.Hamming.Code.Defs

Finite Boolean codes -- definitions #

An abstract Boolean code is an injective map from fixed-length messages to fixed-length codewords. Correctness, minimum distance, exhaustive decoding, and rate are represented independently of any efficiency claim.

structure Complexity.BooleanCode (messageLength blockLength : ) :

An injective fixed-block-length Boolean encoding.

Instances For

    The all-zero Boolean word.

    Equations
    Instances For
      def Complexity.BooleanCode.xorWords {length : } (left right : BooleanHamming.Word length) :

      Coordinatewise addition over GF(2), represented by Boolean XOR.

      Equations
      Instances For
        def Complexity.BooleanCode.rate (messageLength blockLength : ) :

        Exact rational information rate for the two code lengths. At block length zero this uses the total rational-division convention.

        Equations
        Instances For
          def Complexity.BooleanCode.IsLinear {messageLength blockLength : } (code : BooleanCode messageLength blockLength) :

          Linearity over GF(2), stated directly through zero and XOR so the coding layer does not need a second representation of Boolean words.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def Complexity.BooleanCode.codewords {messageLength blockLength : } (code : BooleanCode messageLength blockLength) :

            Finite image of all messages.

            Equations
            Instances For
              def Complexity.BooleanCode.HasMinimumDistance {messageLength blockLength : } (code : BooleanCode messageLength blockLength) (minimumDistance : ) :

              Every pair of distinct messages encodes at distance at least the stated minimum.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                def Complexity.BooleanCode.decodeCandidates {messageLength blockLength : } (code : BooleanCode messageLength blockLength) (received : BooleanHamming.Word blockLength) (radius : ) :
                Finset (BooleanHamming.Word messageLength)

                Exhaustive list of messages whose codewords lie in a received-word ball.

                Equations
                Instances For
                  noncomputable def Complexity.BooleanCode.decodeUnique? {messageLength blockLength : } (code : BooleanCode messageLength blockLength) (received : BooleanHamming.Word blockLength) (radius : ) :
                  Option (BooleanHamming.Word messageLength)

                  Exhaustive decoder returning the first nearby message, if one exists. Minimum-distance hypotheses make this result unique but do not make the search efficient.

                  Equations
                  Instances For