#13065: simon_two_descent not working
-----------------------------------------------------------+----------------
       Reporter:  alexc                                    |         Owner:  
cremona     
           Type:  defect                                   |        Status:  
needs_review
       Priority:  major                                    |     Milestone:  
sage-5.4    
      Component:  elliptic curves                          |    Resolution:     
         
       Keywords:  EllipticCurve simon_two_descent gp pari  |   Work issues:     
         
Report Upstream:  Reported upstream. No feedback yet.      |     Reviewers:     
         
        Authors:  Francis Clarke                           |     Merged in:     
         
   Dependencies:                                           |      Stopgaps:     
         
-----------------------------------------------------------+----------------

Old description:

> In certain cases simon_two_descent produces an error. For example:
>
> {{{
> ----------------------------------------------------------------------
> | Sage Version 5.0, Release Date: 2012-05-14                         |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage: poly = CyclotomicField(43).subfields(3)[0][0].polynomial()
> sage: poly
> x^3 + x^2 - 14*x + 8
> sage: K = NumberField(poly, 'a')
> sage: E = EllipticCurve(K, '37')
> sage: E
> Elliptic Curve defined by y^2 + y = x^3 + (-1)*x over Number Field in
> a with defining polynomial x^3 + x^2 - 14*x + 8
> sage: E.simon_two_descent()
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call
> last)
>
> /home/blatm/<ipython console> in <module>()
>
> /home/blatm/sage/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/
> local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/
> ell_number_field.pyc in simon_two_descent(self, verbose, lim1, lim3,
> limtriv, maxprob, limbigprime)
>     281                               verbose=verbose, lim1=lim1,
> lim3=lim3, limtriv=limtriv,
>     282                               maxprob=maxprob,
> limbigprime=limbigprime)
> --> 283         prob_rank = Integer(t[0])
>     284         two_selmer_rank = Integer(t[1])
>     285         prob_gens = [self(P) for P in t[2]]
>
> /home/blatm/sage/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/
> local/lib/python2.7/site-packages/sage/rings/integer.so in
> sage.rings.integer.Integer.__init__ (sage/rings/integer.c:6865)()
>
> TypeError: unable to convert x (=f) to an integer
> }}}
>
> I have tried Simon's scripts in gp directly, and this case fails there as
> well:
>
> {{{
> sage: gp.console()
> Reading GPRC: /home/blatm/sage/sage-5.0-linux-64bit-
> ubuntu_10.04.3_lts-x86_64-Linux/local/etc/gprc.expect ...Done.
>
>            GP/PARI CALCULATOR Version 2.5.1 (development git-5c5e253)
>           amd64 running linux (x86-64/GMP-5.0.2 kernel) 64-bit version
>                     compiled: May 14 2012, gcc-4.6.3 (GCC)
>                  (readline v6.2 enabled, extended help enabled)
>
>                      Copyright (C) 2000-2011 The PARI Group
>
> PARI/GP is free software, covered by the GNU General Public License, and
> comes
> WITHOUT ANY WARRANTY WHATSOEVER.
>
> Type ? for help, \q to quit.
> Type ?12 for how to get moral (and possibly technical) support.
>
> parisize = 8000000, primelimit = 500509
> ? \r ~/pari/pari-2.5.1/examples/ell.gp \\This is Simon's 2-descent
> script, taken from his webpage.
> ? K = bnfinit(y^3+y^2-14*y+8);
> ? E37A = [0,0,1,-1,0];
> ? bnfellrank(K,E37A)
>   ***   at top-level: bnfellrank(K,E37A)
>   ***                 ^------------------
>   ***   in function bnfellrank: ...eqtheta,rnfeq,bbnf];rang=
>   ***   bnfell2descent_gen(b
>   ***   ^--------------------
>   ***   in function bnfell2descent_gen: ...und,r=nfsqrt(nf,norm(zc))
>   ***   [1];if(DEBUGLEVEL_el
>   ***   ^--------------------
>   ***   array index (1) out of allowed range [none].
> ?
> }}}
>
> I am running Sage 5.0 on Ubuntu 11.04 64bit.

New description:

 In certain cases simon_two_descent produces an error. For example:

 {{{
 ----------------------------------------------------------------------
 | Sage Version 5.0, Release Date: 2012-05-14                         |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 sage: poly = CyclotomicField(43).subfields(3)[0][0].polynomial()
 sage: poly
 x^3 + x^2 - 14*x + 8
 sage: K = NumberField(poly, 'a')
 sage: E = EllipticCurve(K, '37')
 sage: E
 Elliptic Curve defined by y^2 + y = x^3 + (-1)*x over Number Field in
 a with defining polynomial x^3 + x^2 - 14*x + 8
 sage: E.simon_two_descent()
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/blatm/<ipython console> in <module>()

 /home/blatm/sage/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/
 local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/
 ell_number_field.pyc in simon_two_descent(self, verbose, lim1, lim3,
 limtriv, maxprob, limbigprime)
     281                               verbose=verbose, lim1=lim1,
 lim3=lim3, limtriv=limtriv,
     282                               maxprob=maxprob,
 limbigprime=limbigprime)
 --> 283         prob_rank = Integer(t[0])
     284         two_selmer_rank = Integer(t[1])
     285         prob_gens = [self(P) for P in t[2]]

 /home/blatm/sage/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/
 local/lib/python2.7/site-packages/sage/rings/integer.so in
 sage.rings.integer.Integer.__init__ (sage/rings/integer.c:6865)()

 TypeError: unable to convert x (=f) to an integer
 }}}

 I have tried Simon's scripts in gp directly, and this case fails there as
 well:

 {{{
 sage: gp.console()
 Reading GPRC: /home/blatm/sage/sage-5.0-linux-64bit-
 ubuntu_10.04.3_lts-x86_64-Linux/local/etc/gprc.expect ...Done.

            GP/PARI CALCULATOR Version 2.5.1 (development git-5c5e253)
           amd64 running linux (x86-64/GMP-5.0.2 kernel) 64-bit version
                     compiled: May 14 2012, gcc-4.6.3 (GCC)
                  (readline v6.2 enabled, extended help enabled)

                      Copyright (C) 2000-2011 The PARI Group

 PARI/GP is free software, covered by the GNU General Public License, and
 comes
 WITHOUT ANY WARRANTY WHATSOEVER.

 Type ? for help, \q to quit.
 Type ?12 for how to get moral (and possibly technical) support.

 parisize = 8000000, primelimit = 500509
 ? \r ~/pari/pari-2.5.1/examples/ell.gp \\This is Simon's 2-descent script,
 taken from his webpage.
 ? K = bnfinit(y^3+y^2-14*y+8);
 ? E37A = [0,0,1,-1,0];
 ? bnfellrank(K,E37A)
   ***   at top-level: bnfellrank(K,E37A)
   ***                 ^------------------
   ***   in function bnfellrank: ...eqtheta,rnfeq,bbnf];rang=
   ***   bnfell2descent_gen(b
   ***   ^--------------------
   ***   in function bnfell2descent_gen: ...und,r=nfsqrt(nf,norm(zc))
   ***   [1];if(DEBUGLEVEL_el
   ***   ^--------------------
   ***   array index (1) out of allowed range [none].
 ?
 }}}

 I am running Sage 5.0 on Ubuntu 11.04 64bit.

 '''Apply''':
     * [attachment:trac_13065_simon_two_descent-replacement.patch]

--

Comment (by fwclarke):

 Replying to [comment:10 cremona]:
 > PS The full test worked without a hitch so perhaps I was unnecessarily
 cautious (about deleting the line which defines x).

 It looks as though that line has been there from the beginning (sage-2.6).

 > This just leaves adding a comment about the version of the scripts which
 cause that error.

 I've replaced the patch with one that refers to the version.

 > What then with this ticket?  I cannot exactly be closed since the error
 has not been fixed, just flagged better.  Perhaps the thing to do is to
 close this ticket but to open a similar one which refers back to this one.

 Seems like a good idea.  From the point of view of Sage, the error was in
 the implementation of reporting errors in the script(s) (plus one or two
 other things).  A new ticket could (re-)document the upstream report.

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