Attachment 'magma.sage'

Download

   1 def root_number_pari(E):
   2     if E.base_field() != QQ:
   3         raise NotImplementedError("only implemented ")
   4     return pari(E).ellrootno()
   5 
   6 def hilbert_symbol_magma(a, b, P):
   7     K = P.number_field()
   8     f = K.polynomial()
   9     pr = "PQ<" + f.variable_name() + ">:=PolynomialRing(Rationals());"
  10     nf = "K2<" + str(K.gen()) + ">:=NumberField(" + str(f) + ");"
  11     pi = "P2:=ideal<MaximalOrder(K2)|" + str(list(P.gens()))[1:-1] + ">;"
  12     hs = "HilbertSymbol(K2!" + str(a) + ",K2!" + str(b) + ",P2)"
  13     # print pr + nf + pi + hs
  14     return Integer(magma_free(pr + nf + pi + hs))
  15 
  16 def root_number_magma(E):
  17     K = E.base_field()
  18     f = K.polynomial()
  19     pr = "PQ<" + f.variable_name() + ">:=PolynomialRing(Rationals());"
  20     nf = "K2<" + str(K.gen()) + ">:=NumberField(" + str(f) + ");"
  21     ec = "E2:=EllipticCurve([K2|" + str(E.a_invariants())[1:-1] + "]);"
  22     rn = "RootNumber(E2)"
  23     # print pr + nf + ec + rn
  24     return Integer(magma_free(pr + nf + ec + rn))
  25 
  26 def root_number_magma_local(E, P):
  27     K = E.base_field()
  28     f = K.polynomial()
  29     pr = "PQ<" + f.variable_name() + ">:=PolynomialRing(Rationals());"
  30     nf = "K2<" + str(K.gen()) + ">:=NumberField(" + str(f) + ");"
  31     ec = "E2:=EllipticCurve([K2|" + str(E.a_invariants())[1:-1] + "]);"
  32     pi = "P2:=ideal<MaximalOrder(K2)|" + str(list(P.gens()))[1:-1] + ">;"
  33     rn = "RootNumber(E2,P2)"
  34     # print pr + nf + ec + rn
  35     return Integer(magma_free(pr + nf + ec + pi + rn))

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2010-07-03 03:22:50, 3.8 KB) [[attachment:badcop.sws]]
  • [get | view] (2010-07-03 03:24:43, 9.3 KB) [[attachment:demo.sage]]
  • [get | view] (2010-07-03 03:16:27, 3.1 KB) [[attachment:dirty_model.patch]]
  • [get | view] (2010-07-03 03:22:11, 3.5 KB) [[attachment:goodcop.sws]]
  • [get | view] (2010-07-03 03:23:40, 1.4 KB) [[attachment:magma.sage]]
  • [get | view] (2010-07-04 19:16:17, 37.3 KB) [[attachment:project.pdf]]
  • [get | view] (2010-07-03 03:12:33, 11.1 KB) [[attachment:root_number.sage]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.