
// Make newform 560.2.bd.a in Magma, downloaded from the LMFDB on 23 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_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_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_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_560_2_bd_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_560_bd();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![10137856, -13551104, 9056768, 41963136, 463635344, -413805056, 225780480, 713420288, 2693433752, -1593414080, 796378400, 2195369080, 5218653233, -2163417672, 1052515936, 2615957944, 4147286120, -1002847816, 541991456, 1274489624, 1536997484, -138948392, 116473952, 268004696, 286308392, 4073560, 10563168, 24087784, 25999318, 1677224, 400928, 909480, 1139544, 84904, 6240, 14088, 24700, 1480, 32, 72, 256, 8, 0, 0, 1]>],Snew);
    return Vf;
end function;