On Tuesday, April 8, 2014 1:00:27 PM UTC-7, William wrote:
>
> On Tue, Apr 8, 2014 at 10:20 AM, Kevin Buzzard 
> <[email protected] <javascript:>> wrote: 
> > I am new to sage. I am not scared of reading docs for computer programs. 
> I 
> > cannot work out how to answer basic questions I have from the sage docs 
> > though :-( and it's so easy just to ask for help, so here I am. 
> > 
> > Here's my question. I have a polynomial with coefficients in a 
> cyclotomic 
> > field and I want to know how to compute the product of that polynomial 
> with 
> > all its Galois conjugates (because I want to run newton_slopes on it but 
> the 
> > manual is not, as far as I can see, clear on whether this will work, so 
> I'm 
> > going to build a polynomial for which I know it will work). 
>
> The line you want is 
>
>   h = prod(R([sigma(a) for a in f.list()]) for sigma in G.list()); h 
>

Of, if you want to be able to do these computations for non-galois 
extensions, you can use that a norm computation boils down to taking a 
resultant with the appropriate minimal polynomial. This example also 
highlights how sage's coercion discovery based on variable names can 
sometimes be very convenient (it also highlights the pain of having lots of 
different quantities lying around with the same print name):

 K.<z> = CyclotomicField(5)
R.<x> = K[]
f = (x-(z^3 + 2*z^2 + z + 2))^2*(x - 5*z)
Qxz=QQ['x,z']
F=Qxz(f)                       #this conveniently lifts z to a 
transcendental in Q[x,z]
G=z.minpoly()(Qxz.1)    #getting the minimal polynomial expressed seems a 
little more painful
H=F.resultant(G,Qxz.1)  #but then taking the norm is pretty quick
h=QQ['x'](H)                  #but we have to do some work to get it as a 
univariate poly again

One would think that this should work with nested univariate polynomial 
rings too: QQ['x']['z'], but unfortunately it doesn't.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to