Ticket #6955: trac_6955-simon-update.patch

File trac_6955-simon-update.patch, 6.4 KB (added by John Cremona, 13 years ago)

Applies to 4.3.5

  • sage/schemes/elliptic_curves/ell_number_field.py

    # HG changeset patch
    # User John Cremona <john.cremona@gmail.com>
    # Date 1270312999 -3600
    # Node ID bb448d12046dae3667ab9e61fbbecc20c0bde007
    # Parent  ea02bc44fa947f97673768aede1126e6bc7b2c79
    #6955: update simon gp scripts
    
    diff -r ea02bc44fa94 -r bb448d12046d sage/schemes/elliptic_curves/ell_number_field.py
    a b  
    1 r"""
     1 r"""
    22Elliptic curves over number fields.
    33
    44An elliptic curve `E` over a number field `K` can be given
     
    214214            sage: K.<a> = NumberField(x^2 + 7, 'a')
    215215            sage: E = EllipticCurve(K, [0,0,0,1,a]); E
    216216            Elliptic Curve defined by y^2  = x^3 + x + a over Number Field in a with defining polynomial x^2 + 7
     217
    217218            sage: v = E.simon_two_descent(verbose=1); v
    218219            courbe elliptique : Y^2 = x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7)
     220            points triviaux sur la courbe = [[1, 1, 0], [Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1]]
     221            #S(E/K)[2]    = 2
     222            #E(K)/2E(K)   = 2
     223            #III(E/K)[2]  = 1
     224            rang(E/K)     = 1
     225            listpointsmwr = [[Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1]]
     226            (1, 1, [(1/2*a + 3/2 : -a - 2 : 1)])
     227
     228            sage: v = E.simon_two_descent(verbose=2); v
     229            K = bnfinit(y^2 + 7);
     230            a = Mod(y,K.pol);
     231            bnfellrank(K, [0,0,0,1,a]);
     232            courbe elliptique : Y^2 = x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7)
    219233            A = 0
    220234            B = Mod(1, y^2 + 7)
    221235            C = Mod(y, y^2 + 7)
    222236            LS2gen = [Mod(Mod(-5, y^2 + 7)*x^2 + Mod(-3*y, y^2 + 7)*x + Mod(8, y^2 + 7), x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7)), Mod(Mod(1, y^2 + 7)*x^2 + Mod(1/2*y - 1/2, y^2 + 7)*x - 1, x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7))]
    223237            #LS2gen = 2
    224              Recherche de points triviaux sur la courbe
     238            Recherche de points triviaux sur la courbe
    225239            points triviaux sur la courbe = [[1, 1, 0], [Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1]]
    226240            zc = Mod(Mod(-5, y^2 + 7)*x^2 + Mod(-3*y, y^2 + 7)*x + Mod(8, y^2 + 7), x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7))
    227              symbole de Hilbert (Mod(2, y^2 + 7),Mod(-5, y^2 + 7)) = -1
    228              zc = Mod(Mod(1, y^2 + 7)*x^2 + Mod(1/2*y - 1/2, y^2 + 7)*x + Mod(-1, y^2 + 7), x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7))
    229              symbole de Hilbert (Mod(-2*y + 2, y^2 + 7),Mod(1, y^2 + 7)) = 0
    230              sol de Legendre = [1, 0, 1]~
    231              zc*z1^2 = Mod(Mod(2*y - 2, y^2 + 7)*x + Mod(2*y + 10, y^2 + 7), x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7))
    232              quartique : (-1/2*y + 1/2)*Y^2 = x^4 + (-3*y - 15)*x^2 + (-8*y - 16)*x + (-11/2*y - 15/2)
    233              reduite: Y^2 = (-1/2*y + 1/2)*x^4 - 4*x^3 + (-3*y + 3)*x^2 + (2*y - 2)*x + (1/2*y + 3/2)
    234              non ELS en [2, [0, 1]~, 1, 1, [1, 1]~]
     241            symbole de Hilbert (Mod(2, y^2 + 7),Mod(-5, y^2 + 7)) = -1
     242            zc = Mod(Mod(1, y^2 + 7)*x^2 + Mod(1/2*y - 1/2, y^2 + 7)*x + Mod(-1, y^2 + 7), x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7))
     243            symbole de Hilbert (Mod(-2*y + 2, y^2 + 7),Mod(1, y^2 + 7)) = 0
     244            sol de Legendre = [1, 0, 1]~
     245            zc*z1^2 = Mod(Mod(2*y - 2, y^2 + 7)*x + Mod(2*y + 10, y^2 + 7), x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7))
     246            quartique : (-1/2*y + 1/2)*Y^2 = x^4 + (-3*y - 15)*x^2 + (-8*y - 16)*x + (-11/2*y - 15/2)
     247            reduite: Y^2 = (-1/2*y + 1/2)*x^4 - 4*x^3 + (-3*y + 3)*x^2 + (2*y - 2)*x + (1/2*y + 3/2)
     248            non ELS en [2, [0, 1]~, 1, 1, [1, 1]~]
    235249            zc = Mod(Mod(1, y^2 + 7)*x^2 + Mod(1/2*y + 1/2, y^2 + 7)*x + Mod(-1, y^2 + 7), x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7))
    236              vient du point trivial [Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1]
     250            vient du point trivial [Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1]
    237251            m1 = 1
    238252            m2 = 1
    239253            #S(E/K)[2]    = 2
     
    241255            #III(E/K)[2]  = 1
    242256            rang(E/K)     = 1
    243257            listpointsmwr = [[Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1]]
     258            v =  [1, 1, [[Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7)]]]
    244259            (1, 1, [(1/2*a + 3/2 : -a - 2 : 1)])
    245260
    246261        A curve with 2-torsion::
  • sage/schemes/elliptic_curves/ell_rational_field.py

    diff -r ea02bc44fa94 -r bb448d12046d sage/schemes/elliptic_curves/ell_rational_field.py
    a b  
    15121512            sage: E = EllipticCurve('5077a1')
    15131513            sage: set_random_seed(0)
    15141514            sage: E.simon_two_descent()
    1515             (3, 3, [(1 : 0 : 1), (2 : -1 : 1), (0 : 2 : 1)])
     1515            (3, 3, [(1 : 0 : 1), (0 : 2 : 1), (2 : -1 : 1)])
    15161516       
    15171517        In this example Simon's program does not find any points, though it
    15181518        does correctly compute the rank of the 2-Selmer group.
     
    15321532            sage: E = EllipticCurve([1, -1, 0, -79, 289])
    15331533            sage: set_random_seed(0)
    15341534            sage: E.simon_two_descent()
    1535             (4, 4, [(6 : -5 : 1), (4 : 3 : 1), (5 : -3 : 1), (8 : -15 : 1)])
     1535            (4, 4, [(4 : 3 : 1), (5 : -2 : 1), (6 : -1 : 1), (8 : 7 : 1)])
    15361536            sage: E = EllipticCurve([0, 0, 1, -79, 342])
    15371537            sage: set_random_seed(0)
    15381538            sage: E.simon_two_descent()
    1539             (5, 5, [(5 : 8 : 1), (10 : 23 : 1), (3 : 11 : 1), (4 : -10 : 1), (0 : 18 : 1)])
     1539            (5, 5, [(5 : 8 : 1), (3 : 11 : 1), (17/4 : 69/8 : 1), (33/4 : -131/8 : 1), (33 : 183 : 1)])
    15401540            sage: E = EllipticCurve([1, 1, 0, -2582, 48720])
    15411541            sage: set_random_seed(0)
    15421542            sage: r, s, G = E.simon_two_descent(); r,s
  • sage/schemes/elliptic_curves/gp_simon.py

    diff -r ea02bc44fa94 -r bb448d12046d sage/schemes/elliptic_curves/gp_simon.py
    a b  
    9292    else:
    9393        cmd = 'bnfellrank(K, [%s,%s,%s,%s,%s]);' % F.ainvs()
    9494           
    95     gp('DEBUGLEVEL=%s; LIM1=%s; LIM3=%s; LIMTRIV=%s; MAXPROB=%s; LIMBIGPRIME=%s;'%(
     95    gp('DEBUGLEVEL_ell=%s; LIM1=%s; LIM3=%s; LIMTRIV=%s; MAXPROB=%s; LIMBIGPRIME=%s;'%(
    9696        verbose, lim1, lim3, limtriv, maxprob, limbigprime))
    9797
    9898    if verbose >= 2: