Documentation

HexBerlekampZassenhaus.IrreducibleDecide

theorem Hex.ZPoly.irreducible_of_modPCert (f : ZPoly) (p : Nat) [ZMod64.Bounds p] (m : FpPoly p) (c : ZMod64 p) (cert : Berlekamp.IrreducibilityCertificate) (hp : Nat.isPrimeTrial p = true) (hcontent : decide (f.content = 1) = true) (hadm : decide (f.leadingCoeffModP p 0) = true) (hsize : decide (1 < DensePoly.size f) = true) (hc : decide (c = 0) = false) (hfm : (DensePoly.scale c m).beqCoeffs (modP p f) = true) (hcheck : Berlekamp.checkMonicCert m cert = true) :

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.

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.p is irreducible.

    • eisenstein (q : Nat) (shift : Int) : IrredWitness

      Eisenstein method: ZPoly.translate shift f satisfies Eisenstein's criterion at the prime q.

    Instances For

      Kernel-decidable check that w witnesses irreducibility of f.

      Equations
      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
          theorem Hex.ZPoly.irreducible_of_checkIrredCover (factors : List ZPoly) (certified : List (ZPoly × IrredWitness)) (hcheck : checkIrredCover factors certified = true) (q : ZPoly) :
          q factorsq.Irreducible

          A passing checkIrredCover forces irreducibility of every listed factor. The single Boolean hypothesis is the factors_irred slot of a reified ZPoly.Factored value.