/* This code can be loaded, or copied and pasted, into Magma. It will load the data associated to the HMF, including the field, level, and Hecke and Atkin-Lehner eigenvalue data. At the *bottom* of the file, there is code to recreate the Hilbert modular form in Magma, by creating the HMF space and cutting out the corresponding Hecke irreducible subspace. From there, you can ask for more eigenvalues or modify as desired. It is commented out, as this computation may be lengthy. */ P := PolynomialRing(Rationals()); g := P![-27, -1, 1]; F := NumberField(g); ZF := Integers(F); NN := ideal; primesArray := [ [3, 3, -w + 6], [3, 3, w + 5], [4, 2, 2], [5, 5, -3*w + 17], [5, 5, -3*w - 14], [7, 7, w - 5], [7, 7, w + 4], [29, 29, -w - 7], [29, 29, -w + 8], [31, 31, -5*w + 28], [31, 31, -5*w - 23], [43, 43, 6*w + 29], [43, 43, -6*w + 35], [61, 61, 3*w - 19], [61, 61, -3*w - 16], [71, 71, -7*w - 34], [71, 71, 7*w - 41], [73, 73, 2*w - 7], [73, 73, -2*w - 5], [83, 83, -w - 10], [83, 83, w - 11], [89, 89, 3*w - 14], [89, 89, 3*w + 11], [97, 97, 3*w + 17], [97, 97, 3*w - 20], [109, 109, 2*w - 1], [113, 113, -3*w - 10], [113, 113, 3*w - 13], [121, 11, -11], [131, 131, 5*w - 31], [131, 131, -5*w - 26], [137, 137, -9*w - 41], [137, 137, 9*w - 50], [157, 157, -14*w + 79], [157, 157, 14*w + 65], [169, 13, -13], [173, 173, -3*w - 7], [173, 173, 3*w - 10], [191, 191, -10*w - 49], [191, 191, 10*w - 59], [193, 193, 22*w + 103], [193, 193, 22*w - 125], [197, 197, 6*w + 25], [197, 197, -6*w + 31], [211, 211, -4*w - 13], [211, 211, 4*w - 17], [223, 223, 8*w + 35], [223, 223, -8*w + 43], [227, 227, 9*w - 49], [227, 227, 9*w + 40], [233, 233, 3*w - 5], [233, 233, -3*w - 2], [239, 239, -3*w - 1], [239, 239, 3*w - 4], [263, 263, 33*w - 188], [263, 263, 33*w + 155], [281, 281, 8*w - 49], [281, 281, -8*w - 41], [289, 17, -17], [293, 293, 4*w - 29], [293, 293, 4*w + 25], [307, 307, 3*w - 25], [307, 307, -3*w - 22], [311, 311, -5*w - 29], [311, 311, 5*w - 34], [331, 331, 19*w + 88], [331, 331, -19*w + 107], [347, 347, 23*w - 133], [347, 347, 36*w - 205], [349, 349, 15*w - 88], [349, 349, -15*w - 73], [353, 353, -w - 19], [353, 353, w - 20], [361, 19, -19], [373, 373, 23*w - 130], [373, 373, 23*w + 107], [401, 401, -9*w + 47], [401, 401, 9*w + 38], [409, 409, 5*w - 19], [409, 409, -5*w - 14], [421, 421, -10*w + 53], [421, 421, 10*w + 43], [431, 431, -15*w - 68], [431, 431, 15*w - 83], [433, 433, 43*w - 245], [433, 433, 43*w + 202], [439, 439, 35*w - 199], [439, 439, 35*w + 164], [443, 443, 12*w + 53], [443, 443, 12*w - 65], [457, 457, 3*w - 28], [457, 457, -3*w - 25], [461, 461, 21*w - 118], [461, 461, 21*w + 97], [463, 463, -6*w - 35], [463, 463, 6*w - 41], [467, 467, 2*w - 25], [467, 467, -2*w - 23], [479, 479, -w - 22], [479, 479, w - 23], [499, 499, -5*w - 11], [499, 499, 5*w - 16], [509, 509, -5*w - 32], [509, 509, 5*w - 37], [523, 523, -7*w - 25], [523, 523, 7*w - 32], [529, 23, -23], [541, 541, 11*w + 47], [541, 541, -11*w + 58], [557, 557, 7*w - 47], [557, 557, -7*w - 40], [571, 571, -5*w - 8], [571, 571, 5*w - 13], [593, 593, -16*w - 79], [593, 593, 16*w - 95], [619, 619, 6*w - 43], [619, 619, 6*w + 37], [647, 647, -9*w + 44], [647, 647, -9*w - 35], [653, 653, -4*w - 31], [653, 653, 4*w - 35], [659, 659, 45*w + 211], [659, 659, 45*w - 256], [661, 661, 5*w - 7], [661, 661, -5*w - 2], [683, 683, 27*w + 125], [683, 683, -27*w + 152], [727, 727, -27*w - 130], [727, 727, 27*w - 157], [743, 743, 14*w - 85], [743, 743, -14*w - 71], [751, 751, 40*w + 187], [751, 751, 40*w - 227], [797, 797, -13*w - 67], [797, 797, 13*w - 80], [809, 809, -30*w + 169], [809, 809, 30*w + 139], [811, 811, 3*w - 34], [811, 811, -3*w - 31], [823, 823, -13*w + 68], [823, 823, 13*w + 55], [827, 827, 7*w - 50], [827, 827, 7*w + 43], [829, 829, -7*w - 19], [829, 829, 7*w - 26], [857, 857, -8*w - 47], [857, 857, 8*w - 55], [863, 863, -11*w + 70], [863, 863, -11*w - 59], [877, 877, -3*w - 32], [877, 877, 3*w - 35], [881, 881, -6*w - 7], [881, 881, 6*w - 13], [887, 887, -21*w - 95], [887, 887, 21*w - 116], [907, 907, 19*w - 104], [907, 907, 19*w + 85], [947, 947, 9*w - 40], [947, 947, -9*w - 31], [953, 953, 29*w + 140], [953, 953, -29*w + 169], [977, 977, 6*w - 5], [977, 977, 6*w - 1], [997, 997, -26*w - 119], [997, 997, 26*w - 145]]; primes := [ideal : I in primesArray]; heckePol := x; K := Rationals(); e := 1; heckeEigenvaluesArray := [0, 3, -1, 2, -1, 4, 1, 3, 0, 4, -5, -8, -2, 5, 2, 1, -8, -4, 2, 2, -16, -2, -14, 17, -13, 2, 18, -15, 13, 15, 15, 18, -6, -18, -6, -21, -2, 1, -18, -18, 10, 4, 15, 18, -16, -7, 16, 25, 17, 17, -8, 22, -23, 25, 7, -23, 6, -6, -16, 2, 29, -32, -5, 0, 15, 18, -21, -22, -4, 2, -22, 33, 24, -18, 29, 2, 27, 12, -30, -6, -10, 14, -3, 24, -8, 4, 6, 3, 33, 12, 8, -10, -20, -29, 24, -27, 32, 8, 10, 28, -29, 10, -21, 6, -15, 6, 26, 34, -11, 12, 39, 38, -19, 12, -21, -25, -16, -40, 11, 48, -6, -42, 30, -38, 34, 24, 0, 3, -6, -14, 52, -11, 10, -42, -18, -15, -18, -42, -12, 31, -32, 9, -39, 14, 32, 33, -12, 4, -2, 48, -18, -52, -10, -16, -43, 46, -17, 18, -48, 26, 14, 4, 7, 23, 53]; heckeEigenvalues := AssociativeArray(); for i := 1 to #heckeEigenvaluesArray do heckeEigenvalues[primes[i]] := heckeEigenvaluesArray[i]; end for; ALEigenvalues := AssociativeArray(); ALEigenvalues[ideal] := 1; // EXAMPLE: // pp := Factorization(2*ZF)[1][1]; // heckeEigenvalues[pp]; print "To reconstruct the Hilbert newform f, type f, iso := Explode(make_newform());"; function make_newform(); M := HilbertCuspForms(F, NN); S := NewSubspace(M); // SetVerbose("ModFrmHil", 1); NFD := NewformDecomposition(S); newforms := [* Eigenform(U) : U in NFD *]; if #newforms eq 0 then; print "No Hilbert newforms at this level"; return 0; end if; print "Testing ", #newforms, " possible newforms"; newforms := [* f: f in newforms | IsIsomorphic(BaseField(f), K) *]; print #newforms, " newforms have the correct Hecke field"; if #newforms eq 0 then; print "No Hilbert newform found with the correct Hecke field"; return 0; end if; autos := Automorphisms(K); xnewforms := [* *]; for f in newforms do; if K eq RationalField() then; Append(~xnewforms, [* f, autos[1] *]); else; flag, iso := IsIsomorphic(K,BaseField(f)); for a in autos do; Append(~xnewforms, [* f, a*iso *]); end for; end if; end for; newforms := xnewforms; for P in primes do; xnewforms := [* *]; for f_iso in newforms do; f, iso := Explode(f_iso); if HeckeEigenvalue(f,P) eq iso(heckeEigenvalues[P]) then; Append(~xnewforms, f_iso); end if; end for; newforms := xnewforms; if #newforms eq 0 then; print "No Hilbert newform found which matches the Hecke eigenvalues"; return 0; else if #newforms eq 1 then; print "success: unique match"; return newforms[1]; end if; end if; end for; print #newforms, "Hilbert newforms found which match the Hecke eigenvalues"; return newforms[1]; end function;