Ticket #15434: trac_15434-bugfix.patch

File trac_15434-bugfix.patch, 3.2 KB (added by cremona, 6 years ago)

applies to 5.13.beta3

  • sage/schemes/elliptic_curves/isogeny_small_degree.py

    # HG changeset patch
    # User John Cremona <john.cremona@gmail.com>
    # Date 1384866961 0
    # Node ID 438f16f5ea9722f0f5adc93cd6c2a9c289baaf7b
    # Parent  7285f9d8a2aa2116547de1028090bb921e1d128e
    Fix bug in endomorphisms of elliptic curves with j=1728
    
    diff --git a/sage/schemes/elliptic_curves/isogeny_small_degree.py b/sage/schemes/elliptic_curves/isogeny_small_degree.py
    a b  
    17401740        sage: E = EllipticCurve(K,[-75295/1335852*a^5+13066735/445284*a^4+44903485/74214*a^3+17086861/24738*a^2+11373021/16492*a-1246245/2356,0])
    17411741        sage: isogenies_prime_degree_genus_plus_0_j1728(E,11)
    17421742        [Isogeny of degree 11 from Elliptic Curve defined by y^2 = x^3 + (-75295/1335852*a^5+13066735/445284*a^4+44903485/74214*a^3+17086861/24738*a^2+11373021/16492*a-1246245/2356)*x over Number Field in a with defining polynomial x^6 - 522*x^5 - 10017*x^4 + 2484*x^3 - 5265*x^2 + 12150*x - 5103 to Elliptic Curve defined by y^2 = x^3 + (9110695/1335852*a^5-1581074935/445284*a^4-5433321685/74214*a^3-3163057249/24738*a^2+1569269691/16492*a+73825125/2356)*x + (-3540460*a^3+30522492*a^2-7043652*a-5031180) over Number Field in a with defining polynomial x^6 - 522*x^5 - 10017*x^4 + 2484*x^3 - 5265*x^2 + 12150*x - 5103, Isogeny of degree 11 from Elliptic Curve defined by y^2 = x^3 + (-75295/1335852*a^5+13066735/445284*a^4+44903485/74214*a^3+17086861/24738*a^2+11373021/16492*a-1246245/2356)*x over Number Field in a with defining polynomial x^6 - 522*x^5 - 10017*x^4 + 2484*x^3 - 5265*x^2 + 12150*x - 5103 to Elliptic Curve defined by y^2 = x^3 + (9110695/1335852*a^5-1581074935/445284*a^4-5433321685/74214*a^3-3163057249/24738*a^2+1569269691/16492*a+73825125/2356)*x + (3540460*a^3-30522492*a^2+7043652*a+5031180) over Number Field in a with defining polynomial x^6 - 522*x^5 - 10017*x^4 + 2484*x^3 - 5265*x^2 + 12150*x - 5103]
     1743        sage: i = QuadraticField(-1,'i').gen()
     1744        sage: E = EllipticCurve([-1-2*i,0])
     1745        sage: isogenies_prime_degree_genus_plus_0_j1728(E,17)
     1746        [Isogeny of degree 17 from Elliptic Curve defined by y^2 = x^3 + (-2*i-1)*x over Number Field in i with defining polynomial x^2 + 1 to Elliptic Curve defined by y^2 = x^3 + (-82*i-641)*x over Number Field in i with defining polynomial x^2 + 1,
     1747        Isogeny of degree 17 from Elliptic Curve defined by y^2 = x^3 + (-2*i-1)*x over Number Field in i with defining polynomial x^2 + 1 to Elliptic Curve defined by y^2 = x^3 + (-562*i+319)*x over Number Field in i with defining polynomial x^2 + 1]
     1748        sage: Emin = E.global_minimal_model()
     1749        sage: [(p,len(isogenies_prime_degree_genus_plus_0_j1728(Emin,p))) for p in [17, 29, 41]]
     1750        [(17, 2), (29, 2), (41, 2)]
    17431751    """
    17441752    if not l in  hyperelliptic_primes:
    17451753        raise ValueError("%s must be one of %s."%(l,hyperelliptic_primes))
     
    17671775    if l % 4 == 1 and  F(-1).is_square():
    17681776        i = F(-1).sqrt()
    17691777        endo = Fxuv(data['endo'])
    1770         kernels += [endo(X,i,-27*c4).monic(), endo(X,-i,-27*c4).monic()]
     1778        kernels += [endo(36*X+3*b2,i,-27*c4).monic(), endo(36*X+3*b2,-i,-27*c4).monic()]
    17711779
    17721780    S = []
    17731781    for u0 in u_list: