
// Make newform 8018.2.a.h in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8018_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8018_2_a_h();".
// 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_8018_a();"
function MakeCharacter_8018_a()
    N := 8018;
    order := 1;
    char_gens := [2111, 1901];
    v := [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_8018_a_Hecke(Kf)
    return MakeCharacter_8018_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8018_2_a_h();".
// 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_8018_2_a_h( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8018_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![65735, -3178107, 44041707, -217764169, 143300368, 2038899550, -5191099429, -3615886482, 26002377909, -11236788242, -60883450846, 59500586520, 80793401344, -121044455207, -62534691772, 148141085230, 22792573914, -122905176210, 5905415966, 72955136357, -12985710170, -31858936280, 8652852660, 10368784479, -3599613791, -2518791288, 1050499726, 451850432, -223121443, -58162735, 34777557, 5019671, -3940756, -235533, 315857, -1311, -16962, 913, 547, -51, -8, 1]>],Snew);
    return Vf;
end function;