
// Make newform 8020.2.a.e in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8020_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8020_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_8020_a();"
function MakeCharacter_8020_a()
    N := 8020;
    order := 1;
    char_gens := [4011, 6417, 7221];
    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_8020_a_Hecke(Kf)
    return MakeCharacter_8020_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8020_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_8020_2_a_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8020_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![-168832, 1924480, 21872576, -21830272, -352002304, -116600288, 1994212896, 1586187072, -5248636398, -5270567082, 7913430095, 8942677672, -7656348596, -9329419299, 5083064162, 6520144993, -2415530463, -3200885729, 843608158, 1134647259, -219653762, -294795355, 42804414, 56435367, -6204204, -7930957, 657333, 806610, -49290, -57670, 2470, 2745, -74, -78, 1, 1]>],Snew);
    return Vf;
end function;