\\ --------------- GP code --------------------------------------- \\ \\ Time-stamp: \\ \\ Description: Routines for computing invariants associated of a \\ degree 6 polynomial polynomial \\ \\ \\ Original Authors: Fernando Rodriguez-Villegas \\ villegas@math.utexas.edu \\ University of Texas at Austin \\ \\ \\ Created: Wed Feb 12 2000 \\ \\---------------------------------------------------------------------- \\ This implementation is based on \\ Mestre, Jean-Francois Construction de courbes de \\ genre $2$ a partir de leurs modules. (French) [Constructing genus-$2$ \\ curves from their moduli] Effective methods in algebraic geometry \\ (Castiglioncello, 1990), 313--334, Progr. Math., 94, Birkhauser \\ Boston, Boston, MA, 1991. \\ and \\ Liu, Qing Courbes stables de genre $2$ et leur schema de \\ modules. (French) [Stable curves of genus $2$ and their moduli scheme] \\ Math. Ann. 295 (1993), no. 2, 201--222 \\====================================================================== \\ Igusa invariants of sextic f (r is optional; it scales J_{2k} \\ by r^{-2k}) jinv(f,r)= {local(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] } \\---------------------------------------------------------------------- \\ Given a polynomial f in 2 variables (x and y) computes the n-th \\ derivative with respect to x, and the m-th derivative respect to y. 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 \\---------------------------------------------------------------------- \\ Uberschiebung ub(fz,gz,k)= {local(m,n,f,g); m=fz[2];n=gz[2]; f=fz[1];g=gz[1]; f=(m-k)!*(n-k)!/m!/n!* sum(j=0,k, (-1)^j* binomial(k,j)*part(f,j,k-j)*part(g,k-j,j) ,0); m=m+n-2*k; if(m,[f,m],f) } \\---------------------------------------------------------------------- \\ Homogenizes the polynomial respect the y variable homog(pol)=pol=subst(pol,y,1);sum(n=0,6,polcoeff(pol,n)*x^n*y^(6-n),0) \\---------------------------------------------------------------------- \\ Clebsch invariants (only needed as intermediate step) clinv(f,r)= {local(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]) } \\---------------------------------------------------------------------- \\ Another intermediate step iginv(f,r)= {local(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)= {local(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] } \\---------------------------------------------------------------------- \\ Given a non-degenerate 3 by 3 symmetric matrix with rational \\ entries compute the list of primes for which the corresponding \\ conic does not have a rational point locally (including 0 as the \\ infinite prime). The length of the answer should be even. hilbertlist(m)= {local(u,a,b,p,pl,fdis); m=qfgaussred(m);u=[]; a=-m[2,2]/m[1,1]; b=-m[3,3]/m[1,1]; pl=[0,2]; fdis=factor(abs(a*b)/gcd(a,b)); for(k=1,length(fdis~), if(fdis[k,2]%2&&fdis[k,1]>2,pl=concat(pl,fdis[k,1]))); for(k=1,length(pl), if(hilbert(a,b,pl[k])==-1,u=concat(u,pl[k]),)); u } \\---------------------------------------------------------------------- \\ Invariants I_2,I_4,I_6,I_8,I_12 as defined by Q. Liu's paper. \\ Input is vector of J-invariants. 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 \\ 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)= {local(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(j=1,5,(vv[j]*5-j*r)>=0,1); if(tst, print(p," smooth"), r=uv[6]; tst=prod(j=1,4,(vv[j]*6-j*r)>=0,1)* ((vv[5]*6-5*r)>0); if(tst, print(p," irreducible with double point, normalized has j-inv: ", (u[4]^3/u[6])%p), r=uv[2]; tst=prod(j=1,4,(vv[j]*2-j*r)>=0,1)* ((vv[5]*2-5*r)>0)* ((uv[6]-3*r)>0)* ((vv[2]==r)||(vv[3]*2==3*r)); if(tst, print(p," irreducible with 2 double points"), tst=prod(j=2,5,((vv[j]*2-j*r)>0),1); if(tst, print(p," 2 P1's crossing transversal 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 irreducible components 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 component 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 component") ,) ,print(p," what? ") ))))),)) } \\---------------------------------------------------------------------- \\ Equation for Humbert surface for H_5 according \\ to van der Geer (slightly modified) and using \\ Igusa's expression of the forms psi4, psi6, chi10, and chi12 (in his \\ notation) in terms of the invariants A',B',C', and D' (as denoted by \\ Mestre) given here, in turn, in terms of the J-invariants. humb5un(v)=psi4=v[1]^2-24*v[2];\ psi6=v[1]^3-36*v[1]*v[2]+216*v[3];\ chi10=-v[5]/4;\ chi12=-v[1]*v[5]/12;\ (2^12*3^6*chi12+psi6^2+psi4^3)^2-4*psi4*(-2^12*3^5*chi10+psi4*psi6)^2 \\---------------------------------------------------------------------- \\ Normalized version (i.e. primitive in all J's). humb5(v)=humb5un(v)/2^12/3^6 \\---------------------------------------------------------------------- \\ Equation for Humbert surface H_4 \\ v must be jinv of f; humb4(v) gives normalized \\ determinant of the matrix matinv(v) (i.e. integral primitive in \\ J_2, ..., J_10) humb4(v)= {local(a,b,c,e); a=v[1];b=v[2];c=v[3];e=v[5];\ 1/16*c^3*a^6 + (-1/8*c^2*b^2 - 9/2*e*c*b - 27*e^2)*a^5 +\ (1/16*c*b^4 + 1/2*e*b^3 - 9/2*c^3*b - 3*e*c^2)*a^4 +\ (17/2*c^2*b^3 + 301*e*c*b^2 + 1800*e^2*b + 27/2*c^4)*a^3 +\ (-4*c*b^5 - 32*e*b^4 + 135/2*c^3*b^2 - 810*e*c^2*b - 6000*e^2*c)*a^2 +\ (-144*c^2*b^4 - 5280*e*c*b^3 - 32000*e^2*b^2 - 486*c^4*b - 8100*e*c^3)*a +\ (64*c*b^6 + 512*e*b^5 + 432*c^3*b^3 + 43200*e*c^2*b^2 + 720000*e^2*c*b +\ (729*c^5 + 3200000*e^3))} \\---------------------------------------------------------------------- {helpinv()= print("-------------------------------------------------------------------"); print(" Computational number Theory "); print("-------------------------------------------------------------------"); print(""); print("Description: Routines for computing the Igusa invariants of a sextic"); print(""); print("Original Author: Fernando Rodriguez-Villegas"); print(" villegas@math.utexas.edu"); print(" University of Texas at Austin"); print(""); print("With the assistance of: Ariel Pacetti"); print(" apacetti@math.utexas.edu"); print(" University of Texas at Austin"); print("-------------------------------------------------------------------"); print(""); print("Help functions"); print(""); print("helpjinv helpclinv helpmatinv helpliuinv helpredtp"); print("helphumb5 helphumb4"); print(""); } addhelp(jinv,"Computes the Igusa invariants of sextic f (scaled by r, optional)") addhelp(clinv,"Computes the Clebsch invariants, which are used by jinv") addhelp(matinv,"answers Matrix giving a Mestre's conic (in cleaned-up form). The input 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).") addhelp(liuinv,"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.") addhelp(redtp,"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.") addhelp(humb5,"Equation for Humbert surface for H_5 according to van der Geer (slightly modified) and using Igusa's expression of the forms psi4, psi6, chi10, and chi12 (in his notation) in terms of the invariants A',B',C', and D' (as denoted by Mestre) given here, in turn, in terms of the J-invariants.") addhelp(humb4,"Equation for Humbert surface H_4 v must be jinv of f; h4norm(v) gives normalized determinant of the matrix matinv(v) (i.e. integral primitive in J_2, ..., J_10)")