Module: sage.databases.cremona
Cremona's tables of elliptic curves.
SAGE includes John Cremona's tables of elliptic curves in an easy-to-use format. The unique instance of the class CremonaDatabase() gives access to the database.
If the full CremonaDatabase isn't installed, a mini-version, which is included by default with SAGE, is included. It includes Weierstrass equations, rank, and torsion for curves up to conductor 10000.
The large database includes all curves of conductor up to 120,000 (!). It also includes data related to the BSD conjecture and modular degrees for all of these curves, and generators for the Mordell-Weil groups. To install it type the following in SAGE: !sage -i database_cremona_ellcurve-2005.11.03
The name of the database may change as it is updated. Type "!sage -optional" to see the latest package names.
Module-level Functions
) |
n) |
Returns the Cremona letter code corresponding to an integer. For example, 0 -> a 25 -> z 26 -> ba 51 -> bz 52 -> ca 53 -> cb etc.
NOTE: This is just the base 26 representation of n, where a=0, b=1, ..., z=25. This extends the old Cremona notation (counting from 0) for the first 26 classes, and is different for classes above 26.
Input:
sage: cremona_letter_code(0) 'a' sage: cremona_letter_code(26) 'ba' sage: cremona_letter_code(27) 'bb' sage: cremona_letter_code(521) 'ub' sage: cremona_letter_code(53) 'cb' sage: cremona_letter_code(2005) 'czd'
id) |
Returns true if the Cremona id refers to an optimal curve, and false otherwise. The curve is optimal if the id, which is of the form [letter code][number] has number 1.
NOTE: 990H3 is the optimal curve in that class, so doesn't obey this rule.
Input:
sage: is_optimal_id('A2') False sage: is_optimal_id('B1') True sage: is_optimal_id('CC1') True sage: is_optimal_id('CC2') False
n) |
Returns old the Cremona letter code corresponding to an integer.
For example, 1 -> A 26 -> Z 27 -> AA 52 -> ZZ 53 -> AAA etc.
Input:
sage: old_cremona_letter_code(1) 'A' sage: old_cremona_letter_code(26) 'Z' sage: old_cremona_letter_code(27) 'AA' sage: old_cremona_letter_code(521) 'AAAAAAAAAAAAAAAAAAAAA' sage: old_cremona_letter_code(53) 'AAA' sage: old_cremona_letter_code(2005) 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCC'
label) |
Given a Cremona label corresponding that defines an elliptic curve, e.g., 11A1 or 37B3, parse the label and return the conductor, isogeny class label, and number.
The isogeny number may be omitted, in which case it default to 1. If the isogeny number and letter are both omitted, so label is just a string representing a conductor, then the label defaults to 'A' and the number to 1.
Input:
sage: parse_cremona_label('37a2') (37, 'a', 2) sage: parse_cremona_label('37b1') (37, 'b', 1) sage: parse_cremona_label('10bb2') (10, 'bb', 2)
data_tgz, largest_conductor, [decompress=True]) |
Rebuild the LargeCremonaDatabase from scratch using the data_tgz tarball.
Class: LargeCremonaDatabase
sage: c = CremonaDatabase() sage: c.allcurves(11) {'a1': [[0, -1, 1, -10, -20], 0, 5], 'a3': [[0, -1, 1, 0, 0], 0, 5], 'a2': [[0, -1, 1, -7820, -263580], 0, 1]}
self, [read_only=True]) |
Initialize the database.
Input:
Functions: allbsd,
allcurves,
allgens,
conductor_range,
curves,
degphi,
elliptic_curve,
elliptic_curve_from_ainvs,
isogeny_class,
isogeny_classes,
iter,
iter_optimal,
largest_conductor,
list,
number_of_curves,
number_of_isogeny_classes,
random,
smallest_conductor
self, N) |
Return the allbsd table for conductor N. The entries are:
[id, tamagawa_product, Omega_E, L, Reg_E, Sha_an(E)],
Input:
self, N) |
Returns the allcurves table of curves of conductor N.
Input:
self, N) |
Return the allgens table for conductor N.
Input:
self) |
Return the range of conductors that are covered by the database.
Output:
sage: CremonaDatabase().conductor_range() # random -- depends on database installed (1, 9999)
self, N) |
Returns the curves table of all *optimal* curves of conductor N.
Input:
NOTE: 990H3 is the optimal curve in that class, due to a mistake in Cremona's labeling.
self, N) |
Return the degphi table for conductor N.
Input:
self, label) |
Return an elliptic curve with given label with some data about it from the database pre-filled in.
Input:
self, N, ainvs) |
Returns the elliptic curve in the database of conductor N with minimal ainvs, if it exists, or raises a RuntimeError exception otherwise.
Input:
self, label) |
Returns the isogeny class of elliptic curves that are isogeneous to the curve with given Cremona label. Input:
self, conductor) |
Return the allcurves data (ainvariants, rank and torsion) for the elliptic curves in the database of given conductor as a list of lists, one for each isogeny class. The curve with number 1 is always listed first.
self, conductors) |
Returns an iterator through all curves with conductor between Nmin and Nmax-1, inclusive, in the database.
Input:
self, conductors) |
Returns an iterator through all optimal curves with conductor between Nmin and Nmax-1 in the database.
Input:
self) |
The largest conductor for which the database is complete.
Output:
sage: CremonaDatabase().largest_conductor() # random -- depends on size of installed database 9999
self, conductors) |
Returns a list of all optimal curves with conductor between Nmin and Nmax-1, inclusive, in the database. Input:
self, [N=0], [i=0]) |
Returns the number of curves stored in the database with conductor N. If N = 0, returns the total number of curves in the database.
If i is nonzero, returns the number of curves in the i-th isogeny class. If i is a Cremona letter code, e.g., 'a' or 'bc', it is converted to the corresponding number.
Input:
sage: c = CremonaDatabase() sage: c.number_of_curves(11) 3 sage: c.number_of_curves(37) 4 sage: c.number_of_curves(990) 42
self, [N=0]) |
Returns the number of isogeny classes of curves in the database of conductor N. If N is 0, return the total number of curves in the database.
Input:
sage: c = CremonaDatabase() sage: c.number_of_isogeny_classes(11) 1 sage: c.number_of_isogeny_classes(37) 2
self) |
Returns a random curve from the database.
sage: CremonaDatabase().random() # random -- depends on database installed Elliptic Curve defined by y^2 + x*y = x^3 - x^2 - 224*x + 3072 over Rational Field
self) |
The smallest conductor for which the database is complete. (Always 1.)
Output:
sage: CremonaDatabase().smallest_conductor() 1
Special Functions: __getitem__,
__init__,
__iter__,
__repr__,
_init_allbsd,
_init_allcurves,
_init_allgens,
_init_degphi,
_init_from_ftpdata
self, N) |
If N is an integer, return all data about level N in the database. If N is a string it must be a Cremona label, in which case return the corresponding elliptic curve, if it is in the database.
Input:
self) |
Returns an iterator through all EllipticCurve objects in the Cremona database.
self) |
String representation of this database. Output: str
self, ftpdata, [largest_conductor=0]) |
Initialize the allbsd table by reading the corresponding ftpdata files and importing them into the database.
self, ftpdata, [largest_conductor=0]) |
Initialize the allcurves table by reading the corresponding ftpdata files and importing them into the database.
Input:
self, ftpdata, [largest_conductor=0]) |
Initialize the allgens table by reading the corresponding ftpdata files and importing them into the database.
self, ftpdata, [largest_conductor=0]) |
Initialize the degphi table by reading the corresponding ftpdata files and importing them into the database.
self, ftpdata, [largest_conductor=0]) |
Create the ZODB Cremona Database from the Cremona data directory, which is available from Cremona's website. I.e., just wget Cremona's database to a local directory.
NOTE: For data up to level 130000, this function takes about 30 minutes on a 1.8Ghz Opteron laptop. The resulting database occupies 36MB disk space. Creating the database uses a LOT of memory. Use a machine with at *least* 2GB RAM.
To recreate the large database from the files in the current directory, do the following:
sage: d = sage.databases.cremona.LargeCremonaDatabase(read_only=False) # not tested sage: d._init_from_ftpdata('.') # not tested
Class: MiniCremonaDatabase
self, [read_only=True]) |
Initialize the database.
Input:
Special Functions: __init__,
__repr__,
_init
See About this document... for information on suggesting changes.