intrinsic RabiFunction(E::CrvEll, P::CrvEllPt) -> FldFunRat

{The rational function (x - x(P))*(x-x(3*P))/(x-x(2*P))^2.}

   require P in E : "Argument 2 must be in argument 1.";
   require Order(P) eq 0: "Argument 2 must have infinite order.";

   K<x> := FieldOfFractions(PolynomialRing(Rationals()));

   return (x - P[1]) * (x - (3*P)[1]) / ( x - (2*P)[1] )^2;

end intrinsic;


intrinsic Analyze(E::CrvEll)
{}
   G, f := MordellWeilGroup(E);
   T, g := TorsionSubgroup(E);
   printf "Let E be:\n\t%o\n\n", E;
   printf "The Mordell-Weil group is: %o\n\n",G;

   for i in [1..Ngens(G)] do
      printf "Generator %o = %o.\n", i, f(G.i);
   end for;

   printf "\nThe torsion subgroup is:\n %o.\n\n", {g(t) : t in T};
   
   for i in [Ngens(T)+1..Ngens(G)] do
      printf "%o*G.%o \t= %o.\n", j, i, f(j*G.i);
   end for;
end intrinsic;
