#15483: Simon 2-descent gives RuntimeError for an elliptic curve over a 
quadratic
field
-------------------------------------------------+-------------------------
       Reporter:  pbruin                         |        Owner:
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-6.2
      Component:  elliptic curves                |   Resolution:
       Keywords:  simon_two_descent              |    Merged in:
        Authors:                                 |    Reviewers:
Report Upstream:  Not yet reported upstream;     |  Work issues:
  Will do shortly.                               |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:  #11005                         |
-------------------------------------------------+-------------------------

Old description:

> [See #15608 for a list of open simon_two_descent tickets]
>
> The following tries to do 2-descent on an elliptic curve over a quadratic
> field:
> {{{
> K.<s>=QuadraticField(229)
> c4=2173-235*(1-s)/2
> c6=-124369+15988*(1-s)/2
> E=EllipticCurve([-c4/48,-c6/864])
> E.simon_two_descent()
> }}}
> It fails with a `RuntimeError`:
> {{{
> Traceback (most recent call last):
> ...
> RuntimeError:
>   ***   at top-level: ans=bnfellrank(K,[0,0,0,
>   ***                     ^--------------------
>   ***   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
> }}}
> It appears that a certain number field element is expected to be a
> square, but in fact isn't.
>
> The bug is not fixed by first changing to an integral model.
>
> See #11041 for other bug reports related to Denis Simon's script, some of
> which may be caused by the fact that Sage currently uses an outdated
> version.

New description:

 [See #15608 for a list of open simon_two_descent tickets]

 The following tries to do 2-descent on an elliptic curve over a quadratic
 field:
 {{{
 K.<s>=QuadraticField(229)
 c4=2173-235*(1-s)/2
 c6=-124369+15988*(1-s)/2
 E=EllipticCurve([-c4/48,-c6/864])
 E.simon_two_descent()
 }}}
 It fails with a `RuntimeError`:
 {{{
 Traceback (most recent call last):
 ...
 RuntimeError:
   ***   at top-level: ans=bnfellrank(K,[0,0,0,
   ***                     ^--------------------
   ***   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
 }}}
 The problem is apparently that the square root of `norm(zc)` (which is
 indeed a square) is not computed due to a precision bug; see comment:7
 below.

--

Comment (by pbruin):

 It seems that the bug is caused by a precision problem in `subst`, called
 by `nfrealsign` in `ell.gp`.  The following GP input demonstrates this
 (using the latest version of `ell.gp`, see #11005):
 {{{
 \r src/ext/pari/simon/ell.gp
 b =
 
-1554544300737274875964190134520312870631312460283689944298138572669148295776039072867720281361776956435252620954745928376624817557704277432961924925312*y
 +
 
23524523971732905757341977352314040726186200302188191824300117738073539522011689544444863977622786771332621915440577829842674416407299864303146477224320
 a = Mod(b, y^2 - 229);
 \p 38                    \\ default precision
 K = bnfinit(y^2 - 229);
 nfrealsign(K, a, 1)      \\ result: 1
 nfrealsign(K, a, 2)      \\ result: -1  (wrong)
 subst(b, y, K.roots[2])  \\ result: -7.695704335233296721 E112, incorrect
 to this precision
 \p 500                   \\ increase precision
 K = bnfinit(y^2 - 229);
 nfrealsign(K, a, 1)      \\ result: 1
 nfrealsign(K, a, 2)      \\ result: 1
 subst(b, y, K.roots[2])  \\ result:
 
55550556624985845118007242443189926820306719407.796355955086894963616120700422308457186069825115395206111444495243228840597412527828358943327267422898011087182852030228685210492253493260963313348652457717717703991690402543456279919008587884729307897541432624377818611055431792706380900043638904108307170236335925883131494247446074384269328376967381902948861789570537169455258630011202296209679102466188417
 }}}
 The value of `K.roots` does not seem to be the problem; the roots are
 calculated correctly to the requested precision.

--
Ticket URL: <http://trac.sagemath.org/ticket/15483#comment:7>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to