Index type for the modular factors stored in executable prime-choice data.
Equations
- HexBerlekampZassenhausMathlib.ModPFactorIndex primeData = Fin primeData.factorsModP.size
Instances For
A finite subset of the modular factors stored in executable prime-choice data.
Equations
- HexBerlekampZassenhausMathlib.ModPFactorSubset primeData = Finset (HexBerlekampZassenhausMathlib.ModPFactorIndex primeData)
Instances For
The selected modular factor at an executable PrimeChoiceData index.
Equations
- HexBerlekampZassenhausMathlib.modPFactor primeData i = primeData.factorsModP[i]
Instances For
Product of the selected modular factors.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Identify the executable modular subset product with a Mathlib Finset.prod.
The executable surface stores subset products as a left fold over
Finset.toList; after transporting each FpPoly to Mathlib, commutativity
identifies that fold with the canonical finite-set product.
The monic modular image used for subset partition statements. This mirrors the executable prime-choice normalization: zero stays zero, and nonzero inputs are scaled by the inverse of their leading coefficient.
Equations
Instances For
The proof-facing and executable monic modular images are the same polynomial.
The monic modular image of the zero polynomial is zero.
The monic modular image of a nonzero polynomial is nonzero.
The monic modular image of a nonzero polynomial over a prime field is monic.
Nonvanishing of the leading coefficient for a positive-size
Hex.FpPoly p. Composes Hex.FpPoly.leadingCoeff_eq_coeff_pred, which
rewrites the leading coefficient to f.coeff (f.size - 1), with
Hex.DensePoly.coeff_last_ne_zero_of_pos_size, the invariant that the
size-pred coefficient of a positive-size Hex.DensePoly is nonzero.
The monic modular image of a nonzero polynomial divides the input: the image is a unit (inverse-leading-coefficient) scaling.
A nonzero polynomial divides its monic modular image, the reverse direction
of monicModPImage_dvd_self_of_ne_zero: the two are associates.
Coefficientwise reduction modulo p preserves multiplication.
Integer-polynomial divisibility descends through reduction modulo p.
At a good prime, divisibility survives after normalizing both modular images to monic form.
An integer factor is represented modulo the selected prime by a subset of the recorded modular factors when the subset product is the monic modular image of that integer factor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Proof-facing package for the mod-p irreducible-factor subset partition over
the executable PrimeChoiceData surface.
The proposition parameters are hooks for the eventual admissible-prime and square-free-reduction hypotheses. Downstream callers should depend on the existence and uniqueness projections below rather than on a particular analytic proof of this package.
The cached polynomial is the reduction of the integer polynomial.
- admissible_prime : admissiblePrime
The selected prime satisfies the caller's admissibility condition.
- square_free_reduction : squareFreeReduction
Reduction modulo the selected prime preserves square-freeness.
- factors_irreducible (i : ModPFactorIndex primeData) : Irreducible (HexPolyFpMathlib.toMathlibPolynomial (modPFactor primeData i))
Every indexed modular factor is irreducible.
- exists_subset {factor : Hex.ZPoly} : Irreducible (HexPolyZMathlib.toPolynomial factor) → factor ∣ core → ∃ (S : ModPFactorSubset primeData), RepresentsIntegerFactorModP primeData factor S
Every irreducible integer divisor has a representing modular subset.
- unique_subset {factor : Hex.ZPoly} {S T : ModPFactorSubset primeData} : Irreducible (HexPolyZMathlib.toPolynomial factor) → factor ∣ core → RepresentsIntegerFactorModP primeData factor S → RepresentsIntegerFactorModP primeData factor T → S = T
The modular subset representing an irreducible integer divisor is unique.
Instances For
Caller-facing mod-p subset partition: an irreducible integer factor of the
square-free part has a unique representing subset of the selected modular factors.
Existence projection from the mod-p subset-partition package.
Uniqueness projection from the mod-p subset-partition package.
Irreducibility projection for a selected modular factor.
If a selected modular factor divides the Mathlib image of a represented integer-factor product, then its index belongs to the representing subset.
The project-local primality predicate implies Mathlib's Nat.Prime.
Unit-invariance of monicModPImage. Scaling a modular polynomial by a
nonzero residue (a unit modulo a prime) leaves its monic image unchanged: the
leading-coefficient normalisation divides the unit scalar back out.
Associated factors share a monic modular image. If two integer factors
are associated in Polynomial ℤ, their reductions modulo p have the same
monic image, because monicModPImage absorbs the unit ±1.
RepresentsIntegerFactorModP depends only on the Associated class of the
integer factor in Polynomial ℤ: a representing subset for f also represents
any associate g.
modP uniqueness up to association. Associated irreducible integer
divisors of core have the same representing subset of modular factors, not
merely equal ones. Combines unit-invariance of monicModPImage with the
package's unique_subset projection.
modP pairwise-disjointness. Non-associated irreducible integer divisors of
core are represented by disjoint subsets of the modular factors. The genuine
square-freeness of the modular reduction is threaded as the explicit hypothesis
hsqfree; if two representing subsets shared an index, that modular factor would
square-divide the (square-free) modular polynomial, an impossibility.