
// Make newform 143.4.e.b in Magma, downloaded from the LMFDB on 17 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_143_e();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_143_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_143_e();"
function MakeCharacter_143_e()
    N := 143;
    order := 3;
    char_gens := [79, 67];
    v := [3, 2];
    // 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_143_e_Hecke(Kf)
    return MakeCharacter_143_e();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_143_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_143_4_e_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_143_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![4887141433344, -11530665639936, 34295952153600, -37110071356416, 71625377570112, -50821929414528, 99799808186064, -44265573444720, 84516548328988, -20218929431654, 51540959896427, -6352692062437, 20646163868740, -1046388194627, 6010338804828, -106745383824, 1196485315001, -2572280012, 177061504738, 918313337, 19365626122, 190076979, 1630214966, 17996020, 104327879, 1106448, 5161774, 43431, 190322, 1057, 5200, 14, 93, 0, 1]>],Snew);
    return Vf;
end function;