
// Make newform 6022.2.a.d in Magma, downloaded from the LMFDB on 24 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_d();".
// 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_d();".
// 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_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_6022_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![-90066107, -8299578826, -96380952194, -188053102896, 2103444533016, 8734525073794, -16959058817905, -122952185729611, 41338315888541, 964306582809842, 307735188262744, -4947834149101306, -3314505831921741, 17925535801483068, 15935286278197842, -47948612810097682, -50082038968809777, 97468308012649671, 114101830039570608, -153524860151781541, -197857176137668907, 189803687246576811, 268761952623278774, -185530706122975311, -291517602555700289, 143582879143641081, 255955179477617062, -87346832746997429, -183749000995484188, 40785366417407086, 108663622354518494, -13635019429816245, -53221876376273461, 2430500102455892, 21668371194227274, 472588741871700, -7347819514200811, -589182469150676, 2075992144483616, 274077582769414, -487945147498411, -87606645800553, 95059805073684, 21379318770601, -15251103631833, -4126497887865, 1994321219960, 638014625589, -209105672191, -79156897147, 17109113604, 7834086591, -1038690289, -610363037, 41497017, 36610923, -614193, -1630968, -40202, 50801, 2983, -987, -86, 9, 1]>],Snew);
    return Vf;
end function;