
// Make newform 8045.2.a.e in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8045_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8045_2_a_e();".
// 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".
// To make the character of type GrpDrchElt, type "MakeCharacter_8045_a();"
function MakeCharacter_8045_a()
    N := 8045;
    order := 1;
    char_gens := [6437, 1616];
    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;

function MakeCharacter_8045_a_Hecke(Kf)
    return MakeCharacter_8045_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8045_2_a_e();".
// 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_8045_2_a_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8045_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![124007569699, 905587648961, -181450367514880, 2288006215136302, 23992592809994917, -525987361847939565, -384123276991237298, 47546974823465883406, -105785206825328063908, -2323116333708622829590, 8886376454866236739087, 69516644906029543871447, -359079768518306543351119, -1346055908736985140549427, 9195841213425981110502068, 16814774726055516407139994, -165034330387488571481345609, -117144737262166223336755686, 2193602232601831657997620400, -75079538918865457596945848, -22392182185952347488815478945, 13075632968728951085076435817, 180136318628440415776411385556, -185955986637642154993654163632, -1163706283743779161743235393943, 1672695367056597729381269733463, 6117305565964251808413910974652, -11288896072229941084572410933878, -26370411311319266311396370423258, 60830177900950271362033266391467, 93312474285363553571341282077084, -270386242123204567524626124160414, -268312887151727055317765607275214, 1011990431619578000210983158559848, 605460331793782766761246221644868, -3235453888830056900462731334069925, -952967194298271866398411852276474, 8930753888098477385724104208787353, 432922122207545410185784236175681, -21457093858723910431247688599617994, 3439749912690152778952847422959190, 45154624095932526916970327988638812, -15616517663278634283226922649669015, -83622940607180555832089644255755788, 43393888082614197748653041097082513, 136729477013328119438268043024478033, -94219006764221889875078380239957505, -197736399610072360951167494256896479, 171313663956414436819742466653706126, 252929193640171348375718834488182480, -268965005319737128098265912734916832, -285448511688632462167736272328718234, 370809343040026022157730546354310947, 282409841102972397892228255044374367, -453634525881063967385471219897408610, -241557658936219442475764523593761311, 495939665547923076663607471380396633, 173194053427436885500975386373580889, -486945889111016334220821682904198410, -95859210603940787353770728978155176, 430931235089990237558094285288001013, 28283298377047480456054746632580965, -344581554725612984029804732384426074, 17696366707719121174731591282916999, 249357423537406587727687446116160606, -39761078882445917749556771624417910, -163424232660448772489986425885949982, 43027983474931398109958489190166647, 96982390249898677703561133676512748, -35637767801236710710251095804007174, -52045680718745443428595685293445521, 24842844541798729861988211583538609, 25186086904420295163165922358112481, -15114790574230745972628100674838939, -10933779546161053429868647283638654, 8170060155254519175690956658695535, 4218943395490299278787335152856386, -3962381730335102850113235361595855, -1422240794196007103659904330127651, 1734321039187295757484616220247512, 403959360823648246803494811923529, -687457191987914659586786200004952, -87740040745338618849044765040064, 247234712216683746588955641930880, 8926165396210905669814408488883, -80720923958577768419175283499598, 3764897688389701750409243143705, 23914117513551392710202253712731, -2980400728815902200389123057246, -6417682322823079718652413189130, 1294114388996820958010627891098, 1555205840576237033173879412555, -438523335918195363218889959599, -338545072025753182029972318250, 125743174551916800825406511319, 65637566770058245178317911952, -31471941206556789974246382337, -11169199067444518483637177091, 6974943723187762881461082322, 1622065544235248184090133808, -1378266501594740860856161019, -188421132091194260872702635, 243511368182293887984835097, 13942942477151999840556825, -38470109380166323786451638, 467180094002963138276934, 5422219928470329335741712, -412837801958614212098373, -678695765233961920328501, 94255730473531297456238, 74863979372519785302182, -15359177643776086726585, -7186796389745529412780, 2028558345793874241213, 587646327515910489016, -225912879302471349126, -39229824069021549509, 21513667907248161931, 1917148029349842031, -1756524918105459641, -38619182799452793, 122392915434672672, -4368386619006629, -7195909297872249, 645888198371487, 349795102117160, -51253405614086, -13554379626941, 2941215672350, 387778043419, -128891254894, -6428033720, 4306862922, -40642006, -105899723, 6231649, 1760982, -192561, -15763, 3039, 0, -21, 1]>],Snew);
    return Vf;
end function;