
// Make newform 6046.2.a.g in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_6046_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6046_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_6046_a();"
function MakeCharacter_6046_a()
    N := 6046;
    order := 1;
    char_gens := [5];
    v := [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_6046_a_Hecke(Kf)
    return MakeCharacter_6046_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6046_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_6046_2_a_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_6046_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![-4657414144, -9963700224, 1561557241856, -780098510848, -151536171436032, 470453438319616, 3520205656692736, -14819375223477248, -30988019149252096, 178861392756238528, 131284634309030928, -1210695594607910160, -224883949597758680, 5371507707331911984, -426950102261552971, -16978956376067643268, 3650568388581321445, 40245907568876089093, -11318542338735824336, -74025639386940151401, 22734826408631569815, 108236870612658623540, -33401533105252378503, -128054539045870534704, 37816979437563018862, 124238972384954392016, -33980391909422863638, -99876354818395046623, 24698255386206186737, 67073182273915107961, -14716241545897225308, -37872983001361329721, 7258637584560845084, 18073470269077942634, -2985258003161082052, -7318806833696760416, 1029149138943325161, 2522630104283633192, -298500539895923599, -741664375744836836, 73005077083124637, 186221349448479092, -15068375757710159, -39942376508807015, 2623181257143255, 7312875485420449, -384333293212255, -1140668027707062, 47206770121127, 151089200876455, -4831563763464, -16912151896055, 408462528529, 1588813936080, -28172060709, -124091616757, 1557681358, 7953480133, -67319922, -410835610, 2188976, 16667472, -50329, -510967, 729, 11120, -5, -153, 0, 1]>,<11,R![-1983297112808742074694750, -5825877799161972037933660, 432616939614210895375105523, 3084810219237857777029036316, -1138047825154898699048466899, -49140265142827365922476014226, -40647483089042882672177627802, 347669571349138975135957473321, 378560223620702951450285970295, -1440007260566351657498105508604, -1509050437219114236836373552309, 3885189923742659491646403987828, 3424633836747520034189952419114, -7212722624309154067420301238955, -4988769978395722106442592936060, 9621076633022470752532958772900, 4973533448870381715982935804580, -9554227817380292014382704381738, -3495928199890567197459753124427, 7261388760115390860955158608653, 1723266959513015373703748317432, -4311888348318732281158491266127, -549557800329220053487805710406, 2030440757665588600156373787706, 65426287057332085681246738456, -765853048083412679952094199608, 40104146052463238760611174677, 232724503066373101055950804866, -30349759458500618804808828576, -57060942465320905452808770863, 11793485217811936946935024851, 11247223785067359313988727370, -3237739396305771979007727155, -1761550170319189348192382701, 679519820840599722765223682, 213220564240338302333823240, -112428079698525370384286097, -18554748376080265526505804, 14854261711988018629954564, 870417943360465541691345, -1571820825583969442594290, 39602087950201698741098, 132473285347426103217101, -13105161152302817527662, -8744699999081015454646, 1526840565484004496456, 434803893855193878791, -118624532031496016047, -14646964535367810881, 6774023088633754884, 192176535074471695, -289842749826276082, 11907681476046926, 9135709533487458, -952998789258425, -198910969534899, 36674067997447, 2385115472406, -903809544856, 8386547036, 14423140687, -931790746, -131520803, 17298688, 304140, -149564, 5724, 442, -42, 1]>],Snew);
    return Vf;
end function;