kill(libname); libname = concat(componentfolder,"cmtools.so"); kill(cremona); addhelp(cremona,"The cremona package includes the functions ellcremona, ellini, ellctopen, ellctgetline and ellctclose. The Cremona table used in the implementation here includes all curves with conductor up to 5300. For more information on a function *, type ?*"); kill(cremonatable); cremonatable = concat(componentfolder,"db/allcurves.1-5300"); kill(ellcremona); install(ellcremona,s,ellcremona,libname); addhelp(ellcremona,"ellcremona(\"NIk\") returns the coefficient vector for the elliptic curve of conductor N, isogeny class I and isomorphism class k as listed in Cremona's tables; for instance ellcremona(\"37B2\") returns [0,1,1,-1873,-31833]; the defaults are I = A and k = 1, and so to get the curve 37A1, it suffices to type ellcremona(\"37\")"); kill(ellini); ellini(E,p=0,prec=0) = ellini0(E,p,prec); addhelp(ellini,"ellini(E,{p=0},{prec=0}): works like ellinit, but allows you to easily specify the prime at which to calculate the relevant data (default real), and the precision of that calculation (default is 0, in which case the current realprecision is used for real calculations); moreover, instead of a five-component vector for, the input E may be given in the form \"NIk\" as for ellcremona; for instance ellini(\"37\") returns the data for the curve 37A1 over C to realprecision digits and ellini(\"11A2\",11,25) returns the data for curve 11A2 over Q_11 to precision O(11^25)"); kill(ellini0); ellini0(ze,p,prec) = { local(whattype,e,oldprec,E,E1,e2,i); whattype = type(ze); if(whattype == "t_VEC", e = ze, if(whattype == "t_STR", e = ellcremona(ze), error("elliptic curve must be specified either by coefficient vector or by Cremona table entry"); ); ); if(p == 0, oldprec = default(realprecision,,1); if(prec != 0,default(realprecision,prec)); E = ellinit(e); default(realprecision,oldprec); , if(prec == 0,error("Must specify precision for p-adic initialization.")); E1 = ellinit(e,1); e2 = e; e2[1] = e2[1] + O(p^prec); E = ellinit(e2); for(i=1,13,E[i] = E1[i]); ); return(E); } kill(ellctopen); install(ellctopen,v,ellctopen,libname); addhelp(ellctopen,"ellctopen() opens the cremona table for use by ellctgetline"); kill(ellctgetline); install(ellctgetline,,ellctgetline,libname); addhelp(ellctgetline,"ellctgetline() retrieves the next line from the cremona table"); kill(ellctclose); install(ellctclose,v,ellctclose,libname); addhelp(ellctclose,"ellctclose() closes the cremona table opened by ellctopen");