#9409: Bug in elliptic curves method .count_points() over finite fields
-------------------------------+--------------------------------------------
   Reporter:  adam             |       Owner:  cremona                        
       Type:  defect           |      Status:  new                            
   Priority:  major            |   Milestone:                                 
  Component:  elliptic curves  |    Keywords:  Elliptic Curves .count_points()
     Author:  Adam Sorkin      |    Upstream:  N/A                            
   Reviewer:                   |      Merged:                                 
Work_issues:                   |  
-------------------------------+--------------------------------------------
 There is some bug in the method .count_points() which belongs to elliptic
 curves defined over finite fields. This might be specific to EC defined
 over number fields - I only get this error when I take an EC over a number
 field, reduce at a good prime and then count points. In fact, I get the
 correct answer the first time, but if I define a second EC over a possibly
 different number field and count points at a good reduction, then the
 method .count_points() fails. I suspect this has to do with the
 cacheing...

 If you want to reproduce the behavior, try the following code:


 ### this just runs through the method outlined above:

 def test(curve, bound):
     for i in primes(bound):
         print "Checking primes over %d:        "%i
         factors = curve.base_field().ideal(i).factor()
         for j in range(len(factors)):
             if  curve.has_good_reduction(factors[j][0]):
                 if factors[j][0].divides(curve.discriminant()):
                     print "Curve has good reduction, but this isn't not a
 minimal model",
                     print "at %s with %d points in the reduced
 curve"%(factors[j][0],
 
curve.local_minimal_model(factors[j][0]).reduction(factors[j][0]).count_points()
 )
                 else:
                     print "Curve has good reduction and is a minimal
 model"
                     print "at %s with %d points in the reduced
 curve"%(factors[j][0],  curve.reduction(factors[j][0]).count_points() )
             else:
                 print "Curve has bad reduction over %s"%factors[j][0]
     return


 ### sample 1
 K.<t> = NumberField(x^2 + 1); E = EllipticCurve(K, [0, 1, 0, -2*t - 2,
 2*t]); E
 ### sample 2
 L.<u> = NumberField(x^2 - 2); F = EllipticCurve(L, [0,2,0, 2*u +4, 2*u +
 3]); F

 test(E, 100)

 ## now the error will happen
 test(F, 100)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9409>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to