Documentation

Complexitylib.Circuits.BinaryComparison.Defs

Little-endian binary comparison -- definitions #

This module defines unsigned interpretation and comparison for fixed-width little-endian bit strings, together with a linear-size Boolean formula for the comparison. The two input words occupy consecutive variable blocks.

def Complexity.BitString.unsignedValue {width : } (bits : BitString width) :

Interpret a fixed-width bit string as an unsigned little-endian natural.

Equations
Instances For
    def Complexity.BitString.unsignedLE {width : } :
    BitString widthBitString widthBool

    Compare two equally wide little-endian words from their most significant bits downward.

    Equations
    • One or more equations did not get rendered due to their size.
    • x_3.unsignedLE x_4 = true
    Instances For
      def Complexity.BoolFormula.unsignedLEOf {width : } :
      (Fin widthBoolFormula)(Fin widthBoolFormula)BoolFormula

      Compare two fixed-width vectors of Boolean formulas as little-endian unsigned words. This general form supports variables, constants, and later compiled wire layouts without changing the comparator tree.

      Equations
      Instances For
        def Complexity.BoolFormula.unsignedLELeftConstant {width : } (left : BitString width) (rightBase : ) :

        Compare a constant left word with a variable block beginning at rightBase.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Complexity.BoolFormula.unsignedLERightConstant {width : } (leftBase : ) (right : BitString width) :

          Compare a variable block beginning at leftBase with a constant right word.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def Complexity.BoolFormula.unsignedLEAux (width leftBase rightBase : ) :

            Formula for unsigned comparison of two width-bit words beginning at the given variable bases.

            Equations
            Instances For

              Formula comparing the first width input variables with the next width variables as unsigned little-endian words.

              Equations
              Instances For

                Raw fan-in-two circuit comparing two consecutive width-bit unsigned little-endian words.

                Equations
                Instances For