Interpret an executable integer polynomial as a Mathlib polynomial.
Equations
Instances For
Rebuild an executable integer polynomial from a Mathlib polynomial.
Equations
Instances For
Coefficients of the embedded Mathlib polynomial agree with the executable coefficients.
ofPolynomial sends the zero polynomial to the zero ZPoly.
toPolynomial sends the zero ZPoly to the zero polynomial.
toPolynomial sends the executable constant C c to Mathlib's Polynomial.C c.
toPolynomial sends the executable 1 to Mathlib's 1.
toPolynomial commutes with negation.
toPolynomial commutes with subtraction.
toPolynomial is a left inverse of ofPolynomial: embedding a rebuilt
polynomial recovers it.
ofPolynomial is a left inverse of toPolynomial: rebuilding an embedded
ZPoly recovers it.
The executable ZPoly representation is ring-equivalent to Mathlib
polynomials over ℤ.
Equations
Instances For
The ring equivalence acts as toPolynomial in the forward direction.
The inverse ring equivalence acts as ofPolynomial.
The Mathlib-free ZPoly unit predicate agrees with Mathlib units after
transport to Polynomial ℤ.
The executable coefficientwise reduction Hex.ZPoly.modP agrees with
Mathlib's coefficient map from ℤ[X] to (ZMod p)[X], after transporting
the executable ZMod64 p coefficients through the ZMod64/ZMod equivalence.
Extensional equality for any Mathlib polynomial over ZMod p whose
coefficients are supplied by the executable Hex.ZPoly.modP image.
Downstream finite-field polynomial transports can instantiate the coefficient
hypothesis with their own FpPoly coefficient lemma.
Reduction modulo p preserves natural degree when the leading coefficient
survives the map to ZMod p.
Divisibility of executable integer polynomials transports to divisibility of
their Mathlib reductions modulo p.
Integer-to-ZMod p identity underlying modP: pushing an
integer through intModNat/ZMod64.ofNat and then to Mathlib's ZMod p via
toZMod agrees with the direct integer cast.
The executable variable-dilation X ↦ c · X corresponds to Mathlib
composition with C c * X.
Variable dilation is multiplicative: substituting X ↦ c · X is a ring
homomorphism, so it distributes over products.
For a nonzero dilation factor, variable dilation preserves natural degree:
C c * X has degree 1 with a unit leading coefficient over the integers.
Substitution X ↦ u · X by a unit u reflects divisibility: if the dilated
polynomials divide, so do the originals. The substitution is a ring automorphism
of R[X] with inverse X ↦ u⁻¹ · X, so applying that inverse hom to the
hypothesis (via map_dvd) recovers a ∣ b. This is the substitution engine the
lift-stage recovery chain uses to descend a divisibility through X ↦ lc · X,
where lc is a unit because the prime does not divide the leading coefficient.
Divisibility is invariant under substitution X ↦ u · X by a unit: the
dilated polynomials divide iff the originals do. The forward direction is
map_dvd of the composition ring hom (no unit needed); the reverse is
dvd_of_comp_unit_mul_X.
Coprimality is invariant under the invertible variable substitution
X ↦ u * X. This is the Bézout counterpart of
comp_unit_mul_X_dvd_iff.
The Mathlib content of the embedded polynomial agrees with the executable integer content. Both are the normalized (nonnegative) gcd of the coefficients, so this is the Gauss correspondence between the two content theories.
Gauss content decomposition transported to Mathlib: the embedded polynomial is its content times the embedded primitive part.
A primitive executable polynomial embeds to a Mathlib-primitive polynomial.
Packaged recombination recovery. Given the keystone product identity
C (lc^(d-1)) * core = dilate lc g * dilate lc h (the executable keystone
dilate_transformedCore combined with dilate_mul), with lc ≠ 0 and a nonzero
core, the primitive part of dilate lc g divides core, is primitive, and has
the same degree as g. This is the inverse-factor correspondence the
recombination recovery proof consumes.