Mapping a ring homomorphism across a list of polynomials commutes with taking the product.
Over the empty tower the raw coordinate polynomial vanishes exactly when
its rational reading does: Factor.rawPoly [] and Factor.toRatPoly present
the same polynomial through the coefficient identification with ℚ.
Over the empty tower, monic normalisation commutes with the coefficient
identification with ℚ: normalising Factor.rawPoly [] f and then reading
coefficients rationally gives the leading-coefficient rescaling of
Factor.toRatPoly f.
The executable left fold multiplying raw tower factors interprets to the initial value times the product of the interpreted factors.
Rational analogue of rawFactorFoldl: the executable left fold
multiplying rational readings of factors interprets to the initial value
times the product of the interpreted factors.
Reconstruction for one squarefree component: the factors returned by
Factor.factorSquarefree? multiply to the monic normalisation of the input,
after interpretation over the tower coefficient field.
The gcd of P with a squarefree product is associated to the product of
the gcds with the individual factors: pairwise coprimality of the squarefree
factors lets the gcd distribute over the product.
Trager's gcd recovery is complete: if P divides a squarefree product,
the product of the gcds of P with the factors recovers P up to a unit.
The Euclidean-algorithm gcd and the normalised GCDMonoid gcd of two
polynomials agree up to a unit.
Shifting the product of the factors recovered by Factor.recover back by
the shift delta gives, up to a unit, the product of the gcds of the shifted
component with the lifted lower-tower factors. Lower factors whose gcd is
constant contribute a unit and are exactly the ones the recovery loop
discards.
When every recovered factor interprets to an irreducible polynomial, the product of the interpreted recovered factors is monic: each factor is a monic normalisation by construction.
Reconstruction across one Trager recovery step: given a squarefree one-level norm at the accepted shift and lower-tower factors that multiply to its monic normalisation, the recovered top-level factors multiply to the monic normalisation of the squarefree component itself.
With a singleton lower factor list, recovery either returns one canonical factor or nothing. A positive-degree reconstruction product rules out the empty result and identifies that factor exactly.
The executable left fold multiplying monically rescaled rational readings
of integer factors interprets to the initial value times the product of the
corresponding normalizedRatFactors.
Rational base case of reconstruction: the monically rescaled Berlekamp-Zassenhaus factors of the primitive part of a monic rational polynomial multiply back to the polynomial itself.
For a separable input the executable gcd with the derivative is constant, so the squarefreeness guard in the rational factorizer passes.
The rational base factorizer is total on the separable inputs supplied by Yun decomposition.