Compute a square-free decomposition by normalizing away the leading scalar and running Yun's algorithm on the resulting monic polynomial.
Equations
- Hex.FpPoly.squareFreeDecomposition hp f = { unit := f.normalizeMonic.fst, factors := f.normalizeMonic.snd.squareFreeAux 1 (Hex.DensePoly.size f.normalizeMonic.snd + 1) }
Instances For
The factors emitted by squareFreeDecomposition are pairwise coprime,
witnessed by the normalized gcd of any two distinct factors reducing to 1.
This is the underlying coprimality result that the public
squareFreeDecomposition_pairwise_coprime wrapper delegates to; callers reason
about distinct square-free parts in isolation, relying on this to know no common
factor links them.
The decomposition reconstructs its input: multiplying the emitted unit by the
weighted product of the factors (each raised to its recorded multiplicity)
recovers f. This is the underlying reconstruction identity that the public
squareFreeDecomposition_weightedProduct wrapper delegates to; it certifies the
decomposition loses no information, so a caller can substitute the factored form
for f anywhere.
Each factor emitted by Hex.FpPoly.squareFreeDecomposition is itself square-free,
witnessed by the normalized gcd of the factor with its derivative reducing to
1. This is the underlying square-freeness result that the public
squareFreeDecomposition_factors_squareFree wrapper delegates to; it is the
defining guarantee of the decomposition, letting a caller treat every emitted
factor as having no repeated irreducible part.
Every factor emitted by Hex.FpPoly.squareFreeDecomposition is
square-free, witnessed by the normalized gcd with
its derivative reducing to 1. All facts about intermediate Yun states are
proved internally, so the statement needs no auxiliary hypotheses.
Every factor emitted by Hex.FpPoly.squareFreeDecomposition carries a strictly positive
multiplicity, so no factor is recorded at multiplicity 0. A caller iterating
the factor list can therefore treat each recorded exponent as a genuine power and
need not special-case a zero exponent.
Public reconstruction wrapper: the emitted unit and weighted factor product recover the input. All facts about intermediate Yun states are proved internally, so the statement needs no auxiliary hypotheses.
Public coprimality wrapper: the emitted factors are pairwise coprime, witnessed
by the normalized gcd reducing to 1. All facts about intermediate Yun states
are proved internally, so the statement needs no auxiliary hypotheses.