Executable irreducibility predicate for transported integer polynomials.
The checker delegates to the Mathlib-free Hex.ZPoly executable predicate
after transporting the Mathlib polynomial into the project representation.
Equations
Instances For
The Mathlib-free executable irreducibility predicate agrees with Mathlib's
irreducibility predicate after transport to Polynomial ℤ.
Mathlib irreducibility of the transported polynomial is equivalent to the Mathlib-free executable irreducibility predicate.
Hex.ZPoly.Irreducible is preserved by Hex.normalizeFactorSign.
Exposed publicly so the assembled per-branch output theorem can lift raw
factor irreducibility to entry irreducibility (entries pass through
collectFactorMultiplicities, which normalises each raw factor's sign).
Every polynomial factor emitted by the default executable factorization of a
nonzero input is primitive. The public factorization verifies its own output,
so primitivity is discharged from f ≠ 0 alone (the filtered product
reconstructs f); no raw-source hypothesis is needed.
Conversion to Mathlib polynomials preserves a left-associated product.
The executable Array.polyProduct agrees with Mathlib's List.prod
after pushing each factor through the toPolynomial map. This is the
algorithm-to-Mathlib translation needed to feed Hex.ZPoly factor lists
into UFD arguments over Polynomial ℤ.
Converting an executable factor product gives the corresponding Mathlib list product.
Expand factorization entries by multiplicity, forgetting their packed array shape.
Equations
- HexBerlekampZassenhausMathlib.flattenedFactorEntries entries = List.flatMap (fun (entry : Hex.ZPoly × ℕ) => List.replicate entry.2 entry.1) entries
Instances For
Expand the polynomial entries of a Hex.Factorization by multiplicity.
Equations
Instances For
Conversion to Mathlib polynomials preserves the executable factor power.
Transport Hex.Factorization.product to Mathlib as the scalar times the
product of the multiplicity-flattened transported factors.
A nonzero executable integer polynomial fixed by Hex.normalizeFactorSign
transports to a normalize-fixed polynomial over ℤ.
This is the reusable sign-normalization lemma for Mathlib-side factorization
arguments over Hex.ZPoly factors.
Primitive executable integer polynomials with positive leading coefficient are
the canonical representatives of their Mathlib Associated class after
transport to Polynomial ℤ.
Distinct primitive executable integer polynomials with positive leading
coefficient are not associated after transport to Polynomial ℤ.
Recorded entries of the default executable factorization of a nonzero input are
pairwise non-associated after transport to Polynomial ℤ. Primitivity is
discharged from f ≠ 0 by the self-certifying path.
Every complex root of a nonzero input is a root of one of the recorded irreducible factors.
Two irreducible executable factorizations of the same nonzero polynomial
have the same signed scalar and the same multiplicity-flattened multiset of
polynomial factors. The corrected statement compares flattened normalized
factors rather than raw List.Perm, since Hex.Factorization does not
constrain factor sign, multiplicity packing, or constant factors. The
normalizeFactorSign and nonconst hypotheses rule out the corresponding
counterexamples.
Sign normalization produces a nonnegative leading coefficient.