# 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


1740  1740  sage: E = EllipticCurve(K,[75295/1335852*a^5+13066735/445284*a^4+44903485/74214*a^3+17086861/24738*a^2+11373021/16492*a1246245/2356,0]) 
1741  1741  sage: isogenies_prime_degree_genus_plus_0_j1728(E,11) 
1742  1742  [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*a1246245/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^51581074935/445284*a^45433321685/74214*a^33163057249/24738*a^2+1569269691/16492*a+73825125/2356)*x + (3540460*a^3+30522492*a^27043652*a5031180) 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*a1246245/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^51581074935/445284*a^45433321685/74214*a^33163057249/24738*a^2+1569269691/16492*a+73825125/2356)*x + (3540460*a^330522492*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([12*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*i1)*x over Number Field in i with defining polynomial x^2 + 1 to Elliptic Curve defined by y^2 = x^3 + (82*i641)*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*i1)*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)] 
1743  1751  """ 
1744  1752  if not l in hyperelliptic_primes: 
1745  1753  raise ValueError("%s must be one of %s."%(l,hyperelliptic_primes)) 
… 
… 

1767  1775  if l % 4 == 1 and F(1).is_square(): 
1768  1776  i = F(1).sqrt() 
1769  1777  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()] 
1771  1779  
1772  1780  S = [] 
1773  1781  for u0 in u_list: 