Ticket #9413: trac_9413.patch

File trac_9413.patch, 1.8 KB (added by wuthrich, 12 years ago)
  • sage/schemes/elliptic_curves/ell_number_field.py

    # HG changeset patch
    # User Chris Wuthrich <christian.wuthrich@gmail.com>
    # Date 1280253400 -3600
    # Node ID 832e6f6a86c56b40db7adca1c60f3761192ef447
    # Parent  f1ec399c1181a8ac0847f187cdb1ba0e68b6a48f
    trac 9413: tamagawa_product_bsd over Q
    
    diff -r f1ec399c1181 -r 832e6f6a86c5 sage/schemes/elliptic_curves/ell_number_field.py
    a b  
     1# -*- coding: utf-8 -*-
    12r"""
    23Elliptic curves over number fields.
    34
     
    905906            sage: da = E.local_data()
    906907            sage: [dav.tamagawa_number() for dav in da]
    907908            [1, 1]
    908            
     909
     910        An example over `\mathbb{Q}` (trac #9413)::
     911
     912            sage: E = EllipticCurve('30a')
     913            sage: E.tamagawa_product_bsd()
     914            6
     915
    909916        REFERENCES:
    910917           
    911918        - [Ta2] Tate, John, On the conjectures of Birch and Swinnerton-Dyer and a geometric analog. Seminaire Bourbaki, Vol. 9, Exp. No. 306.
     
    921928            # uu is the quotient of the Neron differential at pp divided by
    922929            # the differential associated to this particular equation E
    923930            uu = self.isomorphism_to(dav.minimal_model()).u
    924             uu_abs_val = pp.smallest_integer()**(pp.residue_class_degree()*valuation(uu,pp))
     931            if self.base_field().degree() == 1:
     932                p = pp.gens_reduced()[0]
     933                f = 1
     934                v = valuation(ZZ(uu),p)
     935            else:
     936                p = pp.smallest_integer()
     937                f = pp.residue_class_degree()
     938                v = valuation(uu,pp)
     939            uu_abs_val = p**(f*v)
    925940            pr *= cv * uu_abs_val
    926941        return pr
    927942