Ticket #10832: trac_10872.patch

File trac_10872.patch, 1.6 KB (added by gagansekhon, 11 years ago)
  • sage/schemes/elliptic_curves/ell_rational_field.py

    # HG changeset patch
    # User John Cremona <john.cremona@gmail.com>
    # Date 1298432065 0
    # Node ID f1d8c07018e8eac8ee705b562029dcbe1a093a2c
    # Parent  ec11b62f0270b890da3b9b2021aed9b30ed718ee
    trac_10832 error in processing output from simon_two_descent
    
    diff -r ec11b62f0270 -r f1d8c07018e8 sage/schemes/elliptic_curves/ell_rational_field.py
    a b  
    14721472            sage: set_random_seed(0)
    14731473            sage: r, s, G = E.simon_two_descent(); r,s
    14741474            (8, 8)
     1475
     1476Example from trac 10832::           
     1477            sage: E = EllipticCurve([1,0,0,-6664,86543])
     1478            sage: E.simon_two_descent()
     1479            (2, 3, [(173 : 1943 : 1), (-73 : -394 : 1), (323/4 : 1891/8 : 1)])
     1480            sage: E.rank()
     1481            2
     1482            sage: E.gens()
     1483            [(-73 : -394 : 1), (323/4 : 1891/8 : 1)]
     1484
    14751485        """
    14761486        t = simon_two_descent(self, verbose=verbose, lim1=lim1, lim3=lim3, limtriv=limtriv,
    14771487                              maxprob=maxprob, limbigprime=limbigprime)
     
    14791489        two_selmer_rank = rings.Integer(t[1])
    14801490        gens_mod_two = [self(P) for P in t[2]]
    14811491        if rank_low_bd == two_selmer_rank - self.two_torsion_rank():
    1482             gens = [P for P in gens_mod_two if P.additive_order() != 2]
     1492            gens = [P for P in gens_mod_two if P.has_infinite_order()]
     1493            gens = self.saturation(gens)[0]
    14831494            self.__gens[True] = gens
    14841495            self.__gens[True].sort()
    14851496            self.__rank[True] = len(self.__gens[True])