
// Make newform 546.2.bz.b in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_546_bz();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_546_2_bz_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_546_bz();"
function MakeCharacter_546_bz()
    N := 546;
    order := 12;
    char_gens := [365, 157, 379];
    v := [12, 2, 9];
    // 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_546_bz_Hecke(Kf)
    return MakeCharacter_546_bz();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_546_2_bz_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_546_2_bz_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_546_bz();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![252047376, 1056198528, 40812242688, 529756827264, 2176054437600, 4108968273024, 13175380703232, 19387138281216, 31624916576656, 39414609840128, 39867843332384, 33463831444608, 18814019446888, 6338054419744, -57879661440, -2014174503680, -1138121581200, -340963260704, -92418441056, 92075389472, 77539079056, 1827939168, -6138114744, -662130608, -801158879, -160160208, 114303872, 21367352, 5138914, 681272, -1288552, -128744, 4107, -5256, 7344, 776, -102, -24, -24, 0, 1]>],Snew);
    return Vf;
end function;