Computing on the Jacobian of a genus 2 curve ============================================ The programs in this directory can be used to do computations on the Jacobian of a genus 2 curve. It mainly allows you to go between the analytic Jacobian (that is, the complex torus C^2/L, where L is the lattice generated by the columns of the period matrix) and the algebraic Jacobian. Points on the algebraic Jacobian are thought of as divisors on the curve. Most points on the Jacobian (of a genus 2 curve) can therefore be thought of as unordered pairs of points on the curve. For more details see the papers "Examples of genus two CM curves defined over the rationals", Math. Comp., vol. 68 (1999), no. 225, 307--320 and "Proving that a genus 2 curve has Complex Multiplication", Math. Comp. 68 (1999), no. 228, 1663--1677. Both of these are available at http://www.math.lsu.edu/~wamelen/publications.html These are mostly Mathematica programs. Some of the functions have options for making them a lot faster by using a C program (using the PARI library) to do the critical computations. If you need this speed you need to compile the C program, perint7.c. A) Installation ------------ All these programs will work using just Mathematica. In Mathematica just read in All.m (that is say SetDirectory["path/to/directory/containing/this/file"]; Get["All.m"]; ). It will work but it might be a bit slow. If you want to use the fast integration and theta function evaluations you need to compile perint7.c. This uses the Pari library (http://www.parigp-home.de/). To compile perint7.c copy the Makefile in the examples directory of the installation directory of the PARI-GP distribution to this directory. Edit the line TARGET = matexp to read TARGET = perint7 Then simply type "make dyn" to compile perint7.c Now all options to the functions below will work. B) Functions --------- Before you can use any of the other functions you need to initialize your curve. InitCurve ========= InitCurve[pol,pres,opts] computes analytic data for a genus 2 hyperelliptic curve given by y^2 = pol, where pol must be degree 5 or 6. The answer will be accurate to precision pres. The computed data is: {{rts,PerMat},rt6,a,b,{c,{int1,int2}}} where rts is the roots (in a specific order) of the quintic. Degree 6 is first converted to quintic. PerMat is the Period Matrix corresponding to the usual symplectic basis and the order of the roots as in rts. See Mumford, "Tata lectures on Theta II" rt6 is the root that goes to infinity if pol is degree 6. (0 otherwise) a is the leading term of pol. b is the leading term of the quintic. c is a point on the real axis to the right of all rts. int1 is the integral from c to +infinity of 1/Prod[Sqrt[x-rts[[i]]],{i,1,5}] int2 is the integral from c to +infinity of x/Prod[Sqrt[x-rts[[i]]],{i,1,5}] opts can be omitted or can be any of the following: IntegrationMethod -> NIntegrate - use Mathematica's NIntegrate. You can send options to NIntegrate by giving the optional argument "NIntegrateOptions" IntegrationMethod -> Gauss - use Gaussian Quadrature implemented in Mathematica. The default is 150 point quadrature, but you can use GaussN -> n, where n can be 30, 90 or 150. GaussN -> 30 allows precision up to 600. The others only 200. IntegrationMethod -> Pari - use Gaussian Quadrature implemented in Pari, this needs perint7.c to be compiled. This is fastest. Precision up to 500. Root2Infinity -> a - This only makes sense if pol is of degree 6 and then it should be an exact root of pol. This root is then mapped to infinity to get the quintic. If pol is degree 6 and this option is omitted a root will be chosen automatically. The default is IntegrationMethod -> Gauss and GaussN -> 30. tauFromPerM =========== tauFromPerM[PerM] returns the element tau of two dimensional Siegel upper half-space corresponding to the period matrix PerM. If the period matrix is given by (omega1, omega2) where omega1 and omega2 are 2x2 matrices, then tau = omega2^-1 * omega1. ToTorus ======= ToTorus[CurveData,{Px,Py},pres,opts] maps the point {Px,Py} to the analytic Jacobian, where Px and Py are the x and y coordinates of a point on y^2 = pol. pres is the required precision. CurveData should equal InitCurve[pol,pres], with pres at least as big as the precision used here. The analytic Jacobian is understood to be C^2/(1,tau). The IntegrationMethod option (as for InitCurve above) is understood. FromTorus ========= FromTorus[CurveData,z,pres,opts] maps the point z on the analytic Jacobian to algebraic Jacobian. The analytic Jacobian is understood as C^2/(1,tau). z should therefore be a length 2 column vector. The algebraic Jacobian is represented by the symmetric product of the curve with itself. The function therefore returns two points on the curve y^2 = pol in the form {{P1x,P1y},{P2x,P2y}}. pres is the required precision. CurveData should equal InitCurve[pol,pres], with pres at least as big as the precision used here. The IntegrationMethod option can be used and also the option ThetaMethod. ThetaMethod -> NSum - The 2 dimensional theta function values will be computed using Mathematica's Sum function. This is the default. ThetaMethod -> Pari - Theta functions will be computed by perint7.c This needs perint7.c to be compiled, see Installation. This is fastest. A) Example ------- See the Mathematica notebook Examples.nb