
// Make newform 8024.2.a.z in Magma, downloaded from the LMFDB on 20 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_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_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_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_8024_2_a_z( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8024_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![-704, -14016, 122800, 518976, -1110076, -3669060, 2478432, 7163569, -2344874, -6849625, 1076783, 3835771, -194714, -1356011, -32037, 311283, 24485, -46227, -5580, 4274, 656, -223, -40, 5, 1]>,<5,R![128, -16576, 307576, -1503620, -1806434, 12747161, 19661540, -10989941, -30897917, -2242788, 20238534, 6334564, -6836441, -3232414, 1243405, 816055, -108319, -116070, 778, 9387, 622, -401, -45, 7, 1]>,<7,R![27608800, -95464960, -1250893912, -2699035268, -264736456, 4248231713, 2462836909, -2498335839, -2089509982, 668932145, 829349925, -57573127, -186333121, -12003390, 25002014, 3873833, -1978369, -465577, 83235, 29101, -1105, -931, -35, 12, 1]>],Snew);
    return Vf;
end function;