Ticket #12151: 12151.patch

File 12151.patch, 2.0 KB (added by Johan Bosman, 11 years ago)
  • sage/schemes/elliptic_curves/ell_number_field.py

    # HG changeset patch
    # User Johan Bosman <johan.g.bosman@gmail.com>
    # Date 1324059393 0
    # Node ID 41eeea559d1c34da68b15a873799ef92c637f7d0
    # Parent  b72663c760492cc8c360d328a6d370c8f88d2069
    Trac 12151: change ideal(a.denominator()) into a.denominator_ideal()
    
    diff --git a/sage/schemes/elliptic_curves/ell_number_field.py b/sage/schemes/elliptic_curves/ell_number_field.py
    a b  
    550550            sage: E.global_integral_model()
    551551            Elliptic Curve defined by y^2 + (-i)*x*y + (-25*i)*y = x^3 + 5*i*x^2 + 125*i*x + 3125*i over Number Field in i with defining polynomial x^2 + 1
    552552
    553         trac # 7935::
     553        trac #7935::
    554554
    555555            sage: K.<a> = NumberField(x^2-38)
    556556            sage: E = EllipticCurve([a,1/2])
     
    565565            sage: E.global_integral_model()
    566566            Elliptic Curve defined by y^2 = x^3 + 2*x + (1/2*s+1/2) over Number Field in s with defining polynomial x^2 - 5
    567567
     568        trac #12151::
     569
     570            sage: K.<v> = NumberField(x^2 + 161*x - 150)
     571            sage: E = EllipticCurve([25105/216*v - 3839/36, 634768555/7776*v - 98002625/1296, 634768555/7776*v - 98002625/1296, 0, 0])
     572            sage: E.global_integral_model()
     573            Elliptic Curve defined by y^2 + (33872485050625*v-31078224284250)*x*y + (2020602604156076340058146664245468750000*v-1871778534673615560803175189398437500000)*y = x^3 + (6933305282258321342920781250*v-6422644400723486559914062500)*x^2 over Number Field in v with defining polynomial x^2 + 161*x - 150
    568574        """
    569575        K = self.base_field()
    570576        ai = self.a_invariants()
    571577        for a in ai:
    572578            if not a.is_integral():
    573                for P, _ in K.ideal(a.denominator()).factor():
     579               for P, _ in a.denominator_ideal().factor():
    574580                   pi = K.uniformizer(P,'positive')
    575581                   e  = min([(ai[i].valuation(P)/[1,2,3,4,6][i]) for i in range(5)]).floor()
    576582                   ai = [ai[i]/pi**(e*[1,2,3,4,6][i]) for i in range(5)]