
// Make newform 50.6.d.a in Magma, downloaded from the LMFDB on 06 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_50_d();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_50_6_d_a();".
// 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_50_d();"
function MakeCharacter_50_d()
    N := 50;
    order := 5;
    char_gens := [27];
    v := [4];
    // 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_50_d_Hecke(Kf)
    return MakeCharacter_50_d();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_50_6_d_a();".
// 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_50_6_d_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_50_d();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<3,R![5337136054959438589086096, 2758849491746421170369136, -2054723555407007624253264, -2351073468393685135508814, 3676177670949620771245101, -360459135964591704771984, 106032211373359398164031, -5814889381518780364569, 1185882016578384145806, -52442544890311214679, 7033536957909781251, -28598716470318159, 40704853874958916, 1036961257825466, 151302324844056, 3864503868441, 384452936431, 6151454556, 605959406, 10047396, 1020571, 20436, 1236, 11, 1]>],Snew);
    return Vf;
end function;