Kernel-decidable single-prime irreducibility for f : ZPoly: f is
primitive and non-constant, its reduction mod the trial-division prime p
reconstructs as scale c m for a monic m with a passing Rabin certificate,
and the leading coefficient survives the reduction. Fails to apply (no slot
reduces to true) exactly when no single prime witnesses irreducibility;
balanced inputs need the multi-prime degree-obstruction certificate from the
Mathlib correspondence.
A dense-size-one polynomial is the constant on its zeroth coefficient.
A single-prime modular irreducibility witness for a ZPoly factor,
packing its own modulus and bounds instance (the PrimeFactorData idiom) so
witnesses at different primes share one type.
- p : Nat
The witnessing prime.
- bounds : ZMod64.Bounds self.p
Bounds instance for the modulus.
The monic image of the reduction mod
p.The leading unit of the reduction mod
p.Rabin certificate for
m.
Instances For
One irreducibility witness for a ZPoly: a prime constant, a primitive
linear, a single-prime modular reduction certificate, or an
Eisenstein-after-shift certificate.
- primeConst : IrredWitness
The polynomial is a constant with prime absolute value.
- linear : IrredWitness
The polynomial is linear (dense size two) and primitive.
- modP
(w : ModPWitness)
: IrredWitness
Single-prime method: the reduction mod
w.pis irreducible. - eisenstein
(q : Nat)
(shift : Int)
: IrredWitness
Eisenstein method:
ZPoly.translate shift fsatisfies Eisenstein's criterion at the primeq.
Instances For
Kernel-decidable check that w witnesses irreducibility of f.
Equations
- One or more equations did not get rendered due to their size.
- f.checkIrredWitness Hex.ZPoly.IrredWitness.primeConst = (decide (Hex.DensePoly.size f = 1) && Hex.ZPoly.isNatPrime (Hex.DensePoly.coeff f 0).natAbs)
- f.checkIrredWitness Hex.ZPoly.IrredWitness.linear = (decide (Hex.DensePoly.size f = 2) && decide (f.content = 1))
Instances For
A passing checkIrredWitness forces irreducibility.
Bulk kernel-decidable irreducibility for a ZPoly factor list with
repetition: certified carries one (factor, witness) entry per distinct
factor, matched by beqCoeffs, so each witness is checked once regardless of
multiplicity.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A passing checkIrredCover forces irreducibility of every listed factor.
The single Boolean hypothesis is the factors_irred slot of a reified
ZPoly.Factored value.