Documentation

Complexitylib.Encoding.BitPolynomial.Remainder.Defs

Long division of binary coefficient lists #

significantLength discards high zero padding numerically: it is one past the highest true coefficient, or zero for the zero polynomial. Every nonzero binary polynomial is monic, independently of its list's high zero padding.

For a modulus of degree d, remainderScan processes the dividend from its highest coefficient to its constant coefficient, keeping exactly d bits. Each step shifts the current remainder, inserts the next coefficient, and cancels the possible degree-d term with the supplied modulus. Constant-one moduli have d = 0 and produce the empty list.

remainderBits returns its dividend unchanged for a zero modulus, agreeing with Mathlib's convention for remainder by a nonmonic zero polynomial. Both operands are runtime inputs, and every definition is total.

One past the highest true coefficient, or zero for an all-false list.

Equations
Instances For

    One long-division step, retaining exactly the modulus degree in coefficients.

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

      Scan a little-endian dividend from its high coefficients to its low coefficients.

      Equations
      Instances For

        Remainder by a runtime binary modulus, allowing high zeros and the zero polynomial.

        Equations
        Instances For

          The total paired-input evaluator for binary-polynomial remainder.

          Equations
          Instances For