//////////////////////////////////////////////////////////////////
//
// cinfinity.m -- given an elliptic curve E/Q, compute the 
// number of real components of the optimal quotient of J_0(N)
// in the isogeny class of E.
//
// William Stein, 28 July 2000, in Durham.
//
//////////////////////////////////////////////////////////////////


function cinfinity(E)
   assert Type(E) eq CrvEll;
   assert Type(BaseRing(E)) eq FldRat;

   t := Cputime();
   print "Finding cinfinty of the optimal quotient.";
   print "Computing space of modular symbols.";
   SetVerbose("ModularSymbols",1);
   M := ModularSymbols(E);
   printf "Finished computing modular symbols (time = %o).\n", Cputime(t);

   t := Cputime();
   print "Computing dual integral lattice.";
   L := DualLattice(M);
   printf "Finished computing dual lattice (time = %o).\n", Cputime(t);
   printf "The lattice is:\n %o\n\n",L;

   
   

end function;
