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
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
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
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 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
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
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
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
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 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
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
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
ghell(e, z, prec). The archimedean contribution
alone is given by the library function
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
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
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 R or not.
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
τ = having positive imaginary part.
E[17] and E[18] are the corresponding values η1 and η2 such that η1ω2 - η2ω1 = iπ.
Finally, E[19] is the volume of the complex lattice defining e.
When e is defined overE[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 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
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
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 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
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
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
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 Z.
The library syntax is
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
In particular, the discriminant is E[12], and the j-invariant is E[13].
The library syntax is
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
subell(e, z1, z2).
zell(e, z): If e is an elliptic curve with coefficients in
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
Qp, then either Tate's u is in
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
zell(e, z, prec).