
// Make newform 138.4.e.b in Magma, downloaded from the LMFDB on 02 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_138_e();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_138_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_138_e();"
function MakeCharacter_138_e()
    N := 138;
    order := 11;
    char_gens := [47, 97];
    v := [11, 7];
    // 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_138_e_Hecke( : Kf := Kf)
    return MakeCharacter_138_e();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_138_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_138_4_e_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_138_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<5,R![1256711066253834467096909896369, -1750527293652738457832708716917, 1101978435402245415521274723015, -391741971202251582552550247435, 84493842629376457065888148777, -13502403686497294021324074105, 2295153377974830145959734019, -135946190209469616369584212, 51766587245875316742515857, 3404409154744363958003455, 1074407353612765250339873, 60921089620793429718032, 8039465444777039274136, 5879146710816920602, 32828448481104139698, -689048429477561000, 204708855646739237, -284792807579417, 246925166168021, -9190794675582, 5703265557290, -163702456662, -3451756324, 432306806, 38176278, -1016815, 5482, 6409, 65, 6, 1]>],Snew);
    return Vf;
end function;