
// Make newform 6004.2.a.f in Magma, downloaded from the LMFDB on 25 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_f();".
// 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_f();".
// 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_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_6004_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![-626, -23943, 51959, 171431, -366188, -490240, 1095535, 728867, -1797109, -599657, 1793498, 250739, -1145826, -16709, 479416, -34187, -131672, 17416, 23324, -4112, -2547, 531, 155, -36, -4, 1]>,<5,R![1440253, -3774539, -12415389, 27699702, 42591751, -72673912, -74614488, 94292661, 77450891, -69552424, -51106075, 31062112, 22100030, -8554778, -6323620, 1417080, 1191822, -125536, -144965, 2751, 10863, 479, -453, -41, 8, 1]>],Snew);
    return Vf;
end function;