
// Make newform 225.4.e.d in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_225_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_225_e_Hecke();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_225_4_e_d();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_225_4_e_d();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [82944, -345600, 1572480, 276096, 765088, -55412, 209529, -2346, 23232, -1800, 1605, -60, 48, -2, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [81270546705718272, -25921241556287616, 117092812833806688, -133752262646177216, 42605333749130392, -12904342916750307, 5773718546261598, -1600654919494992, 450465462773892, -67214635202751, 13978725434868, -1952416155384, 306116042626, -20061126179], [6327402188013363456, -301463508848655168, 6388403886706427424, 491208718137338632, 1586131414628791566, 37998719378207139, 151588269426690954, -3383981805395616, 9368850452619066, -222363901918173, 268246879929564, -8326481101332, 5266027591948, -102404815617], [938118109152615552, -4270983905386306656, -1212833497402579392, -2121139439941287256, 124169043517445147, -598583661371575587, 2094038662074018, -66938437996344372, 5089407312211947, -4675917826251741, 170511125461188, -140176351013994, 5818762419041, -2939472898789], [-635787846053180928, -222723185330538432, -115983070461996480, -165936793688224816, 20984698013263682, -65593542660998373, 910270480529994, -7944221758218888, 698418640709550, -580748709713133, 23331293206188, -17633627499780, 779547299216, -376371909409], [-2219955219834868224, -892022300705723328, -2145238309188398016, -778707659501376848, -61555351861332734, -335680001857235061, -10195262304644886, -44745022379815656, 3918866101337646, -3331612503988413, 135970911492204, -102520174110372, 4927484464048, -2181076654577], [11195219267384530176, -6169631611590721728, -183668611928570496, -5686723075246626928, 1490671867267205186, -1966226863777259031, 109604804548363134, -242569404337916136, 26970827811008886, -17408138167954983, 877253848876644, -529205531611572, 27262271328908, -11125627233907], [-58431888210024686592, 2991899986603603776, -41550122424390691968, 14667705367319757976, -13279044448233676862, 2937116288481702777, -1468061862699842178, 409898419101933312, -120236130709947162, 23469677549717961, -3676183472876748, 708621055239924, -84950703264836, 11877650203069], [-5611937348136089088, 21911114884721206464, 6376145950090485648, 8350630296877477364, 651972033637984532, 2231727202378458603, 150558623564004258, 231870377676786468, -6688144134683568, 16684323061922079, -253186185774972, 497974097019636, -13376805115054, 10816153989491], [417410590021475328, 8359273772802089856, 1788282092495597472, 4108101502247733656, -113322476812357012, 1067058783875184507, -1461629934510078, 115234819678132152, -7726553808712992, 7800333243205551, -261650594664228, 231881123650104, -8884383807886, 4781648360579], [2628421300154193408, -10880367775870837824, -3276489473268861168, -4954151404644206124, 237790480436560988, -1389846745001380923, -4637606288236578, -155209969115557788, 11570631006596688, -10927891151629839, 388609132067052, -327948078905676, 13573388130414, -6918798848131], [886710166405356096, -3854505110783586048, -624054241618503336, -1697223178136473988, 22865752810691806, -509264669362768371, -12717367496292066, -55147108409099916, 2948588561373066, -3918785337884283, 101188546669524, -117122204938752, 3909850857688, -2499552103127], [18411464369536291584, -81568948298929301952, -8960478010397626464, -38239197474743117352, 3043820790682361074, -10244344869797115879, 153162733189287006, -1124879785548229824, 87071930738269974, -77165444789888247, 2893374983742996, -2302859876077548, 95353418254572, -47810889109763]];
    Rf_basisdens := [1, 1, 341183023574083200, 682366047148166400, 1023549070722249600, 81883925657779968, 409419628288899840, 2047098141444499200, 2047098141444499200, 1023549070722249600, 409419628288899840, 341183023574083200, 102354907072224960, 682366047148166400];
    Rf_basisnums := ChangeUniverse([[z : z in elt] : elt in Rf_num], Kf);
    Rfbasis := [Rf_basisnums[i]/Rf_basisdens[i] : i in [1..Degree(Kf)]];
    inp_vec := Vector(Rfbasis)*ChangeRing(Transpose(Matrix([[elt : elt in row] : row in input])),Kf);
    return Eltseq(inp_vec);
end function;


// To make the character of type GrpDrchElt, type "MakeCharacter_225_e();"
function MakeCharacter_225_e()
    N := 225;
    order := 3;
    char_gens := [101, 127];
    v := [1, 3];
    // chi(gens[i]) = zeta^v[i]
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    F := CyclotomicField(order);
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),[F|F.1^e:e in v]);
    return MinimalBaseRingCharacter(chi);
end function;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_225_e_Hecke();"
function MakeCharacter_225_e_Hecke(Kf)
    N := 225;
    order := 3;
    char_gens := [101, 127];
    char_values := [[-1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := true, Kf := Kf); // the value of chi on the gens as elements in the Hecke field
    F := Universe(values);// the Hecke field
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),values);
    return chi;
end function;


function ExtendMultiplicatively(weight, aps, character)
    prec := NextPrime(NthPrime(#aps)) - 1; // we will able to figure out a_0 ... a_prec
    primes := PrimesUpTo(prec);
    prime_powers := primes;
    assert #primes eq #aps;
    log_prec := Floor(Log(prec)/Log(2)); // prec < 2^(log_prec+1)
    F := Universe(aps);
    FXY<X, Y> := PolynomialRing(F, 2);
    // 1/(1 - a_p T + p^(weight - 1) * char(p) T^2) = 1 + a_p T + a_{p^2} T^2 + ...
    R<T> := PowerSeriesRing(FXY : Precision := log_prec + 1);
    recursion := Coefficients(1/(1 - X*T + Y*T^2));
    coeffs := [F!0: i in [1..(prec+1)]];
    coeffs[1] := 1; //a_1
    for i := 1 to #primes do
        p := primes[i];
        coeffs[p] := aps[i];
        b := p^(weight - 1) * F!character(p);
        r := 2;
        p_power := p * p;
        //deals with powers of p
        while p_power le prec do
            Append(~prime_powers, p_power);
            coeffs[p_power] := Evaluate(recursion[r + 1], [aps[i], b]);
            p_power *:= p;
            r +:= 1;
        end while;    
    end for;
    Sort(~prime_powers);
    for pp in prime_powers do
        for k := 1 to Floor(prec/pp) do
            if GCD(k, pp) eq 1 then
                coeffs[pp*k] := coeffs[pp]*coeffs[k];
            end if;
        end for;
    end for;
    return coeffs;
end function;


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 4;
    raw_aps := [[0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 3, 0, 1, 0, 0, -1, 1, -1, 0, -1], [0, -4, 4, -1, 1, 1, 0, -1, 0, 0, 4, 1, -1, 0], [17, -2, 0, -1, -15, 4, -1, 5, 1, 0, -5, 2, -1, 1], [23, 0, 2, -2, -2, 2, 0, 0, -4, -2, 5, 1, 1, 0], [41, 0, 0, 4, -2, 0, 0, 2, 2, 4, -1, 1, 1, 0], [-13, -12, 0, 4, 10, -5, 3, -3, 3, 0, 4, -3, -2, 3], [-8, -16, 16, 3, -43, -3, 1, -10, 0, -1, 2, 1, -6, -1], [-43, 8, 0, 9, 37, -2, 9, -9, 3, 0, -1, 4, -3, 3], [-59, 0, 22, 9, 4, 10, 0, 8, -1, 1, -19, -6, -6, 0], [-12, -6, 0, 5, -2, -2, -5, -17, 11, 0, 11, 2, -1, 11], [-2, 32, -32, -3, 79, 3, 4, 5, 0, -4, 8, 13, -9, 2], [9, -20, 20, -4, -34, 4, 12, -11, 0, -12, 35, -15, -7, -6], [54, 0, 28, 2, 30, 16, 0, -24, 0, 12, -42, -10, -10, 0], [2, -64, 0, 10, -28, 7, -17, -14, -13, 0, 60, 6, -11, -13], [8, 82, -82, -11, -106, 11, -4, 1, 0, 4, 28, -3, 1, 10], [170, -56, 0, 23, -173, -26, 21, 18, 3, 0, 27, -25, -22, 3], [-67, 0, 132, 9, -28, 10, 0, 8, 7, -7, 25, 6, 6, 0], [-292, 0, -4, -5, 16, 16, 0, 4, -7, -23, -28, -17, -17, 0], [70, -28, 28, -30, -352, 30, 4, 72, 0, -4, 22, 14, 36, -22], [-27, -144, 144, 4, -219, -4, -3, -30, 0, 3, 15, 13, -20, 3], [381, 0, 156, 25, 60, -4, 0, 60, -21, 15, -120, -35, -35, 0], [6, 168, -168, -27, 280, 27, -51, -38, 0, 51, 68, 19, 30, -15], [-2, 160, -160, 0, -340, 0, -14, 62, 0, 14, -76, 40, 12, 26], [227, 160, 0, -19, -145, -2, 31, 127, 17, 0, -115, -34, -13, 17], [412, 0, -100, 7, -49, -1, 0, -27, 10, 32, 79, 37, 37, 0], [-18, 0, -70, -38, 2, 38, 0, -72, 4, -46, 31, -5, -5, 0], [410, 8, 0, -20, -440, -8, -66, -18, -18, 0, 118, -24, 4, -18], [-369, 0, 424, -25, 57, 21, 0, -29, -6, -36, -66, -34, -34, 0], [-64, -200, 0, -20, 74, -20, -14, -2, -52, 0, 60, -24, 16, -52], [-18, -120, 120, 23, -316, -23, -51, -104, 0, 51, -16, -111, 56, -3], [132, 340, 0, -66, -128, 107, -89, -8, 11, 0, -72, 80, 39, 11], [-268, 130, 0, -17, 270, 73, -10, -25, -8, 0, -79, 78, 22, -8], [-32, 96, -96, 46, -197, -46, 31, -35, 0, -31, -72, -2, -17, -61], [-38, 32, 0, -46, -20, 36, -88, -136, -56, 0, 104, 52, 62, -56], [353, 0, -420, 45, 6, 22, 0, 56, 57, -45, -99, -48, -48, 0], [-474, -28, 0, -37, 497, -5, 32, -106, -92, 0, -41, 41, 83, -92], [-52, -64, 64, -38, 334, 38, -52, -110, 0, 52, 172, 126, -38, -56], [-199, 0, -212, -5, 56, -114, 0, 92, -47, 59, -47, 4, 4, 0], [-35, 0, -104, 51, 112, 72, 0, 54, 71, -95, -292, -129, -129, 0], [-18, -320, 320, -20, 261, 20, -117, 21, 0, 117, -78, 142, 79, -45], [631, -294, 0, 91, -793, 97, 6, -225, 36, 0, 37, 174, -14, 36], [212, 0, -8, 66, 94, -72, 0, 336, -64, -68, -274, -114, -114, 0], [709, 0, 12, 63, -110, 84, 0, -126, 95, 73, 107, 60, 60, 0], [-979, -732, 0, 145, 943, -168, 117, 93, 93, 0, 131, -160, -137, 93], [-37, -184, 184, 34, 1426, -34, 152, -99, 0, -152, 149, -181, -155, 88], [146, -92, 92, 23, -1257, -23, 32, 251, 0, -32, -288, 41, 137, -128], [-641, 120, 0, 28, 657, -163, 43, 46, -139, 0, 272, -164, -29, -139], [37, 0, -318, 84, -72, -182, 0, 200, 48, 102, 33, 45, 45, 0], [-558, -136, 0, -36, 634, 240, -74, 268, 92, 0, -256, 126, -78, 92], [-124, 682, -682, 26, 298, -26, -31, -319, 0, 31, 210, -100, -67, -23], [-19, 0, -136, -84, 146, -194, 0, 302, -80, -196, -191, -129, -129, 0], [-2530, 400, 0, 206, 2186, 33, 1, -416, 185, 0, 192, 172, -67, 185], [166, -60, 60, 20, 791, -20, -11, 377, 0, 11, -448, -18, 197, 23], [2214, 0, 138, -212, -170, 78, 0, -388, 26, -140, 503, 121, 121, 0], [1791, 0, 304, 5, 98, -116, 0, 414, -143, -145, -227, -124, -124, 0], [-2, 66, -66, 66, 785, -66, 103, 277, 0, -103, -372, 96, -39, 53], [132, -558, 558, -89, -2620, 89, -90, 31, 0, 90, 146, 95, 133, -150], [2287, -64, 0, -52, -2208, -27, -41, 163, -193, 0, 198, -95, -16, -193], [-1541, -2, 0, -89, 1491, 72, -161, -95, -7, 0, 79, 50, 67, -7], [-1188, 0, 128, 75, 175, 237, 0, -339, 92, 160, -295, -45, -45, 0], [917, 308, 0, 259, -1143, -476, 227, -355, 7, 0, 533, -282, -65, 7], [-164, 130, -130, 93, 917, -93, -242, 187, 0, 242, -708, 273, 171, 56], [-88, 322, -322, 52, -1493, -52, 293, -35, 0, -293, 172, -210, -329, 247], [-134, 56, -56, 212, -4052, -212, 244, -50, 0, -244, -342, -298, -166, 92], [552, 220, 0, 120, -634, -743, 257, -400, -83, 0, 552, -524, 99, -83], [-2051, -412, 0, 25, 1937, 213, 72, -411, -126, 0, -181, 374, 136, -126], [182, -428, 428, -117, -525, 117, -73, 36, 0, 73, 242, 121, 138, -215], [132, 144, -144, -121, -4348, 121, -123, 316, 0, 123, -76, 333, 134, -39], [1729, 0, -1032, 93, -42, -674, 0, 698, 87, 75, -39, 12, 12, 0], [-458, -636, 636, 244, 3845, -244, 115, -1025, 0, -115, 408, -578, -329, -19], [428, 1852, 0, 368, -894, -182, 68, -430, 28, 0, 754, -16, -202, 28], [2336, 0, -992, -265, -118, -204, 0, 10, -35, -301, 424, 41, 41, 0], [1797, -592, 0, -165, -1603, -402, -55, 197, 55, 0, 127, -486, 81, 55], [188, -238, 238, -63, -5174, 63, 146, 583, 0, -146, -248, 77, -21, 256], [-1046, 0, -496, 362, 148, -400, 0, 944, 74, 106, -712, -202, -202, 0], [72, 772, 0, 154, -506, -55, 19, -878, -61, 0, 386, 244, 145, -61], [2532, 1340, 0, -56, -2728, 295, -139, -478, 421, 0, -550, 408, 169, 421], [-1411, -20, 0, 121, 1323, -572, 137, -175, 61, 0, 479, -468, -17, 61], [-164, -756, 756, -116, 2320, 116, 106, -650, 0, -106, 1104, -140, -386, 50], [4292, 0, -1064, 174, -374, 144, 0, -90, 326, -32, 284, 84, 84, 0], [5247, 0, -402, 242, -382, 254, 0, -616, 400, 446, 433, 293, 293, 0], [284, -308, 308, -246, -3994, 246, -118, 916, 0, 118, -296, 788, 156, 52], [29, 1652, -1652, -91, 2712, 91, 113, 545, 0, -113, -159, 344, -175, 325], [-864, 0, -1780, 167, 270, 268, 0, -312, 267, 111, -600, -163, -163, 0], [-484, -1182, 1182, 23, -3047, -23, 182, -495, 0, -182, 608, -45, -643, 472], [296, 872, -872, 187, 2625, -187, 227, 884, 0, -227, -1218, 325, 256, -407], [-1589, 4, 0, -193, 1943, -276, -123, 729, 417, 0, -281, -560, -91, 417], [-3665, 0, 152, -182, -366, 114, 0, -496, 144, -126, 759, 211, 211, 0], [-926, -152, 152, 374, -1834, -374, -362, -1618, 0, 362, 134, -414, -190, -100], [-2859, 0, -1312, -283, 338, -808, 0, 368, -41, -85, -125, -70, -70, 0], [-10604, -420, 0, 48, 10800, -215, 217, 298, 59, 0, -182, -242, -75, 59], [-4074, -196, 0, -458, 4654, -437, 13, 340, -349, 0, -156, -546, 349, -349], [7473, 0, -1012, 131, -141, -155, 0, 489, 78, -150, -60, -70, -70, 0], [2519, -824, 0, 90, -2201, -757, 597, 30, -441, 0, 184, -568, 99, -441], [1523, 0, 528, 120, 110, -728, 0, 968, -254, 254, -218, 12, 12, 0], [-5905, 0, -1952, -205, 621, -469, 0, -319, 306, 72, -588, -172, -172, 0], [-5185, 0, -696, 347, 86, -276, 0, -14, 229, 755, -272, 161, 161, 0], [-93, 2272, -2272, 21, -3439, -21, 186, 222, 0, -186, -99, 276, -258, 90], [1290, 0, -1412, 106, 232, -600, 0, 872, -418, 358, -328, 10, 10, 0], [-3900, 1000, 0, -107, 4387, -466, 553, 34, -595, 0, -259, -293, 280, -595], [-692, -392, 392, -81, 6894, 81, -503, -968, 0, 503, 708, 381, -270, 197], [1596, -836, 0, -158, -1820, -1343, -83, -980, -271, 0, 1464, -1044, 457, -271], [11862, 0, -960, 319, 138, 520, 0, 220, 243, -345, -858, -401, -401, 0], [-341, -944, 944, -7, 7413, 7, -338, -266, 0, 338, -51, 224, -10, 206], [6719, 0, -770, -71, 356, 450, 0, -244, -497, 149, -353, -68, -68, 0], [-2014, 1372, 0, 434, 1752, 792, -28, 572, -278, 0, 410, 592, -634, -278], [-552, -1128, 1128, 301, 5348, -301, -243, -826, 0, 243, -320, 339, -8, -663], [-2146, -1584, 0, -147, 2417, -333, 76, 220, -694, 0, 581, -381, 99, -694], [1827, 0, -310, 159, -470, -918, 0, 768, 95, 373, 653, 342, 342, 0], [6022, -1080, 0, -62, -6508, 417, -477, -690, -177, 0, 590, 488, 133, -177], [1122, -636, 636, -603, 479, 603, 282, 929, 0, -282, 1162, 167, 237, -276], [-5670, 0, 3580, 42, 560, -18, 0, 372, -92, -178, -992, -390, -390, 0], [740, 758, -758, 30, -294, -30, 533, 161, 0, -533, 282, -648, 237, -731], [1174, 1316, 0, -149, -1035, -944, 361, -752, -139, 0, 63, -573, 520, -139], [-4691, 0, 748, 71, 57, 635, 0, -337, 264, -420, -402, -274, -274, 0], [3311, 4242, 0, -11, -2499, 622, 269, 1865, -233, 0, -949, 90, -521, -233], [-332, -120, 120, 304, -2186, -304, 184, -444, 0, -184, -284, -606, -212, 218], [3722, -1260, 0, -556, -3042, -322, 206, -40, -398, 0, -804, -240, 638, -398], [764, -1898, 1898, -770, -11469, 770, -997, 649, 0, 997, 664, 912, 991, -251], [676, -1790, 1790, -424, -1433, 424, 361, -51, 0, -361, 1684, 142, -109, -697], [2377, 0, -2228, 702, 634, -1186, 0, 2620, -424, 394, -1807, -471, -471, 0], [154, 3084, -3084, -168, 1218, 168, -296, -346, 0, 296, 554, 16, 282, -334], [376, 0, -2034, 180, -124, -738, 0, 264, -80, 914, 373, 429, 429, 0], [556, -5244, 5244, -165, 2625, 165, 169, 1826, 0, -169, -1162, 721, 222, 323], [-6176, 0, 856, 304, -278, 622, 0, -554, 50, 490, 206, 232, 232, 0], [1081, 2176, -2176, -452, 6168, 452, -710, 2211, 0, 710, -1565, 1377, 1339, -424], [-1298, 1156, 0, -136, 654, -486, -266, -1808, -202, 0, 948, 28, 650, -202], [5866, 0, -304, 227, 1458, 546, 0, 106, -381, 183, -2436, -751, -751, 0], [-16847, -3608, 0, 944, 15748, -1171, 443, -1351, 589, 0, 1584, -573, -346, 589], [-4411, -1912, 0, 23, 4007, 1286, -809, 475, 473, 0, -95, 858, -451, 473], [2751, 0, 3802, -129, -174, 242, 0, -116, -393, 9, 459, 156, 156, 0], [-6795, 464, 0, 1052, 7229, 961, 929, 2600, 745, 0, -1460, 404, -1609, 745], [4547, 328, 0, 776, -6445, -241, -533, -2300, -217, 0, 3076, 348, -187, -217], [7760, 0, 4, -550, -344, -488, 0, -1368, 422, 334, 1508, 614, 614, 0], [7585, -624, 0, 7, -7359, 502, 253, 193, -529, 0, -465, 522, 13, -529], [173, -818, 0, -775, -137, -714, -711, -795, -789, 0, 1375, -686, 803, -789], [-4622, 0, 3848, -1399, 814, 1056, 0, -2720, -703, -431, 662, 77, 77, 0], [12778, 0, -2392, -121, 322, -1100, 0, 630, -187, 415, -94, 107, 107, 0], [-1092, -198, 198, 391, -5404, -391, -60, -2189, 0, 60, 956, -1081, -641, 294], [-1952, 4784, 0, 301, 2173, 445, 242, 1082, 976, 0, -1303, 165, -581, 976], [-8697, 0, 1784, 485, 91, 1259, 0, 563, -172, -680, -1204, -628, -628, 0], [-3740, 0, -410, -26, -1788, 106, 0, 304, 342, -804, 2319, 505, 505, 0], [858, -1052, 1052, 294, 5257, -294, 1395, 3083, 0, -1395, -2570, 590, -243, 189], [-620, -186, 186, 664, 891, -664, 1033, 201, 0, -1033, -1160, 306, -989, -193], [1498, 854, -854, -836, 18961, 836, -545, 2235, 0, 545, -272, 1146, 1207, -235], [-9955, 1988, 0, -555, 10391, 163, -920, 1483, -874, 0, 1441, -638, -246, -874], [7015, 0, 1656, 241, -485, 37, 0, 349, 944, -848, -58, -302, -302, 0], [-3341, -1774, 0, 773, 2307, -1998, 151, -1085, 461, 0, 2781, -1586, -361, 461], [9630, 0, 1370, -384, 1602, 1266, 0, -1242, 60, -852, -2253, -1035, -1035, 0], [-4421, 0, -2808, 340, -1191, -499, 0, -291, 603, 867, 1710, 859, 859, 0], [5243, 4036, 0, 425, -4525, -984, 745, 1939, -805, 0, 1149, -1382, -823, -805], [279, -3184, 3184, -149, 11296, 149, -57, -1121, 0, 57, 1511, -1288, 187, -93], [450, -4696, 4696, -726, -14428, 726, -126, 982, 0, 126, 1070, 856, -150, 678], [13904, 0, -6092, -456, 422, -700, 0, 142, -308, -46, 28, -6, -6, 0], [1580, 2700, -2700, -768, 18612, 768, -1222, 2, 0, 1222, 1080, -516, 2034, -1106], [4432, 0, 3932, -1428, 198, 1080, 0, -2568, -834, -534, 1578, 348, 348, 0], [-11401, -536, 0, 1170, 9129, -1981, -337, -2632, -215, 0, 5210, -1216, -405, -215], [-1473, -2340, 2340, 937, 8062, -937, 621, -2809, 0, -621, 619, -2208, -1157, 471], [15981, 0, -1414, -446, -1496, 42, 0, -1132, 26, 172, 2999, 1057, 1057, 0], [10637, 2016, 0, 456, -12734, 477, -531, -3861, 333, 0, 1164, 1587, 654, 333], [9631, 0, -108, -1367, 582, 108, 0, -2434, -951, 543, 1449, 664, 664, 0], [22293, 1522, 0, 83, -21961, -533, 782, -319, 1348, 0, -2213, -166, 284, 1348], [1279, 172, -172, -1224, -18947, 1224, -179, 822, 0, 179, 2671, 1067, 234, -355], [-2170, 0, 3716, -214, 926, 582, 0, -1274, -176, 440, -848, -136, -136, 0], [-2082, 2264, -2264, 498, -15240, -498, -252, -1750, 0, 252, 4, 770, -1332, 648]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_225_e_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_225_4_e_d();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_225_4_e_d(:prec:=14)
    chi := MakeCharacter_225_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 4));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 1;
    while true do
        trunc_vec := Vector(Kf, [0] cat [f_vec[i]: i in [1..prec]]);
        B := Basis(S, prec + 1);
        S_basismat := Matrix([AbsEltseq(g): g in B]);
        if Rank(S_basismat) eq Min(NumberOfRows(S_basismat), NumberOfColumns(S_basismat)) then
            S_basismat := ChangeRing(S_basismat,Kf);
            f_lincom := Solution(S_basismat,trunc_vec);
            f := &+[f_lincom[i]*Basis(S)[i] : i in [1..#Basis(S)]];
            return f;
        end if;
        error if prec eq maxprec, "Unable to distinguish newform within newspace";
        prec := Min(Ceiling(1.25 * prec), maxprec);
    end while;
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_225_4_e_d();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function MakeNewformModSym_225_4_e_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_225_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![82944, 345600, 1572480, -276096, 765088, 55412, 209529, 2346, 23232, 1800, 1605, 60, 48, 2, 1]>],Snew);
    return Vf;
end function;