
// Make newform 225.5.d.c in Magma, downloaded from the LMFDB on 14 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_225_d();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_225_d_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_5_d_c();".
// 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_5_d_c();".
// 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 := [162, -2376, 13068, -31836, 56980, 2904, -10486, -132, 968, -24, 44, 0, 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], [-7651845385224918119079, -9281218694420931552, 50589972327383879472, -120760772221371700032, 212074155831157313984, 32715356917855883824, -49342506377883533248, -11084488624702739552, -1914468230125590682, -472682634797646032, -43216181719854928, -9205518060830864], [-2092330030691253541968, 7485882846759252675012, -26970923564914555440344, -2795843714395884848988, 5013725470280685951134, 431176782518483268750, -459089724012763395643, -32645585063003023380, -20254640617427255320, -1936693333443422163, -484376265228702023, -42108454727855130], [-2549046723107177382927, -1819001450958729552, 10236015128860053912, -26047045140799471392, 47725929258219911434, -5703324607123819816, -10859571130519664228, 4719074442074484068, -483805975140515702, 176100853141904888, -8111221293180158, 3417380478904796], [95725631616895206949536, -342373910940189954259476, 1233279892658346973578100, 129757229348604442131972, -232554828348420481461130, -20662179200412899113902, 21746874422441363906753, 1905943953396685044804, 953133948425494597700, 105355224813541502661, 22859634896916333385, 2253442147022516442], [-14321659915547781033492, 51231277333359413681010, -184562897632539521885698, -19267752187356420495648, 34534501218597548543098, 3071040860956819022952, -3194080372539087937724, -282479450016665928324, -140213313272427505430, -15610656495734355342, -3370009180129990231, -334161988460954652], [-2847739099515269089653, 27842788425249468829080, -76727752715295456967026, 182736471771408815088194, 4769479242889917239382, -33343227004112994874736, -6647927184287443971, 3067422329360704520494, -57511384918025116356, 139857088936859480590, 426288438156659226, 3178173385222898420], [651112431395355, -6366213104454000, 17544952196186850, -41782376687200790, -1085676774313920, 7649001166611560, 1102357150965, -702547605807370, 13158272315610, -32041148924650, -98179240470, -728211395480], [63860035827578958425250, -585385681373531014028220, 1295123034201424304639040, -3084149548450991187023170, -79436939839993974746820, 565595075853549346605070, -82047646168236382725, -52251817326261686121980, 968132344814205506190, -2380868173870006238555, -7463932749583587075, -54061361014743333310], [88397784919418418, -810326699768239038, 1792870731637559046, -4269311512522516658, -109720587137002512, 784193391471170450, -134303607792081, -72389966279209282, 1340568710902674, -3298943456608309, -10368114558450, -74912206398590], [68915005703830992454083, -673823709523528133801112, 1857116185835990061635010, -4422631538437225897720934, -114077909066032028038206, 809578181849231009568416, 122317203680606097093, -74361001263601981876018, 1392356258463117643194, -3391390537112860052818, -10409545733935595754, -77077106696353652072], [842427807504995092303350, -7722560080970343590695182, 17087897539436276357990226, -40690837662638656943509790, -1034794952846615321615256, 7474803359000241505561250, -1228534977915030230739, -689977263174733908191698, 12771576493362969978078, -31444106279877903895663, -99094984654672179996, -714032143416494140586]];
    Rf_basisdens := [1, 275709588562971426171, 827128765688914278513, 39387084080424489453, 827128765688914278513, 39387084080424489453, 354483756723820405077, 42822470560023, 2481386297066742835539, 810126637938499, 827128765688914278513, 2481386297066742835539];
    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_d();"
function MakeCharacter_225_d()
    N := 225;
    order := 2;
    char_gens := [101, 127];
    v := [1, 1];
    // 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_d_Hecke();"
function MakeCharacter_225_d_Hecke( : Kf := false)
    N := 225;
    order := 2;
    char_gens := [101, 127];
    char_values := [[-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := ISA(Type(Kf), Fld), 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]];
    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 := 5;
    raw_aps := [[0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 1], [0, 0, 0, 0, 0, 0, -2, 9, 0, 0, -8, 0], [0, 0, -20, 0, 1, -1, 0, 0, 0, 0, 0, 0], [45, -7, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -53, 0, 2, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 6, -7, 0, -10], [311, -21, 0, -11, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 2, 266, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 42, -28, 0, -14], [0, 0, 0, 0, 0, 0, -54, -62, 0, 0, -11, 0], [0, 0, 351, 0, 8, -15, 0, 0, 0, 0, 0, 0], [0, 0, 224, 0, -28, 2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -28, -88, 0, 9], [1817, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 32, -68, 0, 0, 289, 0], [0, 0, 0, 0, 0, 0, 0, 0, -22, -66, 0, -12], [0, 0, 0, 0, 0, 0, -214, 410, 0, 0, 40, 0], [-600, -112, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 939, 0, 36, -15, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -420, 20, 0, -24], [0, 0, 0, 0, 0, 0, -464, 9, 0, 0, -372, 0], [0, 0, 0, 0, 0, 0, 0, 0, 238, 56, 0, -14], [0, 0, 0, 0, 0, 0, 94, 1558, 0, 0, 54, 0], [0, 0, 1234, 0, 2, 58, 0, 0, 0, 0, 0, 0], [977, 148, 0, 124, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -1156, 0, -52, -68, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -594, -1342, 0, 0, -724, 0], [0, 0, 0, 0, 0, 0, 0, 0, -126, -218, 0, 228], [0, 0, -2712, 0, 39, 127, 0, 0, 0, 0, 0, 0], [-1706, -336, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -144, -253, 0, 200], [3779, 657, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -244, -4243, 0, 0, 396, 0], [0, 0, 0, 0, 0, 0, 2, 3354, 0, 0, 645, 0], [0, 0, 154, 0, -70, 42, 0, 0, 0, 0, 0, 0], [0, 0, -1236, 0, 87, -115, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -532, -136, 0, -351], [9069, -392, 0, 298, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -742, -222, 0, -405], [0, 0, 0, 0, 0, 0, 1142, 4473, 0, 0, 1176, 0], [0, 0, 7004, 0, -29, -13, 0, 0, 0, 0, 0, 0], [40723, 399, 0, -227, 0, 0, 0, 0, 0, 0, 0, 0], [48145, -91, 0, 251, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -870, -3862, 0, 0, -2325, 0], [0, 0, -2718, 0, 418, -222, 0, 0, 0, 0, 0, 0], [46387, 0, 0, -268, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1352, 0, -644, -126, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1162, -1582, 0, 200], [-18225, -308, 0, -228, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1344, -1556, 0, 204], [0, 0, -6424, 0, 352, -44, 0, 0, 0, 0, 0, 0], [0, 0, -10686, 0, -70, -42, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -434, 319, 0, -898], [-3654, -4340, 0, -294, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 4566, -1383, 0, 0, 1408, 0], [0, 0, 0, 0, 0, 0, 0, 0, -1786, -897, 0, 638], [0, 0, 0, 0, 0, 0, 2980, 4916, 0, 0, 2603, 0], [0, 0, -9040, 0, 529, -123, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1744, -1896, 0, 0, 227, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1876, -320, 0, -449], [0, 0, 0, 0, 0, 0, -3502, -13725, 0, 0, -1716, 0], [0, 0, 6028, 0, 420, 448, 0, 0, 0, 0, 0, 0], [-37646, 2924, 0, 642, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -3410, -10457, 0, 0, -6220, 0], [0, 0, -12511, 0, -720, 95, 0, 0, 0, 0, 0, 0], [-28696, 6664, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -1572, 0, -1089, -283, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -830, 130, 0, 1120], [0, 0, 0, 0, 0, 0, -4260, 9384, 0, 0, 4009, 0], [0, 0, 0, 0, 0, 0, 6574, 17613, 0, 0, 3196, 0], [-2759, 45, 0, -341, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 14220, 0, -396, 200, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -5714, 2684, 0, 1654], [0, 0, 0, 0, 0, 0, -1446, -27037, 0, 0, -1444, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1978, 4128, 0, 286], [-117931, -4508, 0, 838, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -6678, 506, 0, -400], [-172282, -84, 0, -370, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -1330, -1778, 0, 995], [0, 0, 0, 0, 0, 0, -2686, 2651, 0, 0, 7876, 0], [-146675, 1365, 0, 871, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 10628, 0, 1780, 764, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 4040, 852, 0, 204], [0, 0, 0, 0, 0, 0, 220, 10726, 0, 0, 3380, 0], [0, 0, 0, 0, 0, 0, 0, 0, 6370, 2080, 0, -74], [0, 0, 0, 0, 0, 0, 1830, -5826, 0, 0, 5360, 0], [0, 0, 16195, 0, -318, -1439, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -3892, 216, 0, -2929], [0, 0, 0, 0, 0, 0, -906, 42046, 0, 0, -9501, 0], [0, 0, 0, 0, 0, 0, 0, 0, 6532, -264, 0, 884], [149213, -9317, 0, 911, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 4958, 0, 702, 1230, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -10668, 5357, 0, 580], [0, 0, 0, 0, 0, 0, 0, 0, 182, 891, 0, -2262], [0, 0, 0, 0, 0, 0, 2470, -20838, 0, 0, -7487, 0], [-144857, -196, 0, 726, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 4810, 88966, 0, 0, 410, 0], [0, 0, 35648, 0, -119, 33, 0, 0, 0, 0, 0, 0], [0, 0, 12587, 0, -1406, 1469, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5926, 3583, 0, -2882], [181991, -11025, 0, 1137, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1184, -48385, 0, 0, 7788, 0], [0, 0, -4042, 0, -3146, -2314, 0, 0, 0, 0, 0, 0], [0, 0, -49572, 0, 1304, 866, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -348, -8284, 0, -2368], [-283829, 5012, 0, 1106, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 4212, 31796, 0, 0, 15728, 0], [0, 0, 0, 0, 0, 0, 388, 432, 0, 0, 19612, 0], [0, 0, -14720, 0, -2836, 1078, 0, 0, 0, 0, 0, 0], [41651, -3605, 0, -335, 0, 0, 0, 0, 0, 0, 0, 0], [51825, 2527, 0, 1767, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -5192, 9820, 0, 2692], [0, 0, 0, 0, 0, 0, 10690, -44122, 0, 0, 11372, 0], [0, 0, -12816, 0, 2696, -876, 0, 0, 0, 0, 0, 0], [0, 0, -64372, 0, -1533, -941, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -3598, 4414, 0, 2220], [-177428, -11788, 0, 568, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 10866, -10278, 0, 0, -16960, 0], [0, 0, 30736, 0, 3443, 2717, 0, 0, 0, 0, 0, 0], [0, 0, 49496, 0, 856, 136, 0, 0, 0, 0, 0, 0], [-63708, 14770, 0, -1128, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -13650, 11577, 0, 4558], [-116703, 23156, 0, -4164, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 12726, -9606, 0, 4551], [0, 0, 0, 0, 0, 0, 3126, 37810, 0, 0, -3855, 0], [0, 0, 0, 0, 0, 0, 6444, 9068, 0, 0, 2928, 0], [59436, 25592, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -148168, 0, 1016, -280, 0, 0, 0, 0, 0, 0], [-31210, -4368, 0, -46, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 11208, -129589, 0, 0, -6280, 0], [0, 0, 0, 0, 0, 0, 0, 0, 8624, 7952, 0, 224], [199017, 15512, 0, 5222, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 22824, 0, 1068, -2566, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1258, 58186, 0, 0, -18355, 0], [0, 0, -24028, 0, 1340, 3000, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1906, 15852, 0, -1998], [-211625, -24619, 0, -1779, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -11452, -9037, 0, -3628], [0, 0, 0, 0, 0, 0, -6638, 11530, 0, 0, -4803, 0], [0, 0, -19934, 0, -6566, -2730, 0, 0, 0, 0, 0, 0], [-451418, -18900, 0, -184, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -3486, -3070, 0, -19], [0, 0, 0, 0, 0, 0, 12556, 22409, 0, 0, 40088, 0], [0, 0, 36112, 0, 5032, 2668, 0, 0, 0, 0, 0, 0], [-58412, 14070, 0, -6248, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 34588, 0, -5780, -2060, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 16136, 13813, 0, 0, -920, 0], [0, 0, 0, 0, 0, 0, 0, 0, -23408, 4644, 0, -4044], [0, 0, 0, 0, 0, 0, -18210, -37870, 0, 0, 903, 0], [0, 0, -153749, 0, -988, -4003, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -22368, 135264, 0, 0, 10432, 0], [0, 0, 0, 0, 0, 0, 0, 0, -3240, -26892, 0, -3655], [514111, -13305, 0, -4391, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 9954, -14195, 0, 9782], [0, 0, 0, 0, 0, 0, -2698, -105137, 0, 0, 29668, 0], [0, 0, 0, 0, 0, 0, 0, 0, 21840, 4571, 0, 3472], [0, 0, 69713, 0, 5698, -3909, 0, 0, 0, 0, 0, 0], [0, 0, 38692, 0, -3852, -620, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -14808, 196744, 0, 0, -12192, 0], [0, 0, 0, 0, 0, 0, 0, 0, 27020, -25568, 0, -4849], [0, 0, 71740, 0, 4957, 965, 0, 0, 0, 0, 0, 0], [0, 0, 440, 0, -4544, -2876, 0, 0, 0, 0, 0, 0], [-20049, 1849, 0, -2975, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 4204, -26044, 0, 0, 15304, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_225_d_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_225_5_d_c();".
// 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_5_d_c(:prec:=12)
    chi := MakeCharacter_225_d();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 5));
    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_5_d_c();".
// 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_5_d_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_225_d();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,5,sign)));
    Vf := Kernel([<2,R![-5832, 0, 2092, 0, -94, 0, 1]>],Snew);
    return Vf;
end function;