Remove trailing zero coefficients and separate the leading monic coefficient
ProvedMIPRE.LowDegree.BinaryPolynomial.normalize_monicA statement of the module MIPRE.Foundations.LowDegree.BinaryRepresentation of the MIP* = RE formalization (commit 70cbf1c of vidick/MIPRE-formalization). 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.
Remove trailing zero coefficients and separate the leading monic coefficient.
Formal statement. In Lean, with the scope shown:
open MIPRE
open MIPRE.LowDegree
open MIPRE.Cost
theorem MIPRE.LowDegree.BinaryPolynomial.normalize_monic (l : BitStr) (h : (polyOfBits l).Monic) :
polyOfBits (l.take (polyOfBits l).natDegree ++ [true]) = polyOfBits l
Formalization Note MIPRE.LowDegree.BinaryPolynomial.normalize_monic is declared in MIPRE/Foundations/LowDegree/BinaryRepresentation.lean, lines 52–76. The binders, hypotheses and conclusion are exactly those of the Lean statement above; the uploaded statement elaborates to the same type as the declaration in the repository. The definitions it mentions are those of the published definition bundles of the module's import closure.
import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Degrees import Mathlib.Algebra.Polynomial.Monic import Mathlib.Data.List.Basic import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Notation import Mathlib.Data.Nat.Size import Mathlib.Data.ZMod.Basic import Definitions.Def_MIPRE_Foundations_Cost_Basic_B import Definitions.Def_MIPRE_Foundations_Cost_Encoding_B import Definitions.Def_MIPRE_Foundations_LowDegree_Encoding import Definitions.Def_MIPRE_Foundations_LowDegree_BinaryRepresentation open MIPRE open MIPRE.LowDegree open MIPRE.Cost
theorem MIPRE.LowDegree.BinaryPolynomial.normalize_monic (l : BitStr) (h : (polyOfBits l).Monic) :
polyOfBits (l.take (polyOfBits l).natDegree ++ [true]) = polyOfBits l := by sorry