
// Make newform 6004.2.a.g in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_6004_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6004_2_a_g();".
// 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_6004_a();"
function MakeCharacter_6004_a()
    N := 6004;
    order := 1;
    char_gens := [3003, 2529, 3953];
    v := [1, 1, 1];
    // 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_6004_a_Hecke(Kf)
    return MakeCharacter_6004_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6004_2_a_g();".
// 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_6004_2_a_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_6004_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![-2560, 3776, 68616, -73231, -660037, 474619, 2841618, -1328886, -6331363, 1773107, 8114423, -1138859, -6445782, 223713, 3316178, 151681, -1128252, -120597, 254518, 38976, -37466, -7046, 3445, 739, -179, -42, 4, 1]>,<5,R![108441, 613655, -860282, -8144163, 728578, 39456012, 6531067, -95173135, -18266943, 127712691, 22047512, -100404302, -17538937, 48752266, 9713322, -15044150, -3585634, 2946572, 851553, -351707, -126256, 22580, 11116, -440, -523, -24, 10, 1]>],Snew);
    return Vf;
end function;