Documentation

Complexitylib.Encoding.BitPolynomial.Defs

Binary coefficient lists and carryless multiplication #

A list of bits represents a polynomial over ZMod 2, with its constant coefficient first. Trailing false bits are high zero coefficients and may be retained. mulBits computes every output coefficient as the parity of the number of contributing pairs of true input coefficients.

The output has length a.length + b.length, including when one operand is empty. For two nonempty inputs this leaves one high zero beyond the largest possible nonzero product coefficient. This fixed length avoids trimming and is convenient for subsequent bounded polynomial arithmetic.

This coefficient representation differs from the fixed natural-polynomial Horner programs in TM.binaryPolynomialEvalTM: here both binary polynomials are runtime inputs, and addition of coefficients is modulo two.

Interpret a coefficient list over ZMod 2, with the constant coefficient first.

Equations
Instances For

    Carryless multiplication, padded to the sum of the input lengths.

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

      Multiply two coefficient lists supplied through the standard pairing codec.

      Equations
      Instances For