The factor module is for factorizations of integer coefficient univariate polynomials.
This module is a port of nzmath.zassenhaus. (At the time of writing the manual, vanHoeij is missing)
bruteForceSearch(f, fp_factors, q) -> [factors]
Find the factorization of f by searching a factor which is a product of some combination in fp_factors. The combination is searched by brute force.
Return boolean value whether f is divisible by g or not, for polynomials.
extgcdp(f,g,p) -> u,v,w
Find u,v,w such that f*u + g*v = w = gcd(f,g) mod p.
findCombination(f, d, factors, q) -> g, list
Find a combination of d factors which divides f (or its complement). The returned values are: the product g of the combination and a list consisting of the combination itself. If there is no combination, return (0,[]).
minimumAbsoluteInjection(f) -> F
Return an integer coefficient polynomial F by injection of a Z/pZ coefficient polynomial f with sending each coefficient to minimum absolute representatives.
padicFactorization(f) -> p, factors
Return a prime p and a p-adic factorization of given integer coefficient squarefree polynomial f. The result factors have integer coefficients, injected from F_p to its minimum absolute representation. The prime is chosen to be:
1) f is still squarefree mod p, 2) the number of factors is not greater than with the successive prime.
padicLift(f, factors, p, q) -> lifted_factors
Find a lifted integer coefficient polynomials such that:
f = G1*G2*...*Gm (mod q * p), Gi = gi (mod q),
from f and gi's of integer coefficient polynomials such that:
f = g1*g2*...*gm (mod q), gi's are pairwise coprime
with positive integers p dividing q.
upperBoundOfCoefficient(polynomial) -> long
Compute Landau-Mignotte bound of coefficients of factors, whose degree is no greater than half of the given polynomial. The given polynomial must have integer coefficients.
zassenhaus(f) -> list of factors of f.
Factor a squarefree monic integer coefficient polynomial f with Berlekamp-Zassenhaus method.