Public result of executable distinct-degree factorization. residual is kept
explicit so downstream callers can inspect any part not separated by the
bounded executable pass.
- input : FpPoly p
The monic square-free polynomial supplied to the algorithm.
- buckets : List (DegreeBucket p)
Products grouped by irreducible-factor degree.
- residual : FpPoly p
The part not separated by the bounded pass.
Instances For
Extract the polynomial factors recorded in distinct-degree buckets.
Equations
- Hex.Berlekamp.degreeBucketFactors buckets = List.map Hex.Berlekamp.DegreeBucket.factor buckets
Instances For
degreeBucketFactors of the empty bucket list is the empty factor list.
Definitional rewrite (by rfl) characterising degreeBucketFactors.
degreeBucketFactors distributes over ::, pulling the head bucket's
.factor to the front of the recovered factor list. Definitional rewrite
(by rfl) characterising degreeBucketFactors.
degreeBucketFactors distributes over ++: the factors of a concatenated
bucket list are the concatenation of each part's factors.
Multiply the polynomial factors recorded in distinct-degree buckets.
Equations
Instances For
The product over the empty bucket list is 1. Definitional rewrite
(by rfl) characterising degreeBucketProduct.
Product represented by a distinct-degree factorization result.
Instances For
Unfold DistinctDegreeFactorization.product to the product of the bucket
factors times the residual. Definitional rewrite (by rfl) characterising
DistinctDegreeFactorization.product.
The degree-d gcd candidate against the current residual polynomial.
Equations
- Hex.Berlekamp.distinctDegreeCandidate f hmonic residual d = Hex.DensePoly.gcd residual (Hex.Berlekamp.frobeniusDiffMod f hmonic d)
Instances For
One executable DDF step, returning an optional newly found bucket.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compute the distinct-degree factorization surface of a monic polynomial over
F_p.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Predicate used by the bucket invariant theorem: the recorded
factor divides the corresponding X^(p^d) - X mod f. The unnormalised
executable DensePoly.gcd does not return bucket.factor literally on the
left of gcd bucket.factor (frobeniusDiffMod ...) = bucket.factor (e.g.
gcd X (2*X) = 2*X over F_3), so the morally-correct invariant is the
divisibility statement that gcd_dvd_right already supplies.
Equations
- Hex.Berlekamp.DegreeBucket.matchesFrobeniusDegree f hmonic bucket = (bucket.factor ∣ Hex.Berlekamp.frobeniusDiffMod f hmonic bucket.degree)
Instances For
Restate DegreeBucket.matchesFrobeniusDegree as the divisibility
bucket.factor ∣ frobeniusDiffMod f hmonic bucket.degree, the morally-correct
bucket invariant. Definitional rewrite (by rfl).
The degree-d candidate unfolds to DensePoly.gcd residual (frobeniusDiffMod f hmonic d). Definitional rewrite (by rfl) characterising
distinctDegreeCandidate.
Bucket products distribute over list append in stored bucket order.
The product of a singleton bucket list is its recorded factor.
Not @[simp]: simp already closes it from degreeBucketProduct_cons,
degreeBucketProduct_nil, and FpPoly.mul_one.
Pull the first bucket factor out of a bucket product.
The executable distinct-degree factorization preserves the input polynomial as the product of recorded degree buckets and the residual factor.
Every recorded bucket is associated with a positive degree and satisfies the corresponding Frobenius-degree divisibility invariant.
Every bucket emitted by distinctDegreeFactor records a positive Frobenius
degree.
Every bucket emitted by distinctDegreeFactor divides its matching Frobenius
difference.