
// Make newform 8027.2.a.e in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8027_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8027_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_8027_a();"
function MakeCharacter_8027_a()
    N := 8027;
    order := 1;
    char_gens := [350, 5935];
    v := [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_8027_a_Hecke(Kf)
    return MakeCharacter_8027_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8027_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_8027_2_a_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8027_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![-90567403569152, -792127796871168, 365192723246006272, 2139010840515215360, -172231855376413990912, -1868722767419243454464, 16101620085966816270336, 246014963021177756557312, -681684718637732249885184, -16117802401095684716890368, 14334040844467097464974976, 670562700622580146567813504, -59222857195638617333791056, -19732815058550413368268428912, -5467677749958067297747554016, 436612942982077702968528788096, 189682675915024103751422480804, -7558496274301286101678320464348, -3663838395107684010400430953093, 105319843039071368986039262236315, 50407780182517234946278533965093, -1206833768104805652502571936470910, -534859066987268263915641410842706, 11567195425351250822051008147119411, 4550600594443462471218025766385264, -94031688257856963097792194672822827, -31744262888737835727933447186482984, 655857604253176842534942433340558961, 183883519901483372634376566445824071, -3963649618233156479397178683774389790, -888856302075646942408330930942237832, 20931169647461362362424995574557896606, 3569279957920278241024889702274068076, -97293842273729977379390436611358304019, -11654100635493702041588933273830189088, 400644129008249032730971338633052676356, 28935645681200827500058156345074673359, -1469859822633129368663593177839119827499, -40894988777629979382933284428227387333, 4828648198532240559635852080515333265520, -65473689742084240929505492287612883708, -14268054470229157815804489305621635129766, 743661883550082726600779937584953371601, 38076069341064665018918598069748926720935, -3353852304891306476569266656816714540238, -92103220967165566261158035311928961204414, 11206294335416327080408643466306784904667, 202614621927724566291838129472388820207846, -31020996859625693049124852380816031355214, -406580761930451129032741398795764744253531, 74236263012549689208432541911816423960279, 746266304118008940619007901784120266339586, -156949967123693850123604612300760167992230, -1256028312693300440455424454106892927694905, 297003439133245077524679174274153823436710, 1942936627074761370618736515209056563383425, -507490505630655221563262652211223163576322, -2768107092386057309988021605770868841591690, 788001171860257032585412391954361419494516, 3639214965330221841114204896606735783071353, -1117328411850436077484967655219444610714123, -4422819904788733575739667767153056982386972, 1452399736703828636101193811105274356958329, 4976911491868199793359367688331113581301634, -1736361130336762044697140675414055140021916, -5193177092594179975365626059171015212558116, 1914342384810980923205225886804506675556173, 5031616224333588093501805109581100090596870, -1950892039790644546295624810966693307034581, -4532317849073486448990005427513187140941523, 1841431456281783312717946659597842701012475, 3799799850322349629680963616449359713947329, -1612694162648675803861681114230423947470995, -2968054808998472151038573337105402490352230, 1312491837239713455315790978501994408005108, 2161990061007096781369108734078779404105747, -993997071392184833280553160825155883089437, -1469819447746711456833485507514667380201249, 701366433918586098606619714897251552617413, 933298005568453628610490622790419877155342, -461575888640731949237876070616889480119741, -553861177673184318221540770382021295761354, 283590569948246064739446352169274179933653, 307358559572883406829312719933402966891784, -162799604105355096935351815488711407496313, -159571311201458236912837972506497823133911, 87386417821323109497112660059635425611337, 77534057548267049760417798224615401725413, -43887052944949176143487061722594081776344, -35268167210340574120669908182754623270008, 20633012053143980728123242210557458076754, 15021421553047301346508918206752340701399, -9084795313419686403391279440706399101057, -5991303684056046775661675758572491692179, 3747559530009172517859046252329045874057, 2237770875897060377537664325810142211775, -1448706035869525342837470734879007753709, -782619332159905805249966883703718532493, 524917648369003079656641844780063346873, 256232540853479629448424249873806197512, -178289445570876081188021908150446230612, -78509400016475654973442809653341267267, 56766404690003476596607566637771045737, 22501339140869793863640866853153046224, -16941779553575864304508835925729297263, -6028687709960476673439144717389389658, 4738720909986438436518417596164140307, 1508742863344527960852953906045791869, -1241912721050630588030262527301258931, -352324795359372761130041313835912318, 304860687519311794132364698073131938, 76674514395363075332429867851382237, -70065128769233919389120910125521805, -15525325367522266155658719193595694, 15068048780502962749728004063601982, 2918967367760011058979555283265925, -3030280458817540780140433503547150, -508257300985407871478385125856309, 569434158652325293995464374255872, 81680328074365589319012343104592, -99895736113893086687754754477163, -12059168822639800164890221668340, 16343290083203338120175191940132, 1624916793614199786519452498778, -2490575784540878831101584000432, -197859684812793624015072294636, 353045945458390380699767339598, 21419213403440431462641939197, -46478620377383455257307192567, -1998964204282339033535635592, 5672704568619943163551458671, 149606224132610033566205785, -640557875115870362865019498, -6845233133716528857869284, 66765180970158603753469655, -275208425203882818207589, -6406388736382119662167538, 116058898431602665183554, 564192741046283480815761, -17689734950420158686452, -45443513596769002156750, 1994466157623519709384, 3334153935180431320502, -185942732953364190854, -221776608694824350649, 14867666275844993074, 13299897411750056295, -1033921127674860190, -714357600879049362, 62796794338135217, 34093222556019554, -3326683376746446, -1431827215822843, 152888852358266, 52279827820868, -6040619855009, -1634184517133, 202472789348, 42852349729, -5650800994, -916758021, 127862223, 15365384, -2254652, -189208, 29077, 1522, -244, -6, 1]>],Snew);
    return Vf;
end function;