
// Make newform 315.2.bh.c in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_315_bh();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_315_2_bh_c();".
// 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_315_bh();"
function MakeCharacter_315_bh()
    N := 315;
    order := 6;
    char_gens := [281, 127, 136];
    v := [4, 3, 6];
    // 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_315_bh_Hecke(Kf)
    return MakeCharacter_315_bh();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_315_2_bh_c();".
// 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_315_2_bh_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_315_bh();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![256, 0, -51472, 0, 7510033, 0, -501589745, 0, 24371083547, 0, -322498586906, 0, 2906755044067, 0, -12955110952891, 0, 38461425542317, 0, -82556312020664, 0, 136575071617202, 0, -179841635037422, 0, 193388873600191, 0, -172656612789781, 0, 129711964818478, 0, -82785369360621, 0, 45234566712282, 0, -21278867042619, 0, 8655341695076, 0, -3052883822837, 0, 935476349453, 0, -249158739392, 0, 57652115165, 0, -11565028487, 0, 2004125915, 0, -298242386, 0, 37788503, 0, -4023391, 0, 353233, 0, -24802, 0, 1327, 0, -49, 0, 1]>],Snew);
    return Vf;
end function;