ellrank(E,{effort = 0},{points}):

   If E is an elliptic curve over Q, attempts to compute the Mordell-Weil group
attached to the curve.   The output is [r_1,r_2,s,L],  where r_1 <= rank(E)  <=
r_2,  s gives informations on the Tate-Shafarevic group (see below), and L is a
list of independent,  non-torsion rational points on the curve.   E can also be
given as the output of ellrankinit(E).

   If points is provided,  it must be a vector of rational points on the curve,
which are not computed again.

   The  parameter  effort  is  a  measure of the time employed to find rational
points  before  giving up.   If effort is not 0,  the search is randomized,  so
rerunning  the  function  might  yield  different or even a different number of
rational points.  Values up to 10 or so are reasonable but the parameter can be
increased  futher,   with running times increasing roughly like the cube of the
effort value.

/*-- (type RETURN to continue) --*/
   ? E = ellinit([-127^2,0]);
   ? ellrank(E)
   %2 = [1, 1, 0, []] \\ rank is 1 but no point has been found.
   ? ellrank(E,4) \\ with more effort we find a point.
   %3 = [1, 1, 0, [[38902300445163190028032/305111826865145547009,
        680061120400889506109527474197680/5329525731816164537079693913473]]]

   In addition to the previous calls, the first argument E can be a pair [e,f],
where e is an elliptic curve given by ellrankinit and f is a quadratic twist of
e.   We then look for points on f.  Note that the ellrankinit initialization is
independent of f, so this can speed up computations significantly!

Technical  explanation.  The  algorithm,   which computes the 2-descent and the
2-part  of  the  Cassels  pairings has an intrinsic limitation: r_1 = r_2 never
holds  when the Tate-Shafarevic group G has 4-torsion.   Thus,  in this case we
cannot  determine  the rank precisely.   The algorithm computes unconditionally
three quantities:

/*-- (type RETURN to continue) --*/
* the rank C of the 2-Selmer group.

* the rank T of the 2-torsion subgroup.

*  the  (even)  rank s of G[2]/2G[4];   then r_2 is defined by r_2 = C - T - s.

   The following quantities are also relevant:

*  the rank R of the free part of E(Q);   it always holds that r_1 <= R <= r_2.

* the rank S of G[2] (conjecturally even); it always holds that s <= S and that
C = T + R + S. Then r_2 = C - T - s >= R.

   When  the  conductor  of  E  is  small,   the  BSD conjecture can be used to
(conditionally) find the true rank:

   ? E=ellinit([-113^2,0]);
   ? ellrootno(E) \\ rank is even (parity conjecture)
/*-- (type RETURN to continue) --*/
   %2 = 1
   ? ellrank(E)
   %3 = [0, 2, 0, []] \\ rank is either 0 or 2, $2$-rank of $G$ is
   ? ellrank(E, 3) \\ try harder
   %4 = [0, 2, 0, []] \\ no luck
   ? [r,L] = ellanalyticrank(E) \\ assume BSD
   %5 = [0, 3.9465...]
   ? L / ellbsd(E) \\ analytic rank is 0, compute Sha
   %6 = 16.0000000000000000000000000000000000000

   We find that the rank is 0 and the cardinal of the Tate-Shafarevich group is
16   (assuming  BSD!).   Moreover,  since s = 0,  it is isomorphic to (Z/4Z)^2.

   When  the  rank  is 1 and the conductor is small,  ellheegner can be used to
find a non-torsion point:

    ? E = ellinit([-157^2,0]);
    ? ellrank(E)
/*-- (type RETURN to continue) --*/
    %2 = [1, 1, 0, []] \\ rank is 1, no point found
    ? ellrank(E, 5) \\ Try harder
    time = 1,094 ms.
    %3 = [1, 1, 0, []] \\ No luck
    ? ellheegner(E) \\ use analytic method
    time = 492 ms.
    %4 = [69648970982596494254458225/166136231668185267540804, ...]

In  this  last example,  an effort about 10 would also  (with probability about
80%)   find  a  random  point,   not necessarily the Heegner point,  in about 5
seconds.

   The  library  syntax is GEN ellrank(GEN E,  long effort,  GEN points = NULL,
long prec).

