
// Make newform 546.2.bx.b in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_546_bx();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_546_2_bx_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_bx();"
function MakeCharacter_546_bx()
    N := 546;
    order := 12;
    char_gens := [365, 157, 379];
    v := [12, 6, 5];
    // 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_bx_Hecke(Kf)
    return MakeCharacter_546_bx();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_546_2_bx_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_bx_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_546_bx();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![107495424, 2938208256, 40155512832, 25885495296, 53270120448, 778894921728, 4507130626560, 7685070384000, 6535645082896, 257856619648, 4563616835072, 6927123030912, 5263629714688, 427715229824, 847065499392, 1290435060032, 1003119252648, 79978916288, 57338955520, 89778325312, 73978713136, 4804371648, 1816825632, 2858448824, 2448393265, 140229384, 27384800, 41956984, 37537612, 2164168, 156128, 234152, 260958, 12696, 288, 424, 828, 24, 0, 0, 1]>],Snew);
    return Vf;
end function;