i1 : kk=ZZ/10007;R=kk[x_0..x_7];
|
i3 : time (J,D,Pts)=getCanonicalCurveOfGenus8With2Torsion(R,20);
-- used 1.24501 seconds
|
i4 : betti J, dim J, codim J, degree J, genus J, apply(D,d->degree d)
0 1
o4 = (total: 1 15, 2, 6, 14, 8, {8, 8})
0: 1 .
1: . 15
o4 : Sequence
|
i5 : time (I,D,Pts)=addANodeAndExtend2Torsion(J,D,Pts);
-- used 8.94068 seconds
|
i6 : betti I, dim I, codim I, degree I, genus I, apply(D,e->degree e)
0 1
o6 = (total: 1 21, 2, 7, 16, 9, {22, 22})
0: 1 .
1: . 21
o6 : Sequence
|
i7 : (E,Pts1)=simplifyDivisor(I,D,Pts);
|
i8 : apply(E,e->degree e)
o8 = {9, 9}
o8 : List
|
i9 : #Pts,#Pts1
o9 = (18, 5)
o9 : Sequence
|
i10 : betti(J=prymCanonicalEmbedding(I,E)), dim J,codim J,degree J,genus J
0 1
o10 = (total: 1 12, 2, 6, 16, 9)
0: 1 .
1: . 12
o10 : Sequence
|
The key idea of the algoritm to compute a rational function g such that f(p)/f(q)*(g(p)/g(q))2 = 1. The function g can be obtained from any pencil of homogeneous forms via a suitable fractional transformation. We compute suitable linear forms g0,g1 such that g=g0/g1 has the desired property and replace Di by Ei+gi.C for i=0,1. The curve C’ is simply the image of C under |KC+p+q|. The divisor representative E0,E1 of the divisor class E0-E1 can be simplified by imposing common base points in both |Ei|. This can be carried out with the function "simplifyDivisor", but it is not in the current routine "addANodeAndExtend2Torsion".