
// Make newform 8002.2.a.e in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8002_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8002_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_8002_a();"
function MakeCharacter_8002_a()
    N := 8002;
    order := 1;
    char_gens := [3];
    v := [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_8002_a_Hecke(Kf)
    return MakeCharacter_8002_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8002_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_8002_2_a_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8002_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![-1136453792, -4620514912, 307277154192, 2049367178896, -20475082324400, -193717741279942, 252466787955852, 6039494670006959, 6891957597552818, -77940904759308059, -161937243623747642, 584033575182202655, 1566510482984339250, -2996756646385391385, -9352069801523313678, 11625827477915094762, 39136602239084656841, -36340235663620657904, -122208653898703769173, 94815003828695226658, 295413162702922238389, -209044216922940964461, -566279504379257945582, 389115334043857421547, 875583372251729913385, -608863511897896162153, -1105903985337828154906, 798900928465928095766, 1152010959295415011217, -879463615312755053667, -996876792756933370166, 814473767691492361122, 720215455560952526576, -637014121642055405540, -435652205980680846319, 422519688229083945121, 220663421243256716598, -238609811523101520261, -93251781501935223453, 115122682660121387704, 32555933950273954777, -47582476423385219056, -9180885345738572078, 16880211850267672557, 1978775099782948723, -5145167143437443797, -270038410484461497, 1347526846108526844, -5063295526342807, -302935453421481411, 16212935084474016, 58325670773880505, -5746588999653173, -9581789587599100, 1344911059518492, 1335618616911880, -241276740685738, -156695997017905, 34677558327839, 15293654807172, -4053007037824, -1220512228519, 385976621530, 77504064294, -29760544649, -3731322116, 1832177308, 122170944, -88005777, -1739128, 3179056, -58955, -81236, 4091, 1309, -101, -10, 1]>],Snew);
    return Vf;
end function;