
// Make newform 6022.2.a.e in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_6022_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6022_2_a_e();".
// 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_6022_a();"
function MakeCharacter_6022_a()
    N := 6022;
    order := 1;
    char_gens := [3013];
    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_6022_a_Hecke(Kf)
    return MakeCharacter_6022_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6022_2_a_e();".
// 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_6022_2_a_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_6022_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![-87273344, -4405092224, 163429475648, 2545677990912, -6729484376408, -119752074880936, 65874903124666, 2312662881399579, 229240291537073, -24692711555065825, -7995674059052994, 167663098934574209, 59496913637795492, -788366374616757453, -222835088762227005, 2708490599937942448, 420301354067384091, -7025373127798621600, -10801239220809024, 14022439661693401674, -2270122829758406450, -21748593101109042024, 7160200184316302476, 26277412492948076519, -13248967237117681158, -24601520414530577504, 17276764182231605100, 17527531190580436745, -16866214273486597534, -9054395225343014250, 12663102909234243530, 2882492655474653737, -7399947207858985864, -26383902766107150, 3371869961422925472, -607199074948723798, -1186771778029907982, 424063406047611648, 313193590904636811, -180107207655702910, -56807682746655756, 55045583562397909, 4662687821224405, -12630606091932814, 966640555385083, 2179340607258542, -475136509313072, -273086540187984, 105190288127575, 21942151990459, -15530450272564, -459581293870, 1624653547664, -153488106382, -117988371267, 25216872012, 5260660309, -2132782598, -61547465, 111087135, -8727208, -3326360, 611452, 33713, -17331, 961, 167, -25, 1]>],Snew);
    return Vf;
end function;