
// Make newform 8024.2.a.y in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8024_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8024_2_a_y();".
// 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_8024_a();"
function MakeCharacter_8024_a()
    N := 8024;
    order := 1;
    char_gens := [2007, 4013, 3777, 3129];
    v := [1, 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_8024_a_Hecke(Kf)
    return MakeCharacter_8024_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8024_2_a_y();".
// 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_8024_2_a_y( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8024_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![23040, 24896, -217712, -300456, 674372, 1190148, -745732, -2030483, 100673, 1774028, 413013, -856688, -357886, 231485, 138214, -32419, -29384, 1357, 3543, 207, -227, -28, 6, 1]>,<5,R![-4352, 254128, -2143728, -18716488, -26472372, 23117937, 61338359, 3369996, -49346271, -15705285, 19605097, 9035779, -4341662, -2518912, 560567, 403980, -41907, -39169, 1681, 2274, -28, -73, 0, 1]>,<7,R![16035200, -44570192, -72133984, 193776736, 115089524, -318989669, -81641576, 265726401, 27085063, -127510562, -3010621, 37736800, -609867, -7132955, 239373, 871644, -32397, -68198, 2207, 3282, -75, -88, 1, 1]>],Snew);
    return Vf;
end function;