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.
Interpret a fixed-width bit string as an unsigned little-endian natural.
Equations
- bits.unsignedValue = Nat.fromBitsLE bits.toList
Instances For
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
Embed one Boolean value as a constant formula leaf.
Equations
Instances For
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
- One or more equations did not get rendered due to their size.
- Complexity.BoolFormula.unsignedLEOf x_3 x_4 = Complexity.BoolFormula.tru
Instances For
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
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
Formula for unsigned comparison of two width-bit words beginning at the
given variable bases.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.BoolFormula.unsignedLEAux 0 x✝¹ x✝ = Complexity.BoolFormula.tru
Instances For
Formula comparing the first width input variables with the next width
variables as unsigned little-endian words.
Equations
- Complexity.BoolFormula.unsignedLE width = Complexity.BoolFormula.unsignedLEAux width 0 width
Instances For
Raw fan-in-two circuit comparing two consecutive width-bit unsigned
little-endian words.
Equations
- Complexity.CircuitCode.unsignedLERawCircuit width = Complexity.BoolFormula.compileRaw (width + width) (Complexity.BoolFormula.unsignedLE width)