
// Make newform 245.2.l.d in Magma, downloaded from the LMFDB on 04 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_245_l();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_245_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_245_l();"
function MakeCharacter_245_l()
    N := 245;
    order := 12;
    char_gens := [197, 101];
    v := [9, 10];
    // 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_245_l_Hecke(Kf)
    return MakeCharacter_245_l();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_245_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_245_2_l_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_245_l();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![16, -64, 128, -1664, 2176, 14112, 12672, 36832, 72652, 19760, 9216, 11088, -12376, -6496, 32, -648, 1737, 72, 0, -8, -45, 0, 0, 0, 1]>],Snew);
    return Vf;
end function;