Binary coefficient representations #
The coefficient interpretation used by the public Shoup contract and by the independent polynomial algorithms. This module does not assume that an irreducible polynomial has already been constructed.
The polynomial over 𝔽₂ whose coefficient of Tⁱ is bit i of l, least significant
first --- the repository's little-endian bit convention (Cost.bitsVal, bitsOfNat).
Equations
- MIPRE.LowDegree.polyOfBits l = ∑ i ∈ Finset.range l.length, (Polynomial.monomial i) (if l.getD i false = true then 1 else 0)
Instances For
The polynomial used by Shoup's contract reads the same coefficient bits.
theorem
MIPRE.LowDegree.BinaryPolynomial.natDegree_lt_length
(l : Cost.BitStr)
(h : (polyOfBits l).Monic)
:
A monic polynomial's leading coefficient is present in its coefficient list.
theorem
MIPRE.LowDegree.BinaryPolynomial.normalize_monic
(l : Cost.BitStr)
(h : (polyOfBits l).Monic)
:
Remove trailing zero coefficients and separate the leading monic coefficient.