Functions related to elliptic curves

ellL1(e, r)

returns the value at s = 1 of the derivative of order r of the L-function of the elliptic curve e assuming that r is at most the order of vanishing of the L-function at s = 1. (The result is wrong if r is strictly larger than the order of vanishing at 1.)

? e = ellinit("11a1"); \\ order of vanishing is 0
 ? ellL1(e, 0)
 %2 = 0.2538418608559106843377589233
 ? e = ellinit("389a1");  \\ order of vanishing is 2
 ? ellL1(e, 0)
 %4 = -5.384067311837218089235032414 E-29
 ? ellL1(e, 1)
 %5 = 0
 ? ellL1(e, 2)
 %6 = 1.518633000576853540460385214

The main use of this function, after computing at low accuracy the order of vanishing using ellanalyticrank, is to compute the leading term at high accuracy to check (or use) the Birch and Swinnerton-Dyer conjecture:

? \p18
   realprecision = 18 significant digits
 ? ellanalyticrank(ellinit([0, 0, 1, -7, 6]))
 time = 32 ms.
 %1 = [3, 10.3910994007158041]
 ? \p200
   realprecision = 202 significant digits (200 digits displayed)
 ? ellL1(e, 3)
 time = 23,113 ms.
 %3 = 10.3910994007158041387518505103609170697263563756570092797[...]

The library syntax is GEN ellL1(GEN e, long r, long prec).




elladd(E,z1,z2)

sum of the points z1 and z2 on the elliptic curve corresponding to E.

The library syntax is GEN addell(GEN E, GEN z1, GEN z2).




ellak(E,n)

computes the coefficient a_n of the L-function of the elliptic curve E, i.e.in principle coefficients of a newform of weight 2 assuming Taniyama-Weil conjecture (which is now known to hold in full generality thanks to the work of Breuil, Conrad, Diamond, Taylor and Wiles). E must be a smallell as output by ellinit. For this function to work for every n and not just those prime to the conductor, E must be a minimal Weierstrass equation. If this is not the case, use the function ellminimalmodel before using ellak.

The library syntax is GEN akell(GEN E, GEN n).




ellan(E,n)

computes the vector of the first n a_k corresponding to the elliptic curve E. All comments in ellak description remain valid.

The library syntax is GEN anell(GEN E, long n).




ellanalyticrank(e, {eps})

returns the order of vanishing at s = 1 of the L-function of the elliptic curve e and the value of the first non-zero derivative. To determine this order, it is assumed that any value less than eps is zero. If no value of eps is given, a value of half the current precision is used.

? e = ellinit("11a1"); \\ rank 0
 ? ellanalyticrank(e)
 %2 = [0, 0.2538418608559106843377589233]
 ? e = ellinit("37a1"); \\ rank 1
 ? ellanalyticrank(e)
 %4 = [1, 0.3059997738340523018204836835]
 ? e = ellinit("389a1"); \\ rank 2
 ? ellanalyticrank(e)
 %6 = [2, 1.518633000576853540460385214]
 ? e = ellinit("5077a1"); \\ rank 3
 ? ellanalyticrank(e)
 %8 = [3, 10.39109940071580413875185035]

The library syntax is GEN ellanalyticrank(GEN e, GEN eps = NULL, long prec).




ellap(E,{p})

computes the trace of Frobenius a_p for the elliptic curve E and the prime number p. This is defined by the equation #E(F_p) = p+1 - a_p, where #E(F_p) stands for the number of points of the curve E over the finite field F_p.

No checking is done that p is indeed prime. E must be a smallell as output by ellinit, defined over Q, Q_p, or F_p. The prime p may be omitted if the curve was defined over F_p ( t_INTMOD coefficients) or Q_p ( t_PADIC coefficients). Otherwise the curve must be defined over Q, and p must be explicitly given. Over Q or Q_p, the equation is assumed to be minimal at p.

? E = ellinit([0,0,0,0,1]);  \\ defined over Q
 ? ellap(E, 3)  \\ 3 necessary here
 %2 = 0    \\ #E(F_3) = 3+1 - 0 = 4
 ? ellap(E, 7)
 %3 = -4   \\ #E(F_7) = 12
 
 ? E = ellinit([0,0,0,0,1] * Mod(1,11));  \\ defined over F_11
 ? ellap(E)       \\ no need to repeat 11
 %5 = 0
 ? ellap(E, 11)   \\ ... but it also works
 %6 = 0
 ? ellgroup(E, 13) \\ ouch, inconsistent input !
    ***   at top-level: ellap(E,13)
    ***                 ^-----------
    *** ellap: inconsistent moduli in Rg_to_Fp: 11, 13.

Algorithms used. If E/F_p has CM by a principal imaginary quadratic order we use an explicit formula (involving essentially Kronecker symbols and Cornacchia's algorithm, hence very fast: O(log p)^2). Otherwise, we use Shanks-Mestre's baby-step/giant-step method, which runs in time O(p^{1/4}) using O(p^{1/4}) storage, hence becomes unreasonable when p has about 30digits. If the seadata package is installed, the SEA algorithm becomes available and primes of the order of 200digits become feasible.

The library syntax is GEN ellap(GEN E, GEN p = NULL).




ellbil(E,z1,z2)

if z1 and z2 are points on the elliptic curve E, assumed to be integral given by a minimal model, this function computes the value of the canonical bilinear form on z1, z2: ( h(E,z1 +z2) - h(E,z1) - h(E,z2) ) / 2 where + denotes of course addition on E. In addition, z1 or z2 (but not both) can be vectors or matrices.

The library syntax is GEN bilhell(GEN E, GEN z1, GEN z2, long prec).




ellchangecurve(E,v)

changes 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 = u^2x'+r, y = u^3y'+su^2x'+t. E must be a smallell as output by ellinit.

The library syntax is GEN ellchangecurve(GEN E, GEN v).




ellchangepoint(x,v)

changes 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 = u^2x'+r, y = u^3y'+su^2x'+t (see also ellchangecurve).

The library syntax is GEN ellchangepoint(GEN x, GEN v). The reciprocal function GEN ellchangepointinv(GEN x, GEN ch) inverts the coordinate change.




ellconvertname(name)

converts an elliptic curve name, as found in the elldata database, from a string to a triplet [conductor, isogeny class, index]. It will also convert a triplet back to a curve name. Examples:

? ellconvertname("123b1")
 %1 = [123, 1, 1]
 ? ellconvertname(%)
 %2 = "123b1"

The library syntax is GEN ellconvertname(GEN name).




elldivpol(E,n,{v = 'x})

n-division polynomial for the curve E in the variable v.

The library syntax is GEN elldivpol(GEN E, long n, long v = -1), where v is a variable number.




elleisnum(E,k,{flag = 0})

E being an elliptic curve as output by ellinit (or, alternatively, given by a 2-component vector [omega_1,omega_2] representing its periods), and k being an even positive integer, computes the numerical value of the Eisenstein series of weight k at E, namely

(2i Pi/omega_2)^k (1 + 2/zeta(1-k) sum_{n >= 0} n^{k-1}q^n / (1-q^n)),

where q = exp(2iPi tau) and tau := omega_1/omega_2 belongs to the complex upper half-plane.

When flag is non-zero and k = 4 or 6, returns the elliptic invariants g_2 or g_3, such that y^2 = 4x^3 - g_2 x - g_3 is a Weierstrass equation for E.

The library syntax is GEN elleisnum(GEN E, long k, long flag, long prec).




elleta(om)

returns the quasi-periods [eta_1,eta_2] associated to the lattice basis om = [omega_1, omega_2]. Alternatively, om can be an elliptic curve E as output by ellinit, in which case, the quasi periods associated to the period lattice basis E.omega (namely, E.eta) are returned.

? elleta([1, I])
 %1 = [3.141592653589793238462643383, 9.424777960769379715387930149*I]

The library syntax is GEN elleta(GEN om, long prec).




ellgenerators(E)

returns a Z-basis of the free part of the Mordell-Weil group associated to E. This function depends on the elldata database being installed and referencing the curve, and so is only available for curves over Z of small conductors.

The library syntax is GEN ellgenerators(GEN E).




ellglobalred(E)

calculates the arithmetic conductor, the global minimal model of E and the global Tamagawa number c. E must be a smallell as output by ellinit, and is supposed to have all its coefficients a_i in Q. The result is a 3 component vector [N,v,c]. N is the arithmetic conductor of the curve. v gives the coordinate change for E over Q to the minimal integral model (see ellminimalmodel). Finally c is the product of the local Tamagawa numbers c_p, a quantity which enters in the \idx{Birch and Swinnerton-Dyer conjecture}.

The library syntax is GEN ellglobalred(GEN E).




ellgroup(E,{p})

computes the structure of the group E(F_p) ~ Z/d_1Z x Z/d_2Z, with d_2 | d_1. The prime p may be omitted if the curve was defined over F_p ( t_INTMOD coefficients) or Q_p ( t_PADIC coefficients). Otherwise the curve must be defined over Q, and p must be explicitly given. Over Q or Q_p, the equation is assumed to be minimal at p.

? E = ellinit([0,0,0,0,1]);  \\ defined over Q
 ? ellgroup(E, 3)  \\ 3 necessary here
 %2 = [4]    \\ cyclic
 ? ellgroup(E, 7)
 %3 = [6, 2] \\ non-cyclic
 
 ? E = ellinit([0,0,0,0,1] * Mod(1,11));  \\ defined over F_11
 ? ellgroup(E)   \\ no need to repeat 11
 %5 = [12]
 ? ellgroup(E, 11)   \\ ... but it also works
 %6 = [12]
 ? ellgroup(E, 13) \\ ouch, inconsistent input !
    ***   at top-level: ellgroup(E,13)
    ***                 ^--------------
    *** ellgroup: inconsistent moduli in Rg_to_Fp: 11, 13.

The library syntax is GEN ellgroup(GEN E, GEN p = NULL).




ellheight(E,x,{flag = 2})

global Néron-Tate height of the point z on the elliptic curve E (defined over Q), given by a standard minimal integral model. E must be an ell as output by ellinit. flag selects the algorithm used to compute the Archimedean local height. If flag = 0, this computation is done using sigma and theta-functions and a trick due to J.Silverman. If flag = 1, use Tate's 4^n algorithm. If flag = 2, use Mestre's AGM algorithm. The latter is much faster than the other two, both in theory (converges quadratically) and in practice.

The library syntax is GEN ellheight0(GEN E, GEN x, long flag, long prec). Also available is GEN ghell(GEN E, GEN x, long prec) (flag = 2).




ellheightmatrix(E,x)

x being a vector of points, 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 ellbil(E,x[i],x[j]). The rank of this matrix, at least in some approximate sense, gives the rank of the set of points, and if x is a basis of the Mordell-Weil group of E, its determinant is equal to the regulator of E. Note that this matrix should be divided by 2 to be in accordance with certain normalizations. E is assumed to be integral, given by a minimal model.

The library syntax is GEN mathell(GEN E, GEN x, long prec).




ellidentify(E)

look up the elliptic curve E (over Z) in the elldata database and return [[N, M, G], C] where N is the name of the curve in the J.E.Cremona database, M the minimal model, G a Z-basis of the free part of the Mordell-Weil group of E and C the coordinates change (see ellchangecurve).

The library syntax is GEN ellidentify(GEN E).




ellinit(x,{flag = 0})

initialize an ell structure, associated to the elliptic curve E. E is either a 5-component vector [a_1,a_2,a_3,a_4,a_6] defining the elliptic curve with Weierstrass equation Y^2 + a_1 XY + a_3 Y = X^3 + a_2 X^2 + a_4 X + a_6 or a string, in this case the coefficients of the curve with matching name are looked in the elldata database if available.

? E = ellinit([0,0,0,0,1]); \\ y^2 = x^3 + 1
 ? E = ellinit("36a1");      \\ the same curve, using Cremona's notations

For the time being, only curves over a prime field F_p and over the p-adic or real numbers (including rational numbers) are fully supported. Other domains are only supported for very basic operations such as point addition.

The result of ellinit is an ell structure by default, and a shorter sell if flag = 1. Both contain the following information in their components:

a_1,a_2,a_3,a_4,a_6,b_2,b_4,b_6,b_8,c_4,c_6,Delta,j.

All are accessible via member functions. In particular, the discriminant is E.disc, and the j-invariant is E.j.

The other six components are only present if flag is 0 or omitted, in which case the computation will be 10 (p-adic) to 200 (complex) times slower. Their content depends on whether the curve is defined over R or not:

* When E is defined over R, E.roots is a vector whose three components contain the roots of the right hand side of the associated Weierstrass equation. (y + a_1x/2 + a_3/2)^2 = g(x) If the roots are all real, they are ordered by decreasing value. If only one is real, it is the first component.

Then omega_1 = E.omega[1] is the real period of E (integral of dx/(2y+a_1x+a_3) over the connected component of the identity element of the real points of the curve), and omega_2 = E.omega[2] is a complex period. E.omega forms a basis of the complex lattice defining E, such that tau = (omega_1)/(omega_2) has positive imaginary part.

E.eta is a row vector containing the quasi-periods eta_1 and eta_2 such that eta_i = 2zeta(omega_i/2), where zeta is the Weierstrass zeta function associated to the period lattice (see ellzeta). In particular, the Legendre relation holds: eta_2omega_1 - eta_1omega_2 = 2iPi.

Finally, E.area is the volume of the complex lattice defining E.

* When E is defined over Q_p, the p-adic valuation of j must be negative. Then E.roots 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.tate yields the three-component vector [u^2,u,q], in the notations of Tate. If the u-component does not belong to Q_p, it is set to zero.

E.w is Mestre's w (this is technical).

For all other base fields or rings, the last six components are arbitrarily set to zero. See also the description of member functions related to elliptic curves at the beginning of this section.

The library syntax is GEN ellinit0(GEN x, long flag, long prec). Also available are GEN ellinit(GEN E, long prec) (flag = 0) and GEN smallellinit(GEN E, long prec) (flag = 1).




ellisoncurve(E,z)

gives 1 (i.e.true) if the point z is on the elliptic curve E, 0 otherwise. If E or z have imprecise coefficients, an attempt is made to take this into account, i.e.an imprecise equality is checked, not a precise one. It is allowed for z to be a vector of points in which case a vector (of the same type) is returned.

The library syntax is GEN ellisoncurve(GEN E, GEN z). Also available is int oncurve(GEN E, GEN z) which does not accept vectors of points.




ellj(x)

elliptic j-invariant. x must be a complex number with positive imaginary part, or convertible into a power series or a p-adic number with positive valuation.

The library syntax is GEN jell(GEN x, long prec).




elllocalred(E,p)

calculates the Kodaira type of the local fiber of the elliptic curve E at the prime p. E must be a smallell as output by ellinit, and is assumed to have all its coefficients a_i in Z. The result is a 4-component vector [f,kod,v,c]. Here f is the exponent of p in the arithmetic conductor of E, and kod is the Kodaira type which is coded as follows:

1 means good reduction (type I_0), 2, 3 and 4 mean types II, III and IV respectively, 4+nu with nu > 0 means type I_nu; finally the opposite values -1, -2, etc.refer to the starred types I_0^*, 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. Finally, the last component c is the local Tamagawa number c_p.

The library syntax is GEN elllocalred(GEN E, GEN p).




elllog(E,P,G,{o})

discrete logarithm of the point P of the elliptic curve E in base G. See znlog for the limitations of the underlying discrete log algorithms. If present, o represents the order of G, see Section [Label: se:DLfun]; the preferred format for this parameter is [N, factor(N)], where N is the order of G.

If no o is given, assume that G generates the curve. The function also assumes that P is a multiple of G.

? a = ffgen(ffinit(2,8),'a);
 ? E = ellinit([a,1,0,0,1]);  \\ over F_{2^8}
 ? x = a^3; y = ellordinate(E,x)[1];
 ? P = [x,y]; G = ellpow(E, P, 113);
 ? ord = [242, factor(242)]; \\ P generates a group of order 242. Initialize.
 ? ellorder(E, G, ord)
 %4 = 242
 ? e = elllog(E, P, G, ord)
 %5 = 15
 ? ellpow(E,G,e) == P
 %6 = 1

The library syntax is GEN elllog(GEN E, GEN P, GEN G, GEN o = NULL).




elllseries(E,s,{A = 1})

E being an sell as output by ellinit, this computes the value of the L-series of E at s. It is assumed that E is defined over Q, not necessarily minimal. The optional parameter A is a cutoff point for the integral, which must be chosen close to 1 for best speed. The result must be independent of A, so this allows some internal checking of the function.

Note that if the conductor of the curve is large, say greater than 10^{12}, this function will take an unreasonable amount of time since it uses an O(N^{1/2}) algorithm.

The library syntax is GEN elllseries(GEN E, GEN s, GEN A = NULL, long prec).




ellminimalmodel(E,{&v})

return the standard minimal integral model of the rational elliptic curve E. If present, sets v to the corresponding change of variables, which is a vector [u,r,s,t] with rational components. The return value is identical to that of ellchangecurve(E, v).

The resulting model has integral coefficients, is everywhere minimal, a_1 is 0 or 1, a_2 is 0, 1 or -1 and a_3 is 0 or 1. Such a model is unique, and the vector v is unique if we specify that u is positive, which we do.

The library syntax is GEN ellminimalmodel(GEN E, GEN *v = NULL).




ellmodulareqn(l,{x},{y})

return a vector [ eqn,t] where eqn is a modular equation of level l, for l < 500, l prime. This requires the package seadata to be installed. The equation is either of canonical type (t = 0) or of Atkin type (t = 1).

The library syntax is GEN ellmodulareqn(long l, long x = -1, long y = -1), where x, y are variable numbers.




ellorder(E,z,{o})

gives the order of the point z on the elliptic curve E. If the curve is defined over Q, return zero if the point has infinite order. The parameter o, if present, represents a non-zero multiple of the order of z, see Section [Label: se:DLfun]; the preferred format for this parameter is [ord, factor(ord)], where ord is the cardinality of the curve.

For a curve defined over F_p, it is very important to supply o since its computation is very expensive and should only be done once, using

? N = p+1-ellap(E,p); o = [N, factor(N)];
possibly using the seadata package; for a curve defined over a non-prime finite field, giving the order is mandatory since no function is available yet to compute the cardinality or trace of Frobenius in that case.

The library syntax is GEN ellorder(GEN E, GEN z, GEN o = NULL). The obsolete form GEN orderell(GEN e, GEN z) should no longer be used.




ellordinate(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 GEN ellordinate(GEN E, GEN x, long prec).




ellpointtoz(E,P)

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, wp(t) = z[1],wp'(t) = z[2]. In other words, this is the inverse function of ellztopoint. More precisely, if (w1,w2) are the real and complex periods of E, t is such that 0 <= Re(t) < w1 and 0 <= Im(t) < Im(w2).

If E has coefficients in Q_p, then either Tate's u is in Q_p, 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 an ell as output by ellinit.

The library syntax is GEN zell(GEN E, GEN P, long prec).




ellpow(E,z,n)

computes [n]z, where z is a point on the elliptic curve E. The exponent n is in Z, or may be a complex quadratic integer if the curve E has complex multiplication by n (if not, an error message is issued).

? Ei = ellinit([0,0,0,1,0]); z = [0,0];
 ? ellpow(Ei, z, 10)
 %2 = [0]     \\ unsurprising: z has order 2
 ? ellpow(Ei, z, I)
 %3 = [0, 0]  \\ Ei has complex multiplication by Z[i]
 ? ellpow(Ei, z, quadgen(-4))
 %4 = [0, 0]  \\ an alternative syntax for the same query
 ? Ej  = ellinit([0,0,0,0,1]); z = [-1,0];
 ? ellpow(Ej, z, I)
   ***   at top-level: ellpow(Ej,z,I)
   ***                 ^--------------
   *** ellpow: not a complex multiplication in powell.
 ? ellpow(Ej, z, 1+quadgen(-3))
 %6 = [1 - w, 0]

The simple-minded algorithm for the CM case assumes that we are in characteristic 0, and that the quadratic order to which n belongs has small discriminant.

The library syntax is GEN powell(GEN E, GEN z, GEN n).




ellrootno(E,{p = 1})

E being a smallell as output by ellinit, this computes the local (if p != 1) or global (if p = 1) root number of the L-series of the elliptic curve E. Note that the global root number is the sign of the functional equation and conjecturally is the parity of the rank of the Mordell-Weil group. The equation for E must have coefficients in Q but need not be minimal.

The library syntax is long ellrootno(GEN E, GEN p = NULL).




ellsearch(N)

if N is an integer, it is taken as a conductor else if N is a string, it can be a curve name ("11a1"), an isogeny class ("11a") or a conductor "11". This function finds all curves in the elldata database with the given property.

If N is a full curve name, the output format is [N, [a_1,a_2,a_3,a_4,a_6], G] where [a_1,a_2,a_3,a_4,a_6] are the coefficients of the Weierstrass equation of the curve and G is a Z-basis of the free part of the Mordell-Weil group associated to the curve.

If N is not a full-curve name, the output is a vector of all matching curves in the above format.

The library syntax is GEN ellsearch(GEN N). Also available is GEN ellsearchcurve(GEN N) that only accepts complete curve names.




ellsigma(E,z,{flag = 0})

E being given by ellinit, returns the value at z of the Weierstrass sigma function of the period lattice L of E: sigma(z, L) = z prod_{omega belongs to L^*} (1 - (z)/(omega))e^{(z)/(omega) + (z^2)/(2omega^2)} Alternatively, one can input a lattice basis [omega_1,omega_2] directly instead of E.

If flag = 1, computes an (arbitrary) determination of log(sigma(z)).

If flag = 2,3, same using the product expansion instead of theta series.

The library syntax is GEN ellsigma(GEN E, GEN z, long flag, long prec).




ellsub(E,z1,z2)

difference of the points z1 and z2 on the elliptic curve corresponding to E.

The library syntax is GEN subell(GEN E, GEN z1, GEN z2).




elltaniyama(E, {d = seriesprecision})

computes the modular parametrization of the elliptic curve E, where E is a smallell as output by ellinit, in the form of a two-component vector [u,v] of power series, given to d significant terms ( seriesprecision by default). This vector is characterized by the following two properties. First the point (x,y) = (u,v) satisfies the equation of the elliptic curve. Second, the differential du/(2v+a_1u+a_3) is equal to f(z)dz, a differential form on H/Gamma_0(N) where N is the conductor of the curve. The variable used in the power series for u and v is x, which is implicitly understood to be equal to exp(2iPi z). It is assumed that the curve is a strong Weil curve, and that the Manin constant is equal to 1. The equation of the curve E must be minimal (use ellminimalmodel to get a minimal equation).

The library syntax is GEN elltaniyama(GEN E, long precdl).




elltatepairing(E, P, Q, m)

Computes the Tate pairing of the two points P and Q on the elliptic curve E. The point P must be of m-torsion.

The library syntax is GEN elltatepairing(GEN E, GEN P, GEN Q, GEN m).




elltors(E,{flag = 0})

if E is an elliptic curve defined over Q, outputs the torsion subgroup of E as a 3-component vector [t,v1,v2], where t is the order of the torsion group, v1 gives the structure of the torsion group as a product of cyclic groups (sorted by decreasing order), and v2 gives generators for these cyclic groups. E must be an ell as output by ellinit.

?  E = ellinit([0,0,0,-1,0]);
 ?  elltors(E)
 %1 = [4, [2, 2], [[0, 0], [1, 0]]]

Here, the torsion subgroup is isomorphic to Z/2Z x Z/2Z, with generators [0,0] and [1,0].

If flag = 0, use Doud's algorithm: bound torsion by computing #E(F_p) for small primes of good reduction, then look for torsion points using Weierstrass parametrization (and Mazur's classification).

If flag = 1, use Lutz-Nagell (much slower), E is allowed to be a smallell.

The library syntax is GEN elltors0(GEN E, long flag). Also available is GEN elltors(GEN E) for elltors(E, 0).




ellweilpairing(E, P, Q, m)

Computes the Weil pairing of the two points of m-torsion P and Q on the elliptic curve E.

The library syntax is GEN ellweilpairing(GEN E, GEN P, GEN Q, GEN m).




ellwp(E,{z = x},{flag = 0},{d = seriesprecision})

Computes the value at z of the Weierstrass wp function attached to the elliptic curve E as given by ellinit (alternatively, E can be given as a lattice [omega_1,omega_2]).

If z is omitted or is a simple variable, computes the power series expansion in z (starting z^{-2}+O(z^2)). The series is given to d significant terms ( seriesprecision by default).

Optional flag is (for now) only taken into account when z is numeric, and means 0: compute only wp(z), 1: compute [wp(z),wp'(z)].

The library syntax is GEN ellwp0(GEN E, GEN z = NULL, long flag, long precdl, long prec). Also available is GEN weipell(GEN E, long precdl) for the power series.




ellzeta(E,z)

E being given by ellinit, returns the value at z of the Weierstrass zeta function of the period lattice L of E: zeta(z, L) = (1)/(z) + z^2sum_{omega belongs to L^*} (1)/(omega^2(z-omega)). Alternatively, one can input a lattice basis [omega_1,omega_2] directly instead of E.

? e = ellinit([0,0,0,1,0]);
 ? ellzeta(e, e.omega[1]/2)
 %2 = 0.8472130847939790866064991234 + 4.417621070 E-29*I
 ? 2*ellzeta([1,I], 1/2)
 %3 = 3.141592653589793238462643384 + 0.E-37*I

The quasi-periods of zeta, such that zeta(z + aomega_1 + bomega_2) = zeta(z) + aeta_1 + beta_2 for integers a and b are obtained directly as eta_i = 2zeta(omega_i/2) or using elleta.

The library syntax is GEN ellzeta(GEN E, GEN z, long prec).




ellztopoint(E,z)

E being an ell as output by ellinit, computes the coordinates [x,y] on the curve E corresponding to the complex number z. Hence this is the inverse function of ellpointtoz. In other words, if the curve is put in Weierstrass form, [x,y] represents the Weierstrass wp-function and its derivative. If z is in the lattice defining E over C, the result is the point at infinity [0].

The library syntax is GEN pointell(GEN E, GEN z, long prec).