Changeset 7685:fde68d8392d8


Ignore:
Timestamp:
11/21/07 11:40:07 (6 years ago)
Author:
Robert Bradshaw <robertwb@…>
Branch:
default
Message:

change doctests to match new gp scripts

Location:
sage/schemes/elliptic_curves
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sage/schemes/elliptic_curves/ell_generic.py

    r7684 r7685  
    13861386        denom = lcm([a.denominator() for a in self.ainvs()]) 
    13871387        if denom != 1: 
    1388             raise NotImplementedError, "model must be integral for now" 
     1388            F = self.integral_weierstrass_model() 
     1389            return F, self.isomorphism_to(F) 
    13891390        else: 
    13901391            parent = self(0).parent() 
  • sage/schemes/elliptic_curves/ell_number_field.py

    r7684 r7685  
    105105            sage: E = EllipticCurve(K, '37') 
    106106            sage: E.simon_two_descent() 
    107             (2, 2, [(-4 : -4 : 1), (2*a - 10 : -4*a - 48 : 1)]) 
     107            (2, 2, [(-1 : 0 : 1), (1/2*a - 5/2 : -1/2*a - 13/2 : 1)]) 
    108108             
    109109            sage: K.<a> = NumberField(x^2 + 7, 'a') 
     
    111111            Elliptic Curve defined by y^2  = x^3 + x + a over Number Field in a with defining polynomial x^2 + 7 
    112112            sage: v = E.simon_two_descent(verbose=1); v 
    113             courbe elliptique : Y^2 = x^3 + Mod(3*y, y^2 + 7)*x^2 + Mod(-20, y^2 + 7)*x + Mod(-5*y, y^2 + 7) 
    114             points triviaux sur la courbe = [[1, 1, 0], [Mod(-1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1]] 
     113            courbe elliptique : Y^2 = x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7) 
     114            A = 0 
     115            B = Mod(1, y^2 + 7) 
     116            C = Mod(y, y^2 + 7) 
     117            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))] 
     118            #LS2gen = 2 
     119             Recherche de points triviaux sur la courbe  
     120            points triviaux sur la courbe = [[1, 1, 0], [Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1]] 
     121            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)) 
     122             symbole de Hilbert (Mod(2, y^2 + 7),Mod(-5, y^2 + 7)) = -1 
     123            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)) 
     124             vient du point trivial [Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1] 
     125            m1 = 1 
     126            m2 = 1 
    115127            #S(E/K)[2]    = 2 
    116128            #E(K)/2E(K)   = 2 
    117129            #III(E/K)[2]  = 1 
    118130            rang(E/K)     = 1 
    119             listpointsmwr = [[Mod(-1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1]] 
     131            listpointsmwr = [[Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7), 1]] 
    120132            (1, 1, [(1/2*a + 3/2 : -a - 2 : 1)]) 
    121              
     133 
    122134        A curve with 2-torsion 
    123135            sage: K.<a> = NumberField(x^2 + 7, 'a') 
  • sage/schemes/elliptic_curves/ell_rational_field.py

    r7684 r7685  
    819819            sage: E = EllipticCurve('37a1') 
    820820            sage: E.simon_two_descent() 
    821             (1, 1, [(0 : 4 : 1)]) 
     821            (1, 1, [(0 : 0 : 1)]) 
    822822            sage: E = EllipticCurve('389a1') 
    823823            sage: E.simon_two_descent() 
    824             (2, 2, [(57/4 : 621/8 : 1), (57 : 243 : 1)]) 
     824            (2, 2, [(1 : 0 : 1), (-11/9 : -55/27 : 1)]) 
    825825            sage: E = EllipticCurve('5077a1') 
    826826            sage: E.simon_two_descent() 
    827             (3, 3, [(1 : 17 : 1), (-8 : 28 : 1), (8 : 4 : 1)]) 
     827            (3, 3, [(1 : 0 : 1), (2 : -1 : 1), (0 : 2 : 1)]) 
    828828 
    829829 
  • sage/schemes/elliptic_curves/gp_simon.py

    r7681 r7685  
    6565        print cmd 
    6666    s = gp.eval('ans=%s;'%cmd) 
    67     if s.find("***") != -1: 
     67    if s.find("###") != -1: 
    6868        raise RuntimeError, "%s\nAn error occured while running Simon's 2-descent program"%s 
    6969    if verbose > 0: 
Note: See TracChangeset for help on using the changeset viewer.