
// Make newform 14.11.d.a in Magma, downloaded from the LMFDB on 23 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_14_d();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_14_d_Hecke();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_14_11_d_a();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_14_11_d_a();".
// 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 ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [16876036055394640656, 627290085157877232, 70590565447335180, -972128975671236, 117569881085905, -1089499860800, 83400850488, -837614684, 39872585, -191104, 7168, 0, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-20016718744911545772883553974492281229195752476908344584592, -3077996948131518626758434260551550289783210125463561262932, 176658700000501971583929769620076825875942764550371169141, -6492313476448837139871047369614801837550998236452787655, 123706173459488348935505936026149988965559296511640780, -4838464430051761361098202087499480643297556503080960, 84839218950506015921844032647660705825950306315029, -2413552784800113778892730490458671082419663948351, 18499239892033793793107795866077969815795722768, -402083411566761348172947225935246859091686748, 1041988613144398320398262559453830741750537, -59851264761259694344133688068921078774791], [-24810088684363243718664558877997071979312102975786040761333108568753660, 3802621779076993409106905359147186313999230457297765641906070881712250, -79842325393564195199915766415040236075094593878022703195612585242797, 2958041641279151359189967341967147538202254947276967005166759779495, -71958644064309497069783821292962726495402415385128513210222695300, 2221013476685186694908114874920720548231943708990620180171040370, -38697059748033790257928553202965957962976780956872410033042605, 956562416383253481088034697669505626332169632435042052910675, -8590345021034059253458402331016147314680439122935483241736, 192216283130231626059514760390507787995315235560092819550, -47899794295494559354240376837269460104056948639385005, 28925121888333512291774356986703545859265003988453647], [-5490348427113885708565033583572544039518920, -53105837327050486342005675333231306520320, -3115204603108863757296958984913479859904, -374188496524594889818203892440919918105, -454593551489376413317862559928960000, -216017698347812844296398434045066540, 1089384487918150013188294945438640, -130492323219194149976079015178985, 579733248703974606784633054768, -21788143628338510664395001740, -6019212042405342472749060, -3611372262029154777698401], [1172761518262702777192947808777781422691997042092083398372173034000321936, 13494281010364930737483133037931535455166361935273945602905572364140332, -7566926472657565902860680783273698823167989211081388182864556963830333, 89410918195818537263556152288336382363029933446572965922978441728855, -6386625495928662971525293614807028340091439169646270560871547028275, 58065417902913274903434636084482595499504081009407917070099821205, -4402173770923758730830403230058849465844712179318705642951211847, 34717335908255795782300694332525933363287526035778876060004836, -953795125588000273126734180661119855056615718024375832649954, 1894807828452046246100357764551791110587860529375895446959, -124347875587135357100690654121092303096822975102005945662, 704346674553673152339320746200572890639121196018577613], [-318358313938357463556048501730514018082383735243652545597561936098326312, -28241529721293575319269033404927882646215790897758718103902616578990400, -930634919433645795794414625228295008734119322926497016475464489779216, -1690068075835854258594394240031411059236951982896722906324592826760, -923791128738986954394249974894316373949531377065907684441372006805, 2172946482674427625024414524032054080148182270395118728395200230, -522048665814317380409925745912346840670457904785370041505538821, 8013412997985092749817510312290337167041054764159694027317795, -154528519533281887362250697886022728000469307469608505830083, 1471670895588285599594764882064789273848512083079654801577, -6591392303791512448821592084348933471615355552029244850, 371880148224915658043330436876215432742871586033688601], [138660227424926687534990512526979623541375365948178227575483750965123816, 8341005660537293618145257738279732090615731972453168769262715503386952, 409478122946779493880330742112119316534823321627114855363612850625738, 12807277006412581762649765284299624413463343101816594061687528045230, 321850486278216341400560868393367345102661910599352764182026003085, 9981459746470797435361288456414063063367194674484150438353638465, 188387645811411477588543748868614155270036484709516679905140328, 4694041207426178964165955928127399512563788566918170393574631, 43037334563782741304103670347734148139227625128691787048854, 1231486907969719462863033866043248152299434944003862158879, 10161903407550516466420480881433884162025410550308619913, 133147936175002151542199322091231376923728654515401372], [965319670032781477790514920878944992183230149229379520928528422406644564, -22806233958722774992325788224799271792314883779081501561370599588889268, 1182290702353917779067057987560655384000135928126671812727969008465531, -80396649328407833436376585554338104372564713060775742054747187754155, 1088801096903483299146764685535134042431963577376082237566106261590, -65160277371978165569734732633237463318107892943309562113967788835, 521442451289169051961012469583470672715927402957920168338078892, -37829534797981938286118584589842413107645405281600492359660549, 149962980832973128062270146951835375229344997307038853340163, -7671464917670132202915255010316298171624201500299202839694, -16499825962330885900771120631491767638728335408267489322, -1143950730899387009590427362364496170445745330229689076], [-9390925482904889036715727560869706764155748264149340733593163710609785464, 215462239918581932290749505642263277359472932583305443756761682834452956, -13040005880132119690412842238949567630250252368950168103606486378642207, 512325994504483265388856488212271689960549161355859545731989247061285, -11673211370923076314925324663457584147524163252913013505687602456390, 370994357156817806025848667128085036725949494696180898135828489165, -2861677956081670584138222551573038432269627778529119571795119972, 174328450165302646561734459775140076025842140214537452030960643, -600367118235993553458122627303091331490960354903547883539491, 40193486916951710246910062347195050603538265285841441867074, 157582763903348013538506051515752329919069452517576683234, 5579905059112142307010512813226441348774685452442892752], [15452332702280702230958476068508763868669204810699040998085064496827295420, 535870717750361331208763675727683367278233257048731469963883748928092208, -52558371926519477782272354303303726209699082940023134140411706387679279, 1829405779971014663969902660857597425110539117171234181801711793306320, -60861301588760866253605075217087219932039922460474951670158022694195, 1504628154263566597481454114972177728536846170793626491482192139235, -47186750073275270925107896596798233738272658313304436489947104305, 800496878907339391490306253579231034774305865232063092764185399, -11114129091158913837568399944450728055303040569340728105019642, 103447375302131234749493027102959320421344093604330697574505, -1126742968998661498664838920953742501226906089024536817568, 19228223094491847019383484760832192910117937261873856874], [49412251324743676822759275509336296106454584392330362314982572523565028028, 2911052737670268872126337136458500849313080412850277354835464133406642764, 144255036579793434513378489874594826223754818587645089033435171291747983, 4075089610262045023191840281916791337617044938519175063090172454431245, 118188038156973983708632548505406015287819257683002654051112094547990, 3743252261086231668713656309201742586564311550829757793379224499170, 70023626125023690634405103944394768774628331487548179981302580379, 1655479166640342477504234577461107791081762088699241892526668967, 17234396474751046765068038566006207987576354917953141670217964, 447514683964494949601728872004453083273450852261006315727642, 3803492102039094354850760444999393627608890136822407099801, 45075847539309788900064087560115925641583760526892689817], [-11477688156627822023154976441160040521019215321829386950502275904051220600, -1028359817601363266479446909582901796369802384918255328682403897610709604, -32709169684204450312776471140477064112019520575730824316150915185475999, -72887262764892176985174780794953852517295140918334700426382564779775, -35623907439733657904270107906162620013908410729494295848768298722790, 24476821008567607388126504115010448590015537697037741696470846460, -20070347048644663664977711353069122338789133085195265477299669905, 360630717381263429221211779018893736791062021118443240907501743, -6526284704777525213068560795161254899994282004047208383693342, 70608477869806032487657050356254377973320996347857247202070, -179849212314059803795771721904223259995151139581341298271, 17841431776699633575900632253861543763253108326157760019]];
    Rf_basisdens := [1, 74802047092548886980024803140197215295466560072440012835180, 3027091662279410737870214741845111923003679802837786463518549576798415, 258529108983836530627718854513151853345390, 4036122216372547650493619655793482564004906403783715284691399435731220, 1345374072124182550164539885264494188001635467927905094897133145243740, 448458024041394183388179961754831396000545155975968364965711048414580, 1345374072124182550164539885264494188001635467927905094897133145243740, 2018061108186273825246809827896741282002453201891857642345699717865610, 6054183324558821475740429483690223846007359605675572927037099153596830, 12108366649117642951480858967380447692014719211351145854074198307193660, 4036122216372547650493619655793482564004906403783715284691399435731220];
    Rf_basisnums := ChangeUniverse([[z : z in elt] : elt in Rf_num], Kf);
    Rfbasis := [Rf_basisnums[i]/Rf_basisdens[i] : i in [1..Degree(Kf)]];
    inp_vec := Vector(Rfbasis)*ChangeRing(Transpose(Matrix([[elt : elt in row] : row in input])),Kf);
    return Eltseq(inp_vec);
end function;


// To make the character of type GrpDrchElt, type "MakeCharacter_14_d();"
function MakeCharacter_14_d()
    N := 14;
    order := 6;
    char_gens := [3];
    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;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_14_d_Hecke();"
function MakeCharacter_14_d_Hecke(Kf)
    N := 14;
    order := 6;
    char_gens := [3];
    char_values := [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := true, Kf := Kf); // the value of chi on the gens as elements in the Hecke field
    F := Universe(values);// the Hecke field
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),values);
    return chi;
end function;


function ExtendMultiplicatively(weight, aps, character)
    prec := NextPrime(NthPrime(#aps)) - 1; // we will able to figure out a_0 ... a_prec
    primes := PrimesUpTo(prec);
    prime_powers := primes;
    assert #primes eq #aps;
    log_prec := Floor(Log(prec)/Log(2)); // prec < 2^(log_prec+1)
    F := Universe(aps);
    FXY<X, Y> := PolynomialRing(F, 2);
    // 1/(1 - a_p T + p^(weight - 1) * char(p) T^2) = 1 + a_p T + a_{p^2} T^2 + ...
    R<T> := PowerSeriesRing(FXY : Precision := log_prec + 1);
    recursion := Coefficients(1/(1 - X*T + Y*T^2));
    coeffs := [F!0: i in [1..(prec+1)]];
    coeffs[1] := 1; //a_1
    for i := 1 to #primes do
        p := primes[i];
        coeffs[p] := aps[i];
        b := p^(weight - 1) * F!character(p);
        r := 2;
        p_power := p * p;
        //deals with powers of p
        while p_power le prec do
            Append(~prime_powers, p_power);
            coeffs[p_power] := Evaluate(recursion[r + 1], [aps[i], b]);
            p_power *:= p;
            r +:= 1;
        end while;    
    end for;
    Sort(~prime_powers);
    for pp in prime_powers do
        for k := 1 to Floor(prec/pp) do
            if GCD(k, pp) eq 1 then
                coeffs[pp*k] := coeffs[pp]*coeffs[k];
            end if;
        end for;
    end for;
    return coeffs;
end function;


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 11;
    raw_aps := [[0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [54, 27, -2, -2, 0, 1, 1, 0, 0, 0, 0, 0], [-369, 371, 14, -29, -2, 0, 2, 0, 0, -1, 0, 0], [1249, -2582, -64, -41, 8, 36, 5, 9, 3, 2, 3, 2], [34, 18556, -340, 340, -42, 368, -368, 21, -15, -30, 13, -13], [58650, 117163, -1669, 817, -262, 40, 0, 262, 35, 35, 0, -137], [159251, 80531, 10515, 10785, 0, -992, -992, 1946, -151, 0, 135, 135], [-24680, 25335, -2421, 4338, -655, 0, 6764, 0, 0, -385, 119, 0], [141442, 139022, -58090, 1483, 2420, 5882, 2941, -4840, -1492, -746, 737, 1474], [5020254, -1781, -2169, 90795, -7150, 32268, 64536, -7150, -1393, 1393, 3562, 1781], [9674581, 4863092, -10986, -9270, 0, -50334, -50334, 52461, 123, 0, 858, 858], [-1270336, -1246872, 369940, -5737, -23464, -26308, -13154, 46928, -3356, -1678, -7415, -14830], [-53638846, -107276039, 2089175, -1045205, -7106, 116092, 0, 7106, 1235, 1235, 0, 1653], [88915454, 5142, 13948, 1601762, -15176, -248726, -497452, -15176, -3664, 3664, -10284, -5142], [-54755757, 54797474, 3171977, -6305111, -41717, 0, 201116, 0, 0, 6371, -32472, 0], [164399, 100230075, -1692848, 1692848, -452632, -125306, 125306, 226316, 13502, 27004, -61917, 61917], [-233316284, -116938967, 14147346, 14070498, 0, 1350311, 1350311, -600074, -46514, 0, -38424, -38424], [-122330644, 122256224, 7111992, -14240607, 74420, 0, -2360062, 0, 0, 38810, 55433, 0], [696304, 265491583, 24710286, -24710286, -963724, 548987, -548987, 481862, -156722, -313444, 214442, -214442], [-645776804, -135880, -227746, 25397974, 813374, -993736, -1987472, 813374, -44014, 44014, 271760, 135880], [222771202, 111815897, 40158338, 40515418, 0, -1578416, -1578416, 1039132, 340562, 0, 178540, 178540], [385107136, 384536760, -109014526, 143317, 570376, -7793222, -3896611, -1140752, -313492, -156746, -13429, -26858], [1231519586, 2463082948, 121076810, -60538694, 5485270, -3035138, 0, -5485270, 578, 578, 0, 43776], [142947411, -139916427, 151199232, -301288074, -3030984, 0, 5230212, 0, 0, 282540, -827850, 0], [2457095446, 4913487993, 273806687, -137610305, -9564214, 9319180, 0, 9564214, 1413923, 1413923, 0, -702899], [-4773487206, -2386006443, 182855877, 181291113, 0, 10998762, 10998762, 691938, 1200381, 0, -782382, -782382], [200514870, -194588876, 202367316, -408521529, -5925994, 0, -29529415, 0, 0, -1958800, 1828097, 0], [5728244706, 5731205329, -362650857, -779832, -2960623, -33348888, -16674444, 5921246, -2179090, -1089545, -1869377, -3738754], [14431900, 590585827, 116525095, -116525095, -27691844, 2717326, -2717326, 13845922, 1950503, 3901006, 585978, -585978], [4706991238, -67473, 1691255, 113550511, 4564426, 27287960, 54575920, 4564426, -1826201, 1826201, 134946, 67473], [17156636074, -3510402, -9151384, -619732682, 333812, 15734978, 31469956, 333812, 2130580, -2130580, 7020804, 3510402], [-10388287995, 10348627263, 200826558, -402270846, 39660732, 0, 83996037, 0, 0, 4299204, 4916934, 0], [-293875, -18361320173, -441709229, 441709229, -5790020, -643748, 643748, 2895010, -5470751, -10941502, -3188885, 3188885], [1726526220, 3439302110, 840732664, -423839914, -183728, -18645280, 0, 183728, 6947164, 6947164, 0, -13750330], [18043049059, 18035316957, 1363991228, -15750587, 7732102, 151266140, 75633070, -15464204, 23340022, 11670011, -4080576, -8161152], [6310041, -30849033276, -1148939680, 1148939680, -467066, 103317058, -103317058, 233533, -3555337, -7110674, 6076508, -6076508], [-27332011299, -13641068673, -1640779476, -1642838262, 0, -20354358, -20354358, 48844560, 2505450, 0, -1029393, -1029393], [11576400805, 11547077957, 3790619038, 10544390, 29322848, 157863278, 78931639, -58645696, -5682272, -2841136, 7703254, 15406508], [24696085585, 49426963877, -4266992459, 2125903646, 53459453, 97732193, 0, -53459453, 15185167, 15185167, 0, 34792707], [2887690506, -2842365066, -1903449900, 3801005049, -45325440, 0, 427010166, 0, 0, 18141072, 24035823, 0], [81430276, -60326533066, -1890239020, 1890239020, -200237782, 307689134, -307689134, 100118891, -1697401, -3394802, -18688615, 18688615], [77018842232, 154030850102, -407685904, 221195770, 132127484, 28295500, 0, -132127484, -34705636, -34705636, 0, -6834362], [187195368303, 187457262830, 3341634387, -14037315, -261894527, 314596140, 157298070, 523789054, 20312410, 10156205, -3881110, -7762220], [40999467, -148117146961, -451640297, 451640297, -43234732, -514330840, 514330840, 21617366, -35291, -70582, 19382101, -19382101], [-12823156254, -8861135, -53436843, 3024974853, 164348378, -535239840, -1070479680, 164348378, 35714573, -35714573, 17722270, 8861135], [-214417262993, -107239681162, -400664570, -420365734, 0, 234760688, 234760688, -71949913, -959807, 0, -9850582, -9850582], [116854892910, 51612722, 99998884, -8567833090, 50100336, 748249782, 1496499564, 50100336, 3226560, -3226560, -103225444, -51612722], [-55440119490, -110753526246, 12233460918, -6106469616, 684047430, 1326070386, 0, -684047430, -20521686, -20521686, 0, 126712734], [-376012925424, -187824352260, 2672228214, 2786137500, 0, -1210728306, -1210728306, 421175547, 52852887, 0, 56954643, 56954643], [-148964167649, 148698186203, 3928122750, -7682763249, 265981446, 0, 945708126, 0, 0, 101039259, -72442992, 0], [22203637864, 22071635674, -6241374388, -51717980, 132002190, -3419151544, -1709575772, -264004380, 145994790, 72997395, 21279415, 42558830], [-84226970713, -42615751, -61745579, 10152550208, -378849111, 1536603157, 3073206314, -378849111, -23485923, 23485923, 85231502, 42615751], [34130116496, 17393885677, 7673417030, 7279896634, 0, 1695823768, 1695823768, 460894660, -54746470, 0, -196760198, -196760198], [-43884711737, -87880631983, -2932095773, 1520230028, -305295673, 3293126015, 0, 305295673, -108364283, -108364283, 0, -111208509], [-24291705426, 24661475220, 8642721090, -17315061072, -369769794, 0, -3729297432, 0, 0, -117489231, -87870339, 0], [554304025, 23757364169, 15776679410, -15776679410, -973157320, -1079204809, 1079204809, 486578660, 56746634, 113493268, 67725365, -67725365], [9033807355, 4586410039, 10642258554, 11211700164, 0, 6618465854, 6618465854, 423733528, 3223360, 0, 284720805, 284720805], [157751995546, -159055389086, 14270669898, -28431636315, 1303393540, 0, -832011953, 0, 0, 82627030, -27076451, 0], [868190093, 472138417787, 1794040430, -1794040430, -1969285360, -2790700378, 2790700378, 984642680, -146941976, -293883952, -116452587, 116452587], [-811148161822, 145672649, 147431017, 9998698517, -28924158, 420354244, 840708488, -28924158, 143914281, -143914281, -291345298, -145672649], [568306802186, 282829224958, 6323832594, 6925238760, 0, -3487500252, -3487500252, -2347649187, 22378809, 0, 300703083, 300703083], [29184225908, 58837394026, 24771191384, -12630296078, -16422536, -5118080204, 0, 16422536, 489400772, 489400772, 0, 468942210], [-327144718904, -654678119134, 45115127124, -22188713274, -610111788, -4577724024, 0, 610111788, -737700576, -737700576, 0, -388681326], [6688388621, 5219294183, -11376960606, -12079439532, 0, -1426230599, -1426230599, 3398960282, -223526836, 0, -351239463, -351239463], [-131653843549, 134800121601, -15531114372, 30940047810, -3146278052, 0, -4072255364, 0, 0, 364494520, 486675454, 0], [1588367581238, 1590433038126, -1541299940, 54960425, -2065456888, 13717785916, 6858892958, 4130913776, 78797012, 39398506, 94358931, 188717862], [-990757495963, -990228296269, 84799732080, -629198760, -529199694, 3654107298, 1827053649, 1058399388, 507368868, 253684434, -375514326, -751028652], [1379244501130, 386283219, 970038015, 62584884687, -2292335106, -6069245952, -12138491904, -2292335106, -197471577, 197471577, -772566438, -386283219], [-4312732842, 979715317987, 18703516110, -18703516110, 8347682828, 4216004991, -4216004991, -4173841414, 452017094, 904034188, -138891428, 138891428], [-745733321350, -1491499889955, -63120181355, 31327805387, -1507322222, -9729710056, 0, 1507322222, 464570581, 464570581, 0, -33247255], [-332451929077, -168679265749, -49680539829, -49296518391, 0, -5507909876, -5507909876, -4714591702, -1083119815, 0, 192010719, 192010719], [1850119255085, 1848721433480, 84936445927, 569533751, 1397821605, 4114318996, 2057159498, -2795643210, -565844214, -282922107, 286611644, 573223288], [277305633539, 138685211641, -129720779798, -129509021212, 0, 1098157895, 1098157895, 170669036, 1024985290, 0, 105879293, 105879293], [-2603114684108, -2600296444148, 211452651684, 298672335, -2818239960, -14523992172, -7261996086, 5636479920, 543726540, 271863270, 570535605, 1141071210], [1093081217491, -268531403, -1183717007, 13925065544, 785248733, 1790733833, 3581467666, 785248733, 646654201, -646654201, 537062806, 268531403], [3125769993123, -3123072198938, -89695791011, 178187227217, -2697794185, 0, 1854756580, 0, 0, -274360685, 929994120, 0], [2948310184, 3723354749179, -107130630799, 107130630799, -3937406412, -4426706242, 4426706242, 1968703206, 146105385, 292210770, 979606978, -979606978], [-2366325798625, 2361715109599, 38291825946, -80019425679, 4610689026, 0, 884151858, 0, 0, -2324208591, 1111565196, 0], [3386638653098, 3383920561868, 119217745060, -1905226822, 2718091230, -15638179736, -7819089868, -5436182460, -37660746, -18830373, -1924057195, -3848114390], [5073105419373, 2533196950551, 2275960871, 695990665, 0, -8564161268, -8564161268, -7501503374, -2065208143, 0, -789985103, -789985103], [-1392277215872, -2783558487346, 35900838304, -18907672870, 3567369356, 1504964696, 0, -3567369356, 1914507436, 1914507436, 0, 995944398], [2166836033538, -67564557, -23150717, -74942320561, 4338292030, 42411678052, 84823356104, 4338292030, -111978397, 111978397, 135129114, 67564557], [1357901907, -7130265215888, 312178763220, -312178763220, -5273207170, -9551164986, 9551164986, 2636603585, -552040141, -1104080282, -1278701678, 1278701678], [3825010155002, 7649365445395, 121465907757, -60993025395, 11780351046, -32904012708, 0, -11780351046, 520143033, 520143033, 0, -654864609], [2951300261697, -2957164194948, 272168223057, -541120549605, 5863933251, 0, -32633459556, 0, 0, -672091497, -3887988006, 0], [9306196798836, 9298101956793, -180252026943, -1378148736, 8094842043, 2275611444, 1137805722, -16189684086, 1434604626, 717302313, -660846423, -1321692846], [-1979183317382, 2563365731, 5909336591, 431562421615, -8451515890, -33420358480, -66840716960, -8451515890, -782605129, 782605129, -5126731462, -2563365731], [-9224996917201, -9230015031121, -545598452880, -111464154, 5018113920, 46162518096, 23081259048, -10036227840, -2509636152, -1254818076, -1366282230, -2732564460], [3944298486854, 7888521425641, 40583826497, -20587188893, -22716269762, 3937252732, 0, 22716269762, 590551289, 590551289, 0, -75548067], [-4589636210560, 1235992044, 2633754198, 339876490902, 1933454178, -24719208528, -49438417056, 1933454178, -161770110, 161770110, -2471984088, -1235992044], [4699221525129, -4691130954633, 106227940410, -214081737222, -8090570496, 0, -45807064179, 0, 0, 1166688744, 2792545146, 0], [-22392496712549, -11194076864375, 294389575290, 291191571732, 0, 21356231315, 21356231315, 2743982020, 1242644122, 0, -1599001779, -1599001779], [-10633994611, -9355655289119, -64963613674, 64963613674, 25413299192, -54291502105, 54291502105, -12706649596, -1656560018, -3313120036, 2072654985, -2072654985], [1250912195695, -1485809559, -4956512395, -25627973072, -136194407, -13548036763, -27096073526, -136194407, 1984893277, -1984893277, 2971619118, 1485809559], [7165816231677, 7144578468389, -679738793618, -2661202630, 21237763288, 37947265054, 18973632527, -42475526576, 3491905496, 1745952748, -915249882, -1830499764], [-6492699106762, -12986638538306, 90510376622, -42519114716, -5071476938, -111661136246, 0, 5071476938, -5472147190, -5472147190, 0, -1240324782], [-9128052435291, 9113400763405, 405984324934, -813166765951, 14651671886, 0, -31232759378, 0, 0, -878399225, 319716858, 0], [-38201006631140, -19129610813507, 154755512844, 162181955280, 0, -1393990660, -1393990660, -54501774656, 328474984, 0, 3713221218, 3713221218], [2956928963124, -2994896529499, -145208307783, 287147881644, 37967566375, 0, -16040385374, 0, 0, -1360053983, 1908679939, 0], [-21165526757549, -21145055553611, 1033911540408, 5156128707, -20471203938, 49865281308, 24932640654, 40942407876, -71886750, -35943375, 5120185332, 10240370664], [5530167646775, 1254614713, -1288345571, -715203594712, 14275360865, -87193329259, -174386658518, 14275360865, 3797574997, -3797574997, -2509229426, -1254614713], [-9929918966, -21191782720517, 1127909473157, -1127909473157, 20379375348, -16248641218, 16248641218, -10189687674, 1032048585, 2064097170, 259768708, -259768708], [-13894360293882, -6919884059211, -130764529254, -146709317442, 0, -43909917897, -43909917897, 46619781366, -7440826062, 0, -7972394094, -7972394094], [-33639365542143, -33668715811507, 999999520104, 782090382, 29350269364, 38594637504, 19297318752, -58700538728, -6389570852, -3194785426, -2412695044, -4825390088], [-3297730734, -43466471875450, -1258941941364, 1258941941364, 7828774314, -5416366038, 5416366038, -3914387157, 12216729987, 24433459974, 616656423, -616656423], [33801475331208, 16916567344869, -1074776472286, -1069898256122, 0, -204258032720, -204258032720, 34098466612, -7255271890, 0, 2439108082, 2439108082], [9000972297528, 18003472320558, -1689257766588, 849504873498, 37951994556, 16279051608, 0, -37951994556, -9751980408, -9751980408, 0, 1527725502], [-1698763528524, 1677825983302, -1279043153798, 2572646734328, 20937545222, 0, 64705051312, 0, 0, 1635863263, -12924563469, 0], [891465373, 675706693345, 1463835991046, -1463835991046, 2130508680, -162073912597, 162073912597, -1065254340, -4925954082, -9851908164, 1956719713, -1956719713], [18266921363842, 36541664116853, 1979033618247, -996077080641, -15286248354, -138699855816, 0, 15286248354, 13120543035, 13120543035, 0, 7821389169], [30694611649841, -30600846707538, -666944999241, 1339972591281, -93764942303, 0, 151504246162, 0, 0, 12303031921, 6220439122, 0], [-9043732238, 4792071117363, -2643623750161, 2643623750161, 27751627740, -88895174718, 88895174718, -13875813870, -4093590093, -8187180186, 4832081632, -4832081632], [10151572990186, -5712699855, -12509022739, -817348350299, 14868653386, -3931731208, -7863462416, 14868653386, 1083623029, -1083623029, 11425399710, 5712699855], [-37830299697468, -18895634911125, -782411060546, -766993245598, 0, -265879787563, -265879787563, 46738782692, -20110284056, 0, 7708907474, 7708907474], [-39013195260754, -3355588154, -14188125008, -1099009824982, -30255627520, -57756078442, -115512156884, -30255627520, 7476948700, -7476948700, 6711176308, 3355588154], [61358958978, 65132981194939, 1391543268498, -1391543268498, -121063395760, 24268254252, -24268254252, 60531697880, -5498173678, -10996347356, 827261098, -827261098], [-17806657398586, -35636257107056, 1859863337922, -939810552702, -22513229766, 221730001302, 0, 22513229766, 19757767482, 19757767482, 0, -22942309884], [-16256993519859, -8139238507173, 634496945310, 657123127272, 0, -77025314619, -77025314619, -10170403506, 31242690948, 0, 11313090981, 11313090981], [-112328122507140, -112304894747228, -1644904379328, 12971917233, -23227759912, 375152524692, 187576262346, 46455519824, -30735425296, -15367712648, -2395795415, -4791590830], [26061769424018, -243764434, -14532117992, 1126356015014, 21017921460, 141640341250, 283280682500, 21017921460, 14044589124, -14044589124, 487528868, 243764434], [33372274862615, 16631799936307, -990094842860, -997180132234, 0, 60881952758, 60881952758, -112217634688, -3217232762, 0, -3542644687, -3542644687], [69498938725542, 3633663447, 4739575691, 478100434279, 44637994586, -107993825356, -215987650712, 44637994586, 2527751203, -2527751203, -7267326894, -3633663447], [-79156132524549, 79168989694611, -647641014630, 1323405119607, -12857170062, 0, -274336000134, 0, 0, 15377274687, -12745815660, 0], [59856182774, 124575662368428, 1459225389964, -1459225389964, -121247215162, -47644082660, 47644082660, 60623607581, 8372689241, 16745378482, -767424807, 767424807], [27051390798203, -26884219612361, 2695704014688, -5349288249234, -167171185842, 0, 237552663387, 0, 0, 12916786158, -29202993984, 0], [44002411840046, -3893352492, 11115212836, 1317086438912, -130918606636, -72358025372, -144716050744, -130918606636, -18901917820, 18901917820, 7786704984, 3893352492], [-76542782834014, -76687645439042, -3195802631668, -11555828501, 144862605028, 333008530348, 166504265174, -289725210056, -13126683856, -6563341928, -18119170429, -36238340858], [20653717627422, -20705180029526, 3117713705038, -6278359693555, 51462402104, 0, 146118865603, 0, 0, -5646919646, 37285363833, 0], [-87198568583632, -174392184463256, 7020001155768, -3504612547176, 176582129208, 391925347884, 0, -176582129208, -10776061416, -10776061416, 0, 4952704008], [14906381298098, -15016161811682, 2752294001700, -5511586562523, 109780513584, 0, -924093835290, 0, 0, -33018474852, -26019915729, 0], [-28186891488, 9374852639438, -6986877147624, 6986877147624, 34211007738, 284483123586, -284483123586, -17105503869, -3807394341, -7614788682, -11081387619, 11081387619], [-4904209482658, -12894755678, -40886944292, 1704268221542, -31289369816, 247726237318, 495452474636, -31289369816, 15097432936, -15097432936, 25789511356, 12894755678], [142471592468539, 142481848164602, -2217731390509, 11485259593, -10255696063, 353323253132, 176661626566, 20511392126, -18489375926, -9244687963, 2240571630, 4481143260], [22741425744526, 5988767837, 37645757393, 1417932064597, 58989046966, 232185803404, 464371606808, 58989046966, -25668221719, 25668221719, -11977535674, -5988767837], [-114048723635352, 114238015201918, 720677487622, -1454314880218, -189291566566, 0, 313509584056, 0, 0, -26322387131, -13362482157, 0], [97422223722790, 194874801998533, 4006022104447, -1986087078541, -34204315478, 459960884000, 0, 34204315478, -33847947365, -33847947365, 0, 30354552953], [319372405958252, 159590032883981, 2767983596019, 2786506228155, 0, -686068821554, -686068821554, -183078874222, 16364272931, 0, 9261316068, 9261316068], [-127881774159362, -63976850613235, -5911956715202, -5891052272542, 0, 486842285867, 486842285867, -61474845778, -85992746018, 0, 10452221330, 10452221330], [45464974188054, 90912430148271, -1844928351741, 894963455481, 492781699350, 256596533040, 0, -492781699350, 55001440779, 55001440779, 0, -17518227837], [303740753368, 79705134014523, 4252317664562, -4252317664562, -701205194720, -267539388964, 267539388964, 350602597360, -5787035834, -11574071668, -46861843992, 46861843992], [-11937337393506, -23840377152384, -774256832130, 405039237186, 192361812426, 776155652670, 0, -192361812426, -35821642242, -35821642242, 0, 34297634628], [-207727345572167, -207772321981545, 2533468508732, -92289484187, 44976409378, 1910423962916, 955211981458, -89952818756, 79352581234, 39676290617, -52613193570, -105226387140], [206953798389, 130005488309037, -9542704557866, 9542704557866, -379532028928, -600949434577, 600949434577, 189766014464, -7293612614, -14587225228, 17187783925, -17187783925], [94912939512656, -38432033640, -73479568598, -5393703004582, 163818905570, -150707188352, -301414376704, 163818905570, -3384498682, 3384498682, 76864067280, 38432033640], [36999459526700, 18367221239137, -7131424937903, -7288654033351, 0, -10048893430, -10048893430, -343631596150, 56545686181, 0, -78614547724, -78614547724], [41594012267950, 83092385372546, -11779912124210, 5911846647944, -44626464850, 694209511814, 0, 44626464850, -43781171678, -43781171678, 0, -95639163354], [-74570505779314, -149148450435097, 6918591937859, -3482599817063, -245164388218, -842871933020, 0, 245164388218, 46607696267, 46607696267, 0, -7438876469], [-8100109577452, -3931218576859, 2661918531228, 2319214668336, 0, -149719604864, -149719604864, 66320492288, 55061723072, 0, -171351931446, -171351931446], [137760306233626, -137934210343475, -2194699636221, 4329525987252, 173904109849, 0, -1461776843684, 0, 0, -64369013801, -4495728611, 0], [-5330340877514, -5519410074988, 16643511147284, 6971687017, 189069197474, -1456115438146, -728057719073, -378138394948, -3982794688, -1991397344, 4980289673, 9960579346], [72796932022369, 73137597697859, 14010257188252, 88169251283, -340665675490, 408019008548, 204009504274, 681331350980, -175672731074, -87836365537, 332885746, 665771492], [29300501183568, 58635371099868, -11025315361920, 5449518722916, 263239783152, 556617910428, 0, -263239783152, 126277916088, 126277916088, 0, 34368732732], [-61274633806508, -34528843584, -32962059162, -2062504045314, -347135528082, -549869260008, -1099738520016, -347135528082, -36095628006, 36095628006, 69057687168, 34528843584], [-144369026744193, 144809009902904, -5123613945745, 10147858305151, -439983158711, 0, 1619588482946, 0, 0, -62577680647, 36791905692, 0], [-181370875602, -400471608381115, -11167437130970, 11167437130970, 339687551024, -198127154959, 198127154959, -169843775512, -54411693032, -108823386064, -11527100090, 11527100090], [33467121232570, 80212076002, 170219778416, 3410118325642, 314903733900, -286385902090, -572771804180, 314903733900, -9795626412, 9795626412, -160424152004, -80212076002], [91898062767573, 91637230367084, 18349357230667, 56958666467, 260832400489, 1665473354716, 832736677358, -521664800978, -753704014, -376852007, 56581814460, 113163628920], [-88990608045609, 88026605711393, -5310480990856, 10768807543276, 964002334216, 0, -783623814184, 0, 0, -8778015958, -156623577522, 0], [280112496081780, 560130292828256, 16330584699988, -8200466775220, -254110289060, -680507710204, 0, 254110289060, 70348850452, 70348850452, 0, -94699335304], [-87057788676215, -43298792566949, 10340854075824, 9913738696206, 0, -781969049974, -781969049974, 246645852508, -26160160574, 0, -213557689809, -213557689809], [312807190205697, 313286871040721, -16499548838322, -68887174002, -479680835024, -132413126154, -66206563077, 959361670048, -19731746408, -9865873204, -78753047206, -157506094412], [2035157378518, -93367266861, -185566959589, 8304679927939, -503155825070, 93442634408, 186885268816, -503155825070, -1167574133, 1167574133, 186734533722, 93367266861], [-538822271499492, -4024944484, -46045942926, -1974643786134, 374963388230, -1257531617800, -2515063235600, 374963388230, 37996053958, -37996053958, 8049888968, 4024944484], [75022500669327, -75494537135123, 9803749179070, -19769707778584, 472036465796, 0, 828618052969, 0, 0, -24699826184, 137509594260, 0], [-89291282729, -182376949966489, 1679968322351, -1679968322351, 203437041572, 2172679076024, -2172679076024, -101718520786, 19220815709, 38441631418, 12427238057, -12427238057], [85448176092595, 42805398102322, 20022326295042, 20054430945318, 0, 1400541079160, 1400541079160, 178672437187, -205010113487, 0, 16052325138, 16052325138], [530508290175, -694027696111771, -16621442472254, 16621442472254, -1243015874272, 910061077019, -910061077019, 621507937136, -53093073398, -106186146796, -90999646961, 90999646961], [-338086906297435, -169232688534833, 2066554740378, 2350886079216, 0, -46110908442, -46110908442, -236305102812, -47250363504, 0, 142165669419, 142165669419]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_14_d_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_14_11_d_a();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_14_11_d_a(:prec:=12)
    chi := MakeCharacter_14_d();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 11));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 1;
    while true do
        trunc_vec := Vector(Kf, [0] cat [f_vec[i]: i in [1..prec]]);
        B := Basis(S, prec + 1);
        S_basismat := Matrix([AbsEltseq(g): g in B]);
        if Rank(S_basismat) eq Min(NumberOfRows(S_basismat), NumberOfColumns(S_basismat)) then
            S_basismat := ChangeRing(S_basismat,Kf);
            f_lincom := Solution(S_basismat,trunc_vec);
            f := &+[f_lincom[i]*Basis(S)[i] : i in [1..#Basis(S)]];
            return f;
        end if;
        error if prec eq maxprec, "Unable to distinguish newform within newspace";
        prec := Min(Ceiling(1.25 * prec), maxprec);
    end while;
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_14_11_d_a();".
// 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_14_11_d_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_14_d();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,11,sign)));
    Vf := Kernel([],Snew);
    return Vf;
end function;