
// Make newform 8045.2.a.b in Magma, downloaded from the LMFDB on 16 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_b();".
// 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_b();".
// 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_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8045_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![-35354521, 650293555, 93721612674, 1097645037212, -19336140876985, -375996059277331, -218880833428332, 25358720738524680, 76913891405586410, -871186289516744190, -3622434779509246079, 19289773365133306195, 93889062739962790621, -307594447926817808965, -1642258352637591661286, 3769953450813492516742, 21163497674596003423672, -37044460805059955259401, -211280202812099526579400, 300287156100272073371480, 1688919315733507548436142, -2047840638324081986329468, -11068964787943718387156342, 11910390546532744218953024, 60550380469571942126104821, -59656041657713268809391229, -280376044887914220171165295, 259208770733064639265943575, 1111514153116148125928052783, -982755782733724061860143902, -3808195133548714669794399314, 3267402149077225976172471308, 11365360836633494136446222652, -9568703642636968441102624615, -29745988726751662320210783592, 24784197568468266874684551469, 68670300101944107973643060696, -56993281893982807785094603121, -140535599569941324909709016631, 116774027499744743221750123444, 256085684701133728783214475869, -213887164160657168386368744571, -417096285386637822436700848182, 351300032452212659874417125195, 609268643719846496619073950988, -518876982723713423810069015053, -800565606643696387788826828851, 691006218526302858274497349185, 948723458760878164434806173212, -831712523428027117657409719125, -1016334474867850856906777565320, 906750864920221473010282723563, 986189811316232618206626441829, -897195197938281320380853169180, -868291676955488876025259663583, 807134062665780446725540285757, 694695898442393514934329518784, -661238323650869033206158165024, -505687900486702606415322135966, 494013956999207701274282797865, 335241060894855523065934143483, -336999027625787314436677275448, -202552964706169782914161575083, 210131870177889712039260712510, 111592218210367979712558646336, -119873313919092226004730260975, -56069788133502960786956224090, 62609850301231724310641185188, 25690597418229249865225073251, -29957375892241942774361816284, -10729114487675341472352864516, 13136690348076408557914174880, 4080404111011526273913615929, -5280767605537451070355495433, -1411102604857223775457171244, 1946124553843052252813754864, 442770858858295406993082123, -657450844877650464414968823, -125650981474120414662457790, 203540513112948803513057490, 32095712182294540288012993, -57719630847555495611891587, -7325778242959667511708942, 14982338180796098616091130, 1476552341873662351222900, -3556456625553095584496874, -257316682244468219050687, 771127567863826244115301, 37099438319330047507679, -152501061770383505666963, -3910950972708060216376, 27459178540201699591699, 131617159065900672914, -4492046688354586496771, 65544727675604430499, 665942738242495872918, -21734871583322750056, -89196644407720077366, 4411866260335415340, 10755041495987650272, -700893037380265105, -1162409049368043941, 92819292528401788, 112034239665202462, -10485545690380207, -9569448298674227, 1018851088214462, 718913638110312, -85226999110765, -47060563841837, 6112973394637, 2652916568875, -372904003918, -126857628785, 19105311362, 5043721288, -807317630, -162200736, 27409419, 4052697, -718968, -73797, 13679, 871, -168, -5, 1]>],Snew);
    return Vf;
end function;