
// Make newform 3150.2.bf.e in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_3150_bf();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_3150_2_bf_e();".
// 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_3150_bf();"
function MakeCharacter_3150_bf()
    N := 3150;
    order := 6;
    char_gens := [2801, 127, 451];
    v := [3, 6, 1];
    // 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_3150_bf_Hecke(Kf)
    return MakeCharacter_3150_bf();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_3150_2_bf_e();".
// 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_3150_2_bf_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_3150_bf();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<11,R![1679616, 0, -11757312, 0, 59590080, 0, -136499904, 0, 226614160, 0, -126799808, 0, 50195872, 0, -9697232, 0, 1330444, 0, -77312, 0, 3232, 0, -68, 0, 1]>,<37,R![5080516, 1830248, 6136564, 3526600, 7024018, 3088724, 1343030, 138392, 22759, 1642, 253, 14, 1]>],Snew);
    return Vf;
end function;