up previous next
 factor

factor a polynomial

 Syntax
 `factor(F: RINGELEM): RECORD`

 Description
This function factorizes a polynomial into irreducibles in its ring of definition. Multivariate factorization is not yet supported over finite fields (but you can use SqFreeFactor and then ContentFreeFactor to obtain a partial factorization). To factorize an integer use SmoothFactor . (For information about the algorithm, consult John Abbott's papers)

NOTE: in older versions of CoCoA-5 the field names were Factors and Exponents .

 Example
 ```/**/ Use R ::= QQ[x,y]; /**/ F := 4*x^8 + 4*x^6 + x^4 + 4*x^2 + 4; /**/ FacInfo := factor(F); /**/ indent(FacInfo); record[ RemainingFactor := 1, factors := [2*x^4-4*x^3+5*x^2-4*x+2, 2*x^4+4*x^3+5*x^2+4*x+2], multiplicities := [1, 1] ] /**/ G := product([FacInfo.factors[i]^FacInfo.multiplicities[i] /**/ | i In 1..len(FacInfo.factors)]); /**/ F = G * FacInfo.RemainingFactor; true /**/ factor((8*x^2 +16*x +8)/27); record[factors := [x +1], multiplicities := , RemainingFactor := 8/27] /**/ factor(2*x^2-4); -- over a finite field the factors are monic record[factors := [x^2 -2], multiplicities := , RemainingFactor := 2] --------------------------------- ```