Every recorded entry of the default public factorization is primitive once every raw factor in the hybrid's raw factor array is primitive.
Public-entry specialisation: every recorded entry is primitive once the hybrid's raw factor array is primitive entrywise.
Mathlib-free irreducibility predicate for integer polynomials.
The class form lets downstream Mathlib-free APIs request irreducibility through typeclass inference. The predicate remains the usual nonzero, non-unit, no proper factorization condition.
The zero polynomial is not irreducible.
Units are excluded from irreducibility.
Every product decomposition has a unit factor.
Instances
Mathlib-free associatedness predicate for integer polynomials: a and
b are associated when b = a * u for some ZPoly-unit u (i.e. u = ±1).
Used by irreducibility dischargers to translate "Mathlib-side irreducible factor
of the primitive square-free part" to the direct non-divisibility hypothesis required
by the greedy expansion helper.
Instances For
Integer primality checker used by constant-polynomial irreducibility.
This is the shared verified bounded checker from HexArith.
Equations
Instances For
Computational irreducibility checker backed by the public factorization API.
Constants are checked by integer primality. Positive-degree polynomials are
checked from the returned Factorization: the scalar must be a unit and there
must be exactly one polynomial factor with multiplicity one.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A polynomial of dense size 1 is the constant polynomial of its zeroth
coefficient. The trimming invariant on DensePoly forces the single stored
coefficient to be nonzero, so coeff 0 already names the unique stored entry.
A constant polynomial DensePoly.C k is ZPoly.Irreducible whenever
k.natAbs is prime in the elementary isNatPrime sense.
An irreducible constant polynomial DensePoly.C k (for k ≠ 0) has
k.natAbs prime in the elementary isNatPrime sense.
Mathlib-free Gauss reduction-mod-p transfer: a primitive integer
polynomial whose leading coefficient survives reduction modulo a prime p and
whose modular image is FpPoly-irreducible is itself ZPoly.Irreducible.
The hnotConstant : 1 < f.size precondition rules out the size-one constant
case explicitly: the executable FpPoly.Irreducible predicate only asserts the
factorization disjunction (it does not internally exclude constants the way
Mathlib's _root_.Irreducible does via not_isUnit), so the non-unit clause
for f is supplied at the ZPoly level. A primitive ZPoly of size > 1 is
automatically not a ZPoly unit (units have size 1).
Mathlib analog:
HexBerlekampZassenhausMathlib.irreducible_of_isPrimitive_of_irreducible_map_intCast_zmod
(HexBerlekampZassenhausMathlib/IntReductionMod.lean:106).
Kernel-decidable irreducibility for a linear (dense size two) primitive
integer polynomial: both hypotheses are Boolean checks on literal data, so a
reified application discharges them with Eq.refl true. Public decide-slot
form of irreducible_of_size_two_primitive for the
irreducibility/factor_poly elaborators.
Hex.normalizeFactorSign preserves Hex.ZPoly.Irreducible: the
sign-normalised polynomial equals either the original or its -1 scaling,
and -1 is a ZPoly unit, so the no-proper-factorization predicate
transfers. Mathlib-free counterpart of the Mathlib-side
zpolyIrreducible_normalizeFactorSign_of_zpolyIrreducible
(HexBerlekampZassenhausMathlib). Consumed by the
Mathlib-free factor_factors_irreducible assembly.
Every factor emitted by the extracted X-power normalization array is
irreducible.
Reassembly preserves the irreducibility proof for normalization factors
coming specifically from the extracted power of X.
Lift square-free-factor irreducibility through the reassembly. When the
repeated-part expansion fully consumes its residual (so the reassembly emits
only X powers and the supplied factors of the square-free part), every emitted raw factor is
irreducible. This is the Mathlib-free "reassemble lift" consumed by the
assembled per-branch output theorem to discharge the xPower half of each
branch automatically.
Membership classifier for the constant primitive square-free part branch. The only
raw factors requiring irreducibility content are extracted powers of X; the
singleton square-free factor is 1, and any repeated-part fallback is identified
separately for later expansion through actual factors of the square-free part.
The primitive square-free layer in normalization reassembles the extracted
X-free primitive polynomial up to the rational unit introduced by clearing
denominators.
Replacing the primitive square-free part by a product-equivalent factor array preserves the rational-associate normalization invariant for the extracted primitive polynomial.
For constant square-free parts, the normalization-only factor array preserves the rational-associate normalization invariant for the extracted primitive polynomial.
The X-free part of the primitive part of a nonzero integer polynomial is itself
primitive. Stripping initial zero coefficients does not introduce a common factor
because the original primitive part already has unit content.