
// Make newform 1050.3.l.h in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1050_l();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1050_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_1050_3_l_h();".
// 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_1050_3_l_h();".
// 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 := [2560000, -7168000, 10035200, 70149120, 178889856, 86081152, 18837632, -4595248, 1093889, 231896, 50336, -12664, 1954, 152, 32, -8, 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], [-125597356615831969536000, 1309863686202312128000, -2157494988382877363200, -9966351473395582185920, -22232452750211023274336, -588890574148529033256, 446250282498400102704, -100458761515785846391, -59153440044822509928, -1461099351530560688, 1204837597044011592, -220441925294230158, -37961089316763336, -962633185803656, 759860784649304, -124150896048631], [232431648484874621115141632000, -2225350312372339004103034892800, -11620918919670154992391536887680, -12993474700473951273694265843648, -5305696558618628641218886482240, -719449018130531781232088723240, 180976850729426810190271470950, -65924256015119669450932994891, -14274226782583577122771384520, -1912893592429770663178189120, 546511703953657264363821140, -105717930910748956540229574, -9304805374903308743399240, -1220781585234851432658840, 355849584339626868196590, -50521933035234406935387], [222122905273351925296690427776000, -351325748136599941624346108518400, -1818182355719495270833534626247040, -2014834486401151120674936909338304, -780014500024526499493845235763536, -99192306063654602485356687469376, 25009453348432333318581627650154, -9911131083816128297130191166779, -2102021021189220528568128879528, -263505718309346300935072397648, 76809414399688904270132589212, -15547180873839092314908209030, -1371720702266455093133696536, -168283183559866103821772176, 50322989299182724918321074, -7312607874029475001394987], [74392129685396065048852419008000, 173723596390269875933568240172800, 912283111994794320793370813810880, 1022192686228881977575596028483968, 422996013884134839010228418101912, 50574570308491286816955297317692, -13137999125753012940783686579493, 5097784662125274247991681038018, 1135855513549067340147092753376, 134228933858105791931167618416, -40115168057085959901727168954, 8080492117822719953566872060, 738472474668082305176147912, 85716107970375280109650292, -26239924034908349561047733, 3829248573711961810228154], [-791690269400822440126720933632000, -204933875925357469386506273011200, 335304029931824859067057245818880, 1579073718550839377173770069070528, 560505715214402813371124692098464, 197242012453008650162361763243624, -42746338127717678855584877772256, 9281398469286679055313488293555, 1488190510116819840272411790472, 524082693362606559108631080752, -116078749946814566963122790728, 16406783357784092286256768006, 970844817532966381882679464, 329286172060042198589089224, -72884793664688762327427496, 8434758074635845174981811], [43416482023106197952486779072000, 700480090955541156514822825491200, 534989378035413890928655655721920, 592392329795398244339777298698112, 226905386235990131470393653849848, 51697072134057534901962276570668, -11155203340322902555583466472697, 3249015252369852414260909288202, 609896432357399170382037323104, 135335521255521909352386882864, -32772269636178963252888012066, 5470121097635201079614833260, 400180941001107979947439848, 85615020415050855998432068, -21121139726752262958470857, 2703350908857430681504226], [-338043110964360494658210332032000, 532880132548126797451977997516800, 2782839408275349352230347459422080, 3111633157131511050847624678326208, 1270855705906394283493640257820560, 172352038909657772404504958906560, -43372335081959687277592960733330, 15752394612797340867688025357631, 3418446210754313761500284959880, 458255913561199101206385102480, -130955780952902562464699541580, 25263266575828111291938782414, 2226878906398720288454917560, 292450754027165513539470160, -85224520217749198675066170, 12085404159758350350699247], [-113359430152712771622478808256000, -266461998719592764984523512185600, -1391388873664253031217367420877760, -1555603783724061364253191658007936, -634888487783576647750492215095160, -85927199122479636045696950022860, 21731443531600977047188683957145, -7897245961507910001212281287842, -1708385418054973711004999115680, -228974356306765774837195962480, 65598741434497573017700291490, -12669223252126716516697758108, -1114365932830071889909269160, -146396752377212370392985060, 42688660290736661449235625, -6056238176411623354901114], [284070615775820469186311384448000, 34588423261938521837652363724800, -3148453244888932714110481083573120, 513303202736939391134214036605248, 681418496046837343739531629625968, 394337167632079767709453607041888, -92357140706999333666351278578782, 10026035755381385551980140386629, 1845934094669355616190820667864, 1055514404460438472878574440624, -229201540500665581650189292276, 24040930028724245351326487098, 1240561408564195207045804968, 667898763729717798692161488, -139027753904031006612800022, 14129833027634573328418325], [131357250168685668066320480960000, 3363881345957517157644805153760000, 1626861080351121141621570863179200, 1778878067376571140283514896411520, 622367781092282082439843183168056, 227697201764607633474125119937996, -45017079953250546758762804361489, 10699991996617570136301704778266, 1684986168098138022742646619488, 591433866196449550916053714608, -128967308020168938157932429522, 18946840984161357852443170508, 1120905125163472401458438056, 371219892585702008246536996, -82269111088638989379317089, 9668013063977981500352306], [79515996867061186837374272704000, 590464581344660932680019676486400, 2530298869302846424708257483311040, 3447289313445791967409692127220864, 1407092593745364166072964645630840, 190370004235474841905042468432940, -50347774701495496827378148425705, 17455229625444557705980955874558, 3785911360249835478377779872320, 508437929524523712541921295920, -147785160815340224918590602210, 28018034445128638980749316692, 2468664225355349332858656840, 326014514436759550605148740, -95277250258724264876361625, 13428386924650328789132886], [23011798155364052313163481152000, -108919511236600054251394453228800, 20598020740194583964273158630720, 526392895267692344984883448867072, 272269485278723106271564459864680, 69103137912046253068044979963980, -16870639247760785733127918275355, 3502339757578052353297544394044, 732062379870015137712893598640, 185293017945287983690134265440, -45229501636240344791660292950, 6507430709809207300491768896, 480385076756020571623172680, 117756865846291539249127380, -28307063272516326875381915, 3404401966607173877425988], [10285863897088000, -97996854480243200, -510847011841073920, -569226084296757312, -227948096200534528, -28041792915591848, 7210077963870292, -2818574049615457, -613147040366744, -74450035079504, 22040222469376, -4443245195650, -399345069528, -47557870248, 14409577452, -2097730881], [-259119882623177043296570553728000, 330148562707684344358019661619200, 2823314684767143272028526453659520, 9424101164824769813013080053776832, 4637585547270709318518120721781392, 1072746719544806691245649613534272, -260940383955764793658263364589458, 59211492079032463231993548028391, 12497293042934816331478823353416, 2867735110082173279479725159056, -712930028410174509849510994444, 107243768305371799717320206622, 8198850832251074129599542392, 1822484469846211499663774672, -448999850966826273318055418, 55340626917352680234536855], [-1188010392247008601362800236928000, 2558545494384426331242712330291200, 19036102356136401049313401888462720, 53288345966417140025275244418473152, 25944777282824431327728140088012816, 5775972091841201670688510441625056, -1409395537133264350096185765428114, 329409472637030401174417018228435, 69881089967765443707729606788968, 15435979975198357718332290647888, -3870242021740782277143203820332, 591601321613599416662896665974, 45809024378751100125056577816, 9811958801528103138100681456, -2441714352744758148157979674, 303722929320017955947921539]];
    Rf_basisdens := [1, 27321183167929327616000, 1179243315565405491986909440000, 150943144392371902974324408320000, 75471572196185951487162204160000, 150943144392371902974324408320000, 37735786098092975743581102080000, 150943144392371902974324408320000, 75471572196185951487162204160000, 150943144392371902974324408320000, 75471572196185951487162204160000, 75471572196185951487162204160000, 18867893049046487871790551040000, 11314720808960000, 75471572196185951487162204160000, 150943144392371902974324408320000];
    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_1050_l();"
function MakeCharacter_1050_l()
    N := 1050;
    order := 4;
    char_gens := [701, 127, 451];
    v := [4, 3, 4];
    // 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_1050_l_Hecke();"
function MakeCharacter_1050_l_Hecke(Kf)
    N := 1050;
    order := 4;
    char_gens := [701, 127, 451];
    char_values := [[1, 0, 0, 0, 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, 0], [1, 0, 0, 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 := 3;
    raw_aps := [[1, 0, 1, 0, 0, 0, 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, 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, 0, 0, 0], [1, 0, 0, -1, 0, 0, 0, 1, 2, 0, 0, 0, -1, 0, 0, 0], [2, 2, -2, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 2, 0, 0], [-4, 0, -4, -2, 0, 0, 0, 2, 0, 1, 0, 0, 1, -1, -1, -1], [0, 0, 1, 0, 0, 0, 0, 0, 0, -1, 1, 1, 0, 2, 0, 1], [-2, 4, 2, 1, -1, 0, 0, 0, 0, -1, 1, 0, 1, 4, 0, 0], [0, 0, 4, 3, -3, 0, 2, 4, -4, 2, 1, -2, 0, -1, 2, 1], [-7, 3, 0, -3, -4, 1, -1, 1, 0, 0, 1, 0, 1, -1, 1, -1], [8, 2, 8, -3, 0, -2, 0, 4, 0, 1, 0, -2, 1, -2, 2, 0], [1, 5, 0, 2, 5, -1, 0, 1, 4, 0, -2, 0, -3, 2, 0, 2], [0, 4, 0, 0, -6, 0, -2, 0, -8, 0, -2, 0, 0, 4, 0, 0], [-4, 2, -4, 6, 0, 2, 0, 2, 0, 0, 0, 2, 0, -4, -2, -2], [-4, 6, 4, 0, 1, -2, -2, 2, 4, 0, -1, 2, 0, 6, 0, 0], [0, 0, -2, 4, -4, 0, -2, -4, 0, -6, -2, 2, 0, 0, -2, -2], [6, 4, 0, 5, 5, 0, 2, 0, 0, 0, -1, 0, 0, 1, -2, 1], [6, 6, 6, 6, 0, 2, 0, -6, 0, 0, 0, 2, 0, -4, 0, 2], [33, 8, 0, -8, -9, 0, 4, -5, -6, 0, 1, 0, 1, -1, -4, -1], [2, 6, -2, -4, 23, 0, 4, 0, 0, 4, 1, 0, -4, 6, 0, 0], [0, 0, 38, 12, -12, 0, 0, -4, 0, -2, -2, -2, 0, -4, 0, -2], [18, 2, -18, -2, -10, 2, -2, -2, 8, 2, 2, -2, -2, 2, 0, 0], [0, 0, -59, -17, 17, 0, 1, 8, -8, 3, 0, -3, 0, -11, 1, 0], [-42, -6, -42, 11, 0, 0, 0, -28, 0, -2, 0, 0, -2, 3, -4, -3], [-57, 3, 0, 3, 2, 1, -5, 5, 4, 0, -3, 0, 1, 3, 5, 3], [-5, 5, 5, 3, -4, -1, -2, 1, -16, -3, 6, 1, 3, 5, 0, 0], [2, 0, 2, 0, 0, -4, 0, -2, 0, 1, 0, -4, 1, 7, 4, 7], [0, 0, 4, -27, 27, 0, -2, 10, -8, 0, 3, 2, 0, -11, -2, 3], [0, 4, 0, 10, -15, 0, -2, 0, 4, -10, 3, 0, 10, 4, 0, 0], [-2, -10, -2, -36, 0, 6, 0, -10, 0, 4, 0, 6, 4, -2, 2, -12], [48, 2, 0, 12, 4, -2, -6, -4, -12, 0, 6, 0, 8, -6, 6, -6], [12, -14, 12, -37, 0, 2, 0, 22, 0, -4, 0, 2, -4, 9, -4, -5], [0, 0, -75, 30, -30, 0, 9, 14, -16, 5, 1, -7, 0, -2, 9, 1], [0, 0, 58, 26, -26, 0, -6, 12, 8, 8, -6, 12, 0, -2, -6, -6], [-16, 14, 0, -38, -34, -6, 2, -16, -12, 0, -8, 0, -4, 8, -2, 8], [30, -14, 30, 3, 0, -4, 0, -16, 0, 2, 0, -4, 2, 11, -2, -3], [-10, 10, 10, -4, -44, -6, -6, 6, -8, 4, -8, 6, -4, 10, 0, 0], [26, 4, 26, 62, 0, -4, 0, 40, 0, -6, 0, -4, -6, 4, 4, 8], [44, 2, -44, -5, -9, -2, 7, 2, 8, 5, -9, 2, -5, 2, 0, 0], [0, 0, 61, -39, 39, 0, 4, -1, -2, -3, 5, 0, 0, 13, 4, 5], [16, -18, 0, 36, 26, 10, 2, -22, -32, 0, 4, 0, 10, -4, -2, -4], [-85, -24, 0, -25, -22, 8, 12, -5, -2, 0, 2, 0, -3, -2, -12, -2], [24, -16, -24, 3, -40, 4, -2, -4, -36, -3, 8, -4, 3, -16, 0, 0], [-4, -10, -4, -75, 0, -2, 0, 30, 0, -2, 0, -2, -2, 17, 6, 7], [0, 0, 89, -10, 10, 0, -4, 4, -16, -17, -1, 5, 0, 28, -4, -1], [-50, -12, 0, -12, -6, -12, -2, -18, -12, 0, -2, 0, -6, 2, 2, 2], [7, 9, -7, -3, -8, -1, 0, 1, -88, 3, 2, 1, -3, 9, 0, 0], [-26, -2, -26, -20, 0, -2, 0, 54, 0, 0, 0, -2, 0, 6, -2, 4], [0, 0, 8, -5, 5, 0, -4, 28, -16, 6, -11, 6, 0, -1, -4, -11], [-32, -16, 32, 14, -97, 4, -8, -4, -4, -14, 17, -4, 14, -16, 0, 0], [0, 0, -79, -46, 46, 0, -4, 9, 14, 15, -14, 8, 0, 26, -4, -14], [52, -30, 0, 23, 13, -6, -2, -14, -24, 0, 1, 0, 10, -1, 2, -1], [6, -26, 0, 24, 30, 2, 0, 26, 32, 0, 0, 0, -6, 0, 0, 0], [13, -29, 13, 49, 0, 5, 0, 65, 0, -6, 0, 5, -6, 36, -5, 7], [-65, 4, 65, -10, -55, 0, 4, 0, 36, 10, -9, 0, -10, 4, 0, 0], [0, 0, 29, -28, 28, 0, 11, 6, -12, 7, 7, -13, 0, -2, 11, 7], [21, -29, 0, -11, 0, 17, 11, -43, -32, 0, 1, 0, -11, -1, -11, -1], [20, -4, 20, -97, 0, -8, 0, -18, 0, 5, 0, -8, 5, -2, 6, -6], [152, -30, 0, -39, -29, 14, 6, 18, 28, 0, -1, 0, -10, 1, -6, 1], [-35, 7, 35, 19, 96, 1, 0, -1, -88, -19, 14, -1, 19, 7, 0, 0], [37, -25, -37, -2, 43, 9, 9, -9, 88, 2, 13, -9, -2, -25, 0, 0], [-20, -8, -20, 108, 0, 0, 0, -16, 0, 4, 0, 0, 4, 0, -12, -8], [-116, -14, 0, 54, 46, -2, -4, 44, 36, 0, 4, 0, 8, -4, 4, -4], [20, -14, -20, 4, -67, 4, -6, -4, -24, -4, -1, -4, 4, -14, 0, 0], [-170, 16, -170, 93, 0, -12, 0, 84, 0, 18, 0, -12, 18, -25, 22, -9], [-10, -4, 0, -2, 0, -20, -10, -46, -44, 0, 4, 0, -2, -4, 10, -4], [5, 2, 5, -150, 0, 2, 0, -30, 0, -4, 0, 2, -4, 16, -8, 18], [103, 8, 103, -105, 0, 4, 0, -12, 0, 6, 0, 4, 6, -23, -16, -15], [0, 0, -178, 79, -79, 0, -8, -52, 64, -8, -5, 20, 0, 27, -8, -5], [-161, 3, 161, -2, 49, -11, -29, 11, 64, 2, -21, 11, -2, 3, 0, 0], [0, 0, 179, 58, -58, 0, 4, 23, -14, 13, -6, -4, 0, 22, 4, -6], [3, 9, 3, -131, 0, 7, 0, -71, 0, -11, 0, 7, -11, 5, -8, 14], [-27, -10, 27, 4, -98, 10, 16, -10, -112, -4, -10, -10, 4, -10, 0, 0], [0, 0, -12, -18, 18, 0, 6, 14, -20, -4, 12, -2, 0, 18, 6, 12], [54, 26, -54, 4, -178, -10, -4, 10, 96, -4, -6, 10, 4, 26, 0, 0], [0, 0, 52, -64, 64, 0, 0, -20, -16, -22, 6, -14, 0, 8, 0, 6], [-2, 8, -2, 117, 0, -10, 0, -18, 0, 4, 0, -10, 4, -7, 26, 1], [-112, -6, 0, -44, -10, 6, 24, 6, 40, 0, -8, 0, -34, 8, -24, 8], [0, 0, 92, -58, 58, 0, 10, 48, -8, 46, 0, -6, 0, -30, 10, 0], [0, 0, 168, 56, -56, 0, 8, -56, 80, 4, -8, 20, 0, 20, 8, -8], [-160, 2, 0, -79, -109, 6, -16, -14, -44, 0, 19, 0, 30, -19, 16, -19], [109, 28, 0, -52, -49, 12, -8, 7, 10, 0, -23, 0, -3, 23, 8, 23], [26, -16, -26, -30, 11, -6, 2, 6, 56, 30, -19, 6, -30, -16, 0, 0], [0, 0, 145, -54, 54, 0, -4, 24, 32, 47, -21, 9, 0, 28, -4, -21], [-75, 12, 75, 26, -45, -8, -16, 8, 124, -26, 13, 8, 26, 12, 0, 0], [0, 0, -98, -6, 6, 0, -6, 4, -24, -16, -14, -4, 0, 6, -6, -14], [73, -34, 73, 164, 0, 2, 0, -6, 0, -16, 0, 2, -16, 42, 16, 8], [-25, -27, 0, 35, 40, 11, 10, 43, 48, 0, -9, 0, -5, 9, -10, 9], [-110, -12, 110, 12, 112, 8, 6, -8, -80, -12, 40, -8, 12, -12, 0, 0], [34, 16, 34, 4, 0, 20, 0, -36, 0, -4, 0, 20, -4, -44, -18, -28], [0, 0, 40, -52, 52, 0, -12, -50, 28, -8, 10, -14, 0, 28, -12, 10], [6, 8, 6, -40, 0, -20, 0, 0, 0, -6, 0, -20, -6, 6, 26, 14], [121, 16, 0, -130, -107, -8, 0, 27, 50, 0, -17, 0, -23, 17, 0, 17], [0, 0, -28, 50, -50, 0, -4, -54, 44, 8, 0, -18, 0, -2, -4, 0], [38, 12, -38, 24, -146, -4, -12, 4, -24, -24, 46, 4, 24, 12, 0, 0], [0, 0, -127, -53, 53, 0, 28, -44, 20, 9, 8, -33, 0, -37, 28, 8], [-139, 57, 0, -3, -18, -45, -3, 35, 20, 0, -9, 0, 15, 9, 3, 9], [-37, 9, 37, -1, -152, 3, -10, -3, 0, 1, 2, -3, -1, 9, 0, 0], [-56, -22, 0, 77, 49, 6, 18, 36, 8, 0, 13, 0, 28, -13, -18, -13], [-32, 42, -32, -188, 0, -2, 0, -14, 0, -6, 0, -2, -6, -28, -16, 14], [-96, -14, -96, -115, 0, 10, 0, -26, 0, 4, 0, 10, 4, 47, -14, 33], [-180, 10, 180, -6, 66, -2, 20, 2, 88, 6, -26, 2, -6, 10, 0, 0], [0, 0, 4, -42, 42, 0, 4, 56, 0, 30, -28, 26, 0, -82, 4, -28], [-64, 60, 0, -112, -88, -12, 0, 32, 56, 0, -8, 0, -24, 8, 0, 8], [2, 48, 2, -149, 0, -2, 0, 130, 0, -10, 0, -2, -10, -59, 22, -11], [-42, 62, -42, 138, 0, -22, 0, 106, 0, 0, 0, -22, 0, -52, 36, 10], [52, -90, -52, -7, -93, 2, -11, -2, -48, 7, -1, -2, -7, -90, 0, 0], [0, 0, 69, -10, 10, 0, 16, -71, 62, 27, 10, -36, 0, -58, 16, 10], [2, 16, 0, 21, 21, 36, 12, -56, -56, 0, 31, 0, 0, -31, -12, -31], [-45, -31, -45, 29, 0, 15, 0, 57, 0, 1, 0, 15, 1, 1, -24, -30], [227, -28, -227, -4, 146, -8, 0, 8, 96, 4, -10, 8, -4, -28, 0, 0], [282, 46, 282, -209, 0, -10, 0, 114, 0, 16, 0, -10, 16, -43, 20, 3], [0, 0, 163, 10, -10, 0, 11, 14, -8, 19, -5, -13, 0, -134, 11, -5], [-346, 42, 0, -104, -126, 14, 10, 14, -8, 0, -8, 0, 22, 8, -10, 8], [-92, -42, 0, -11, -41, 18, -12, 10, -20, 0, 35, 0, 30, -35, 12, -35], [-252, 0, 252, 8, -100, -8, 12, 8, 8, -8, -28, 8, 8, 0, 0, 0], [-2, 18, -2, -206, 0, -18, 0, 90, 0, 38, 0, -18, 38, -38, 36, -20], [-104, -8, 104, 2, 13, 12, -24, -12, 100, -2, 3, -12, 2, -8, 0, 0], [0, 0, -71, -15, 15, 0, -12, 35, -10, -15, 21, 40, 0, -43, -12, 21], [598, 4, 0, -65, -77, -32, -6, 76, 64, 0, 9, 0, 12, -9, 6, -9], [-308, 42, 308, 13, 204, -26, -22, 26, -44, -13, -16, 26, 13, 42, 0, 0], [468, 40, 468, 16, 0, -8, 0, -6, 0, -11, 0, -8, -11, -35, -9, 5], [-29, 44, 29, -6, -7, 8, -12, -8, -12, 6, -49, -8, -6, 44, 0, 0], [-291, 7, 0, 67, 150, -11, -5, -99, -16, 0, -45, 0, -83, 45, 5, 45], [168, 98, 0, -209, -199, -10, -12, 66, 76, 0, -3, 0, -10, 3, 12, 3], [0, 0, 52, 100, -100, 0, 4, -32, 56, 12, -8, 12, 0, -100, 4, -8], [0, 0, -194, 62, -62, 0, -22, 44, -24, -6, -12, 26, 0, -74, -22, -12], [-172, 32, -172, 164, 0, 32, 0, -48, 0, -8, 0, 32, -8, -32, -28, 0], [-290, -6, 290, 4, -85, 28, 48, -28, -32, -4, 29, -28, 4, -6, 0, 0], [0, 0, -292, 2, -2, 0, 12, 108, -88, 8, 14, 12, 0, -22, 12, 14], [123, 0, -123, -2, 125, 12, 24, -12, 132, 2, 11, -12, -2, 0, 0, 0], [402, 132, 0, -46, -16, -20, -28, 6, 36, 0, -32, 0, -30, 32, 28, 32], [-89, -26, -89, -302, 0, -10, 0, -50, 0, 8, 0, -10, 8, 32, -20, 6], [335, -27, 0, 233, 246, 27, -6, -117, -104, 0, 9, 0, -13, -9, 6, -9], [0, 0, 58, 117, -117, 0, 28, -104, 56, 8, 21, -56, 0, -143, 28, 21], [-275, -1, 275, 34, -21, 29, 25, -29, -128, -34, 53, -29, 34, -1, 0, 0], [143, 77, 143, -313, 0, -9, 0, -91, 0, 7, 0, -9, 7, -31, -10, 46], [-36, 16, -36, 264, 0, -4, 0, -46, 0, 27, 0, -4, 27, -13, 37, 3], [0, 0, -106, -49, 49, 0, 2, 156, -116, 40, -21, 0, 0, -61, 2, -21], [-301, 105, 0, -19, -22, -5, 21, 43, 40, 0, 1, 0, 3, -1, -21, -1], [-122, 64, 0, 103, 79, -8, -2, -36, -60, 0, 5, 0, 24, -5, 2, -5], [-42, 50, 42, 48, 40, 2, -70, -2, 104, -48, 44, -2, 48, 50, 0, 0], [158, 80, 158, -248, 0, 28, 0, -142, 0, -21, 0, 28, -21, -91, -56, -11], [0, 0, 156, -210, 210, 0, 20, -152, 96, -38, 24, -18, 0, 70, 20, 24], [0, 0, -190, -52, 52, 0, -20, 22, 12, 22, -12, 12, 0, 144, -20, -12], [-296, 54, 296, 22, -321, -28, -22, 28, 96, -22, 21, 28, 22, 54, 0, 0], [-197, 17, -197, -141, 0, -21, 0, 159, 0, -22, 0, -21, -22, 8, 5, 25], [0, 0, 313, 24, -24, 0, -24, -20, -64, -97, -7, 13, 0, 70, -24, -7], [-446, 24, 446, -45, -35, -20, 4, 20, -128, 45, -13, 20, -45, 24, 0, 0], [167, 60, 167, 418, 0, 0, 0, -176, 0, -16, 0, 0, -16, -18, 8, 42], [-115, 79, 0, 28, -19, -39, -9, -17, -64, 0, 30, 0, 47, -30, 9, -30], [-334, 30, 334, -26, 236, -14, -40, 14, 248, 26, -56, 14, -26, 30, 0, 0], [226, 46, 226, 192, 0, -26, 0, -38, 0, 14, 0, -26, 14, 4, 14, 50], [30, 44, 30, 78, 0, 28, 0, 80, 0, 26, 0, 28, 26, -104, 28, -60], [189, -40, 0, -119, -178, -24, -4, 109, 50, 0, 34, 0, 59, -34, 4, -34], [0, 0, -70, 158, -158, 0, -42, 14, -4, -14, -30, 24, 0, 18, -42, -30], [0, 0, 67, 118, -118, 0, -10, 198, -168, 15, -29, 15, 0, 82, -10, -29], [-158, -22, -158, -73, 0, -8, 0, 192, 0, 40, 0, -8, 40, -63, 38, -85], [-425, 25, 0, -201, -224, 39, 22, -73, -96, 0, -13, 0, 23, 13, -22, 13], [195, 40, 195, 247, 0, 4, 0, 108, 0, -6, 0, 4, -6, 5, -8, 45], [8, 62, -8, 46, -219, -2, 30, 2, -308, -46, 35, 2, 46, 62, 0, 0], [-192, -14, -192, -128, 0, -10, 0, 74, 0, -62, 0, -10, -62, 32, 40, 18], [-222, 36, 0, -24, 38, 28, 14, -98, -36, 0, -34, 0, -62, 34, -14, 34], [-458, 2, -458, -275, 0, 18, 0, -178, 0, 12, 0, 18, 12, -45, 0, -43], [-266, -44, 266, -32, 200, 8, 62, -8, -112, 32, 60, -8, -32, -44, 0, 0], [130, -84, 0, 226, 204, 28, 46, 90, 68, 0, 28, 0, 22, -28, -46, -28], [114, -150, 114, -293, 0, 16, 0, -144, 0, -44, 0, 16, -44, 137, -74, -13], [0, 0, -272, -164, 164, 0, -32, 100, -88, 8, -16, 4, 0, -28, -32, -16], [-69, -37, 69, 22, 43, -31, -41, 31, 64, -22, 73, 31, 22, -37, 0, 0], [0, 0, 289, -20, 20, 0, 4, 9, 6, 15, 28, 0, 0, -4, 4, 28], [-354, -92, 0, 92, 120, 12, 16, 132, 160, 0, 12, 0, -28, -12, -16, -12], [-101, -68, 0, -156, -127, -20, -32, -23, 6, 0, -49, 0, -29, 49, 32, 49], [52, -68, -52, -27, 124, 36, 62, -36, 108, 27, 12, -36, -27, -68, 0, 0], [0, 0, 461, -102, 102, 0, -28, -88, 64, -45, -33, 21, 0, 124, -28, -33], [0, 0, -137, 41, -41, 0, -12, 120, -148, 7, 8, -35, 0, -39, -12, 8], [-414, 54, 0, 4, -62, -54, -24, 82, 16, 0, 28, 0, 66, -28, 24, -28], [20, -162, 0, 160, 270, 18, 12, -86, 24, 0, -36, 0, -110, 36, -12, 36], [116, -4, -116, -12, -320, 36, 8, -36, -16, 12, -68, -36, -12, -4, 0, 0], [0, 0, 182, 54, -54, 0, -10, -196, 216, -20, 26, 40, 0, -70, -10, 26], [332, -20, 332, 364, 0, -36, 0, 136, 0, 18, 0, -36, 18, 46, 48, 26], [226, -68, 0, -152, -90, -12, 10, 86, 148, 0, -6, 0, -62, 6, -10, 6], [-116, -70, 116, 31, -138, 6, -14, -6, 148, -31, 6, -6, 31, -70, 0, 0], [123, -173, 123, 91, 0, 25, 0, 29, 0, -26, 0, 25, -26, 150, -23, -23], [-81, 108, 81, 14, 373, -24, -52, 24, 52, -14, -37, 24, 14, 108, 0, 0], [0, 0, 235, -245, 245, 0, 8, 276, -212, 15, 6, 49, 0, -101, 8, 6], [65, 28, 65, 2, 0, 12, 0, -12, 0, -48, 0, 12, -48, 86, 8, 114], [503, 45, -503, -21, 316, -41, 30, 41, -128, 21, -42, 41, -21, 45, 0, 0], [0, 0, 104, 412, -412, 0, 22, -78, 116, -14, 8, 52, 0, 84, 22, 8], [-490, -86, 0, -60, 46, 22, 12, 30, 136, 0, -28, 0, -106, 28, -12, 28], [-322, 24, 322, 34, 267, -34, -48, 34, 208, -34, -15, 34, 34, 24, 0, 0], [102, -136, -102, 7, -23, 4, -48, -4, -224, -7, 31, -4, 7, -136, 0, 0], [224, -42, 0, -152, -188, 2, 10, 128, 92, 0, 46, 0, 36, -46, -10, -46], [625, -149, 0, 202, 147, -3, -1, 7, -48, 0, -4, 0, 55, 4, 1, 4], [-129, 12, -129, 75, 0, 8, 0, 48, 0, 58, 0, 8, 58, -67, 36, -55], [-172, -50, 172, 35, 221, -14, -65, 14, -32, -35, 1, 14, 35, -50, 0, 0], [-592, -28, 0, 240, 304, 20, -4, 48, 112, 0, -44, 0, -64, 44, 4, 44], [532, -116, -532, 85, -12, 4, -22, -4, -84, -85, 68, -4, 85, -116, 0, 0], [119, -63, 119, 35, 0, 15, 0, 363, 0, -22, 0, 15, -22, 80, 5, 17], [406, 8, -406, 62, 240, 16, -28, -16, 88, -62, 60, -16, 62, 8, 0, 0], [0, 0, 374, 75, -75, 0, -16, 112, -148, -20, -21, -16, 0, 27, -16, -21], [-51, -257, 0, -259, -278, 25, 20, -173, -192, 0, 45, 0, 19, -45, -20, -45], [208, -44, 208, -5, 0, 18, 0, 26, 0, -64, 0, 18, -64, 3, -68, -41], [0, 0, -80, -315, 315, 0, 28, -148, 88, 10, 27, -70, 0, -7, 28, 27], [0, 0, -10, 80, -80, 0, 78, -122, -4, -22, 48, -104, 0, -40, 78, 48], [-264, 92, -264, 12, 0, -24, 0, -10, 0, -17, 0, -24, -17, -17, 69, 75], [0, 0, -59, -82, 82, 0, 24, 84, 64, 139, -53, 9, 0, 28, 24, -53], [-214, -20, 214, 23, -207, 16, 72, -16, -16, -23, 31, -16, 23, -20, 0, 0], [0, 0, 354, 55, -55, 0, -32, 180, -92, 64, 31, 24, 0, -105, -32, 31], [779, -131, 0, -67, -120, 35, 8, 149, 96, 0, 65, 0, 53, -65, -8, -65], [-575, -90, -575, 72, 0, -34, 0, -42, 0, 4, 0, -34, 4, 170, -40, 80], [403, 23, 0, -168, -99, 5, -20, -153, -84, 0, -44, 0, -69, 44, 20, 44], [-308, 58, 308, -64, -200, 38, 40, -38, 0, 64, -52, -38, -64, 58, 0, 0], [150, -12, 150, 188, 0, -24, 0, 28, 0, 18, 0, -24, 18, 26, 46, 14], [0, 0, -578, 32, -32, 0, -24, -238, 172, -70, -4, 4, 0, 32, -24, -4], [646, 52, 0, 263, 331, -16, 38, 108, 176, 0, -55, 0, -68, 55, -38, 55], [-48, 2, -48, -6, 0, -30, 0, -38, 0, 44, 0, -30, 44, 16, -6, 18], [-503, -181, 0, -7, 24, 21, 54, -7, 24, 0, 1, 0, -31, -1, -54, -1], [65, -136, 65, -239, 0, 76, 0, -92, 0, -2, 0, 76, -2, 75, -104, -61], [304, -38, -304, -106, -101, 2, 0, -2, 436, 106, -103, -2, -106, -38, 0, 0], [908, -108, 0, -132, -64, 20, 28, 68, 136, 0, 20, 0, -68, -20, -28, -20], [0, 0, 309, -84, 84, 0, -23, 114, -112, -67, 23, 69, 0, 56, -23, 23], [0, 0, 86, 71, -71, 0, -32, -192, 140, -12, 7, -40, 0, 95, -32, 7], [326, 6, -326, -18, -340, 10, -24, -10, -24, 18, 24, -10, -18, 6, 0, 0], [-404, 84, -404, -160, 0, -4, 0, -412, 0, -20, 0, -4, -20, -84, -16, 0], [0, 0, -712, -18, 18, 0, -26, -298, 324, 22, -54, 4, 0, 22, -26, -54], [369, 93, -369, 30, 257, -17, -55, 17, 0, -30, -61, 17, 30, 93, 0, 0], [0, 0, 1057, -21, 21, 0, 0, -77, 78, -47, 19, 48, 0, 187, 0, 19], [-721, -115, -721, -237, 0, -9, 0, 29, 0, 3, 0, -9, 3, 137, 30, 22], [-629, 164, 0, -110, -233, 20, -12, 137, 14, 0, 29, 0, 123, -29, 12, -29], [-451, 72, 451, -64, 212, 20, 48, -20, 168, 64, -4, -20, -64, 72, 0, 0], [0, 0, 1029, -16, 16, 0, -12, 148, -168, -13, 9, -7, 0, 50, -12, 9], [-1124, -2, 0, 332, 332, -30, 0, 108, 108, 0, -50, 0, 0, 50, 0, 50], [-398, -104, 0, 29, 17, 72, 12, -264, -276, 0, 71, 0, 12, -71, -12, -71], [-828, 104, 828, 56, 96, -40, -88, 40, -56, -56, -8, 40, 56, 104, 0, 0], [-266, -128, -266, -360, 0, -20, 0, 20, 0, -12, 0, -20, -12, 88, 34, -40], [0, 0, -36, -212, 212, 0, 22, -16, -144, -50, 22, -110, 0, 80, 22, 22], [-474, 4, 474, -60, -89, -56, 26, 56, 4, 60, -163, 56, -60, 4, 0, 0], [0, 0, 29, 413, -413, 0, -24, -253, 310, 37, -3, 20, 0, 9, -24, -3], [-462, -170, 0, -294, -360, 2, -2, 122, 56, 0, 42, 0, 66, -42, 2, -42], [-210, 4, 210, -29, 289, 8, 40, -8, 64, 29, 71, -8, -29, 4, 0, 0], [617, 7, 0, -61, 26, 21, -9, 25, 112, 0, -5, 0, -87, 5, 9, 5], [200, -4, -200, -56, 176, -12, 28, 12, 248, 56, -104, 12, -56, -4, 0, 0], [0, 0, 100, 94, -94, 0, 56, 228, 0, 200, -134, 28, 0, -42, 56, -134], [347, 133, -347, -42, -191, 55, 95, -55, -224, 42, 15, -55, -42, 133, 0, 0], [0, 0, -146, -338, 338, 0, 0, -246, 236, -18, 2, 8, 0, 26, 0, 2], [816, 48, 816, 20, 0, 8, 0, 48, 0, 52, 0, 8, 52, -68, -28, -20], [168, -24, 0, 156, 160, -48, -36, -244, -240, 0, 36, 0, -4, -36, 36, -36], [0, 0, 66, -8, 8, 0, 20, -68, 48, 30, -14, -50, 0, 48, 20, -14], [-130, 244, 130, 43, 109, -40, -64, 40, 64, -43, -85, 40, 43, 244, 0, 0], [-701, 22, -701, 376, 0, -46, 0, 186, 0, 72, 0, -46, 72, -2, 12, 20], [-233, 109, 0, -37, 20, 19, 74, -129, -72, 0, 43, 0, -57, -43, -74, -43], [138, -84, 138, 244, 0, -8, 0, -762, 0, -81, 0, -8, -81, 129, -76, 45], [0, 0, 464, 126, -126, 0, 68, 296, -208, 86, -44, 2, 0, -122, 68, -44], [-51, -15, 51, 14, -435, 15, -95, -15, -264, -14, -81, -15, 14, -15, 0, 0], [0, 0, -289, -44, 44, 0, 72, -265, 250, 97, 72, -112, 0, -408, 72, 72], [-720, 140, 0, 2, -80, -4, -86, 414, 332, 0, 36, 0, 82, -36, 86, -36], [275, 205, 275, -27, 0, -37, 0, 13, 0, -51, 0, -37, -51, -151, 24, 54], [-75, 39, -75, -255, 0, 21, 0, 353, 0, 14, 0, 21, 14, -76, -69, -37], [-96, -138, -96, -479, 0, 48, 0, 8, 0, -32, 0, 48, -32, 143, -22, 5], [-374, -28, 374, 12, 100, 40, 86, -40, -240, -12, -12, -40, 12, -28, 0, 0], [-81, 140, -81, 603, 0, -32, 0, 264, 0, -6, 0, -32, -6, -131, 24, 9], [0, 0, 448, -155, 155, 0, -4, 68, -32, 66, 83, -30, 0, -63, -4, 83], [-480, -48, 480, 16, 589, 54, 22, -54, 32, -16, 147, -54, 16, -48, 0, 0], [-368, -92, -368, 174, 0, -32, 0, -174, 0, -83, 0, -32, -83, 127, 39, 35], [0, 0, -465, -378, 378, 0, -53, 46, 0, 7, 15, 39, 0, -62, -53, 15], [0, 0, -410, 127, -127, 0, -18, -92, 92, -48, -77, 48, 0, -21, -18, -77], [311, 167, 0, 225, 204, -19, -93, -63, -84, 0, -57, 0, 21, 57, 93, 57], [204, 80, -204, 14, -86, -64, 44, 64, -136, -14, -18, 64, 14, 80, 0, 0], [196, 192, -196, 22, -377, -28, -56, 28, 316, -22, 41, 28, 22, 192, 0, 0], [682, -48, 0, 44, -60, -16, -44, 8, -96, 0, 44, 0, 104, -44, 44, -44], [354, -116, 354, -148, 0, 8, 0, -308, 0, -126, 0, 8, -126, 158, -118, 42], [720, 204, -720, -32, -129, -30, -100, 30, 296, 32, -107, 30, -32, 204, 0, 0], [0, 0, 634, 46, -46, 0, -14, 110, -84, 42, 130, -16, 0, -150, -14, 130], [-240, 246, -240, 115, 0, -48, 0, -104, 0, 4, 0, -48, 4, -215, 40, 31], [72, 248, -72, 68, -348, -40, 12, 40, -304, -68, 32, 40, 68, 248, 0, 0], [474, 104, 474, 224, 0, 4, 0, -374, 0, -45, 0, 4, -45, 13, 32, 117], [0, 0, -372, -333, 333, 0, -104, -80, 28, -118, 17, 66, 0, 59, -104, 17], [1084, 158, 0, -179, -85, 74, 88, -138, -44, 0, -25, 0, -94, 25, -88, 25], [386, 306, 0, -158, -104, 22, 20, 26, 80, 0, -46, 0, -54, 46, -20, 46], [-120, 108, 120, 42, -108, 48, 22, -48, -168, -42, -40, -48, 42, 108, 0, 0], [-1086, -314, 0, -38, -112, 90, 48, -174, -248, 0, 94, 0, 74, -94, -48, -94], [-332, -168, -332, -114, 0, 60, 0, -8, 0, 42, 0, 60, 42, 72, -134, -96], [162, 144, 0, 66, 54, 80, -56, 188, 176, 0, 2, 0, 12, -2, 56, -2], [-303, 115, -303, -723, 0, -79, 0, 3, 0, -23, 0, -79, -23, -93, 122, 22], [955, 48, 0, -57, -62, 64, 40, 147, 142, 0, 34, 0, 5, -34, -40, -34], [-707, 290, 707, -4, -100, -42, -24, 42, -216, 4, -72, 42, -4, 290, 0, 0], [922, 84, 922, 459, 0, 40, 0, -344, 0, -10, 0, 40, -10, -131, 2, -47], [0, 0, 1359, 104, -104, 0, 59, 74, -64, 39, 17, -29, 0, 24, 59, 17], [0, 0, 17, -20, 20, 0, 2, -234, 152, -59, -17, -23, 0, 88, 2, -17], [-162, -32, 0, -117, -157, 40, 74, 172, 132, 0, 17, 0, 40, -17, -74, -17], [-144, -52, -144, 834, 0, 48, 0, -104, 0, -32, 0, 48, -32, 42, 18, -10], [-478, -158, 478, -4, 345, 10, -20, -10, 340, 4, 59, -10, -4, -158, 0, 0], [-412, 212, 0, -516, -660, -12, -20, 152, 8, 0, 56, 0, 144, -56, 20, -56], [-507, 14, 507, -60, -218, -6, -32, 6, -192, 60, -2, 6, -60, 14, 0, 0], [0, 0, -783, -78, 78, 0, 102, 54, -128, 69, 21, -143, 0, -58, 102, 21], [-105, -7, 0, -733, -782, 15, 16, -327, -376, 0, 103, 0, 49, -103, -16, -103], [968, 106, -968, -33, 553, -26, -17, 26, 32, 33, 5, 26, -33, 106, 0, 0], [0, 0, -526, -90, 90, 0, -8, -256, 112, -90, 48, -54, 0, -46, -8, 48], [-423, 115, -423, -255, 0, -55, 0, -109, 0, 37, 0, -55, 37, -109, -18, 6], [304, 60, -304, 74, -135, -102, -62, 102, 88, -74, -65, 102, 74, 60, 0, 0], [-50, -92, -50, -229, 0, 64, 0, 364, 0, -36, 0, 64, -36, 107, 24, 15], [0, 0, -400, 88, -88, 0, 84, 324, -240, 100, -80, -16, 0, 96, 84, -80]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1050_l_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1050_3_l_h();".
// 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_1050_3_l_h(:prec:=16)
    chi := MakeCharacter_1050_l();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 3));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(1999) - 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_1050_3_l_h();".
// 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_1050_3_l_h( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1050_l();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<11,R![-50723840, -31392768, -4963840, 257024, 94224, 368, -540, -4, 1]>,<13,R![29509874586259456, -34923012164460544, 20664553742409728, -7193496361187328, 1606269890474496, -227380825507328, 21049489926656, -1244416610176, 51959046416, -2529262912, 209535104, -12410464, 417256, -7216, 512, -32, 1]>],Snew);
    return Vf;
end function;