/* 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![29, 8, -12, -1, 1]; F := NumberField(g); ZF := Integers(F); NN := ideal; primesArray := [ [5, 5, -w + 2], [5, 5, -3/5*w^3 - w^2 + 26/5*w + 42/5], [9, 3, 2/5*w^3 - 19/5*w - 3/5], [9, 3, -1/5*w^3 + 2/5*w + 4/5], [11, 11, -2/5*w^3 - w^2 + 14/5*w + 28/5], [11, 11, 1/5*w^3 - w^2 - 7/5*w + 36/5], [16, 2, 2], [29, 29, -w], [29, 29, 1/5*w^3 - 12/5*w + 1/5], [41, 41, -2/5*w^3 - w^2 + 14/5*w + 38/5], [41, 41, -w^2 + 10], [41, 41, 11/5*w^3 + 3*w^2 - 102/5*w - 149/5], [41, 41, -1/5*w^3 + w^2 + 7/5*w - 26/5], [49, 7, 1/5*w^3 + w^2 - 12/5*w - 19/5], [49, 7, 1/5*w^3 + w^2 - 12/5*w - 44/5], [59, 59, -4/5*w^3 - w^2 + 33/5*w + 36/5], [59, 59, -2*w^3 - 3*w^2 + 17*w + 26], [61, 61, -1/5*w^3 + w^2 + 12/5*w - 51/5], [61, 61, 4/5*w^3 + w^2 - 28/5*w - 41/5], [71, 71, 1/5*w^3 + w^2 - 7/5*w - 49/5], [71, 71, -2*w^3 - 3*w^2 + 18*w + 28], [89, 89, -3/5*w^3 + 16/5*w + 7/5], [89, 89, 3/5*w^3 + w^2 - 26/5*w - 57/5], [121, 11, -3/5*w^3 + 21/5*w + 2/5], [131, 131, w^2 - w - 8], [131, 131, 2/5*w^3 + w^2 - 19/5*w - 23/5], [149, 149, 2/5*w^3 - w^2 - 14/5*w + 22/5], [149, 149, 3/5*w^3 + w^2 - 21/5*w - 42/5], [179, 179, -6/5*w^3 - w^2 + 57/5*w + 69/5], [179, 179, -2/5*w^3 - 2*w^2 + 14/5*w + 73/5], [179, 179, 2*w^2 - 11], [179, 179, -3/5*w^3 + 2*w^2 + 16/5*w - 48/5], [181, 181, -7/5*w^3 - 2*w^2 + 59/5*w + 78/5], [181, 181, -2/5*w^3 + 24/5*w - 27/5], [191, 191, -3/5*w^3 + 2*w^2 + 21/5*w - 78/5], [191, 191, 2/5*w^3 - 2*w^2 - 9/5*w + 57/5], [199, 199, -1/5*w^3 + 17/5*w - 16/5], [199, 199, 1/5*w^3 - 17/5*w - 14/5], [211, 211, 2/5*w^3 - w^2 + 1/5*w + 7/5], [211, 211, -1/5*w^3 + w^2 - 3/5*w - 26/5], [211, 211, 4/5*w^3 + w^2 - 38/5*w - 36/5], [211, 211, -1/5*w^3 - 2*w^2 + 7/5*w + 44/5], [239, 239, 3/5*w^3 + w^2 - 16/5*w - 37/5], [239, 239, 2/5*w^3 + w^2 - 14/5*w - 53/5], [251, 251, 2/5*w^3 - 24/5*w - 13/5], [251, 251, 2*w - 3], [251, 251, w^2 + w - 10], [251, 251, -4/5*w^3 - w^2 + 28/5*w + 46/5], [269, 269, 1/5*w^3 - 12/5*w - 24/5], [269, 269, w - 5], [271, 271, -3/5*w^3 + 31/5*w - 33/5], [271, 271, -8/5*w^3 - 2*w^2 + 66/5*w + 77/5], [281, 281, 4/5*w^3 - w^2 - 38/5*w + 39/5], [281, 281, -14/5*w^3 - 3*w^2 + 128/5*w + 161/5], [311, 311, 1/5*w^3 - 2*w^2 - 2/5*w + 51/5], [311, 311, 1/5*w^3 - w^2 - 17/5*w + 21/5], [331, 331, 1/5*w^3 + 3/5*w - 4/5], [331, 331, 3/5*w^3 - 31/5*w - 2/5], [359, 359, -w^3 + 6*w - 1], [359, 359, -6/5*w^3 + 47/5*w - 6/5], [359, 359, 3/5*w^3 + w^2 - 31/5*w - 27/5], [359, 359, 3/5*w^3 + w^2 - 26/5*w - 22/5], [361, 19, 4/5*w^3 - 28/5*w - 11/5], [361, 19, 1/5*w^3 - 7/5*w - 24/5], [379, 379, 9/5*w^3 + 3*w^2 - 78/5*w - 121/5], [379, 379, -4/5*w^3 + 3*w^2 + 28/5*w - 99/5], [389, 389, -3/5*w^3 - 2*w^2 + 26/5*w + 42/5], [389, 389, -2*w^2 + w + 17], [401, 401, 4/5*w^3 - w^2 - 23/5*w + 24/5], [401, 401, 3/5*w^3 + w^2 - 26/5*w - 7/5], [401, 401, -4/5*w^3 - w^2 + 38/5*w + 66/5], [401, 401, 6/5*w^3 + w^2 - 52/5*w - 39/5], [409, 409, -6/5*w^3 + 52/5*w + 19/5], [409, 409, 1/5*w^3 + 2*w^2 - 7/5*w - 39/5], [421, 421, -1/5*w^3 - w^2 + 17/5*w + 44/5], [421, 421, 2/5*w^3 + w^2 - 24/5*w - 18/5], [431, 431, -3/5*w^3 - w^2 + 36/5*w + 47/5], [431, 431, -13/5*w^3 - 4*w^2 + 116/5*w + 182/5], [431, 431, -2/5*w^3 + w^2 + 24/5*w - 47/5], [431, 431, 2/5*w^3 - w^2 + 6/5*w - 8/5], [439, 439, 6/5*w^3 + w^2 - 47/5*w - 49/5], [439, 439, -2/5*w^3 + 2*w^2 + 9/5*w - 42/5], [439, 439, 4/5*w^3 - w^2 - 23/5*w + 14/5], [439, 439, -w^3 - 2*w^2 + 8*w + 17], [461, 461, w^3 + w^2 - 10*w - 9], [461, 461, -2*w^3 - 3*w^2 + 17*w + 27], [461, 461, -1/5*w^3 + w^2 - 8/5*w - 16/5], [461, 461, -3*w^3 - 4*w^2 + 26*w + 35], [479, 479, 2*w - 1], [479, 479, 2/5*w^3 - 24/5*w - 3/5], [491, 491, w^3 - 2*w^2 - 6*w + 11], [491, 491, w^3 + w^2 - 10*w - 15], [499, 499, -1/5*w^3 + 2*w^2 + 2/5*w - 36/5], [499, 499, 4/5*w^3 + 2*w^2 - 33/5*w - 91/5], [509, 509, 8/5*w^3 + w^2 - 66/5*w - 42/5], [509, 509, 1/5*w^3 - 2*w^2 + 8/5*w + 16/5], [521, 521, w^3 - 9*w - 4], [521, 521, 3/5*w^3 + w^2 - 16/5*w - 42/5], [521, 521, 3/5*w^3 - w^2 - 26/5*w + 23/5], [521, 521, -3/5*w^3 + 11/5*w + 22/5], [529, 23, 3/5*w^3 + w^2 - 36/5*w - 62/5], [529, 23, -4/5*w^3 + 2*w^2 + 23/5*w - 64/5], [541, 541, -w^3 - w^2 + 9*w + 7], [541, 541, 1/5*w^3 + 2*w^2 - 7/5*w - 64/5], [541, 541, 3/5*w^3 + w^2 - 26/5*w - 12/5], [571, 571, -w^3 - w^2 + 6*w + 9], [571, 571, -w^3 + w^2 + 8*w - 4], [619, 619, -w^3 - 2*w^2 + 8*w + 11], [619, 619, -2/5*w^3 + 2*w^2 + 9/5*w - 72/5], [619, 619, 2/5*w^3 - 2*w^2 - 4/5*w + 57/5], [619, 619, -6/5*w^3 - 2*w^2 + 52/5*w + 69/5], [631, 631, 1/5*w^3 + w^2 + 3/5*w - 24/5], [631, 631, 2/5*w^3 - w^2 - 24/5*w + 42/5], [659, 659, -13/5*w^3 - 4*w^2 + 111/5*w + 177/5], [659, 659, -11/5*w^3 - 3*w^2 + 92/5*w + 119/5], [659, 659, -8/5*w^3 - w^2 + 61/5*w + 27/5], [659, 659, -8/5*w^3 + 71/5*w + 2/5], [661, 661, -w^3 - w^2 + 7*w + 11], [661, 661, 4/5*w^3 - w^2 - 28/5*w + 9/5], [691, 691, 1/5*w^3 - w^2 - 17/5*w + 41/5], [691, 691, 3/5*w^3 + 2*w^2 - 26/5*w - 67/5], [701, 701, 12/5*w^3 + 4*w^2 - 99/5*w - 158/5], [701, 701, -17/5*w^3 - 4*w^2 + 149/5*w + 193/5], [709, 709, -1/5*w^3 + w^2 + 12/5*w - 6/5], [709, 709, 1/5*w^3 + w^2 - 2/5*w - 59/5], [719, 719, 2/5*w^3 + w^2 - 29/5*w - 8/5], [719, 719, -w^3 + w^2 + 7*w - 4], [719, 719, 6/5*w^3 + w^2 - 42/5*w - 44/5], [719, 719, -2/5*w^3 - w^2 + 29/5*w + 53/5], [739, 739, 14/5*w^3 + 4*w^2 - 123/5*w - 171/5], [739, 739, -1/5*w^3 + 2*w^2 + 12/5*w - 56/5], [739, 739, -6/5*w^3 + 3*w^2 + 37/5*w - 96/5], [739, 739, 2/5*w^3 + 2*w^2 - 9/5*w - 73/5], [751, 751, -9/5*w^3 - 2*w^2 + 73/5*w + 86/5], [751, 751, -w^3 + 2*w^2 + 5*w - 8], [761, 761, 1/5*w^3 + w^2 - 22/5*w + 16/5], [761, 761, -16/5*w^3 - 4*w^2 + 147/5*w + 214/5], [769, 769, 13/5*w^3 + 3*w^2 - 121/5*w - 172/5], [769, 769, 3/5*w^3 - w^2 - 41/5*w + 78/5], [769, 769, -12/5*w^3 - 4*w^2 + 99/5*w + 153/5], [769, 769, -6/5*w^3 + 3*w^2 + 27/5*w - 61/5], [809, 809, 1/5*w^3 + 3*w^2 - 22/5*w - 104/5], [809, 809, w^3 + 3*w^2 - 10*w - 17], [811, 811, -5*w + 11], [811, 811, -16/5*w^3 - 5*w^2 + 137/5*w + 214/5], [821, 821, -1/5*w^3 + w^2 + 17/5*w - 36/5], [821, 821, w^2 + 2*w - 6], [829, 829, 3*w^2 + w - 17], [829, 829, 2/5*w^3 + 3*w^2 - 9/5*w - 108/5], [841, 29, w^3 - 7*w - 3], [859, 859, 6/5*w^3 + w^2 - 37/5*w - 34/5], [859, 859, 2/5*w^3 + w^2 - 14/5*w - 68/5], [881, 881, 1/5*w^3 + 2*w^2 - 17/5*w - 79/5], [881, 881, 3/5*w^3 + 2*w^2 - 31/5*w - 47/5], [911, 911, 4/5*w^3 - 3*w^2 - 28/5*w + 89/5], [911, 911, 1/5*w^3 - w^2 - 7/5*w + 61/5], [911, 911, w^3 - 6*w - 3], [911, 911, -11/5*w^3 - 3*w^2 + 92/5*w + 139/5], [919, 919, 7/5*w^3 + 2*w^2 - 54/5*w - 88/5], [919, 919, 4/5*w^3 - 2*w^2 - 23/5*w + 39/5], [929, 929, -7/5*w^3 + w^2 + 54/5*w - 17/5], [929, 929, -1/5*w^3 + w^2 + 22/5*w - 71/5], [941, 941, 9/5*w^3 + w^2 - 73/5*w - 31/5], [941, 941, 1/5*w^3 - w^2 - 2/5*w + 66/5], [941, 941, 2/5*w^3 + 2*w^2 - 19/5*w - 103/5], [941, 941, -w^3 + w^2 + 5*w - 3], [961, 31, w^3 - 7*w - 2], [961, 31, 2/5*w^3 - 14/5*w - 33/5], [971, 971, -2/5*w^3 - 2*w^2 + 24/5*w + 93/5], [971, 971, 2/5*w^3 + 2*w^2 - 24/5*w - 33/5], [991, 991, -w^3 + 2*w^2 + 7*w - 10], [991, 991, -7/5*w^3 - 2*w^2 + 49/5*w + 78/5]]; primes := [ideal : I in primesArray]; heckePol := x^4 - 2*x^3 - 6*x^2 + 2*x + 1; K := NumberField(heckePol); heckeEigenvaluesArray := [e, -1/2*e^3 + 3/2*e^2 + 3/2*e - 5/2, 0, -1/2*e^3 + 3/2*e^2 + 1/2*e - 5/2, 1, 1/2*e^3 - 3/2*e^2 - 3/2*e + 3/2, -1/2*e^3 + 1/2*e^2 + 9/2*e - 3/2, 5/2*e^3 - 11/2*e^2 - 27/2*e + 1/2, -3*e^3 + 5*e^2 + 19*e - 5, -2*e^3 + 3*e^2 + 11*e - 1, e^3 - 3*e^2 - 5*e + 1, 2*e^3 - 5*e^2 - 11*e + 9, 1/2*e^3 + 1/2*e^2 - 13/2*e - 3/2, 5/2*e^3 - 9/2*e^2 - 27/2*e - 1/2, 5/2*e^3 - 13/2*e^2 - 17/2*e + 15/2, 3*e^3 - 7*e^2 - 15*e + 5, -1/2*e^3 + 9/2*e^2 - 9/2*e - 23/2, -3*e^3 + 6*e^2 + 19*e - 4, 5/2*e^3 - 9/2*e^2 - 27/2*e + 3/2, 2*e^3 - 6*e^2 - 10*e + 7, -2*e^3 + 2*e^2 + 16*e + 1, -3/2*e^3 + 1/2*e^2 + 21/2*e + 11/2, -e^3 + e^2 + 11*e - 1, 5/2*e^3 - 7/2*e^2 - 39/2*e + 1/2, 3/2*e^3 - 9/2*e^2 - 17/2*e + 15/2, -11/2*e^3 + 19/2*e^2 + 73/2*e - 19/2, 2*e^2 - 4*e - 10, 4*e^3 - 7*e^2 - 30*e + 7, e^3 - 2*e^2 - 5*e + 2, -5/2*e^3 + 13/2*e^2 + 31/2*e - 19/2, -4*e^3 + 9*e^2 + 16*e - 8, e^3 - e^2 - 5*e - 9, -11/2*e^3 + 21/2*e^2 + 73/2*e - 13/2, 1/2*e^3 - 3/2*e^2 + 5/2*e - 23/2, 3*e^3 - 5*e^2 - 15*e - 15, 3*e^3 - 6*e^2 - 20*e + 10, -13/2*e^3 + 23/2*e^2 + 75/2*e - 11/2, 1/2*e^3 + 3/2*e^2 - 23/2*e - 11/2, e^3 - e^2 - 17*e + 5, 7/2*e^3 - 13/2*e^2 - 55/2*e + 23/2, e^3 - 5*e^2 + 7*e + 7, -e^2 + 4, -9/2*e^3 + 21/2*e^2 + 57/2*e - 7/2, 6*e^3 - 12*e^2 - 38*e + 12, 11/2*e^3 - 21/2*e^2 - 63/2*e + 3/2, -2*e^3 + 10*e^2 - 18, -3*e^3 + 7*e^2 + 15*e - 11, 6*e^3 - 12*e^2 - 26*e + 4, -3*e^3 + 9*e^2 + 17*e - 15, -9/2*e^3 + 17/2*e^2 + 57/2*e + 9/2, 9/2*e^3 - 15/2*e^2 - 43/2*e - 7/2, -1/2*e^3 + 5/2*e^2 + 11/2*e - 7/2, e^3 - 3*e^2 - 3*e + 5, -5/2*e^3 + 23/2*e^2 + 5/2*e - 61/2, -4*e^3 + 10*e^2 + 24*e - 1, -3*e^2 + 12*e + 5, e^3 - 4*e^2 - e + 1, 8*e^3 - 18*e^2 - 46*e + 18, -6*e^2 + 14*e + 20, 4*e^3 - 6*e^2 - 25*e + 6, -5*e^3 + 7*e^2 + 37*e + 4, -10*e^3 + 21*e^2 + 54*e - 12, 2*e^3 - 2*e^2 - 16*e - 11, -5/2*e^3 + 15/2*e^2 + 19/2*e - 57/2, -5*e^3 + 15*e^2 + 11*e - 25, -13/2*e^3 + 33/2*e^2 + 59/2*e - 31/2, -3/2*e^3 + 5/2*e^2 + 17/2*e + 5/2, -3*e^3 + 5*e^2 + 27*e + 1, -3*e^3 + 7*e^2 + 21*e + 7, -25/2*e^3 + 45/2*e^2 + 139/2*e - 13/2, 2*e^3 - 2*e^2 - 12*e - 3, 3/2*e^3 - 9/2*e^2 - 29/2*e + 31/2, 7/2*e^3 - 9/2*e^2 - 63/2*e + 15/2, 7*e^3 - 11*e^2 - 50*e + 23, 5/2*e^3 - 1/2*e^2 - 51/2*e - 13/2, 25/2*e^3 - 51/2*e^2 - 153/2*e + 17/2, -19/2*e^3 + 45/2*e^2 + 85/2*e - 47/2, 3*e^3 - 4*e^2 - 19*e + 1, 6*e^3 - 16*e^2 - 29*e + 28, e^3 + 4*e^2 - 11*e - 32, 13/2*e^3 - 27/2*e^2 - 59/2*e + 5/2, -3/2*e^3 + 1/2*e^2 + 29/2*e - 25/2, 5*e^3 - 9*e^2 - 33*e + 9, -10*e^3 + 24*e^2 + 48*e - 24, 7/2*e^3 - 11/2*e^2 - 41/2*e - 11/2, -3/2*e^3 - 9/2*e^2 + 49/2*e + 25/2, 2*e^3 - 10*e^2 - 6*e + 18, -8*e^3 + 16*e^2 + 44*e - 20, -7/2*e^3 + 5/2*e^2 + 59/2*e + 25/2, -4*e^3 + 8*e^2 + 20*e - 6, -7/2*e^3 + 21/2*e^2 + 23/2*e + 1/2, -5*e^3 + 7*e^2 + 31*e - 1, 1/2*e^3 - 5/2*e^2 - 15/2*e + 79/2, -12*e^3 + 22*e^2 + 62*e - 8, -13/2*e^3 + 21/2*e^2 + 83/2*e - 17/2, e^3 - 7*e^2 + e + 19, 7*e^3 - 15*e^2 - 39*e + 3, -4*e^3 + 10*e^2 + 18*e + 4, -8*e^3 + 20*e^2 + 38*e - 23, 3*e^3 - 27*e - 25, -19/2*e^3 + 29/2*e^2 + 119/2*e + 1/2, -3*e^3 + 12*e^2 + e - 40, 15*e^3 - 28*e^2 - 81*e + 14, -1/2*e^3 - 3/2*e^2 + 19/2*e - 33/2, 13/2*e^3 - 21/2*e^2 - 71/2*e - 25/2, 14*e^3 - 29*e^2 - 78*e + 15, 8*e^3 - 18*e^2 - 44*e + 31, -15/2*e^3 + 21/2*e^2 + 113/2*e - 35/2, 19/2*e^3 - 31/2*e^2 - 97/2*e - 17/2, 5/2*e^3 - 13/2*e^2 - 19/2*e - 41/2, 9/2*e^3 - 15/2*e^2 - 73/2*e + 9/2, 3*e^3 - 5*e^2 - 19*e - 15, 6*e^2 - 2*e - 28, -17/2*e^3 + 29/2*e^2 + 91/2*e - 27/2, 4*e^3 - 2*e^2 - 34*e - 26, -9/2*e^3 + 7/2*e^2 + 71/2*e + 11/2, 1/2*e^3 - 1/2*e^2 - 11/2*e - 11/2, -1/2*e^3 + 7/2*e^2 + 7/2*e - 17/2, -5*e^3 + 7*e^2 + 31*e - 17, -2*e^3 + 3*e^2 + 12*e + 16, 4*e^3 - 6*e^2 - 28*e - 21, -2*e^3 + 14*e^2 - 3*e - 28, -3*e^3 + 4*e^2 + 31*e - 14, 9/2*e^3 - 21/2*e^2 - 19/2*e + 7/2, 3*e^3 - 7*e^2 - 9*e - 6, 9*e^2 - 24*e - 36, e^3 - 11*e^2 + 7*e + 21, -3*e^3 + 7*e^2 + 15*e - 13, 15/2*e^3 - 23/2*e^2 - 109/2*e - 7/2, 7*e^3 - 12*e^2 - 57*e + 8, 27/2*e^3 - 47/2*e^2 - 165/2*e + 1/2, 29/2*e^3 - 73/2*e^2 - 147/2*e + 59/2, -14*e^3 + 28*e^2 + 80*e - 16, -9/2*e^3 + 29/2*e^2 + 47/2*e - 41/2, -29/2*e^3 + 59/2*e^2 + 147/2*e - 35/2, -19/2*e^3 + 35/2*e^2 + 101/2*e - 27/2, -10*e^3 + 16*e^2 + 62*e + 2, 10*e^3 - 21*e^2 - 54*e + 5, 27/2*e^3 - 59/2*e^2 - 125/2*e + 13/2, 9/2*e^3 - 13/2*e^2 - 39/2*e - 53/2, 7*e^3 - 7*e^2 - 59*e - 11, -13*e^3 + 21*e^2 + 83*e - 23, 2*e^3 - 4*e^2 - 25, 13*e^3 - 31*e^2 - 55*e + 37, -17/2*e^3 + 35/2*e^2 + 75/2*e + 3/2, 8*e^3 - 14*e^2 - 40*e + 6, -9*e^3 + 19*e^2 + 63*e - 27, -13/2*e^3 + 17/2*e^2 + 85/2*e + 53/2, 15/2*e^3 - 31/2*e^2 - 85/2*e + 5/2, 7/2*e^3 - 23/2*e^2 - 21/2*e - 23/2, 13/2*e^3 - 27/2*e^2 - 103/2*e + 65/2, 12*e^3 - 24*e^2 - 55*e + 20, e^3 + 3*e^2 - 27*e - 11, -35/2*e^3 + 79/2*e^2 + 169/2*e - 57/2, 15/2*e^3 - 25/2*e^2 - 97/2*e + 1/2, -7*e^3 + 9*e^2 + 39*e + 13, 13/2*e^3 - 15/2*e^2 - 103/2*e + 1/2, -5*e^3 + 13*e^2 + 21*e + 21, -e^3 - 8*e^2 + 15*e + 40, 16*e^3 - 34*e^2 - 86*e + 22, -10*e^3 + 21*e^2 + 51*e - 17, 9/2*e^3 - 15/2*e^2 - 45/2*e - 15/2, 2*e^3 - 6*e^2 + 4*e + 26, -3/2*e^3 + 11/2*e^2 - 3/2*e + 31/2, -12*e^3 + 28*e^2 + 60*e - 42, 3*e^3 - 9*e^2 - 7*e + 36, -3/2*e^3 + 7/2*e^2 - 3/2*e + 23/2, -14*e^3 + 24*e^2 + 96*e - 14, -7*e^3 + 7*e^2 + 56*e + 15, -27/2*e^3 + 53/2*e^2 + 125/2*e - 35/2, e^3 + 7*e^2 - 21*e - 47, -13/2*e^3 + 33/2*e^2 + 59/2*e - 29/2]; 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;