
// Make newform 8001.2.a.z in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8001_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8001_2_a_z();".
// 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_8001_a();"
function MakeCharacter_8001_a()
    N := 8001;
    order := 1;
    char_gens := [3557, 1144, 7750];
    v := [1, 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_8001_a_Hecke(Kf)
    return MakeCharacter_8001_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8001_2_a_z();".
// 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_8001_2_a_z( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8001_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![1024, 0, -49988, 0, 768912, 0, -4344224, 0, 13033947, 0, -24217870, 0, 30115005, 0, -26180225, 0, 16322280, 0, -7400506, 0, 2452287, 0, -591710, 0, 102523, 0, -12396, 0, 991, 0, -47, 0, 1]>,<5,R![7929856, 0, -778960896, 0, 8702817280, 0, -32280164864, 0, 57528137408, 0, -58678148896, 0, 38053281348, 0, -16726538356, 0, 5180583848, 0, -1155962819, 0, 187637364, 0, -22127702, 0, 1870977, 0, -110184, 0, 4277, 0, -98, 0, 1]>],Snew);
    return Vf;
end function;