Functions related to elliptic curves.

We have implemented a number of functions which are useful for number theorists working on elliptic curves. We always use Tate's notations.

The functions assume that the curve is given by a general Weierstrass model

y2 + a1xy + a3y = x3 + a2x2 + a4x + a6,

where a priori the ai can be of any scalar type. This curve can be considered as a five component vector e=[a1,a2,a3,a4,a6], but for most functions it is useful to have at one's disposal more information. This is given either by the function initell (see below), which gives a 19 component vector (which we will call a long vector in this section), or by the faster function smallinitell which gives a 13 component vector (which we will call a medium vector), all these vectors starting in the same way. Consequently, in functions which do not use the extra information given by initell, the curve can be given either as a five component vector, or by one of the longer vectors computed by initell or smallinitell.

Other functions, in particular those relative to height computations (see hell below) require also that the curve be in minimal Weierstrass form. This is achieved by the function globalred below.

Points on elliptic curves are represented as two component vectors [x,y], except for the point at infinity, i.e. the identity element of the group law, represented by the one-component vector [0].

addell(e, z1, z2): sum of the points z1 and z2 on the elliptic curve corresponding to the vector e.

The library syntax is $\teb$addell(e, z1, z2).

anell(e, n): compute the vector of the first n ak corresponding to the elliptic curve e, i.e. in principle coefficients of a newform of weight 2 assuming Taniyama-Weil. e must be a medium or long vector of the type given by smallinitell or initell.

The library syntax is $\teb$anell(e, n).

apell(e, p): compute the ap corresponding to the elliptic curve e and the prime number p, using the baby-step giant-step method and a trick due to Mestre. No checking is done that p is indeed prime. The number of points of e over $\Bbb$Fp is p + 1 - ap. e must be a medium or long vector of the type given by smallinitell or initell.

The library syntax is $\teb$apell(e, p).

apell2(e, p): compute the ap corresponding to the elliptic curve e and the prime number p as a sum of legendre symbols. This is slower than apell as soon as p is greater than 100, say. e must be a medium or long vector of the type given by smallinitell or initell.

The library syntax is $\teb$apell2(e, p).

chell(e, v): change the data for the elliptic curve e by changing the coordinates using the vector v=[u,r,s,t], i.e. if x' and y' are the new coordinates, then x = u2x' + r, y = u3y' + su2x' + t. The vector e must be a medium or long vector of the type given by smallinitell or initell.

The library syntax is $\teb$coordch(e, v).

chptell(x, v): change the coordinates of the point or vector of points x using the vector v=[u,r,s,t], i.e. if x' and y' are the new coordinates, then x = u2x' + r, y = u3y' + su2x' + t (see also chell above).

The library syntax is $\teb$pointch(x, v).

globalred(e): calculate the arithmetic conductor and the global minimal model of e. Here e is an elliptic curve given by a medium or long vector of the type given by smallinitell or initell, and is supposed to have all its coefficients ai in $\Bbb$Q. The result is a 2 component vector [N, v]. N is the arithmetic conductor of the curve, v is itself a vector [u, r, s, t] with rational components. It gives a coordinate change for e over $\Bbb$Q such that the resulting model has integral coefficients, is everywhere minimal, a1 is 0 or 1, a2 is 0, 1 or -1 and a3 is 0 or 1. Such a model is unique, and the vector v is unique if we specify that u is positive.

The library syntax is $\teb$globalreduction(e).

hell(e, z): global [*] of the point z on the elliptic curve e. The vector e must be a long vector of the type given by initell. This computation is done using sigma and theta-functions and a trick due to J. Silverman.

The library syntax is $\teb$ghell(e, z, prec). The archimedean contribution alone is given by the library function $\teb$hell(e, z, prec).

hell2(e, z): same as hell, except that the algorithm used is Tate's 4n algorithm, and is much slower.

The library syntax is $\teb$ghell2(e, z, prec).

initell(e): compute some fixed data concerning the elliptic curve given by the five component vector e, which will be essential for most further computations on the curve. The result is a 19-component vector E (called a long vector in this section), containing the following information:

The first 13 components contain

a1, a2, a3, a4, a6, b2, b4, b6, b8, c4, c6, Δ, j.

In particular, the discriminant is E[12], and the j-invariant is E[13].

For the other six components, their content depends on whether the curve is defined over $\Bbb$R or not.

When e is defined over $\Bbb$R, E[14] is a vector with three components containing the roots of the associated Weierstrass equation. If the roots are all real, then they are ordered by decreasing value. If only one is real, it is the first component of E[14].

E[15] is the real period of E (integral of dx/(2y + a1x + a3) over the connected component of the identity element of the real points of the curve), and E[16] is a complex period. In other words, ω1 = E[15] and ω2 = E[16] form a basis of the complex lattice defining e, with τ = ${\dfrac{{\omega_1}}{{\omega_2}}}$ having positive imaginary part.

E[17] and E[18] are the corresponding values η1 and η2 such that η1ω2 - η2ω1 = .

Finally, E[19] is the volume of the complex lattice defining e.

When e is defined over $\Bbb$Qp, the p-adic valuation of j must be negative. Then E[14] is the vector with a single component equal to the p-adic root of the associated Weierstrass equation corresponding to -1 under the Tate parametrization.

E[15] is equal to the square of the u-value, in the notation of Tate.

E[16] is the u-value itself, if it belongs to $\Bbb$Qp, otherwise zero.

E[17] is the value of Tate's q for the curve e.

E[18] is the value of Mestre's w (this is technical), and E[19] is arbitrarily set equal to zero.

For all other base fields or rings, the last six components are arbitrarily set equal to zero.

The library syntax is $\teb$initell(e, prec).

isoncurve(e, z): gives 1 (i.e. true) if the point z is on the elliptic curve e, 0 otherwise. Here e can be a five-component vector or a long vector.

The library syntax is $\teb$oncurve(e, z), and the result is a C-integer.

localred(e, p): calculate the Kodaira type of the local fiber of the elliptic curve e at the prime p. e must be given by a medium or long vector of the type given by smallinitell or initell, and is assumed to have all its coefficients ai in $\Bbb$Z. The result is a 3 component vector [f, kod, v]. Here f is the exponent of p in the arithmetic conductor of e, kod is the Kodaira type which is coded as follows: 1 means good reduction (type I0), 2, 3 and 4 mean types II, III and IV respectively, 4 + ν with ν > 0 means type Iν; finally the opposite values -1, -2, etc. refer to the starred types I0*, II*, etc. The third component v is itself a vector [u, r, s, t] giving the coordinate changes done during the local reduction. Normally, this has no use if u is 1, that is, if the given equation was already minimal.

The library syntax is $\teb$localreduction(e, p).

matell(e, x): here x is a vector of points, and this function outputs the Gram matrix of x with respect to the Néron-Tate height, in other words, the (i,j) component of the matrix is equal to (hell(e,x[i]+x[j])-hell(e,x[i])-hell(e,x[j]))/2, where x[i]+x[j] denotes of course the sum of the points on the curve e. The rank of this matrix, at least in some approximate sense, gives the rank of the set of points.

The library syntax is $\teb$matell(e, x, prec).

ordell(e, x): gives a 0, 1 or 2-component vector containing the y-coordinates of the points of the curve e having x as x-coordinate.

The library syntax is $\teb$ordell(e, x).

powell(e, n, z): computes n times the point z for the group law on the elliptic curve e. Here n is in $\Bbb$Z.

The library syntax is $\teb$powell(e, n, z).

smallinitell(e): compute some fixed data concerning the elliptic curve given by the five component vector e, which may be useful for further computations on the curve. The result is a 13-component vector E (called a medium vector in this section), containing the first 13 components of the vector given by initell, in other words the vector

[a1, a2, a3, a4, a6, b2, b4, b6, b8, c4, c6, Δ, j].

In particular, the discriminant is E[12], and the j-invariant is E[13].

The library syntax is $\teb$smallinitell(e).

subell(e, z1, z2): difference of the points z1 and z2 on the elliptic curve corresponding to the vector e.

The library syntax is $\teb$subell(e, z1, z2).

zell(e, z): If e is an elliptic curve with coefficients in $\Bbb$R, this computes a complex number t (modulo the lattice defining e) corresponding to the point z, i.e. such that, in the standard Weierstrass model, ℘(t) = z[1],℘'(t) = z[2]. If e has coefficients in $\Bbb$Qp, then either Tate's u is in $\Bbb$Qp, in which case the output is a p-adic number t corresponding to the point z under the Tate parametrization, or only its square is, in which case the output is t + 1/t. e must be a long vector of the type given by initell.

The library syntax is $\teb$zell(e, z, prec).