
// Make newform 504.2.cz.b in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_504_cz();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_504_2_cz_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_504_cz();"
function MakeCharacter_504_cz()
    N := 504;
    order := 6;
    char_gens := [127, 253, 281, 73];
    v := [3, 3, 4, 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_504_cz_Hecke(Kf)
    return MakeCharacter_504_cz();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_504_2_cz_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_504_2_cz_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_504_cz();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![-29463513259734155952, 0, 3146166419724398419776, 0, -116605659607657758863892, 0, 2274914033000451362687031, 0, -27598872250256226071203224, 0, 227919613914044051643121869, 0, -1357482223635896101938086520, 0, 6073211311639379960471617464, 0, -21039535337216534235385344540, 0, 57788433794170634524423494624, 0, -128238064483494087324676144764, 0, 233470088701749918144314650674, 0, -353183629198748267007177674436, 0, 448688970899972908064422927182, 0, -483026882880266502311243915028, 0, 444019164429114457295332899366, 0, -350814241391626760944841787672, 0, 239569253485730317058573497536, 0, -142084770129914816541626394972, 0, 73486412917670738596339362129, 0, -33259963747989058871103383556, 0, 13211830509705101975133489655, 0, -4617237947289063304296454848, 0, 1422417122839890178313603082, 0, -386857691008428647780952676, 0, 92986992840597205881385410, 0, -19766154194730170086730916, 0, 3716604532293188745100341, 0, -618010544693576136126252, 0, 90816715482714623706309, 0, -11779495370446573480120, 0, 1346167283203362424629, 0, -135212795551564608192, 0, 11898286277391744753, 0, -913485069016897488, 0, 60867104987841594, 0, -3496447489327924, 0, 171687329098650, 0, -7127829875388, 0, 246632479349, 0, -6976520112, 0, 157050027, 0, -2704224, 0, 33429, 0, -264, 0, 1]>],Snew);
    return Vf;
end function;