Documentation

HexBerlekampZassenhausMathlib.Factorization

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
    @[simp]

    The default executable factorization multiplies back to the input.

    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
    Instances For

      Conversion to Mathlib polynomials preserves the executable factor power.

      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 recorded factor divides the transported input polynomial.

      Every complex root of a nonzero input is a root of one of the recorded irreducible factors.

      theorem HexBerlekampZassenhausMathlib.factorize_unique (φ ψ : Hex.Factorization) (hφ_norm : entryφ.factors, Hex.normalizeFactorSign entry.1 = entry.1) (hψ_norm : entryψ.factors, Hex.normalizeFactorSign entry.1 = entry.1) (hφ_nonconst : entryφ.factors, 0 < Hex.DensePoly.natDegree entry.1) (hψ_nonconst : entryψ.factors, 0 < Hex.DensePoly.natDegree entry.1) (hφ_irr : entryφ.factors, entry.1.Irreducible) (hψ_irr : entryψ.factors, entry.1.Irreducible) (hφ_prod_ne : φ.product 0) (hprod : φ.product = ψ.product) :

      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.