Igusa Invariants

\\ IGUSA INVARIANTS.
\\ Fernando Rodriguez Villegas
\\ villegas@math.princeton.edu
\\ April 1997

\\ The following gp functions compute the Igusa invariants of a sextic
\\ using the classical theory of invariants based on a paper
\\ by J.-F. Mestre. Though they seem to work fine I do not in any way
\\ guarantee their performance and made little efforts to maximize
\\ their efficiency. To use them save in a file *** and
\\ while running a gp session read it by typing \r ***.
\\ Please e-mail me any bugs, suggestions, or comments. Thanks.


\\ Notation as in Mestre's paper.
\\ Here f is a sextic in x,y (or equivalently a degree <= 6 polynomial
\\ in x). jinv(f) will return vector of J-invariants
\\ [J_2,J_4,J_6,J_8,J_10]


\\ For example: the sextics f1=4*(x^6-1) and f2= 4*(x^5-x)
\\ (corresponding to curves of genus 2 with many automorphisms)
\\ have:
\\ jinv(f1)=[480, 5280, -20480, -9427200, 11943936] and
\\ jinv(f2)=[-80, 480, 1280, -83200, -65536].
\\ For both the matrix matinv is identically zero.
\\ and its stable reduction at p is
\\ 2 irred comp crossing at a point, both smooth, j-inv [x,2] (i.e.
\\ j=0 for both elliptic curves) at p=2,3 and p=2 respectively.


{
jinv(f,r,
v,j2,j4,
j6,j8,j10)=
v=iginv(f,r);
j2=v[1]/8;j4=1/2^5/3*(4*j2^2-v[2]);
j6=1/2^6/9*(8*j2^3-160*j2*j4-v[3]);
j8=1/4*(j2*j6-j4^2);
j10=v[4]/2^12;
[j2,j4,j6,j8,j10]
}

part(f,n,m,g,j,k)=g=f;for(j=1,n,g=deriv(g,x));for(k=1,m,g=deriv(g,y));g

{
ub(fz,gz,k,
m,n,j,f,g)=m=fz[2];n=gz[2];
f=fz[1];g=gz[1];
f=(m-k)!*(n-k)!/m!/n!*
sum(0,j=0,k,
(-1)^j* bin(k,j)*part(f,j,k-j)*part(g,k-j,j)
);
m=m+n-2*k;
if(m,[f,m],f)
}

homog(pol)=pol=subst(pol,y,1);sum(0,n=0,6,coeff(pol,n)*x^n*y^(6-n))

{
clinv(f,r,
in,delt,
y1,y2,y3)=
f=homog(f));
if(r==0,r=1,);
f=[f,6];
in=ub(f,f,4);
delt=ub(in,in,2);
y1=ub(f,in,4);
y2=ub(in,y1,2);
y3=ub(in,y2,2);
simplify([ub(f,f,6)/r^2,ub(in,in,4)/r^4,ub(in,delt,4)/r^6,ub(y3,y1,2)/r^10])
}

{
iginv(f,r,
a,b,
v,c,d)=v=clinv(f,r);a=v[1];b=v[2];c=v[3];d=v[4];
[-120*a,-720*a^2+6750*b,8640*a^3-108000*a*b+202500*c,
-62208*a^5+972000*a^3*b+1620000*a^2*c-3037500*a*b^2
-6075000*b*c-4556250*d]
}


\\ Matrix giving conic (in cleaned-up form);
\\ v is a vector of J-invariants (i.e. jinv(f)) for some sextic f.
\\ This conic has a point over field of moduli iff the curve is
\\ definable over field of moduli (c.f. Mestre's paper).


{
matinv(v,
a,b,c,e)=
a=v[1];b=v[2];c=v[3];e=v[5];
[3*a^3 - 160*b*a - 3600*c,
-b*a^2 + 330*c*a + 160*b^2,
-c*a^2 -840*c*b - 8000*e;
-b*a^2 + 330*c*a + 160*b^2,
-25*c*a^2 - 8*b^2*a -120*c*b - 2000*e,
67*c*b*a + 600*e*a + 90*c^2;
-c*a^2 -840*c*b - 8000*e,
67*c*b*a + 600*e*a + 90*c^2,
-33*c^2*a -100*c*b^2 - 800*e*b]
}


\\ Invariants I_2,I_4,I_6,I_8,I_12 as defined by Q. Liu in
\\ Math Ann 295 (1993). Input is vector of J-invariants as input.

{
liuinv(v)=
[v[1]/12,
v[1]^2-24*v[2],
v[3],v[4],
-8*v[2]^3+9*v[1]*v[2]*v[3]-27*v[3]^2-v[1]^2*v[4]]
{


\\ Program to analize stable reduction of the genus 2 curve
\\ y^2=f(x,1), after Q. Liu, Math Ann 295.
\\ v is a vector of J-invariants (i.e. jinv(f)) for some sextic f.
\\ the j-invariant of elliptic curves appears as the factorization of
\\ its minimal polynomial over F_p.


{
redtp(v,
p,aux,r,u,vv,tst,uv,e,a,b,pol)=
u=v;
u[1]=v[1]/12;
u[2]=v[1]^2-8*3*v[2];
u=concat(u,-8*v[2]^3+9*v[1]*v[2]*v[3]-27*v[3]^2-v[1]^2*v[4]);
aux=factor(v[5]);
for(k=1,length(aux~),
p=aux[k,1];
if(p>0,
vv=v;uv=u;
for(k=1,5,vv[k]=if(v[k],valuation(v[k],p),10^10));
for(k=1,6,uv[k]=if(u[k],valuation(u[k],p),10^10));
if(p==2,e=4,if(p==3,e=3,e=1));
r=vv[5];
tst=prod(1,j=1,5,(vv[j]*5-j*r)>=0);
if(tst,
print(p," smooth"),
r=uv[6];
tst=prod(1,j=1,4,(vv[j]*6-j*r)>=0)*
((vv[5]*6-5*r)>0);
if(tst,
print(p," irred w/ double point, normaliz has j-inv: ",
(u[4]^3/u[6])%p),
r=uv[2];
tst=prod(1,j=1,4,(vv[j]*2-j*r)>=0)*
((vv[5]*2-5*r)>0)*
((uv[6]-3*r)>0)*
((vv[2]==r)||(vv[3]*2==3*r));
if(tst,
print(p," irred w/ 2 double points"),
tst=prod(1,j=2,5,((vv[j]*2-j*r)>0));
if(tst,
print(p," 2 P1's crossing transv at 3 pts"),
r=uv[e];
tst=((e*uv[2]-2*r)>0)*
((e*vv[5]-5*r)>0)*
((e*uv[6]-6*r)>0);
if(tst,
print1(p," 2 irred comp crossing at a point,");
a=u[2]^(3*e)/v[5]^e/u[e];
b=u[6]^e/v[5]^e/u[e];
if(valuation(a,p)>=0&&valuation(b,p)>=0,
print1(" both smooth, j-inv: ");
pol=mod(1,p)*x^2-mod(2^6*27+b,p)*x+mod(a,p);
print(lift(factor(pol)))
,);
if(((3*uv[2]-uv[6])>=0)&&
((e*vv[5]-e*uv[6]-r)>0),
print(" one comp smooth, j-inv: ",(u[2]^3/u[6])%p)
,);
if(((uv[6]-3*uv[2]*3)>0)&&
((e*vv[5]+r-3*e*uv[2])>0),
print(" no smooth comp")
,)
,print(p," what? ")
))))),))
}