
// Make newform 450.2.l.c in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_450_l();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_450_l_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_450_2_l_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_450_2_l_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 := [11105, 21080, 1135, -10440, 18271, 14670, -15752, -11958, 6259, 4642, -1584, -936, 262, 94, -24, -4, 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, 0], [-36766787356071608007667585, -2518379054720136093673150, 3697181661562006774932655, -24907817546557276804454900, -132407938274590801116617, 19090952137993148860203137, 3146071202213920505926562, -7616568797732981879968331, -1203647771351280118822772, 1696861859405690275607183, 142199510139739938929725, -200158344597704877408533, -4830492818371367785816, 11692850809057402771308, -222689963418511649230, -216062652991087486517], [-91429957070907564671351610, -24344868121453920674255425, 104941588005445229750025955, -49901182956943689204688600, -78953875227996269190814922, 41504619394117749813534187, 37039168692149977669870742, -15187750120575825142764691, -9299193782108641569228897, 3010621887147134394227693, 1241691800858697588974155, -310570846147264249920748, -82635447635890840435206, 15780868218717044920838, 1990174463411413335455, -265732875567395073657], [49504201727591742141925840, -30211511665347684930563925, -35152535417255483308930345, 72705390025681627618678875, 32685303511358818643459718, -40039221089263675036570378, -26170693115741185316682238, 12537511618422589653976589, 9176301900507627049359998, -2812846670822251548242917, -1482042781994674721659060, 368633707984163431786287, 114953003304995515650009, -25795447997562939235427, -3304044074082752777785, 702375526475979478783], [-10609792203969280509060435, 44218902932902401592517525, -38527298141204740926854120, -32920117107035471964771150, 52805059704158952082659513, 37963741339531390922508492, -31019540923068154312589818, -21294724748266832493330656, 12651496691912944253088318, 5262312369001650000411893, -3188418937056165399714235, -424999022122650057110578, 376031136320790011131049, -5742569515547694072792, -18777167771030970954085, 2296292574754742295778], [2136427940493114503422100, 648738016230841178303300, -1056349544697974528792295, 1751624753872932949676820, 1561882257402276944726861, -1439503235730439393390400, -1201274203759528179191999, 521913912002145220106872, 469952553315433857842339, -132289916480158900957958, -96439403899597794479889, 23588922138538677715666, 9842957759035774370007, -2318583371847014159396, -425968439454909023504, 102309325228650587446], [-54250932322302201472419340, -9360398580013835322450250, 52324310540791207677909920, -56558593741097731772595025, -57387686031561159003451668, 48847780672259798172146818, 38669929503840247602021988, -20136486077065159637670929, -13952896772257730298480513, 5120683136367422331041022, 2772410277587660664967595, -843282840396799929838402, -279795475163391518337309, 76658914050049775735647, 12108798860040862926030, -3180944021456305418003], [68909263042569036125855870, -36825642304869580862835650, -40267892959128470588816910, 77529726343056299821308475, 60090136619662887556863749, -60890899573543787233277629, -46215997398926518335783349, 24890198037032388014893387, 17064490132080048666621894, -6202656224864865816953881, -3429976210567685569153495, 998563896155868111731741, 347746317243990280362907, -89761163865409232604666, -15083470458469574064070, 3754084957894051064894], [-3543808081464618883649710, -37529598314145175899342950, 19285624254963832677634030, -1287569082167687474870500, -38968246371604410909723242, 10251508388168254787967127, 35426011517516138530176972, -4220420776903807591816446, -16064794943644897425418542, 1783092343379774194213858, 3759928827840084662619945, -558606750221222446608433, -416649754235775402919971, 73342780711804225674553, 19337803181486775124430, -3973936680890235791447], [2686892356943722466767320, 1107814885746452854956660, -3317734863222409081306840, 1780293400073412257719180, 3808469691277882506316428, -1829541259881354437224758, -2456515842661058092401641, 794296728242089068127598, 865180285576144364779891, -224574784032425709435836, -164810455922834007902603, 40151303735551147100534, 15994665739743758299833, -3827536126025598552754, -661637860075799467724, 161168803239414780910], [1025511991580005661458970, 2233536035317308402213160, -1332489074800974413015230, 47852376229771545163160, 1984064979606023800874943, -552527714012012839873230, -1736893910036273955685895, 317412747752376679716350, 733989392081838127266340, -130154545341889076617028, -157188061964900911061375, 31059323892781834514230, 16401138606042229504145, -3474010950605366952410, -719766109199837227876, 164194301487618633410], [17988954213833427432880420, 3148595090397016687536785, -18066278410794456581746620, 10638060647839174881601105, 20000504884661427693942799, -6217938413303324609066387, -12618721201525299962308298, 1109399877527339581698789, 4699509630594445307398133, -234297600527699664967938, -1002540084989697030577461, 90720060109888652320392, 106085643722406510377459, -13869542625980282893647, -4786382082628259634787, 838230261608330797746], [4308719570906786186270775, 12987872084176881105529190, -11744901364273461227406290, 1296008565761348543038545, 20462537822506322798652590, 1820874604516396099156933, -14822422913804415887485051, -1561116277429088140696022, 5770412096942933836755541, 90637788457715278790657, -1186706887477185726218359, 82750556881744744497304, 120512535486778277787298, -15283113254819993188609, -5174938240432228690153, 908669311439016539378], [-61955069294991105282252615, -84912508264192029168955175, 67691544638516502492240320, 10820382804042389176367050, -98305813076082701994022623, 11636953568620512039028188, 77592234545423436266661168, -7246181075197585096864139, -31333706626178340309002363, 3470026494541648226365932, 6724682741769758012533880, -1007374201550559641412517, -708040835635361844344624, 125897227911835136338677, 31619240120523939425865, -6533138943972814245933], [-86034467893737742078614385, -134474994846987328679889500, 81809532792011322933042280, -15715753986137640451935575, -183985152384127705242957177, 9914427702507185104901877, 145008784517773349507323362, 613642773665136143529419, -55828465749972912641212972, 1598877636542195838733293, 11575346968422089033871410, -1024978252277545106715408, -1190582299946926644582166, 159762414534900794176883, 52366780732480415686465, -9361640845971301396397], [-25977835089457219631295215, -32435795750138591078265085, 21432392262237651257289005, -4541857374012864958803405, -42222846117366993415189833, 8620102019274457312300996, 32442715594977735558622037, -3751634380400785138202611, -12215850222197537282508032, 1429316307775823908404854, 2410564961185097493334441, -348172097985448217050033, -237493265324739844946336, 40235447863223328373118, 9926479283735303812942, -1965198321477020977800]];
    Rf_basisdens := [1, 30245841639247391690913875, 30245841639247391690913875, 30245841639247391690913875, 30245841639247391690913875, 1209833665569895667636555, 30245841639247391690913875, 30245841639247391690913875, 30245841639247391690913875, 1209833665569895667636555, 1209833665569895667636555, 6049168327849478338182775, 6049168327849478338182775, 30245841639247391690913875, 30245841639247391690913875, 6049168327849478338182775];
    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_450_l();"
function MakeCharacter_450_l()
    N := 450;
    order := 10;
    char_gens := [101, 127];
    v := [10, 9];
    // 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_450_l_Hecke();"
function MakeCharacter_450_l_Hecke(Kf)
    N := 450;
    order := 10;
    char_gens := [101, 127];
    char_values := [[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, -1, 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 := 2;
    raw_aps := [[0, 0, 0, 0, 0, 0, 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], [-1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, -1], [0, 0, 0, 1, 0, -1, -1, 0, 1, 0, 0, 1, 0, -2, 0, -1], [0, 0, 0, -1, 0, 2, -1, -1, 0, -1, 0, 0, -1, 1, 0, -1], [1, -1, 0, -1, 0, 1, 1, 1, -1, -2, -1, 0, 0, 2, 0, 1], [1, -2, -1, 1, 1, 1, 1, 1, -2, 0, 1, 0, 0, 0, 1, 0], [0, 0, -1, 1, 0, 3, 0, 0, 2, -2, -2, -1, 1, -1, 1, 1], [0, -3, 0, 1, 0, 2, 1, 0, -1, -2, 0, -1, 0, 2, 1, 0], [-1, -3, 1, 0, 0, -2, -2, -1, -1, -1, 0, 1, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0, 0, 0, 1, 1, -1, 0, 1, 0, 0, 0], [-1, 0, -2, -1, -1, 0, 0, 0, -2, 3, 3, 1, 0, 2, -2, -2], [-4, 0, -1, -2, -2, 5, 0, 0, -1, -5, -2, 0, -1, 1, -2, 0], [6, 1, 1, 1, 1, 0, 0, -3, 2, 5, 3, 1, -2, 0, 0, 0], [-2, 0, -1, 0, 0, 0, -2, -1, 1, -3, -1, 0, -1, -1, -1, 1], [-3, 1, 1, 0, -1, 2, 1, 2, 2, 1, -1, -2, 1, -2, 0, 0], [2, 4, 0, 0, -1, -1, 0, 1, 1, 4, 2, 1, 2, 2, 0, 0], [0, -3, 0, -1, -1, -3, 4, 3, -1, 6, 5, -1, 3, 1, 0, 2], [1, 3, 0, 1, 0, 1, -1, 0, 5, -2, -2, 0, 2, 0, 0, 1], [5, 3, -1, 1, -1, -7, -1, -1, 3, 3, 2, -1, 1, -3, 0, 1], [1, 7, 1, 3, 1, -2, -4, 1, 6, 2, -1, -2, 0, -2, 3, 1], [6, 4, -1, 0, 0, -4, -5, -3, 1, 2, 10, 1, -2, -4, 0, -2], [-7, 0, -1, -2, -2, 1, -4, 0, 2, -1, -6, 1, 1, -4, 0, 0], [0, 2, 1, 2, 0, -5, 0, -3, 0, -4, 0, 2, -3, 2, -1, -1], [2, 4, -2, 0, -1, -5, 2, -1, -3, -1, 5, -2, 1, -3, -1, 1], [5, -2, -3, -2, 0, -2, 2, 1, -4, 0, 2, -3, 1, 2, -2, 4], [0, 6, 2, 2, 3, 1, 1, 1, 8, -5, -2, -1, 2, -2, 2, 3], [2, -2, 2, 1, 0, -2, 1, 1, -2, 1, 0, -2, 1, 3, 2, 1], [1, 2, -1, -1, -1, 2, 2, 0, -2, 2, -3, -1, 1, 0, -1, 1], [-2, 0, 2, 1, 0, 8, 0, 0, -2, -3, -5, 2, -2, -1, 1, 1], [6, -1, 0, 1, -1, -5, -2, -1, 1, 6, 1, 3, -1, -1, 0, 0], [1, 0, 4, 3, 5, -4, 2, 0, 0, 3, -1, 1, 0, 0, 2, -2], [2, 2, 3, 3, 2, -1, -6, -2, 4, -2, 2, 1, -1, -3, 3, -3], [4, -4, 1, 1, 0, -7, 1, 1, 3, 1, 7, 1, -1, -1, 1, 0], [-2, 6, 0, -1, 1, 4, 2, -2, -4, -1, -4, 0, 0, -2, -1, -1], [-2, 10, -3, -4, -4, 5, -11, 0, 8, 1, 3, 1, -2, -10, -5, 0], [4, 6, -2, 1, -2, 2, 0, 2, 1, 1, 0, -1, 2, -2, -1, 3], [-2, 4, 2, 2, 2, 4, -4, 0, 0, -6, -10, 0, -2, 2, 0, 0], [-6, 2, 1, -2, -1, 3, -3, -5, -1, -2, 0, 3, -1, 3, -5, -2], [1, -5, 2, 1, 3, 3, 3, 2, -1, -2, -2, 0, -3, 5, 2, 0], [2, -4, -1, 3, 2, -3, -4, 1, 2, 0, 3, 3, -1, -3, 3, -1], [1, -4, 4, 3, 1, 0, -1, -1, -5, 3, 3, -2, 1, 7, 5, 2], [0, -10, 0, 2, 4, 3, 10, 2, -10, -4, 1, -2, 0, 8, 2, 0], [7, 2, 3, 2, -1, -3, -6, 1, 4, 9, 3, 1, 0, -3, 0, -3], [-1, 4, 1, 2, 0, -2, 5, 0, 0, 1, -2, -3, 2, -6, -3, 0], [0, 4, 0, 0, 0, 0, -12, 0, 6, 2, 0, 0, 0, -8, 0, 0], [12, -6, 1, 0, 2, -9, 2, 2, 2, 5, -1, 1, -1, 4, 2, 0], [-5, -5, -2, -1, 2, 0, 2, 2, -3, -1, 6, -2, 2, 4, 1, -1], [-1, 6, -1, 0, 0, 1, -4, -1, 4, -1, -5, -1, -1, 0, 0, -2], [4, 2, 1, -1, 1, -3, -2, 2, -2, 4, 7, 0, -1, 0, 0, 2], [-6, 4, 2, 2, 2, 0, 0, -2, 0, -4, -6, 0, -2, 6, 2, -2], [1, -6, -1, 0, 3, 2, 9, -3, 0, -6, -2, 3, -2, 9, 1, 2], [2, -3, 0, -3, 0, -6, 3, 3, 0, 0, 6, 0, 3, 0, 0, 0], [-8, -2, -4, -7, -9, 5, -2, -2, -6, -3, -5, 2, -4, 4, -7, -3], [6, -2, 0, 3, 2, 8, 2, -2, -7, -1, 2, 1, -8, 2, 3, -5], [5, 2, 1, 0, -2, -8, 4, -2, -3, 6, 0, 3, -1, 2, -1, 0], [-5, 0, -5, -2, -4, 4, -4, -5, -2, -4, -4, -3, -1, 4, -2, -6], [-9, 2, 0, -3, 0, 10, 0, 0, -12, -5, -4, 0, 0, 1, -3, -3], [14, -4, -1, 1, 3, -1, -4, 2, 2, 12, 1, -2, 1, -2, 2, 0], [0, 1, -2, -5, -1, -1, 0, 3, -3, 4, 5, 1, 1, -9, -2, 2], [4, -4, 4, 4, 7, -5, 0, 3, -1, -1, -3, -4, 3, -5, 5, 5], [0, 4, 3, 2, 4, 1, 0, 2, 7, -7, -4, -2, 3, -5, 2, 6], [-1, 1, 5, 7, 6, -4, 11, 0, -4, -1, -4, -2, -1, 11, 2, -1], [3, 10, -1, 0, -2, 3, 5, 1, -5, -5, 6, 1, 0, -1, 0, 1], [4, 7, -1, 1, -2, -3, -7, -1, 2, 0, 5, -1, 3, -15, 1, -1], [1, -1, -1, -2, 0, -4, -5, 2, 3, 2, -2, -5, 1, -1, -1, 0], [1, -14, 2, 2, 3, -2, 6, 0, -5, -1, 2, 0, 0, 0, 1, -1], [15, -3, -7, -3, -3, -5, 4, 5, 3, 9, 7, -4, 2, -9, -5, 5], [-2, -2, -3, -2, -2, 1, 9, 2, -2, -1, 1, -1, 2, -8, 1, 2], [-2, -2, 2, -2, 0, 0, 12, 6, -2, 0, -2, -4, 6, 0, 2, 0], [-8, 4, 0, -1, -2, 6, -4, 2, 1, -3, -6, -1, 0, -6, -3, -1], [-1, 6, 3, 5, 1, -5, -6, 0, 2, 9, 5, -2, 1, 2, 2, 0], [0, -2, 0, -2, 0, -4, 0, 0, 16, 2, 2, 0, 0, 4, -2, -2], [4, 10, 0, -2, 4, -6, 0, 0, 6, 2, 6, 6, 4, -8, -6, 0], [-9, -5, 1, -2, -2, 2, 5, 6, -3, 8, -2, -3, 5, 1, 3, 6], [-3, -3, 3, 2, 3, -2, 6, 3, -2, 1, -6, -4, 3, 1, 0, 4], [2, -2, 0, -2, 2, 8, 18, 0, 4, 6, 0, -4, 2, -4, 0, 4], [-4, 2, 6, 3, 3, -5, 6, 0, 0, 3, 3, 4, -4, -6, 1, -3], [9, -8, 2, 0, 4, -5, 12, 4, 0, 10, 12, -4, 2, 4, 6, 6], [-5, -11, 2, -2, 0, 6, 0, -3, -10, -6, -2, -2, 3, 7, -3, 4], [0, -12, 1, -2, -3, 0, 7, 1, -7, 1, 1, 2, 2, 2, -1, 4], [-7, 6, 5, -3, -1, 3, -5, -3, 8, -4, -3, 0, 0, 0, -1, -2], [9, 13, 2, 5, 0, -10, -10, 2, 3, 5, 9, -2, 5, -8, -1, -1], [4, 2, -3, 6, 2, -7, 10, 4, -4, 15, 1, 1, -1, 4, -6, 0], [-4, 3, 1, -5, -8, 5, -1, -3, 3, 1, 0, 2, 0, 3, -4, 2], [6, 3, 0, 4, 1, -5, -5, -7, 5, -1, 4, -1, -4, 0, -2, -1], [-3, 18, -2, -2, -6, -1, -1, -4, 17, 0, -2, 5, -1, 3, -3, -4], [-2, -18, -5, -4, -1, 3, 15, 1, -11, 0, -2, -3, -3, -1, -5, 4], [-5, -2, -4, -8, -7, 8, 7, -3, -12, 0, -5, 1, -3, 3, -2, -1], [-2, 8, -3, -2, -1, -2, -7, -2, 1, 4, 4, 2, 0, -6, -3, -3], [5, 0, 3, 0, 3, -11, 5, 3, 9, 9, 7, 5, 4, 2, -2, 5], [-4, -4, 3, -1, 3, -3, -2, -2, 2, -2, 1, 1, -1, 2, 1, -3], [4, -4, -2, -3, 0, -4, 8, 3, -3, 7, 6, 0, -1, 5, -4, 1], [2, -5, -3, -2, -1, -6, 6, -1, 3, -2, 9, 0, 0, -6, 1, 1], [0, 4, 2, 4, 0, 0, -12, -6, 8, 2, 0, 4, -6, -4, -2, -2], [7, -15, 4, 1, 1, -6, 8, 3, -20, 3, 1, -4, 1, 25, 3, 4], [-2, 1, -1, 1, -2, 6, -3, -1, 3, -5, -9, -3, -1, 4, 2, -1], [-5, -11, 5, 5, -4, 8, -3, -2, -4, -1, -2, 4, -5, 9, 2, 5], [-1, 2, -7, -4, -1, 0, 8, 0, 7, 11, 13, 4, -1, -2, -6, -4], [-3, -4, -3, -4, 1, 5, -5, 3, 7, -3, -1, -3, 4, -10, 2, 3], [-4, 1, 4, 7, 8, 4, 2, 1, 3, -16, -7, -3, 2, 1, 9, -2], [8, 0, -2, -1, -4, 6, 6, 3, -3, -7, 8, 0, 5, -3, -2, 5], [7, 3, -2, 3, 4, -9, 13, 1, -5, 2, 3, 0, 2, 0, 2, 3], [2, -11, 3, -1, 5, 20, 8, 3, -2, -19, -5, 3, -4, 10, 0, 0], [0, -3, 3, 1, 1, -13, -3, -7, 1, 6, 15, 7, -3, 5, -2, 1], [1, -13, 5, -1, 5, 0, 7, -2, -5, 6, -7, 1, 1, 2, 1, -3], [-2, -5, 4, 6, 7, 11, 11, 1, -3, -11, 4, -3, 2, 10, 8, -1], [-4, 3, 3, 2, 1, 10, 10, 1, -1, 2, -13, 0, 0, -10, -1, -1], [-3, 7, 9, 7, 6, 4, -7, -7, 0, 3, -4, 9, -13, 3, 3, -6], [-3, -14, 1, 4, 4, -2, 1, 0, -14, -9, -8, -1, 0, 2, 5, -4], [5, -2, 7, 8, 9, -8, 4, 2, 1, 5, 1, 2, 1, -2, 4, -2], [8, -14, -3, -3, -1, -11, 16, 0, 0, 12, 21, 2, 1, 12, -4, -2], [-2, 0, 2, -2, 0, -4, -10, 0, 8, 0, -2, -2, 0, -2, 0, -2], [-9, 2, -1, -3, -3, 25, -7, 1, 6, -6, -3, -4, 0, -2, -3, 0], [-2, -8, 2, 2, -2, 0, 6, 0, -10, -8, -10, -2, 2, 20, 2, -2], [-2, -4, -2, -4, 2, 0, 2, 6, -8, 0, -6, -8, -4, 2, -2, 2], [-11, 0, 9, 0, 5, 3, -5, -1, 15, -9, -7, -3, 4, -10, 6, -1], [11, 1, -1, 1, -2, -3, -6, 1, -8, 11, 7, 4, -1, 7, 1, -4], [0, 4, -8, -4, 2, 2, -2, 1, 4, -16, -10, 3, 1, -13, -1, -2], [6, 2, 0, 0, -2, -6, 12, 10, -2, 10, 2, -2, 12, 2, -4, 8], [-2, -10, -5, -2, 1, 6, 0, -1, -11, -6, -5, -4, 5, 12, -2, -2], [0, 5, 2, -2, 3, -5, 0, -3, 17, 2, 6, 5, -2, -3, -2, -2], [-14, 15, -1, -1, 0, 5, -17, -3, 0, 6, -5, 1, -3, -17, 1, -1], [-5, -6, 8, 3, -5, 0, 11, 3, -3, 11, 1, -6, 1, 19, -1, 0], [8, 17, -2, -3, 2, 2, 2, -7, -14, -4, 2, 2, -3, -3, 0, -2], [8, 6, 2, 5, 2, -6, -5, -11, 14, -5, 0, 6, -3, -5, 4, -1], [-5, -9, -5, -2, -10, 4, 5, -2, -17, -2, -2, 1, -1, 7, -9, 6], [-3, 1, -3, -1, -4, -4, -3, -2, 10, 1, 2, -4, 3, 3, -4, -1], [4, -6, 4, 4, 4, 4, 4, -2, 0, -10, -8, 0, -6, -8, 2, 0], [-9, -11, 0, -4, -2, 3, 15, 0, -8, 5, -8, -1, 2, 6, 1, 2], [-6, -9, -2, 0, -1, 13, 2, -1, -10, -11, 3, 2, -1, 3, -1, -3], [-2, 5, 4, -1, 0, -9, 2, 9, -10, 4, 5, 0, 5, 3, 0, 0], [-2, 4, 1, -1, 5, -2, 6, 6, 1, -2, -9, -10, -3, 7, 3, 1], [-5, 15, -6, -6, -7, 2, -27, 1, 13, 11, -2, 4, 2, -14, -3, 0], [2, -13, 4, 3, 1, -5, -7, 0, -9, 5, 3, 9, -6, 5, 7, -10], [17, 1, -3, 0, -1, -32, 0, 1, -2, 15, 14, -4, 3, -1, 0, 0], [1, -2, -8, -4, -11, 2, 7, 5, -4, 0, -1, -3, 9, -5, -6, 11], [-12, 6, 7, 6, 4, 2, 4, -13, -3, -11, -5, 8, -9, 13, 3, -5], [13, 0, -7, -5, 1, -12, 2, 4, -2, 10, 13, 1, 1, -6, -3, -1], [1, 3, 3, 3, 4, 2, -19, -6, 8, -17, 2, 0, -7, -9, 4, -5], [1, 8, 1, 0, 2, -5, -3, 1, 17, 5, 1, 1, -1, 9, 0, 0], [-12, 18, -1, -4, -2, 13, 2, 6, -10, -5, -7, -5, 1, -16, -2, -4], [11, -14, 2, 4, 1, -14, -1, -3, -15, 7, 8, 4, -2, 11, 3, 4], [-7, 20, -7, -6, -10, 1, -14, -7, 14, -1, 7, -1, 3, -2, -6, -4], [-7, 19, 3, 9, 6, -4, -15, -4, 8, 1, -8, 2, -7, 5, 2, -7], [-13, 0, 5, 0, 4, 11, 2, -3, 4, -5, -7, -1, 1, 0, 4, 0], [2, 2, -2, -4, 0, -14, 12, 4, 0, 6, -12, -4, -2, 10, -4, 4], [-10, 4, -2, 0, 0, 10, -10, -6, -2, 10, 12, 6, -4, -2, -4, -2], [9, 8, -2, 1, -3, 6, 19, 3, -17, -1, 3, 0, 3, -3, -1, 4], [-8, -4, 4, -4, -7, -21, -4, -1, -17, 14, 18, 1, -4, 12, -8, -4], [14, -12, -6, 2, -4, -18, 12, 2, -24, 14, 2, 2, -2, 8, -2, 2], [21, 2, -1, 3, -3, -11, -3, -3, 4, -2, 21, -2, 4, -4, 3, -2], [11, 4, 2, 0, 1, 12, -9, -1, 8, -12, 13, 3, -3, 1, 2, -3], [4, -2, -1, 4, 6, -9, -12, 2, -1, -1, -4, 0, 1, -17, 2, 0], [-9, -7, 0, 4, 2, -7, 13, 8, -4, -13, -14, -3, 6, -4, -5, 6], [-1, -1, -5, -4, -10, -22, 13, 0, -19, 4, -4, -3, -1, 9, -9, 4], [-5, -12, -2, -2, -12, 3, 2, -2, 4, 0, -22, -3, 4, 14, 1, 5], [-1, 20, 3, 0, 5, 0, -1, -3, 0, -6, 4, -1, -2, 3, 1, -4], [-2, 6, 5, 4, 0, 2, 5, -4, 21, -3, -4, 0, -1, -8, 3, 1], [-8, -4, -12, -4, -3, 6, 8, 2, 2, -8, -2, 0, -1, -9, -4, 5], [3, -2, -2, -2, 4, 15, -2, -6, 12, 8, 4, 3, -2, -10, 5, 1], [-12, -5, 2, 5, -1, 7, 5, 0, 3, -5, -19, -3, 4, -1, 3, 0], [0, -10, -2, 2, -1, -18, 4, -2, -4, 16, 6, -2, 3, 5, 0, -1], [7, 13, 0, -2, 5, -8, 3, 1, -9, 3, 4, 2, 0, -14, 1, -2], [-23, 26, -9, -9, -5, 9, -23, -1, 0, 2, -15, 4, 4, -18, -7, -4], [16, 2, 2, 7, 0, -16, -9, -13, 2, 0, 5, 6, -1, 9, 6, -5], [0, 2, 8, 2, 2, -8, 20, 0, -2, -4, -2, -2, 2, 6, 2, -2]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_450_l_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_450_2_l_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_450_2_l_c(:prec:=16)
    chi := MakeCharacter_450_l();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    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_450_2_l_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_450_2_l_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_450_l();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![99856, 0, 1326272, 0, 3943448, 0, 1927704, 0, 407105, 0, 44874, 0, 2683, 0, 82, 0, 1]>],Snew);
    return Vf;
end function;