
// Make newform 684.3.g.c in Magma, downloaded from the LMFDB on 17 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_684_g();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_684_3_g_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_684_g();"
function MakeCharacter_684_g()
    N := 684;
    order := 2;
    char_gens := [343, 533, 325];
    v := [1, 2, 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_684_g_Hecke(Kf)
    return MakeCharacter_684_g();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_684_3_g_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_684_3_g_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_684_g();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<5,R![-18460196864, 42930171904, 14547937024, -53820654848, -12464571456, 21307704320, 5639453760, -3051280352, -834838636, 202348668, 54646049, -6963720, -1829084, 126816, 32454, -1144, -288, 4, 1]>],Snew);
    return Vf;
end function;