
// Make newform 560.2.bd.b in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_560_bd();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_560_2_bd_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_560_bd();"
function MakeCharacter_560_bd()
    N := 560;
    order := 4;
    char_gens := [351, 421, 337, 241];
    v := [4, 3, 4, 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_560_bd_Hecke(Kf)
    return MakeCharacter_560_bd();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_560_2_bd_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_560_2_bd_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_560_bd();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![12845056, -227540992, 2015363072, -7782072320, 17580703744, -27964620800, 94349238272, -332921972736, 750037311744, -893003668480, 1144744743424, -3042452256640, 7430813475216, -8096968465920, 3374866359552, 1038076293120, 6258935574936, -7466408437472, 2861083710496, 4428522542776, 4722236139601, -1754896755816, 814782908512, 1634672131384, 1501594057032, -59731171304, 85397442848, 183632367576, 177736753036, 7920102456, 4284567136, 9475540056, 10366537992, 707492088, 113720160, 254713000, 336935734, 23108936, 1623072, 3654696, 6404344, 366536, 11616, 26184, 70620, 2792, 32, 72, 416, 8, 0, 0, 1]>],Snew);
    return Vf;
end function;