
// Make newform 546.2.bq.c in Magma, downloaded from the LMFDB on 20 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_546_bq();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_546_2_bq_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_546_bq();"
function MakeCharacter_546_bq()
    N := 546;
    order := 6;
    char_gens := [365, 157, 379];
    v := [3, 3, 2];
    // 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_bq_Hecke(Kf)
    return MakeCharacter_546_bq();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_546_2_bq_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_546_2_bq_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_546_bq();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![8836, 0, -34932, 0, 54189, 0, -42568, 0, 18451, 0, -4508, 0, 603, 0, -40, 0, 1]>,<61,R![35153041, 0, -4511601402, 0, 563862866604, 0, -1914833044244, 0, 4525731539502, 0, -5190445595278, 0, 4211066601608, 0, -1826916247430, 0, 562160559279, 0, -115191956542, 0, 17317544136, 0, -1676019958, 0, 110141918, 0, -2648516, 0, 46172, 0, -242, 0, 1]>],Snew);
    return Vf;
end function;