
// Make newform 220.2.l.d in Magma, downloaded from the LMFDB on 26 December 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_220_l();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_220_2_l_d();".
// 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_220_l();"
function MakeCharacter_220_l()
    N := 220;
    order := 4;
    char_gens := [111, 177, 101];
    v := [2, 3, 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_220_l_Hecke(Kf)
    return MakeCharacter_220_l();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_220_2_l_d();".
// 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_220_2_l_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_220_l();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![9216, 52224, 147968, -376960, 668176, 641024, 613888, -931936, 1303816, 1001680, 646912, -606784, 616113, 394260, 202184, -124684, 83168, 45668, 21912, -10236, 3582, 1324, 728, -340, 88, 12, 8, -4, 1]>],Snew);
    return Vf;
end function;