/* 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![18, 0, -12, 0, 1]; F := NumberField(g); ZF := Integers(F); NN := ideal; primesArray := [ [2, 2, -1/3*w^3 - 1/3*w^2 + 3*w + 4], [7, 7, 1/3*w^3 + 1/3*w^2 - 3*w - 3], [7, 7, -1/3*w^2 + w + 1], [7, 7, 1/3*w^2 + w - 1], [7, 7, 1/3*w^3 - 1/3*w^2 - 3*w + 3], [9, 3, w - 3], [41, 41, 1/3*w^3 - 1/3*w^2 - 3*w + 1], [41, 41, -1/3*w^2 + w + 3], [41, 41, 1/3*w^2 + w - 3], [41, 41, -1/3*w^3 - 1/3*w^2 + 3*w + 1], [47, 47, 1/3*w^3 + 1/3*w^2 - 4*w - 1], [47, 47, -1/3*w^3 + 1/3*w^2 + 2*w - 3], [47, 47, 1/3*w^3 + 1/3*w^2 - 2*w - 3], [47, 47, 1/3*w^3 - 1/3*w^2 - 4*w + 1], [89, 89, -1/3*w^3 + 2/3*w^2 + 3*w - 3], [89, 89, 2/3*w^2 + w - 5], [89, 89, 2/3*w^2 - w - 5], [89, 89, 1/3*w^3 + 2/3*w^2 - 3*w - 3], [97, 97, 2/3*w^3 - 1/3*w^2 - 6*w + 5], [97, 97, -w^3 - 5/3*w^2 + 10*w + 15], [97, 97, -5/3*w^3 - 5/3*w^2 + 16*w + 21], [97, 97, -2/3*w^3 - 1/3*w^2 + 6*w + 5], [103, 103, -4/3*w^3 - 4/3*w^2 + 13*w + 17], [103, 103, 1/3*w^3 + w^2 - 5*w - 7], [103, 103, -w^3 - w^2 + 9*w + 11], [103, 103, -2/3*w^3 - 4/3*w^2 + 7*w + 11], [137, 137, -1/3*w^3 - 1/3*w^2 + 3*w - 1], [137, 137, 1/3*w^2 + w - 5], [137, 137, 1/3*w^2 - w - 5], [137, 137, 1/3*w^3 - 1/3*w^2 - 3*w - 1], [151, 151, w^2 - w - 5], [151, 151, 1/3*w^3 + w^2 - 3*w - 7], [151, 151, -1/3*w^3 + w^2 + 3*w - 7], [151, 151, w^2 + w - 5], [191, 191, 1/3*w^3 + 2/3*w^2 - 4*w - 3], [191, 191, 1/3*w^3 + 2/3*w^2 - 2*w - 5], [191, 191, -1/3*w^3 + 2/3*w^2 + 2*w - 5], [191, 191, -1/3*w^3 + 2/3*w^2 + 4*w - 3], [193, 193, 2/3*w^3 + w^2 - 8*w - 7], [193, 193, -1/3*w^3 - 1/3*w^2 + 4*w + 7], [193, 193, -7/3*w^3 - 13/3*w^2 + 26*w + 37], [193, 193, -2/3*w^3 + w^2 + 8*w - 7], [199, 199, 5/3*w^3 + 2*w^2 - 17*w - 23], [199, 199, -2/3*w^3 - 5/3*w^2 + 9*w + 13], [199, 199, -2/3*w^3 - 1/3*w^2 + 5*w + 5], [199, 199, -w^3 - 2*w^2 + 11*w + 17], [233, 233, 1/3*w^3 - 4/3*w^2 - 3*w + 5], [233, 233, 1/3*w^3 - 4/3*w^2 - 5*w + 7], [233, 233, 4/3*w^2 + w - 11], [233, 233, 1/3*w^3 + 4/3*w^2 - 3*w - 5], [239, 239, 1/3*w^3 + w^2 - 4*w - 5], [239, 239, 4/3*w^3 + 4/3*w^2 - 14*w - 17], [239, 239, 4/3*w^3 + 2/3*w^2 - 12*w - 13], [239, 239, -1/3*w^3 + w^2 + 4*w - 5], [241, 241, -2/3*w^3 + 6*w + 1], [241, 241, 2/3*w^3 - 1/3*w^2 - 6*w + 3], [241, 241, -2/3*w^3 - 1/3*w^2 + 6*w + 3], [241, 241, 2/3*w^3 - 6*w + 1], [281, 281, -w^3 - w^2 + 9*w + 13], [281, 281, -2/3*w^3 - 2/3*w^2 + 5*w + 7], [281, 281, -2/3*w^3 + 2/3*w^2 + 5*w - 7], [281, 281, -7/3*w^3 - 3*w^2 + 23*w + 31], [289, 17, w^2 - 5], [289, 17, w^2 - 7], [337, 337, -w^3 + 4/3*w^2 + 8*w - 7], [337, 337, -2*w + 7], [337, 337, 2/3*w^3 - 2*w^2 - 4*w + 11], [337, 337, 1/3*w^3 + 2/3*w^2 - 6*w + 1], [383, 383, 2/3*w^3 + 5/3*w^2 - 8*w - 11], [383, 383, -w^3 - 2/3*w^2 + 10*w + 11], [383, 383, -5/3*w^3 - 4/3*w^2 + 16*w + 19], [383, 383, -4/3*w^3 - 7/3*w^2 + 14*w + 19], [431, 431, -2/3*w^3 + 1/3*w^2 + 4*w - 5], [431, 431, -2/3*w^3 - 1/3*w^2 + 8*w - 1], [431, 431, 2/3*w^3 - 1/3*w^2 - 8*w - 1], [431, 431, 2/3*w^3 + 1/3*w^2 - 4*w - 5], [433, 433, 2/3*w^3 + 7/3*w^2 - 10*w - 15], [433, 433, -3*w^3 - 10/3*w^2 + 30*w + 39], [433, 433, -1/3*w^3 - 4/3*w^2 + 4*w + 9], [433, 433, -4/3*w^3 - 5/3*w^2 + 12*w + 15], [439, 439, -4/3*w^3 - 1/3*w^2 + 11*w + 13], [439, 439, 1/3*w^3 + 2/3*w^2 - 5*w - 5], [439, 439, -3*w^3 - 10/3*w^2 + 29*w + 37], [439, 439, -4/3*w^3 - 7/3*w^2 + 13*w + 19], [479, 479, 1/3*w^2 - 2*w - 5], [479, 479, 2/3*w^3 + 1/3*w^2 - 6*w + 1], [479, 479, 2/3*w^3 - 1/3*w^2 - 6*w - 1], [479, 479, -1/3*w^2 - 2*w + 5], [487, 487, 1/3*w^3 + 4/3*w^2 - 3*w - 7], [487, 487, 4/3*w^2 - w - 9], [487, 487, -4/3*w^2 - w + 9], [487, 487, 1/3*w^3 - 4/3*w^2 - 3*w + 7], [521, 521, 2/3*w^3 - 2/3*w^2 - 5*w - 3], [521, 521, 5/3*w^3 + 7/3*w^2 - 17*w - 21], [521, 521, -7/3*w^3 - 11/3*w^2 + 25*w + 33], [521, 521, -4/3*w^3 - 2/3*w^2 + 13*w + 15], [529, 23, -1/3*w^2 - 3], [529, 23, 1/3*w^2 - 7], [569, 569, 2/3*w^3 + 2/3*w^2 - 5*w + 1], [569, 569, 1/3*w^3 - 2/3*w^2 - 5*w + 9], [569, 569, -1/3*w^3 - 2/3*w^2 + 5*w + 9], [569, 569, -2/3*w^3 + 2/3*w^2 + 5*w + 1], [577, 577, -w^3 + 1/3*w^2 + 8*w + 3], [577, 577, -1/3*w^3 - 1/3*w^2 + 6*w + 7], [577, 577, 1/3*w^3 - 1/3*w^2 - 6*w + 7], [577, 577, w^3 + 1/3*w^2 - 8*w + 3], [617, 617, -2/3*w^3 - 5/3*w^2 + 5*w + 7], [617, 617, -5/3*w^2 + 3*w + 5], [617, 617, -8/3*w^3 - 13/3*w^2 + 27*w + 37], [617, 617, -w^3 - 5/3*w^2 + 9*w + 15], [625, 5, -5], [631, 631, -1/3*w^3 - 5/3*w^2 + 3*w + 7], [631, 631, -5/3*w^2 - w + 13], [631, 631, 5/3*w^2 - w - 13], [631, 631, 1/3*w^3 - 5/3*w^2 - 3*w + 7], [673, 673, 2/3*w^3 + 1/3*w^2 - 8*w - 1], [673, 673, -2/3*w^3 - 1/3*w^2 + 4*w + 3], [673, 673, -2/3*w^3 + 1/3*w^2 + 4*w - 3], [673, 673, 2/3*w^3 - 1/3*w^2 - 8*w + 1], [719, 719, 1/3*w^3 - 1/3*w^2 - 6*w + 9], [719, 719, w^3 - 1/3*w^2 - 8*w - 5], [719, 719, w^3 + 1/3*w^2 - 8*w + 5], [719, 719, -1/3*w^3 - 1/3*w^2 + 6*w + 9], [727, 727, 2/3*w^3 + 1/3*w^2 - 5*w - 1], [727, 727, -1/3*w^3 - 1/3*w^2 + 5*w + 3], [727, 727, 1/3*w^3 - 1/3*w^2 - 5*w + 3], [727, 727, -2/3*w^3 + 1/3*w^2 + 5*w - 1], [761, 761, -2/3*w^3 + 1/3*w^2 + 3*w + 3], [761, 761, 7/3*w^3 + 10/3*w^2 - 23*w - 33], [761, 761, 3*w^3 + 10/3*w^2 - 29*w - 39], [761, 761, -2*w^3 - 5/3*w^2 + 17*w + 21], [769, 769, -4/3*w^3 - w^2 + 12*w + 13], [769, 769, -w^3 - 2/3*w^2 + 10*w + 13], [769, 769, -w^3 - 8/3*w^2 + 12*w + 19], [769, 769, -2*w^3 - 3*w^2 + 22*w + 29], [809, 809, -2/3*w^3 - 2/3*w^2 + 7*w + 3], [809, 809, w^2 + w - 11], [809, 809, w^2 - w - 11], [809, 809, 2/3*w^3 - 2/3*w^2 - 7*w + 3], [823, 823, 1/3*w^3 - 5*w - 1], [823, 823, 2/3*w^3 - 5*w - 1], [823, 823, 2/3*w^3 - 5*w + 1], [823, 823, -1/3*w^3 + 5*w - 1], [857, 857, -5/3*w^2 + w + 15], [857, 857, -1/3*w^3 - 5/3*w^2 + 3*w + 5], [857, 857, 1/3*w^3 - 5/3*w^2 - 3*w + 5], [857, 857, 5/3*w^2 + w - 15], [863, 863, -2/3*w^3 - 5/3*w^2 + 10*w + 15], [863, 863, -5/3*w^3 - 8/3*w^2 + 18*w + 27], [863, 863, -3*w^3 - 14/3*w^2 + 32*w + 45], [863, 863, -5/3*w^2 + 4*w + 9], [911, 911, 1/3*w^3 - 2/3*w^2 - 4*w - 1], [911, 911, -1/3*w^3 + 2/3*w^2 + 2*w - 9], [911, 911, 1/3*w^3 + 2/3*w^2 - 2*w - 9], [911, 911, -1/3*w^3 - 2/3*w^2 + 4*w - 1], [919, 919, w^3 + 1/3*w^2 - 9*w - 1], [919, 919, -w^3 - 2/3*w^2 + 9*w + 7], [919, 919, w^3 - 2/3*w^2 - 9*w + 7], [919, 919, -w^3 + 1/3*w^2 + 9*w - 1], [953, 953, -w^3 - w^2 + 9*w + 5], [953, 953, -w^2 - 3*w + 7], [953, 953, w^2 - 3*w - 7], [953, 953, w^3 - w^2 - 9*w + 5], [961, 31, 4/3*w^2 - 7], [961, 31, 4/3*w^2 - 9], [967, 967, -w^3 - 1/3*w^2 + 9*w + 5], [967, 967, w^3 + 2/3*w^2 - 9*w - 5], [967, 967, -w^3 + 2/3*w^2 + 9*w - 5], [967, 967, w^3 - 1/3*w^2 - 9*w + 5], [1009, 1009, 1/3*w^3 + 5/3*w^2 - 4*w - 9], [1009, 1009, -8/3*w^3 - 10/3*w^2 + 26*w + 33], [1009, 1009, 4/3*w^3 + 8/3*w^2 - 16*w - 21], [1009, 1009, 7/3*w^3 + 5/3*w^2 - 22*w - 27], [1049, 1049, -2/3*w^3 + 2/3*w^2 + 5*w - 9], [1049, 1049, -1/3*w^3 - 2/3*w^2 + 5*w - 1], [1049, 1049, 1/3*w^3 - 2/3*w^2 - 5*w - 1], [1049, 1049, 2/3*w^3 + 2/3*w^2 - 5*w - 9], [1063, 1063, w^3 + 2/3*w^2 - 9*w - 13], [1063, 1063, 2*w^3 + w^2 - 17*w - 19], [1063, 1063, -2/3*w^3 - w^2 + 9*w + 11], [1063, 1063, -3*w^3 - 14/3*w^2 + 31*w + 43], [1097, 1097, -2/3*w^3 + 1/3*w^2 + 7*w + 1], [1097, 1097, 1/3*w^3 + 1/3*w^2 - w - 5], [1097, 1097, -1/3*w^3 + 1/3*w^2 + w - 5], [1097, 1097, 2/3*w^3 + 1/3*w^2 - 7*w + 1], [1103, 1103, 2/3*w^2 + 2*w - 7], [1103, 1103, 2/3*w^3 + 2/3*w^2 - 6*w - 1], [1103, 1103, -2/3*w^3 + 2/3*w^2 + 6*w - 1], [1103, 1103, 2/3*w^2 - 2*w - 7], [1151, 1151, -2/3*w^3 + 4*w - 7], [1151, 1151, 2/3*w^3 - 8*w - 7], [1151, 1151, -2/3*w^3 + 8*w - 7], [1151, 1151, 2/3*w^3 - 4*w - 7], [1153, 1153, -1/3*w^3 + 6*w - 5], [1153, 1153, -w^3 + 8*w + 5], [1153, 1153, -w^3 + 8*w - 5], [1153, 1153, 1/3*w^3 - 6*w - 5], [1193, 1193, -1/3*w^3 - 2/3*w^2 + 5*w - 3], [1193, 1193, 2/3*w^3 + 2/3*w^2 - 5*w - 11], [1193, 1193, -2/3*w^3 + 2/3*w^2 + 5*w - 11], [1193, 1193, 1/3*w^3 - 2/3*w^2 - 5*w - 3], [1201, 1201, -7/3*w^3 - 4/3*w^2 + 20*w + 23], [1201, 1201, -w^3 + 2/3*w^2 + 8*w - 1], [1201, 1201, w^3 + 2/3*w^2 - 8*w - 1], [1201, 1201, 1/3*w^3 + 2/3*w^2 - 6*w - 7], [1249, 1249, -2/3*w^3 + 2*w^2 + 6*w - 11], [1249, 1249, 2*w^2 + 2*w - 13], [1249, 1249, 2*w^2 - 2*w - 13], [1249, 1249, 2/3*w^3 + 2*w^2 - 6*w - 11], [1289, 1289, w^3 - 2/3*w^2 - 11*w + 3], [1289, 1289, 1/3*w^3 + w^2 - 5*w - 11], [1289, 1289, -1/3*w^3 + w^2 + 5*w - 11], [1289, 1289, -w^3 - 2/3*w^2 + 11*w + 3], [1297, 1297, -1/3*w^3 + 4*w - 7], [1297, 1297, -1/3*w^3 + 2*w - 7], [1297, 1297, 1/3*w^3 - 2*w - 7], [1297, 1297, 1/3*w^3 - 4*w - 7], [1303, 1303, 1/3*w^3 - 2/3*w^2 - 5*w + 13], [1303, 1303, -11/3*w^3 - 13/3*w^2 + 37*w + 49], [1303, 1303, -w^3 - 7/3*w^2 + 11*w + 19], [1303, 1303, -1/3*w^3 - 2/3*w^2 + 5*w + 13], [1399, 1399, 4/3*w^3 + 2/3*w^2 - 11*w + 1], [1399, 1399, -1/3*w^3 - 2/3*w^2 + 7*w + 9], [1399, 1399, 1/3*w^3 - 2/3*w^2 - 7*w + 9], [1399, 1399, -4/3*w^3 + 2/3*w^2 + 11*w + 1], [1433, 1433, w^3 - 9*w - 7], [1433, 1433, 4/3*w^3 + 11/3*w^2 - 17*w - 25], [1433, 1433, -4/3*w^3 - 7/3*w^2 + 13*w + 17], [1433, 1433, -w^3 + 9*w - 7], [1439, 1439, -1/3*w^3 - 4/3*w^2 + 6*w + 11], [1439, 1439, -2*w^3 - 3*w^2 + 22*w + 31], [1439, 1439, 4/3*w^3 + 3*w^2 - 16*w - 25], [1439, 1439, -5/3*w^3 - 10/3*w^2 + 20*w + 29], [1447, 1447, 1/3*w^2 + w - 9], [1447, 1447, 1/3*w^3 - 1/3*w^2 - 3*w - 5], [1447, 1447, -1/3*w^3 - 1/3*w^2 + 3*w - 5], [1447, 1447, 1/3*w^2 - w - 9], [1481, 1481, -2/3*w^3 + 5/3*w^2 + 7*w - 9], [1481, 1481, 1/3*w^3 + 5/3*w^2 - w - 11], [1481, 1481, -1/3*w^3 + 5/3*w^2 + w - 11], [1481, 1481, -2/3*w^3 - 5/3*w^2 + 7*w + 9], [1487, 1487, 2/3*w^3 + 8/3*w^2 - 10*w - 15], [1487, 1487, -w^3 - 1/3*w^2 + 10*w + 9], [1487, 1487, -w^3 + 1/3*w^2 + 10*w - 9], [1487, 1487, -2*w^3 - 10/3*w^2 + 20*w + 27], [1489, 1489, -1/3*w^3 + 5/3*w^2 + 2*w - 9], [1489, 1489, -1/3*w^3 + 5/3*w^2 + 4*w - 11], [1489, 1489, 1/3*w^3 + 5/3*w^2 - 4*w - 11], [1489, 1489, 1/3*w^3 + 5/3*w^2 - 2*w - 9], [1543, 1543, -4*w^3 - 13/3*w^2 + 39*w + 49], [1543, 1543, 4*w^3 + 5*w^2 - 41*w - 55], [1543, 1543, 2/3*w^3 - 2/3*w^2 - 9*w + 1], [1543, 1543, 4/3*w^3 + 5/3*w^2 - 15*w - 17], [1583, 1583, -1/3*w^3 + w^2 + 4*w + 1], [1583, 1583, 1/3*w^3 + w^2 - 2*w - 13], [1583, 1583, -1/3*w^3 + w^2 + 2*w - 13], [1583, 1583, -1/3*w^3 - w^2 + 4*w - 1], [1721, 1721, w^3 - 1/3*w^2 - 7*w + 9], [1721, 1721, 2/3*w^3 + 1/3*w^2 - 9*w + 5], [1721, 1721, -2/3*w^3 + 1/3*w^2 + 9*w + 5], [1721, 1721, w^3 + 1/3*w^2 - 7*w - 9], [1777, 1777, -8/3*w^3 - 3*w^2 + 28*w + 37], [1777, 1777, -w^3 - 2/3*w^2 + 8*w + 7], [1777, 1777, -w^3 + 2/3*w^2 + 8*w - 7], [1777, 1777, -2/3*w^3 - 3*w^2 + 10*w + 19], [1783, 1783, -1/3*w^2 - w - 5], [1783, 1783, -1/3*w^3 + 1/3*w^2 + 3*w - 9], [1783, 1783, 1/3*w^3 + 1/3*w^2 - 3*w - 9], [1783, 1783, -1/3*w^2 + w - 5], [1823, 1823, 2/3*w^3 - 4/3*w^2 - 4*w + 9], [1823, 1823, 2/3*w^3 - 4/3*w^2 - 8*w + 7], [1823, 1823, 2/3*w^3 + 4/3*w^2 - 8*w - 7], [1823, 1823, 2/3*w^3 + 4/3*w^2 - 4*w - 9], [1831, 1831, -w - 7], [1831, 1831, -1/3*w^3 + 3*w - 7], [1831, 1831, 1/3*w^3 - 3*w - 7], [1831, 1831, w - 7], [1871, 1871, -4*w^3 - 13/3*w^2 + 38*w + 49], [1871, 1871, -7/3*w^3 - 10/3*w^2 + 22*w + 31], [1871, 1871, -7/3*w^3 - 4/3*w^2 + 20*w + 25], [1871, 1871, 2/3*w^3 + 1/3*w^2 - 4*w - 7], [1873, 1873, -1/3*w^2 + 4*w - 3], [1873, 1873, 4/3*w^3 + 1/3*w^2 - 12*w - 7], [1873, 1873, 4/3*w^3 - 1/3*w^2 - 12*w + 7], [1873, 1873, 1/3*w^2 + 4*w + 3], [1879, 1879, -1/3*w^3 + 7/3*w^2 + 5*w - 11], [1879, 1879, 2/3*w^3 + 7/3*w^2 - 5*w - 17], [1879, 1879, -2/3*w^3 + 7/3*w^2 + 5*w - 17], [1879, 1879, 1/3*w^3 + 7/3*w^2 - 5*w - 11], [1913, 1913, 1/3*w^3 + 1/3*w^2 - w - 7], [1913, 1913, -2/3*w^3 - 1/3*w^2 + 7*w - 3], [1913, 1913, 2/3*w^3 - 1/3*w^2 - 7*w - 3], [1913, 1913, -1/3*w^3 + 1/3*w^2 + w - 7]]; primes := [ideal : I in primesArray]; heckePol := x; K := Rationals(); e := 1; heckeEigenvaluesArray := [-1, -1, 1, 2, 0, 4, 5, 4, -2, 8, 0, 7, -2, 9, 2, -12, 15, -7, -7, 12, -2, 0, 6, 7, -5, -14, 6, 18, -3, -7, -14, 11, 8, -15, -3, 12, 15, 15, 4, 11, -14, 16, -24, 19, 7, 6, -22, 14, -9, -14, 12, -9, 5, 28, 19, -10, 4, 0, -27, 1, -20, 6, -29, 30, -7, -14, -33, -34, -20, -24, 30, 8, -16, -24, -16, 23, -37, 24, 5, 2, 21, -20, 17, 18, -3, -26, 37, 32, 5, 24, 38, 10, 27, -16, 17, -25, -13, -10, 25, -10, -18, -22, 4, -33, 31, 33, 41, 30, 14, -7, -44, -6, -16, -13, 32, -38, -31, 24, -5, -8, 19, 36, 50, 46, -11, -47, -48, 54, -18, -46, -11, 36, 53, -17, 5, 22, 35, -20, -29, 28, 38, -14, 5, -19, -48, 28, 20, -8, -36, 49, 19, 24, -8, 9, 13, -26, -14, 45, 20, -6, -30, 24, 16, 10, -46, 43, -48, -32, -2, 44, 32, -20, 6, 0, -38, 14, -40, 24, -35, 2, 54, 30, 12, 3, 64, -40, -14, -42, -40, 62, -42, -27, 52, 1, 7, -8, -5, 22, 46, -18, -30, 20, 5, 32, -46, -25, -25, 16, -41, 6, -62, -20, -68, 31, -50, -14, 53, 66, 8, -60, -55, 20, 22, -35, -31, 2, -36, 51, 3, 14, -20, -52, -26, 64, 8, 8, -28, -15, 5, 24, -46, 63, -24, -46, -63, 69, 4, -22, -44, 32, -64, -35, 24, -56, -54, 12, -1, -33, -10, 43, -81, -22, 38, -64, 56, 56, -8, -36, 50, -48, 57, -9, 56, 52, -28, 32, -59, -15, 10, 52, 6, -38, -2, -12, 66, -32, -24, -26, -46, -26, 78, 68, 34]; heckeEigenvalues := AssociativeArray(); for i := 1 to #heckeEigenvaluesArray do heckeEigenvalues[primes[i]] := heckeEigenvaluesArray[i]; end for; ALEigenvalues := AssociativeArray(); ALEigenvalues[ideal] := 1; 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;