Magma V2.12-22 Fri May 25 2007 20:58:56 on grobner2 [Seed = 1163145922] Type ? for help. Type -D to quit. > load "curve.magma"; Loading "curve.magma" > // The finite field is k = F_p, where p = 10^8 + 7 is the > // first prime greater than 10^8. > // FG, FG2 in the source file represent two sample elements > // of the Jacobian, corresponding to divisors D and D2 > // (more accurately, to the degree zero divisor classes > // [D-3P_infty] and [D2-3P_infty] ). > // > > FG; ( 31799142 90609133 49845484 24754428 79025059 84333687 80639977) > FG2; ( 76509637 62125676 24876255 68759361 64391863 63102834 450027) > //The values of a,...,f and the inverse ainv=1/a for each > //divisor. > // > > FGaddition := makeAddition(FG,FG2); > FGdoubling := makeDoubling(FG); > FGaddition; [ 25304965, 11184472, 25791031, 23473565, 8877183, 16260570, 53777877 ] > FGdoubling; [ 49729719, 44939260, 63843568, 3821943, 77472530, 73861271, 28756183 ] > //Just to show the form of the output. > // > // > > //Now start the verification in terms of polynomials, > //using the routines for ideals in polynomial rings > //that are built in to Magma. Along the way, we verify > //that various intermediate results are correct. > F:=getF(FG); > G:=getG(FG); > F2:=getF(FG2); > G2:=getG(FG2); > Faddition:=getF(FGaddition); > Gaddition:=getG(FGaddition); > Fdoubling:=getF(FGdoubling); > Gdoubling:=getG(FGdoubling); > F,G; x^2 + 90609133*x + 31799142*y + 49845484 x*y + 79025059*x + 24754428*y + 84333687 > F2,G2; x^2 + 62125676*x + 76509637*y + 24876255 x*y + 64391863*x + 68759361*y + 63102834 > Faddition,Gaddition; x^2 + 11184472*x + 25304965*y + 25791031 x*y + 8877183*x + 23473565*y + 16260570 > Fdoubling,Gdoubling; x^2 + 44939260*x + 49729719*y + 63843568 x*y + 77472530*x + 3821943*y + 73861271 > > > > I:=makeIdeal(FG); > I2:=makeIdeal(FG2); > //These are the ideals in the polynomial ring RR = k[x,y] > //generated by {F,G} and {F2,G2} respectively. > //Their images in the coordinate algebra RR/ of the > //affine open set C-{P_infty} are the elements vanishing > //on the divisors D and D2, respectively. > // > > IC := ideal; > //Thus the coordinate algebra is RR/IC, and all the ideals > //that we consider should contain IC. > // > > Iaddition:=makeIdeal(FGaddition); > Idoubling:=makeIdeal(FGdoubling); > Iinvaddition:=makeIdeal(makeInverse(FGaddition)); > Iinvdoubling:=makeIdeal(makeInverse(FGdoubling)); > //Make the ideals representing the sum and the double > //in the Jacobian. Also make the ideals of their > //inverses (this will be used for checking the result). > //For convenience later, let us write Daddition and Ddoubling > //for the degree three divisors representing the sum and > //the doubling in the Jacobian, respectively. Thus > // [Daddition-3P_infty] = [D-3P_infty] + [D2-3P_infty], > // [Ddoubling-3P_infty] = 2[D-3P_infty]. > //Similarly, we refer to the divisors Dinvaddition and > //Dinvdoubling, for which > // [Dinvaddition-3P_infty] = -[Daddition-3P_infty], > // [Dinvdoubling-3P_infty] = -[Ddoubling-3P_infty]. > // > > ff in I; true > ff in I2; true > Dimension(RR/I); 3 > Dimension(RR/I2); 3 > //check that the divisors D and D2 actually lie on the curve > //and are of degree 3. > > ff in I*I2; true > ff in I*I; false > Dimension(RR/(I*I2)); 6 > Dimension(RR/(I*I)); 9 > //Here I*I2 represents D+D2, which lies on the curve even > //when viewed as a dimension zero subscheme of the plane. > //This is because D and D2 are disjoint, as expected for > //typical divisors. > //However, I*I represents 2D as a dimension zero > //subscheme of the plane, and this is NOT on the curve. > //The reason is that the "double points" of D, when viewed > //on the plane, are "thicker" than the double points > //when viewed on C itself, which only extend along the > //tangent directions to C. (Double points in the plane > //extend along all tangent directions, i.e. with two > //"extra" dimensions of vanishing per double point.) > // > > ItimesI2 := I*I2; > ItimesI := I*I + IC; > Dimension(RR/ItimesI); 6 > //The correct answer is that one should consider the > //product (I/IC)*(I/IC) of ideals in the Dedekind > //domain RR/IC. The pullback to RR is then > //I*I + IC. On the other hand, I*I2 already contains IC. > // > > MprimeFGplusFG2:=makeMprimeForAddition(FG,FG2); > MprimeFGplusFG:=makeMprimeForDoubling(FG); > MprimeFGplusFG2; [ 24969229 21230853 16449562 56533505 98221980] [ 28483457 14633196 51480051 95068829 10038175] [ 55289512 55995074 32489333 47968166 26386033] > v1v2addition:=kernelOfMprime(MprimeFGplusFG2); > v1v2doubling:=kernelOfMprime(MprimeFGplusFG); > v1v2addition; [ 28669518, 62427515, 7586399, 43520424, 76536347, 46062824 ] > staddition:=makeCoefficientsOfst(FG,v1v2addition); > stdoubling:=makeCoefficientsOfst(FG,v1v2doubling); > staddition; [ 62182795, 27411945, 32672195, 30750122, 94339841, 42389357, 78763941, 74935950, 93047064, 339110, 99044234, 26514424 ] > //Make the pairs {s,t} in each case of addition > //and of doubling. We have shown the intermediate > //results for the case of addition. > // > > saddition:=gets(staddition); > taddition:=gett(staddition); > saddition, taddition; x^3 + 32672195*x^2 + 27411945*x*y + 94339841*x + 62182795*y^2 + 30750122*y + 42389357 x^2*y + 93047064*x^2 + 74935950*x*y + 99044234*x + 78763941*y^2 + 339110*y + 26514424 > saddition in ItimesI2; true > taddition in ItimesI2; true > ideal eq ItimesI2; true > //Check that the polynomials s,t actually belong > //to ItimesI2, and in fact that they generate ItimesI2 > //when we work in the quotient RR/IC. > // > > sdoubling:=gets(stdoubling); > tdoubling:=gett(stdoubling); > sdoubling, tdoubling; x^3 + 51176283*x^2 + 71390635*x*y + 18249360*x + 4391521*y^2 + 31068197*y + 45534456 x^2*y + 32719354*x^2 + 45608829*x*y + 77495044*x + 66317460*y^2 + 69710811*y + 9649398 > sdoubling in ItimesI; true > tdoubling in ItimesI; true > ideal eq ItimesI; true > //Same for sdoubling and tdoubling with ItimesI. > // > // > > //Now we verify the correctness of our answers. > (I*I2*Iinvaddition + IC) eq ideal; true > //Check that the principal ideal in RR/IC generated > //by saddition corresponds to the sum of divisors > // D + D2 + Dinvaddition. > //Thus the principal divisor of saddition on the > //curve C is > // (saddition) = D+D2+Dinvaddition - 9P_infty. > // > > (I*I*Iinvdoubling + IC) eq ideal; true > //Do the same for sdoubling. > // > > //Also verify that Daddition and Dinvaddition > //represent inverses of each other in the Jacobian. > //Similarly for doubling. > (Iaddition*Iinvaddition + IC) eq ideal; true > (Idoubling*Iinvdoubling + IC) eq ideal; true > //This is because the principal ideal in RR/IC generated > //by Faddition corresponds to Daddition + Dinvaddition. > //In terms of principal divisors on C, > // (Faddition) = Daddition + Dinvaddition - 6P_infty. > > quit; Total time: 0.829 seconds, Total memory usage: 3.24MB