Ticket #9541: trac_9541-part5-doctests_outside_nf.patch

File trac_9541-part5-doctests_outside_nf.patch, 27.1 KB (added by was, 7 years ago)
  • sage/modular/cusps_nf.py

    # HG changeset patch
    # User William Stein <wstein@gmail.com>
    # Date 1279709373 -7200
    # Node ID f8a3a8cdcf94052e64c133a8f1f6b70c2a854abd
    # Parent  d5abbca52e1414a1c13b23e086ca6e0b12149e8a
    [mq]: trac_9541-part5-doctests_outside_nf.patch
    
    diff -r d5abbca52e14 -r f8a3a8cdcf94 sage/modular/cusps_nf.py
    a b  
    774774            sage: k.<a> = NumberField(x^3 + x + 1)
    775775            sage: kCusps = NFCusps(k)
    776776
    777         Comparing with infinity:
    778 
    779         ::
     777        Comparing with infinity::
     778       
    780779            sage: c = kCusps((a,2))
    781780            sage: d = kCusps(oo)
    782781            sage: c < d
     
    784783            sage: kCusps(oo) < d
    785784            False
    786785
    787         Comparison as elements of the number field:
    788 
    789         ::
     786        Comparison as elements of the number field::
    790787
    791788            sage: kCusps(2/3) < kCusps(5/2)
    792             False
     789            True
    793790            sage: k(2/3) < k(5/2)
     791            True
     792            sage: kCusps(2/3) > kCusps(5/2)
    794793            False
    795794        """
    796795        if self.__b.is_zero():
     
    12911290    from sage.misc.mrange import xmrange
    12921291    from sage.misc.misc import prod
    12931292
    1294     return [prod([u**e for u,e in zip(ulist,ei)],k(1)) for ei in xmrange(elist)]
    1295  No newline at end of file
     1293    return [prod([u**e for u,e in zip(ulist,ei)],k(1)) for ei in xmrange(elist)]
  • sage/rings/number_field/todo.txt

    diff -r d5abbca52e14 -r f8a3a8cdcf94 sage/rings/number_field/todo.txt
    a b  
    2323   [x] _quadratic -- make sure datatype right in doctests there.
    2424   [x] cython arithmetic implementation object.
    2525   [x] test stabilization
    26  
    2726   [x] increase coverage a lot
     27   [x] fix all doctests outside number_field directory (except pickling)
    2828
    2929   [ ] generic: get to work in the *relative case*
    3030
     
    4949
    5050   [ ] make default implementation computation be centralized?
    5151
     52   [ ] fix unpickling of old nf elts
     53
    5254   [ ] fix order.py -- it explicitly references ntl but must not.
    5355   [ ] change number_field_element_quadratic to derive from
    5456       number_field_element code (i.e., the abstract base), instead of
  • sage/schemes/elliptic_curves/ell_curve_isogeny.py

    diff -r d5abbca52e14 -r f8a3a8cdcf94 sage/schemes/elliptic_curves/ell_curve_isogeny.py
    a b  
    43554355        True
    43564356        sage: E = EllipticCurve(K,[0,0,0,1,0])   
    43574357        sage: isogenies_5_1728(E)                 
    4358         [Isogeny of degree 5 from Elliptic Curve defined by y^2 = x^3 + x over Number Field in a with defining polynomial x^4 + 20*x^2 - 80 to Elliptic Curve defined by y^2 = x^3 + (-20*a^2-39)*x + (35*a^3+112*a) over Number Field in a with defining polynomial x^4 + 20*x^2 - 80,
    4359         Isogeny of degree 5 from Elliptic Curve defined by y^2 = x^3 + x over Number Field in a with defining polynomial x^4 + 20*x^2 - 80 to Elliptic Curve defined by y^2 = x^3 + (-20*a^2-39)*x + (-35*a^3-112*a) over Number Field in a with defining polynomial x^4 + 20*x^2 - 80]
     4358        [Isogeny of degree 5 from Elliptic Curve defined by y^2 = x^3 + x over Number Field in a with defining polynomial x^4 + 20*x^2 - 80 to Elliptic Curve defined by y^2 = x^3 + (-20*a^2-39)*x + (-35*a^3-112*a) over Number Field in a with defining polynomial x^4 + 20*x^2 - 80,
     4359        Isogeny of degree 5 from Elliptic Curve defined by y^2 = x^3 + x over Number Field in a with defining polynomial x^4 + 20*x^2 - 80 to Elliptic Curve defined by y^2 = x^3 + (-20*a^2-39)*x + (35*a^3+112*a) over Number Field in a with defining polynomial x^4 + 20*x^2 - 80]
    43604360   
    43614361    """
    43624362    F = E.base_field()
     
    45264526        sage: E = EllipticCurve(K, [1, 0])                               
    45274527        sage: isogs = isogenies_7_1728(E)
    45284528        sage: [phi.codomain().a_invariants() for phi in isogs]
    4529         [(0,
    4530         0,
    4531         0,
    4532         35/636*a^6 + 55/12*a^4 - 79135/636*a^2 + 1127/212,
    4533         155/636*a^7 + 245/12*a^5 - 313355/636*a^3 - 3577/636*a),
    4534         (0,
    4535         0,
    4536         0,
    4537         35/636*a^6 + 55/12*a^4 - 79135/636*a^2 + 1127/212,
    4538         -155/636*a^7 - 245/12*a^5 + 313355/636*a^3 + 3577/636*a)]
     4529        [(0, 0, 0, 35/636*a^6 + 55/12*a^4 - 79135/636*a^2 + 1127/212,
     4530        -155/636*a^7 - 245/12*a^5 + 313355/636*a^3 + 3577/636*a),
     4531        (0, 0, 0, 35/636*a^6 + 55/12*a^4 - 79135/636*a^2 + 1127/212, 155/636*a^7 + 245/12*a^5 - 313355/636*a^3 - 3577/636*a)]
    45394532        sage: [phi.codomain().j_invariant() for phi in isogs]
    45404533        [-526110256146528/53*a^6 + 183649373229024*a^4 - 3333881559996576/53*a^2 + 2910267397643616/53,
    45414534        -526110256146528/53*a^6 + 183649373229024*a^4 - 3333881559996576/53*a^2 + 2910267397643616/53]
     
    46064599        [Isogeny of degree 13 from Elliptic Curve defined by y^2 = x^3 + r over Number Field in r with defining polynomial x^2 + 3 to Elliptic Curve defined by y^2 = x^3 + r over Number Field in r with defining polynomial x^2 + 3,
    46074600        Isogeny of degree 13 from Elliptic Curve defined by y^2 = x^3 + r over Number Field in r with defining polynomial x^2 + 3 to Elliptic Curve defined by y^2 = x^3 + r over Number Field in r with defining polynomial x^2 + 3]
    46084601        sage: isogenies_13_0(E)[0].rational_maps()
    4609         (((-4/169*r - 11/169)*x^13 + (-128/13*r - 456/13)*x^10 + (-1224/13*r - 2664/13)*x^7 + (-2208/13*r + 5472/13)*x^4 + (1152/13*r - 8064/13)*x)/(x^12 + (4*r - 36)*x^9 + (-1080/13*r + 3816/13)*x^6 + (2112/13*r + 5184/13)*x^3 + (17280/169*r - 1152/169)), ((18/2197*r - 35/2197)*x^18*y + (-23142/2197*r + 35478/2197)*x^15*y + (-1127520/2197*r + 1559664/2197)*x^12*y + (87744/2197*r + 5992704/2197)*x^9*y + (-6625152/2197*r + 9085824/2197)*x^6*y + (28919808/2197*r - 2239488/2197)*x^3*y + (-1990656/2197*r + 3870720/2197)*y)/(x^18 + (6*r - 54)*x^15 + (-3024/13*r + 11808/13)*x^12 + (31296/13*r - 51840/13)*x^9 + (-487296/169*r - 2070144/169)*x^6 + (-940032/169*r - 248832/169)*x^3 + (-1990656/2197*r + 3870720/2197)))
     4602        (((4/169*r - 11/169)*x^13 + (-128/13*r + 456/13)*x^10 + (1224/13*r - 2664/13)*x^7 + (-2208/13*r - 5472/13)*x^4 + (-1152/13*r - 8064/13)*x)/(x^12 + (4*r + 36)*x^9 + (1080/13*r + 3816/13)*x^6 + (2112/13*r - 5184/13)*x^3 + (-17280/169*r - 1152/169)), ((18/2197*r + 35/2197)*x^18*y + (23142/2197*r + 35478/2197)*x^15*y + (-1127520/2197*r - 1559664/2197)*x^12*y + (-87744/2197*r + 5992704/2197)*x^9*y + (-6625152/2197*r - 9085824/2197)*x^6*y + (-28919808/2197*r - 2239488/2197)*x^3*y + (-1990656/2197*r - 3870720/2197)*y)/(x^18 + (6*r + 54)*x^15 + (3024/13*r + 11808/13)*x^12 + (31296/13*r + 51840/13)*x^9 + (487296/169*r - 2070144/169)*x^6 + (-940032/169*r + 248832/169)*x^3 + (1990656/2197*r + 3870720/2197)))
    46104603
    46114604    An example of endomorphisms over a finite field::
    46124605   
     
    46424635        sage: E = EllipticCurve(j=K(0)); E.ainvs()
    46434636        (0, 0, 0, 0, 1)
    46444637        sage: [phi.codomain().ainvs() for phi in isogenies_13_0(E)]
    4645         [(0, 0, 0, -739946459/23857162861049856*a^11 - 2591641747/1062017577504*a^8 + 16583647773233/4248070310016*a^5 - 14310911337/378211388*a^2, 26146225/4248070310016*a^9 + 7327668845/14750244132*a^6 + 174618431365/756422776*a^3 - 378332499709/94552847), (0, 0, 0, 3501275/5964290715262464*a^11 + 24721025/531008788752*a^8 - 47974903745/1062017577504*a^5 - 6773483100/94552847*a^2, 6699581/4248070310016*a^9 + 1826193509/14750244132*a^6 - 182763866047/756422776*a^3 - 321460597/94552847)]
     4638        [(0, 0, 0, 3501275/5964290715262464*a^11 + 24721025/531008788752*a^8 - 47974903745/1062017577504*a^5 - 6773483100/94552847*a^2, 6699581/4248070310016*a^9 + 1826193509/14750244132*a^6 - 182763866047/756422776*a^3 - 321460597/94552847), (0, 0, 0, -739946459/23857162861049856*a^11 - 2591641747/1062017577504*a^8 + 16583647773233/4248070310016*a^5 - 14310911337/378211388*a^2, 26146225/4248070310016*a^9 + 7327668845/14750244132*a^6 + 174618431365/756422776*a^3 - 378332499709/94552847)]
    46464639    """
    46474640    if E.j_invariant()!=0:
    46484641        raise ValueError, "j-invariant must be 0."
     
    47434736        sage: K.<a> = NumberField(f)
    47444737        sage: E = EllipticCurve(K, [1,0])
    47454738        sage: [phi.codomain().ainvs() for phi in isogenies_13_1728(E)]
    4746         [(0,
    4747         0,
    4748         0,
    4749         11090413835/20943727039698624*a^10 + 32280103535965/55849938772529664*a^8 - 355655987835845/1551387188125824*a^6 + 19216954517530195/5235931759924656*a^4 - 1079766118721735/5936430566808*a^2 + 156413528482727/8080141604822,
    4750         214217013065/82065216155553792*a^11 + 1217882637605/427423000810176*a^9 - 214645003230565/189965778137856*a^7 + 22973355421236025/1282269002430528*a^5 - 2059145797340695/2544184528632*a^3 - 23198483147321/989405094468*a),
    4751         (0,
    4752         0,
    4753         0,
    4754         11090413835/20943727039698624*a^10 + 32280103535965/55849938772529664*a^8 - 355655987835845/1551387188125824*a^6 + 19216954517530195/5235931759924656*a^4 - 1079766118721735/5936430566808*a^2 + 156413528482727/8080141604822,
    4755         -214217013065/82065216155553792*a^11 - 1217882637605/427423000810176*a^9 + 214645003230565/189965778137856*a^7 - 22973355421236025/1282269002430528*a^5 + 2059145797340695/2544184528632*a^3 + 23198483147321/989405094468*a)]
    4756    
     4739        [(0, 0, 0, 11090413835/20943727039698624*a^10 + 32280103535965/55849938772529664*a^8 - 355655987835845/1551387188125824*a^6 + 19216954517530195/5235931759924656*a^4 - 1079766118721735/5936430566808*a^2 + 156413528482727/8080141604822, -214217013065/82065216155553792*a^11 - 1217882637605/427423000810176*a^9 + 214645003230565/189965778137856*a^7 - 22973355421236025/1282269002430528*a^5 + 2059145797340695/2544184528632*a^3 + 23198483147321/989405094468*a),
     4740        (0, 0, 0, 11090413835/20943727039698624*a^10 + 32280103535965/55849938772529664*a^8 - 355655987835845/1551387188125824*a^6 + 19216954517530195/5235931759924656*a^4 - 1079766118721735/5936430566808*a^2 + 156413528482727/8080141604822, 214217013065/82065216155553792*a^11 + 1217882637605/427423000810176*a^9 - 214645003230565/189965778137856*a^7 + 22973355421236025/1282269002430528*a^5 - 2059145797340695/2544184528632*a^3 - 23198483147321/989405094468*a)]
    47574741    """
    47584742    if E.j_invariant()!=1728:
    47594743        raise ValueError, "j-invariant must be 1728."
  • sage/schemes/elliptic_curves/ell_field.py

    diff -r d5abbca52e14 -r f8a3a8cdcf94 sage/schemes/elliptic_curves/ell_field.py
    a b  
    773773            Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x + (-6) over Number Field in e with defining polynomial x^2 - 2
    774774            sage: E.isogenies_prime_degree(2)
    775775            [Isogeny of degree 2 from Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x + (-6) over Number Field in e with defining polynomial x^2 - 2 to Elliptic Curve defined by y^2 + x*y + y = x^3 + (-36)*x + (-70) over Number Field in e with defining polynomial x^2 - 2]
    776             sage: E.isogenies_prime_degree(3)           
    777             [Isogeny of degree 3 from Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x + (-6) over Number Field in e with defining polynomial x^2 - 2 to Elliptic Curve defined by y^2 + x*y + y = x^3 + (-171)*x + (-874) over Number Field in e with defining polynomial x^2 - 2, Isogeny of degree 3 from Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x + (-6) over Number Field in e with defining polynomial x^2 - 2 to Elliptic Curve defined by y^2 + x*y + y = x^3 + (-128/3)*x + 5662/27 over Number Field in e with defining polynomial x^2 - 2]
    778 
    779 
     776            sage: E.isogenies_prime_degree(3)
     777            [Isogeny of degree 3 from Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x + (-6) over Number Field in e with defining polynomial x^2 - 2 to Elliptic Curve defined by y^2 + x*y + y = x^3 + (-128/3)*x + 5662/27 over Number Field in e with defining polynomial x^2 - 2, Isogeny of degree 3 from Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x + (-6) over Number Field in e with defining polynomial x^2 - 2 to Elliptic Curve defined by y^2 + x*y + y = x^3 + (-171)*x + (-874) over Number Field in e with defining polynomial x^2 - 2]
    780778        """
    781779        F = self.base_ring()
    782780        if rings.is_RealField(F):
  • sage/schemes/elliptic_curves/ell_generic.py

    diff -r d5abbca52e14 -r f8a3a8cdcf94 sage/schemes/elliptic_curves/ell_generic.py
    a b  
    22702270            sage: K.<a> = NumberField(x^2+3) # adjoin roots of unity
    22712271            sage: E.automorphisms(K)
    22722272            [Generic endomorphism of Abelian group of points on Elliptic Curve defined by y^2 + y = x^3 over Number Field in a with defining polynomial x^2 + 3
    2273             Via:  (u,r,s,t) = (1, 0, 0, 0),
    2274             ...
     2273            Via:  (u,r,s,t) = (-1, 0, 0, -1), ...
    22752274            Generic endomorphism of Abelian group of points on Elliptic Curve defined by y^2 + y = x^3 over Number Field in a with defining polynomial x^2 + 3
    2276             Via:  (u,r,s,t) = (-1/2*a - 1/2, 0, 0, 0)]
    2277        
    2278         ::
    2279        
     2275            Via:  (u,r,s,t) = (1/2*a + 1/2, 0, 0, -1)]
    22802276            sage: [ len(EllipticCurve_from_j(GF(q,'a')(0)).automorphisms()) for q in [2,4,3,9,5,25,7,49]]
    22812277            [2, 24, 2, 12, 2, 6, 6, 6]
    22822278        """
     
    26332629            [[(5 : -6 : 1), 1]]
    26342630            sage: K.<t>=NumberField(x^4 + x^3 + 11*x^2 + 41*x + 101)
    26352631            sage: EK=E.base_extend(K)                               
    2636             sage: EK._p_primary_torsion_basis(5)                   
    2637             [[(16 : 60 : 1), 1], [(t : 1/11*t^3 + 6/11*t^2 + 19/11*t + 48/11 : 1), 1]]
     2632            sage: EK._p_primary_torsion_basis(5)
     2633            [[(5 : -6 : 1), 1], [(t : -1/11*t^3 - 6/11*t^2 - 19/11*t - 59/11 : 1), 1]]
    26382634            sage: EF=E.change_ring(GF(101))
    26392635            sage: EF._p_primary_torsion_basis(5)
    26402636            [[(0 : 13 : 1), 1], [(5 : 5 : 1), 1]]
    26412637
    2642             This shows that the bug at trac \#4937 is fixed::
     2638        The bug at trac \#4937 is fixed::
    26432639
    26442640            sage: a=804515977734860566494239770982282063895480484302363715494873
    26452641            sage: b=584772221603632866665682322899297141793188252000674256662071
     
    26482644
    26492645            sage: F.<z> = CyclotomicField(21)
    26502646            sage: E = EllipticCurve([2,-z^7,-z^7,0,0])
    2651             sage: E._p_primary_torsion_basis(7,2)
    2652             [[(0 : z^7 : 1), 1],
    2653             [(z^7 - z^6 + z^4 - z^3 + z^2 - 1 : z^8 - 2*z^7 + z^6 + 2*z^5 - 3*z^4 + 2*z^3 - 2*z + 2 : 1),
    2654             1]]
     2647            sage: E._p_primary_torsion_basis(7,2)       # long time
     2648            [[(0 : 0 : 1), 1], [(z^7 - z^6 + z^4 - z^3 + z^2 - 1 : -z^8 + z^7 + z^6 - 2*z^5 + z^4 - 2*z^2 + 2*z : 1), 1]]
    26552649        """
    26562650        p = rings.Integer(p)
    26572651        if not p.is_prime():
  • sage/schemes/elliptic_curves/ell_number_field.py

    diff -r d5abbca52e14 -r f8a3a8cdcf94 sage/schemes/elliptic_curves/ell_number_field.py
    a b  
    11801180            sage: tor
    11811181            Torsion Subgroup isomorphic to Multiplicative Abelian Group isomorphic to C5 x C5 associated to the Elliptic Curve defined by y^2 + y = x^3 + (-1)*x^2 + (-10)*x + (-20) over Number Field in t with defining polynomial x^4 + x^3 + 11*x^2 + 41*x + 101
    11821182            sage: tor.gens()
    1183             ((16 : 60 : 1), (t : 1/11*t^3 + 6/11*t^2 + 19/11*t + 48/11 : 1))
     1183            ((5 : -6 : 1), (t : -1/11*t^3 - 6/11*t^2 - 19/11*t - 59/11 : 1))
    11841184
    11851185        ::
    11861186   
     
    12721272            sage: K.<t> = NumberField(x^4 + x^3 + 11*x^2 + 41*x + 101)
    12731273            sage: EK = E.base_extend(K)
    12741274            sage: EK.torsion_points()
    1275             [(t : 1/11*t^3 + 6/11*t^2 + 19/11*t + 48/11 : 1),
    1276             (1/11*t^3 - 5/11*t^2 + 19/11*t - 40/11 : -6/11*t^3 - 3/11*t^2 - 26/11*t - 321/11 : 1),
    1277             (1/11*t^3 - 5/11*t^2 + 19/11*t - 40/11 : 6/11*t^3 + 3/11*t^2 + 26/11*t + 310/11 : 1),
    1278             (t : -1/11*t^3 - 6/11*t^2 - 19/11*t - 59/11 : 1),
    1279             (16 : 60 : 1),
    1280             (-3/55*t^3 - 7/55*t^2 - 2/55*t - 133/55 : 6/55*t^3 + 3/55*t^2 + 25/11*t + 156/55 : 1),
    1281             (14/121*t^3 - 15/121*t^2 + 90/121*t + 232/121 : 16/121*t^3 - 69/121*t^2 + 293/121*t - 46/121 : 1),
    1282             (-26/121*t^3 + 20/121*t^2 - 219/121*t - 995/121 : -15/121*t^3 - 156/121*t^2 + 232/121*t - 2887/121 : 1),
    1283             (10/121*t^3 + 49/121*t^2 + 168/121*t + 73/121 : -32/121*t^3 - 60/121*t^2 + 261/121*t + 686/121 : 1),
    1284             (5 : 5 : 1),
    1285             (-9/121*t^3 - 21/121*t^2 - 127/121*t - 377/121 : -7/121*t^3 + 24/121*t^2 + 197/121*t + 16/121 : 1),
    1286             (3/55*t^3 + 7/55*t^2 + 2/55*t + 78/55 : 7/55*t^3 - 24/55*t^2 + 9/11*t + 17/55 : 1),
    1287             (-5/121*t^3 + 36/121*t^2 - 84/121*t + 24/121 : -34/121*t^3 + 27/121*t^2 - 305/121*t - 829/121 : 1),
    1288             (5/121*t^3 - 14/121*t^2 - 158/121*t - 453/121 : 49/121*t^3 + 129/121*t^2 + 315/121*t + 86/121 : 1),
    1289             (5 : -6 : 1),
    1290             (5/121*t^3 - 14/121*t^2 - 158/121*t - 453/121 : -49/121*t^3 - 129/121*t^2 - 315/121*t - 207/121 : 1),
    1291             (-5/121*t^3 + 36/121*t^2 - 84/121*t + 24/121 : 34/121*t^3 - 27/121*t^2 + 305/121*t + 708/121 : 1),
    1292             (3/55*t^3 + 7/55*t^2 + 2/55*t + 78/55 : -7/55*t^3 + 24/55*t^2 - 9/11*t - 72/55 : 1),
    1293             (-9/121*t^3 - 21/121*t^2 - 127/121*t - 377/121 : 7/121*t^3 - 24/121*t^2 - 197/121*t - 137/121 : 1),
    1294             (16 : -61 : 1),
    1295             (10/121*t^3 + 49/121*t^2 + 168/121*t + 73/121 : 32/121*t^3 + 60/121*t^2 - 261/121*t - 807/121 : 1),
    1296             (-26/121*t^3 + 20/121*t^2 - 219/121*t - 995/121 : 15/121*t^3 + 156/121*t^2 - 232/121*t + 2766/121 : 1),
    1297             (14/121*t^3 - 15/121*t^2 + 90/121*t + 232/121 : -16/121*t^3 + 69/121*t^2 - 293/121*t - 75/121 : 1),
    1298             (-3/55*t^3 - 7/55*t^2 - 2/55*t - 133/55 : -6/55*t^3 - 3/55*t^2 - 25/11*t - 211/55 : 1),
    1299             (0 : 1 : 0)]
     1275            [(0 : 1 : 0), (5 : -6 : 1), (5 : 5 : 1), (16 : -61 : 1), (16 : 60 : 1),
     1276             (t : -1/11*t^3 - 6/11*t^2 - 19/11*t - 59/11 : 1),
     1277             ...
     1278             (14/121*t^3 - 15/121*t^2 + 90/121*t + 232/121 : 16/121*t^3 - 69/121*t^2 + 293/121*t - 46/121 : 1)]
    13001279
    13011280        ::
    13021281   
     
    13041283            sage: K.<t> = NumberField(x^2 + 2*x + 10)
    13051284            sage: EK = E.base_extend(K)
    13061285            sage: EK.torsion_points()
    1307             [(t : t - 5 : 1),
    1308             (-1 : 0 : 1),
    1309             (t : -2*t + 4 : 1),
    1310             (8 : 18 : 1),
    1311             (1/2 : 5/4*t + 1/2 : 1),
    1312             (-2 : 3 : 1),
    1313             (-7 : 5*t + 8 : 1),
    1314             (3 : -2 : 1),
    1315             (-t - 2 : 2*t + 8 : 1),
    1316             (-13/4 : 9/8 : 1),
    1317             (-t - 2 : -t - 7 : 1),
    1318             (8 : -27 : 1),
    1319             (-7 : -5*t - 2 : 1),
    1320             (-2 : -2 : 1),
    1321             (1/2 : -5/4*t - 2 : 1),
    1322             (0 : 1 : 0)]
     1286            [(0 : 1 : 0), (-7 : -5*t - 2 : 1), (-7 : 5*t + 8 : 1), (-13/4 : 9/8 : 1), (-2 : -2 : 1),
     1287            (-2 : 3 : 1), (-1 : 0 : 1), (1/2 : -5/4*t - 2 : 1), (1/2 : 5/4*t + 1/2 : 1), (3 : -2 : 1),
     1288            (8 : -27 : 1), (8 : 18 : 1), (-t - 2 : -t - 7 : 1), (-t - 2 : 2*t + 8 : 1),
     1289            (t : -2*t + 4 : 1), (t : t - 5 : 1)]
    13231290       
    13241291        ::
    13251292   
    13261293            sage: K.<i> = QuadraticField(-1)
    13271294            sage: EK = EllipticCurve(K,[0,0,0,0,-1])           
    1328             sage: EK.torsion_points ()             
    1329             [(-2 : -3*i : 1),
    1330             (0 : -i : 1),
    1331             (1 : 0 : 1),
    1332             (0 : i : 1),
    1333             (-2 : 3*i : 1),
    1334             (0 : 1 : 0)]
     1295            sage: EK.torsion_points()
     1296            [(0 : 1 : 0), (0 : -i : 1), (0 : i : 1), (-2 : -3*i : 1),
     1297             (-2 : 3*i : 1), (1 : 0 : 1)]
    13351298         """
    13361299        T = self.torsion_subgroup() # make sure it is cached
    13371300        return T.points()           # these are also cached in T
  • sage/schemes/elliptic_curves/ell_point.py

    diff -r d5abbca52e14 -r f8a3a8cdcf94 sage/schemes/elliptic_curves/ell_point.py
    a b  
    834834            sage: E(0).division_points(3)
    835835            [(0 : 1 : 0), (5 : -10 : 1), (5 : 9 : 1)]
    836836            sage: EK(0).division_points(3)
    837             [(0 : 1 : 0), (5 : 9 : 1), (5 : -10 : 1)]
     837            [(0 : 1 : 0), (5 : -10 : 1), (5 : 9 : 1)]
    838838            sage: E(0).division_points(9)
    839839            [(0 : 1 : 0), (5 : -10 : 1), (5 : 9 : 1)]
    840840            sage: EK(0).division_points(9)
    841             [(0 : 1 : 0), (5 : 9 : 1), (5 : -10 : 1), (-150/121*t^8 + 414/121*t^7 + 1481/242*t^6 - 2382/121*t^5 - 103/242*t^4 + 629/22*t^3 - 367/242*t^2 - 1307/121*t + 625/121 : 35/484*t^8 - 133/242*t^7 + 445/242*t^6 - 799/242*t^5 + 373/484*t^4 + 113/22*t^3 - 2355/484*t^2 - 753/242*t + 1165/484 : 1), (-150/121*t^8 + 414/121*t^7 + 1481/242*t^6 - 2382/121*t^5 - 103/242*t^4 + 629/22*t^3 - 367/242*t^2 - 1307/121*t + 625/121 : -35/484*t^8 + 133/242*t^7 - 445/242*t^6 + 799/242*t^5 - 373/484*t^4 - 113/22*t^3 + 2355/484*t^2 + 753/242*t - 1649/484 : 1), (-1383/484*t^8 + 970/121*t^7 + 3159/242*t^6 - 5211/121*t^5 + 37/484*t^4 + 654/11*t^3 - 909/484*t^2 - 4831/242*t + 6791/484 : 927/121*t^8 - 5209/242*t^7 - 8187/242*t^6 + 27975/242*t^5 - 1147/242*t^4 - 1729/11*t^3 + 1566/121*t^2 + 12873/242*t - 10871/242 : 1), (-1383/484*t^8 + 970/121*t^7 + 3159/242*t^6 - 5211/121*t^5 + 37/484*t^4 + 654/11*t^3 - 909/484*t^2 - 4831/242*t + 6791/484 : -927/121*t^8 + 5209/242*t^7 + 8187/242*t^6 - 27975/242*t^5 + 1147/242*t^4 + 1729/11*t^3 - 1566/121*t^2 - 12873/242*t + 10629/242 : 1), (-4793/484*t^8 + 6791/242*t^7 + 10727/242*t^6 - 18301/121*t^5 + 2347/484*t^4 + 2293/11*t^3 - 7311/484*t^2 - 17239/242*t + 26767/484 : 30847/484*t^8 - 21789/121*t^7 - 34605/121*t^6 + 117164/121*t^5 - 10633/484*t^4 - 29437/22*t^3 + 39725/484*t^2 + 55428/121*t - 176909/484 : 1), (-4793/484*t^8 + 6791/242*t^7 + 10727/242*t^6 - 18301/121*t^5 + 2347/484*t^4 + 2293/11*t^3 - 7311/484*t^2 - 17239/242*t + 26767/484 : -30847/484*t^8 + 21789/121*t^7 + 34605/121*t^6 - 117164/121*t^5 + 10633/484*t^4 + 29437/22*t^3 - 39725/484*t^2 - 55428/121*t + 176425/484 : 1)]
    842 
     841            [(0 : 1 : 0), (5 : -10 : 1), (5 : 9 : 1), (-4793/484*t^8 + 6791/242*t^7 + 10727/242*t^6 - 18301/121*t^5 + 2347/484*t^4 + 2293/11*t^3 - 7311/484*t^2 - 17239/242*t + 26767/484 : -30847/484*t^8 + 21789/121*t^7 + 34605/121*t^6 - 117164/121*t^5 + 10633/484*t^4 + 29437/22*t^3 - 39725/484*t^2 - 55428/121*t + 176425/484 : 1), (-4793/484*t^8 + 6791/242*t^7 + 10727/242*t^6 - 18301/121*t^5 + 2347/484*t^4 + 2293/11*t^3 - 7311/484*t^2 - 17239/242*t + 26767/484 : 30847/484*t^8 - 21789/121*t^7 - 34605/121*t^6 + 117164/121*t^5 - 10633/484*t^4 - 29437/22*t^3 + 39725/484*t^2 + 55428/121*t - 176909/484 : 1), (-1383/484*t^8 + 970/121*t^7 + 3159/242*t^6 - 5211/121*t^5 + 37/484*t^4 + 654/11*t^3 - 909/484*t^2 - 4831/242*t + 6791/484 : -927/121*t^8 + 5209/242*t^7 + 8187/242*t^6 - 27975/242*t^5 + 1147/242*t^4 + 1729/11*t^3 - 1566/121*t^2 - 12873/242*t + 10629/242 : 1), (-1383/484*t^8 + 970/121*t^7 + 3159/242*t^6 - 5211/121*t^5 + 37/484*t^4 + 654/11*t^3 - 909/484*t^2 - 4831/242*t + 6791/484 : 927/121*t^8 - 5209/242*t^7 - 8187/242*t^6 + 27975/242*t^5 - 1147/242*t^4 - 1729/11*t^3 + 1566/121*t^2 + 12873/242*t - 10871/242 : 1), (-150/121*t^8 + 414/121*t^7 + 1481/242*t^6 - 2382/121*t^5 - 103/242*t^4 + 629/22*t^3 - 367/242*t^2 - 1307/121*t + 625/121 : -35/484*t^8 + 133/242*t^7 - 445/242*t^6 + 799/242*t^5 - 373/484*t^4 - 113/22*t^3 + 2355/484*t^2 + 753/242*t - 1649/484 : 1), (-150/121*t^8 + 414/121*t^7 + 1481/242*t^6 - 2382/121*t^5 - 103/242*t^4 + 629/22*t^3 - 367/242*t^2 - 1307/121*t + 625/121 : 35/484*t^8 - 133/242*t^7 + 445/242*t^6 - 799/242*t^5 + 373/484*t^4 + 113/22*t^3 - 2355/484*t^2 - 753/242*t + 1165/484 : 1)]
    843842        """
    844843        # Coerce the input m to an integer
    845844        m = rings.Integer(m)
     
    11841183
    11851184        An example over a number field::
    11861185
    1187             sage: P,Q = EllipticCurve('11a1').change_ring(CyclotomicField(5)).torsion_subgroup().gens()
    1188             sage: (P.order(),Q.order())
     1186            sage: P, Q = EllipticCurve('11a1').change_ring(CyclotomicField(5)).torsion_subgroup().gens()     
     1187            sage: (P.order(), Q.order())
    11891188            (5, 5)
    11901189            sage: P.weil_pairing(Q,5)
    1191             zeta5^2
     1190            -zeta5^3 - zeta5^2 - zeta5 - 1
    11921191            sage: Q.weil_pairing(P,5)
    1193             zeta5^3       
     1192            zeta5
     1193            sage: (Q.weil_pairing(P,5))^(-1)
     1194            -zeta5^3 - zeta5^2 - zeta5 - 1
    11941195
    11951196        ALGORITHM:
    11961197
     
    21642165            sage: Ls = [E.period_lattice(e) for e in embs]
    21652166            sage: [L.real_flag for L in Ls]
    21662167            [0, 0, -1]
    2167             sage: P = E.torsion_points()[0]                                 
     2168            sage: P = E.torsion_points()[1]                                 
    21682169            sage: [L.elliptic_logarithm(P) for L in Ls]   
    21692170            [-1.73964256006716 - 1.07861534489191*I, -0.363756518406398 - 1.50699412135253*I, 1.90726488608927]
    21702171
  • sage/schemes/elliptic_curves/ell_torsion.py

    diff -r d5abbca52e14 -r f8a3a8cdcf94 sage/schemes/elliptic_curves/ell_torsion.py
    a b  
    235235            sage: EK=E.change_ring(K)
    236236            sage: T = EK.torsion_subgroup()
    237237            sage: T.gen()
    238             (16 : 60 : 1)
     238            (5 : -6 : 1)
    239239        """
    240240        return self.__torsion_gens[i]
    241241
     
    280280            sage: E = EllipticCurve(K,[0,0,0,1,0])
    281281            sage: tor = E.torsion_subgroup()
    282282            sage: tor.points()
    283             [(i : 0 : 1), (0 : 0 : 1), (-i : 0 : 1), (0 : 1 : 0)]
     283            [(0 : 0 : 1), (0 : 1 : 0), (-i : 0 : 1), (i : 0 : 1)]
    284284        """
    285285        try:
    286286            return self.__points
  • sage/schemes/elliptic_curves/heegner.py

    diff -r d5abbca52e14 -r f8a3a8cdcf94 sage/schemes/elliptic_curves/heegner.py
    a b  
    14091409            sage: G = K3.galois_group(K1)
    14101410            sage: orb = sorted([g.alpha() for g in G]); orb # random (the sign depends on the database being installed or not)
    14111411            [1, 1/2*sqrt_minus_52 + 1, -1/2*sqrt_minus_52, 1/2*sqrt_minus_52 - 1]
    1412             sage: [x^2 for x in orb] # this is just for testing 
    1413             [1, sqrt_minus_52 - 12, -13, -sqrt_minus_52 - 12]
     1412            sage: [x^2 for x in orb] # this is just for testing
     1413            [1, -13, -sqrt_minus_52 - 12, sqrt_minus_52 - 12]
    14141414
    14151415            sage: K5 = heegner_points(389,-52,5).ring_class_field()
    14161416            sage: K1 = heegner_points(389,-52,1).ring_class_field()
     
    14181418            sage: orb = sorted([g.alpha() for g in G]); orb # random (the sign depends on the database being installed or not)
    14191419            [1, -1/2*sqrt_minus_52, 1/2*sqrt_minus_52 + 1, 1/2*sqrt_minus_52 - 1, 1/2*sqrt_minus_52 - 2, -1/2*sqrt_minus_52 - 2]
    14201420            sage: [x^2 for x in orb] # just for testing
    1421             [1, -13, sqrt_minus_52 - 12, -sqrt_minus_52 - 12, -2*sqrt_minus_52 - 9, 2*sqrt_minus_52 - 9]
     1421            [1, 2*sqrt_minus_52 - 9, -13, -2*sqrt_minus_52 - 9, -sqrt_minus_52 - 12, sqrt_minus_52 - 12]
    14221422
    14231423        """
    14241424        if self.__alpha is None: