
// Make newform 6031.2.a.e in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_6031_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6031_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_6031_a();"
function MakeCharacter_6031_a()
    N := 6031;
    order := 1;
    char_gens := [816, 5218];
    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_6031_a_Hecke(Kf)
    return MakeCharacter_6031_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6031_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_6031_2_a_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_6031_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![-1624320801696, 1512194556560, 1257692300249248, -12152109227218398, -150728917403558409, 1885267680527375640, 8614118550429086865, -130326811979421612931, -304961553917367364417, 5298814017600184267758, 7447259619043315664352, -143075421418726655007351, -132137505170428613693605, 2755373557745144045699463, 1750371391034142367002919, -39714935601166853833750137, -17530535738408819935836121, 443833919577040842367292021, 132467555117368786166243242, -3951837161154622745015965173, -732619899146825653846598576, 28648027673435988093073502305, 2614616452402922581432816927, -172090013854338654856660122568, -1732682349082150424634469307, 869162005144649090436003651033, -53670439224284827973360173120, -3736086806096120065058792172778, 472252179097012698040461208250, 13809411741394786244392362646289, -2559908484537197309449108610149, -44278268442439395731929358204032, 10614712642846965849889518994379, 124092289793703523128755983195590, -36021303555783541331028243548807, -305970210082987447179625165400518, 103323581455600524007149437627098, 667525608087244195071367446905773, -255353335063343752149530936092379, -1295016552897248110956911247628700, 550803200954999771686349478499125, 2243884041013955833553436684893072, -1046840105983705858823386437496110, -3485883787500524128007966342157544, 1765979765858350789386132061930818, 4871709243637113660419382197029931, -2660020046146294168446258819546133, -6143211175692569282014074998518764, 3595062565444034251748006899114294, 7007824314611461720550603846581578, -4377690083700787921991802927659197, -7248097810942582548723223840191288, 4819853292821973301917280797418277, 6810167370622557985044576119482886, -4812764587985832733183201456287796, -5822237926118012782834876504727234, 4369918648011583198010830407960618, 4535164786597751317795032213176612, -3616315893217897532909386584738528, -3221836287958135480382486319890966, 2733002601946215739841329588671596, 2088874322207933020424367845589993, -1889495366511945439276480904606341, -1236371547970798792882726899351654, 1196827719353493429990087871815811, 667964417118634952059183000185644, -695425624476758351158620406044829, -329177541128078039444229402889411, 371080544963666886353896709353359, 147766389502626417212493534565134, -181997854119129375241861149205219, -60277125571273891551687804315486, 82100817463746680751211879927983, 22257229005210285559250298561605, -34082932432895446534121247596592, -7392230483982188387460019919322, 13025168630240460825127149039896, 2184677503722907129237864283370, -4583093320822697861135670853352, -563224514751370810514065883865, 1484762447248075997098405860842, 121406623072521330025664040795, -442783572642425397370531539364, -19404970641671516399542213121, 121504097186155582765555761834, 1044140275026401152016031304, -30661514434028861126158290109, 746462113742601555094383062, 7109516833751769976818545262, -393689340292484630682369616, -1513084708102042852226000531, 128396079374397336674646579, 295172143301084991161778720, -33396976625395689862941321, -52692815158005555784765750, 7408272066800044066047156, 8590269924802542841855398, -1439621585085390957881870, -1275757537158520158469739, 248205667275796812939754, 172081032046311285122229, -38203804593273635185890, -21004593514736289980327, 5263792967256471459176, 2309723113763910576368, -649501914608970704534, -227526846754892637062, 71685518266384551856, 19935184131901247637, -7058853208034373838, -1538919626415329148, 617736351745485513, 103307528109163437, -47791828288640788, -5914175536396232, 3246480554629093, 279469301343111, -191939264716758, -10200505262590, 9765514255943, 235299658312, -421307879706, 721704132, 15111703232, -374623507, -438489579, 19970990, 9888654, -635910, -162601, 13227, 1734, -168, -9, 1]>],Snew);
    return Vf;
end function;