# HG changeset patch
# User John Cremona <john.cremona@gmail.com>
# Date 1210627121 3600
# Node ID 3fbbb1c4281d2b20ae52bfea9e7ccd6ece26edd3
# Parent 6be71336769080d20026f30bbbc803bb481ba9b0
Final fix for #3111 (delete debugging lines and add doctest)
diff r 6be713367690 r 3fbbb1c4281d sage/schemes/elliptic_curves/ell_finite_field.py
a

b

class EllipticCurve_finite_field(Ellipti 
1006  1006  Of course, there are plenty of points if we extend the field: 
1007  1007  sage: E.cardinality(extension_degree=100) 
1008  1008  1267650600228231653296516890625 
 1009  
 1010  This tests the patch for trac#3111: 
 1011  sage: E = EllipticCurve('389a') 
 1012  sage: for _ in range(10): 
 1013  ... p=random_prime(10000) 
 1014  ... if p != 389: 
 1015  ... G = E.change_ring(GF(p)).abelian_group() 
1009  1016  """ 
1010  1017  if not debug: 
1011  1018  # if we're in debug mode, always recalculate 
… 
… 
class EllipticCurve_finite_field(Ellipti 
1191  1198  print " and not ",n2 
1192  1199  raise ValueError 
1193  1200  if n2>1: 
1194   print "P1=",P1," of order ",P1.order(),"=",n1 
1195   print "P2=",P2," of order ",P2.order(),"=",n2 
1196  1201  if generic.linear_relation(P1,P2,operation='+')[1]!=n2: 
1197  1202  print "Generators not independent!" 
1198  1203  raise ValueError 