Sharedwww / Tables / genus2reduction / js.gpOpen in CoCalc
Author: William A. Stein
1\\ First input the polynomial
2\\ p=a0*x^6+a1*x^5+a2*x^4+a3*x^3+a4*x^2+a5*x+a6
3
4\\ get coefficients of p
5a0=polcoeff(p, 6)
6a1=polcoeff(p, 5)
7a2=polcoeff(p, 4)
8a3=polcoeff(p, 3)
9a4=polcoeff(p, 2)
10a5=polcoeff(p, 1)
11a6=polcoeff(p, 0)
12
13\\ compute Igusa invariants
14
15print("Igusa invariants:")
16
17print("j2:")
18j2=(- 120*a0*a6 + 20*a1*a5 - 8*a2*a4 + 3*a3^2)/4
19
20print("j4:")
21j4=(2640*a0^2*a6^2  - 880*a0*a1*a5*a6 + 1312*a0*a2*a4*a6 - 400*a0*a2*a5^2- 672*a0*a3^2 *a6 + 240*a0*a3*a4*a5 - 64*a0*a4^3  - 400*a1^2*a4*a6+ 240*a1^2*a5^2  + 240*a1*a2*a3*a6 - 112*a1*a2*a4*a5 - 8*a1*a3^2*a5+ 16*a1*a3*a4^2 - 64*a2^3*a6 + 16*a2^2*a3*a5 + 16*a2^2*a4^2 - 16*a2*a3^2*a4 + 3*a3^4)/128
22
23print("I4:")
24I4=j2^2-2^3*3*j4
25
26print("j6:")
27j6= - (4000*a0^2*a3*a5^3  - 1600*a0^2*a4^2*a5^2- 1600*a0*a1*a2*a5^3  - 640*a0*a1*a3*a4*a5^2  + 384*a0*a1*a4^3*a5+ 640*a0*a2^2*a4*a5^2  - 80*a0*a2*a3^2*a5^2- 192*a0*a2*a3*a4^2*a5 + 48*a0*a3^3*a4*a5 + 4000*a1^3*a3*a6^2- 1600*a1^3*a4*a5*a6 + 320*a1^3*a5^3  - 1600*a1^2*a2^2*a6^2- 640*a1^2*a2*a3*a5*a6 + 640*a1^2*a2*a4^2*a6 - 64*a1^2*a2*a4*a5^2- 80*a1^2*a3^2*a4*a6 - 176*a1^2*a3^2*a5^2  + 224*a1^2*a3*a4^2*a5- 64*a1^2*a4^4  + 384*a1*a2^3*a5*a6 - 192*a1*a2^2*a3*a4*a6+ 224*a1*a2^2*a3*a5^2  - 128*a1*a2^2*a4^2*a5 + 48*a1*a2*a3^3*a6- 112*a1*a2*a3^2*a4*a5 + 64*a1*a2*a3*a4^3 + 28*a1*a3^4*a5- 16*a1*a3^3*a4^2 - 64*a2^4*a5^2  + 64*a2^3*a3*a4*a5- 16*a2^2*a3^3*a5 - 16*a2^2*a3^2*a4^2  + 8*a2*a3^4*a4 - a3^6)/1024+ 5*a0^3*a6^3 - (159/64)*a0^2*a6^2*a3^2 + (39/128)*a0*a3^4*a6- 4*a0*a6*(a0*a4^3  + a2^3*a6) - a0*a2*a4*a6*(14*a0*a6 - a2*a4)- 5*a0*a1*a5*a6*(8*a0*a6 + 7*a1*a5)/16+ 25*a0*a6*(a0*a2*a5^2 + a1^2*a4*a6)/4 - 51/8*a0*a1*a2*a4*a5*a6+ 165/16*a0*a3*a6*(a0*a4*a5 + a1*a2*a6)- 49/32*a0*a2*a3^2*a4*a6 + 41/16*a0*a3*a6*(a1*a4^2 + a2^2*a5)- 277/64*a0*a1*a3^2*a5*a6
28
29print("j8:")
30j8=(j2*j6-j4^2)/4
31
32print("j10:")
33if(a0, j10=poldisc(p)/2^12, j10=(a1)^2*poldisc(p)/2^12)
34
35print("I12:")
36I12=-2^3*j4^3+3^2*j2*j4*j6-3^3*j6^2-j2^2*j8
37