Thanks a lot David! It works ^^
Cindy On Thursday, August 30, 2012 4:39:36 PM UTC+8, David Loeffler wrote: > > On 29 August 2012 12:54, Cindy <cindy42...@gmail.com <javascript:>> > wrote: > > Hi, > > > > Given a cyclotomic field Q(zeta_n), where zeta_n is a primitive nth root > of > > unity, with maximal real subfield F, how can I calculate the > discriminant of > > K/F? > > You need to use the "relativize" command to create the field extension > K / F. Here's an example for the 13th cyclotomic field: > > ---------------------------------------------------------------------- > | Sage Version 5.2, Release Date: 2012-07-25 | > | Type "notebook()" for the browser-based notebook interface. | > | Type "help()" for help. | > ---------------------------------------------------------------------- > sage: K.<zeta> = CyclotomicField(13) > sage: Krel = K.relativize(zeta + zeta^(-1), "w") > sage: Krel > Number Field in w0 with defining polynomial x^2 - w1*x + 1 over its base > field > sage: Krel.base_field() > Number Field in w1 with defining polynomial x^6 + x^5 - 5*x^4 - 4*x^3 > + 6*x^2 + 3*x - 1 > > # so now Krel is QQ(zeta13) as an extension of F = QQ(zeta13 + > zeta13^(-1)) > > sage: Krel.relative_discriminant() > Fractional ideal (w1^5 - 5*w1^3 + 4*w1) > # (an ideal of F) > > sage: Krel.relative_different() > Fractional ideal ((w1^3 - 2*w1)*w0 - w1^2) > # (an ideal of Krel) > > Regards, David > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.