Hey Mike and Luis:
> > (5) Factorize polynomials in Q[x,y,z,t,a] extracted from
> > numerators/denominatos of rational functions.
>
> We can do this via Maxima. First we convert f to Maxima and call the
> factor command passing in the defining polynomial for the number
> field. Then we extract each of the products and convert them back to
> polynomials in Sage:
>
> sage: ff = maxima(f).factor(K.defining_polynomial
> ().change_variable_name('a'))
> sage: ff
> (y+a^2*x)*(z+a*t)
> sage: map(R, map(repr, ff.args()))
> [(a^2)*x + y, z + (a)*t]
Why not just use Sage's factor() command?
sage: K.<a>=NumberField(x^4+x+1)
sage: R.<x,y,z,t>=K['x,y,z,t']
sage: f = (a^2*x + y)*(z+a*t)
sage: list(f.factor())
[(z + (a)*t, 1), (x + (a^3 - a^2 + 1)*y, 1)]
Alex
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---