
// Make newform 99.4.e.b in Magma, downloaded from the LMFDB on 04 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_99_e();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_99_4_e_b();".
// 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_99_e();"
function MakeCharacter_99_e()
    N := 99;
    order := 3;
    char_gens := [56, 46];
    v := [2, 3];
    // 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_99_e_Hecke(Kf)
    return MakeCharacter_99_e();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_99_4_e_b();".
// 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_99_4_e_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_99_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![1871424, 31398336, 422484304, 1533811936, 4000710708, 6015743794, 7035712891, 4785328575, 3250191576, 1355969649, 879243480, 274195814, 149114219, 34922943, 17445128, 3305042, 1408932, 198633, 78033, 8775, 3016, 226, 72, 4, 1]>],Snew);
    return Vf;
end function;