#13065: simon_two_descent not working
-----------------------------------------------------------+----------------
       Reporter:  alexc                                    |         Owner:  
cremona   
           Type:  defect                                   |        Status:  
new       
       Priority:  major                                    |     Milestone:  
sage-5.0.1
      Component:  elliptic curves                          |    Resolution:     
       
       Keywords:  EllipticCurve simon_two_descent gp pari  |   Work issues:     
       
Report Upstream:  N/A                                      |     Reviewers:     
       
        Authors:                                           |     Merged in:     
       
   Dependencies:                                           |      Stopgaps:     
       
-----------------------------------------------------------+----------------

Comment (by fwclarke):

 As well as the problem with the gp script, there are errors in the sage
 code which meant that the gp error didn't get reported as was intended:

 At line 283 of `schemes/elliptic_curves/ell_number_field.py` (Sage-5.0):
 {{{
     prob_rank = Integer(t[0])
 }}}
 `t` has the value `'fail'`, from the previous line.  But the error should
 have been detected earlier.  If lines 104--105 of
 `schemes/elliptic_curves/gp_simon.py`:
 {{{
     if s.find("###") != -1:
         raise RuntimeError, "%s\nAn error occurred while running Simon's
 2-descent program"%s
 }}}
 are changed to:
 {{{
     if s.find("***") != -1:
         raise RuntimeError, "\n%s\nAn error occurred while running Simon's
 2-descent program"%s
 }}}
 then:
 {{{
 sage: K = CyclotomicField(43).subfields(3)[0][0]
 sage: E = EllipticCurve(K, '37')
 sage: E.simon_two_descent()
 Traceback (most recent call last):
 ...
 RuntimeError:
   ***   at top-level: ans=bnfellrank(K,[0,0,1,
   ***                     ^--------------------
   ***   in function bnfellrank: ...eqtheta,rnfeq,bbnf];rang=
   ***   bnfell2descent_gen(b
   ***   ^--------------------
   ***   in function bnfell2descent_gen: ...riv,r=nfsqrt(nf,norm(zc))
   ***   [1];if(DEBUGLEVEL_el
   ***   ^--------------------
   ***   array index (1) out of allowed range [none].
 An error occurred while running Simon's 2-descent program
 }}}

 There's another error at line 276 of
 `schemes/elliptic_curves/ell_number_field.py`, where a `KeyError` has to
 be allowed for as well as an `AttributeError`.  Thus trying
 `E.simon_two_descent()` again leads to
 {{{
 sage: E.simon_two_descent()
 Traceback (most recent call last):
 ...
 KeyError: (5, 50, 10, 20, 30)
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13065#comment:3>
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