
// Make newform 3024.2.q.l in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_3024_q();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_3024_2_q_l();".
// 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_3024_q();"
function MakeCharacter_3024_q()
    N := 3024;
    order := 3;
    char_gens := [1135, 757, 785, 2593];
    v := [3, 3, 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_3024_q_Hecke(Kf)
    return MakeCharacter_3024_q();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_3024_2_q_l();".
// 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_3024_2_q_l( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_3024_q();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![5476, 89614, 1471701, 733078, 6691114, 408138, 27085701, -202038, 14453850, -916301, 5195983, -343158, 1048624, -55568, 151797, -5484, 14145, -120, 952, 4, 39, 1, 1]>,<11,R![4241135376, 6082125732, 20686052241, -17856863748, 29054340927, -13900141890, 12322526598, -5135510970, 3377443068, -1088484696, 497845800, -116247042, 44948130, -8293953, 2876524, -387465, 126419, -12546, 4059, -249, 80, -3, 1]>],Snew);
    return Vf;
end function;