13.1.1.1 LargeCremonaDatabase Objects

class LargeCremonaDatabase
The Cremona database of elliptic curves.

sage: c = CremonaDatabase()
sage: c
Cremona's database of elliptic curves
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]}
LargeCremonaDatabase( [read_only=True])

Initialize the database.

INPUT:
    read_only -- bool (default: True), if True, then the
                 database is read_only and changes cannot be
                 commited to disk.

Instances of class LargeCremonaDatabase have the following methods (in addition to inherited methods and special methods):

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

Further documentation:

allbsd( N)

Return the allbsd table for conductor N. The entries are:

            [id, tamagawa_product, Omega_E, L, Reg_E, Sha_an(E)],
where id is the isogeny class (letter) followed by a number, e.g., b3, and L is $ L^r(E,1)/r!$ , where E has rank r.

INPUT:
    N -- int, the conductor
OUTPUT:
    dict

allcurves( N)

Returns the allcurves table of curves of conductor N.

INPUT:
    N -- int, the conductor
OUTPUT:
    dict -- {id:[ainvs, rank, tor], ...}

allgens( N)

Return the allgens table for conductor N.

INPUT:
    N -- int, the conductor
OUTPUT:
    dict -- {id:[points, ...], ...}

conductor_range( )

Return the range of conductors that are covered by the database.

OUTPUT: int - smallest cond int - largest

curves( N)

Returns the curves table of all *optimal* curves of conductor N.

INPUT:
    N -- int, the conductor
OUTPUT:
    dict -- {id:[ainvs, rank, tor], ...}

NOTE: 990H3 is the optimal curve in that class, due to a mistake in Cremona's labeling.

degphi( N)

Return the degphi table for conductor N.

INPUT:
    N -- int, the conductor
OUTPUT:
    dict -- {id:degphi, ...}

elliptic_curve( label)

Return an elliptic curve with given label with some data about it from the database pre-filled in.

INPUT:
    label -- str (Cremona label)
OUTPUT:
    EllipticCurve

elliptic_curve_from_ainvs( 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:
    N -- int
    ainvs -- list (5-tuple of int's); the minimal Weierstrass model
             for an elliptic curve of conductor N
OUTPUT:
    EllipticCurve

isogeny_class( label)

Returns the isogeny class of elliptic curves that are isogeneous to the curve with given Cremona label.

INPUT:
    label -- string
OUTPUT:
    list -- list of EllpticCurve objects.

isogeny_classes( 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.

iter( conductors)

Returns an iterator through all curves with conductor between Nmin and Nmax-1, inclusive, in the database.

INPUT:
    conductors -- list or generator of ints
OUTPUT:
    generator that iterates over EllipticCurve objects.

iter_optimal( conductors)

Returns an iterator through all optimal curves with conductor between Nmin and Nmax-1 in the database.

INPUT:
    conductors -- list or generator of ints
OUTPUT:
    generator that iterates over EllipticCurve objects.

largest_conductor( )

The largest conductor for which the database is complete. OUTPUT: int - largest conductor

list( conductors)

Returns a list of all optimal curves with conductor between Nmin and Nmax-1, inclusive, in the database.

INPUT:
    conductors -- list or generator of ints
OUTPUT:
    list of EllipticCurve objects.

number_of_curves( [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:
    N -- int
    i -- int or str
OUTPUT:
    int

sage: c = CremonaDatabase()
sage: c.number_of_curves(11)
3
sage: c.number_of_curves(37)
4
sage: c.number_of_curves(990)
42

number_of_isogeny_classes( [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:
    N -- int
OUTPUT:
    int

sage: c = CremonaDatabase()
sage: c.number_of_isogeny_classes(11)
1
sage: c.number_of_isogeny_classes(37)
2

random( )

Returns a random curve from the database.

smallest_conductor( )

The smallest conductor for which the database is complete. (Always 1.)

OUTPUT: int - smallest conductor

Instances of class LargeCremonaDatabase also have the following special methods:

__getitem__,$  $ __iter__,$  $ __repr__,$  $ _init_allbsd,$  $ _init_allcurves,$  $ _init_allgens,$  $ _init_degphi,$  $ _init_from_ftpdata

Further documentation:

__getitem__( 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:
    N -- int or str
OUTPUT:
    dict (if N is an int) or EllipticCurve (if N is a str)

__iter__( )

Returns an iterator through all EllipticCurve objects in the Cremona database.

__repr__( )

String representation of this database. OUTPUT: str

_init_allbsd( ftpdata, [largest_conductor=0])

Initialize the allbsd table by reading the corresponding ftpdata files and importing them into the database.

_init_allcurves( ftpdata, [largest_conductor=0])

Initialize the allcurves table by reading the corresponding ftpdata files and importing them into the database.

INPUT:
    largest_conductor -- int (default: 0), if > 0, then only
                     include data up to that conductor.
OUTPUT:
    int -- number_of_curves
    int -- number_of_isogeny_classes

_init_allgens( ftpdata, [largest_conductor=0])

Initialize the allgens table by reading the corresponding ftpdata files and importing them into the database.

_init_degphi( ftpdata, [largest_conductor=0])

Initialize the degphi table by reading the corresponding ftpdata files and importing them into the database.

_init_from_ftpdata( ftpdata, [largest_conductor=0])

Create the ZODB Cremona Database from the Cremona ftpdata directory, which is available from Cremona's website. (Decompress ftpdata.tgz.)

NOTE: For data up to level 70000, this function takes about 10 minutes on a Thinkpad T42p 1.8Ghz Pentium-M laptop. The resulting database occupies 36MB disk space. Creating the database uses a LOT of memory. Use a machine with at least 1GB RAM.

See About this document... for information on suggesting changes.