// Some useful defintitions Q4 := RMatrixSpace(Rationals(),4,4); Z4 := RMatrixSpace(IntegerRing(),4,4); KneserForm := Z4 ! [2,0,0,0,0,6,0,0,0,0,10,0,0,0,0,14]; //KneserHALF := Z4 ! [1,0,0,0,0,3,0,0,0,0,5,0,0,0,0,7]; Form6414 := Z4 ! [ 2, 0, 0, 0, 0, 4, 1, -1, 0, 1, 8, 3, 0, -1, 3, 62 ]; // ========================================================================= // Makes the Eisinstein series for the form Q (where Q2 = 2*Q) up to precision prec. function Make_Eisenstein_Series(Q2, prec) // Declare some variables Z := Integers(); Q := Rationals(); n := Nrows(Q2); ZZ := RMatrixSpace(Z, n, n); QQ := RMatrixSpace(Q, n, n); ThetaRing:=PowerSeriesRing(Q); // Make the Eisenstein series L2 := LatticeWithGram(Q2); Gen := GenusRepresentatives(L2); AvgTheta := &+[ThetaRing ! ThetaSeries(L, 2*prec) / #AutomorphismGroup(L) : L in Gen]; AvgAuto := &+[ 1 / #AutomorphismGroup(L) : L in Gen]; Eis2 := AvgTheta / AvgAuto; // Substitute x for x^2 everywhere Eis_half := ThetaRing ! [ Coefficient(Eis2, 2*i) : i in [0..Floor((AbsolutePrecision(Eis2) - 1)/2)]]; // Return the Eisenstein Series return Eis_half; end function; // Makes the Theta series for the form Q (where Q2 = 2*Q) up to precision prec. function Make_Theta_Series(Q2, prec) // Declare some variables Z := Integers(); Q := Rationals(); n := Nrows(Q2); ZZ := RMatrixSpace(Z, n, n); QQ := RMatrixSpace(Q, n, n); ThetaRing:=PowerSeriesRing(Q); // Make the Eisenstein series L2 := LatticeWithGram(Q2); Theta2 := ThetaRing ! ThetaSeries(L2, 2*prec); // Substitute x for x^2 everywhere Theta_half := ThetaRing ! [ Coefficient(Theta2, 2*i) : i in [0..Floor((AbsolutePrecision(Theta2) - 1)/2)]]; // Return the Eisenstein Series return Theta_half; end function;