
// Make newform 115.2.g.b in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_115_g();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_115_g_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_115_2_g_b();".
// 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_115_2_g_b();".
// 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 := [1437601, 857285, 23958, 225907, 243089, 12001, -31240, 1474, 56089, -22715, 18470, -10594, 3851, -1189, 551, -155, 56, -12, 12, -1, 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, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [26548999555093353263926930466166209724982511831814634527, -137823642047991919735022840512319272486404426779517066126, 6753827839043212430844195660098710200267043248993961008, -781224953141502829554567924531506458979909518606650925, 3042086722711864261003081721067403034138525011474727278, -1296760375317429860371351071729750679664131363696960556, -878794321439622132749032937415049094129320276562135205, 11616032481905787501885800071670893777258373614097962, -45957926856357131121924595884534637570224667118913612, 111205734159145972305986650842183440371806229553578861, -88433033447767019174379746896082043288647143530063815, 577998539274924479689242707937550439146463556998614, -20097635050529698838977158558154819122084356751485890, 1386193524946050388814204831807270429955786939097643, -1871471777031465453779099029717326420142379488791474, -192610033106523421152833079973380809905720893349059, -258300773685394298137206100679112823896323167258732, 19222269035505153720290233256539148181373974918596, -27389619375852552331958592085262590953416063816851, 3547656574549649472249819790094325635102659948000], [-32468441433996768197970339854733522363701037544645083768, -42255604775978963807798128642844490040688393415251802938, -3402575300735561174091844216266339140043571345091274712, 20960571395298076190381915741119822299896507567180053846, -15519409184901986772855548897876428954708054603401647028, 16599366527571399152407671995627261148136412330642234658, -23059166426201575615622912489665723871553480163597266891, 10290743160915813559555754634752864350011933741970632330, -5695170775953212694611388854008253280418542768730988996, 2826556609964974223606007493127499315763983936298422610, -1032937630451589587783549935918593825805055282904205356, 339362174097333464302105613589812082749309449898198967, -129410286284974912958276199485701290863162995887242434, 44917076569913225562341705734186398245381540580973630, -14635808788289058971799354743296914626040322639238042, 4212987026921970120625956696050852377748240640197879, -2477842947933797105239653275297228386256106603767348, 298738991113717928093406596856393081196149108050565, -178767805428876439854358320660354578149887517480999, 4418474027405890073740365939191902258145700347648], [-13285239932224072325826752829020762507119034899185744232, 25313210062071372735798333693564203623295805764413173774, -98577962154293971450207780590317727275064411004209754341, 7948748970217292456401442399794314814108066484125358044, -3103805266441457369457408776761774602664698196305557485, 3943166315969256480907260453825502744825705657148925904, -1395187939241942796347127193993513278505992138924831533, -599237566872220218527457575773082170096588176027970295, -132903186461082509503563625318266670840488779490333322, -25998818387772425388371619893214014099433777117735886, 95960934538273890236534975524601682869669251096755228, -35842552181307931627035099937795403066946958711681432, 3735684521769032825996362657720262035747855225827542, -6480464040927418022353700273215150652162285781941015, 1768327172821389243265486825281692427131691108208883, -564063911289018777218866875429801506446429021151987, -23835196267962025469858511547015551322143883062112, -160531454718394616612833103537539108410459825330695, -6961350127056273285561439224737514200828038945828, -17784189735314600978048516425443993494305294498449], [2513051112105037979206457186567971826448034999846669769, 121025654060810037896501525945308854241251628662928962, -36472898367724261530661452819358597352883248290994638, -7593215622290454021926908556381295533220751379553175, -11490974036455476498343047355293139082149024875785647, 9724301745619830898117438279663814951412723699494905, 6870653969091801064827920556963735101680217148607179, -14423203766531419069638053514961690195935182601575875, 8490136909333417516748646613030715039803387815772617, -4223435915676340929369897901767672014951691163600706, 3050819344647526897332718605852820613462891683642969, -445445248587361802831225286271185757632059755926677, 388462110685440240901016811789233202241878125141248, -94554899565537498322631131657978567697576640799853, 48383852816201621342938244653831306117429361965285, -10239560589052184957455611371960062667962680601876, 4032939196896498385514812307005049012364757327992, -2186391611799443801147297275906797821826317310194, 317569414350078711265692394795187192343348371459, -188483095560837788874804822121990024298551275941], [22787809830244981506463028310717565814090648773293625320, 38884884531427231503517077881964697733265418811966876727, -3045162803704609998108008580256821015513194490385748122, 28454917392842979422269953853248242225189160603699299292, -43465390112353630421774873612018376270548119561903494181, 12503213943291001809678063901142912805880507805583324880, -4620201171784888223335656731987492397147016068340290010, 3730832308458885718627436079031089375138515022089127625, -695204295014529232232256145112369190489707858579203860, 211656500036267943021633894171466150228007280505742388, -183657305241730203314567874822867985442080105329677966, 73435105434722447305456643177817623661637362297363722, -13691368463900550427889394577662537984586706037576327, 8165604042899135522934905508839538462641994400323984, -4115900004301692402372766790570897733353545517423982, 511682712792702236106821061207183873691500864732035, 116126857161758206876270909577517180808216290438955, 185258900099108397454701042788906906670376566631164, 31395326728726283790765987971173033446021928826075, 23194390257305651855040157785504847516791552079267], [30034612034117962107450878007385022713197671860473229294, 1832789890943150037736318270635407202288294639631249061, 27685486154986493840693471542023354709200321535607601293, -65256840567181898794974422687859605450264971921406345386, 13563581228398718412156959577602161081646242905139835185, -3625312518427399286490636972423771947184109781852322929, 3688677302769679991662844919803704646329478200661306615, -1619251388377034984227416021927831077829442873367235071, 570811811290796508072441172694814198438218343803806641, -588760841663339404077606565487157083170467843309346056, 324946627006347779128920752389642281034731803812289256, -113534940879509362730388183711518429429957424683849123, 33348220517742270758227271978119009379903322708955243, -20996631068068430478281786057712817677410171284395394, 2348978094830014126284252401790778502030964518737962, -1629722111132085594899850465587090179426987687087414, 337984586384101740082107335167187107236886587371011, -302324708244888188754416917704634371023926058675481, 50039694631130167567371653311179984107726797615412, -26402087022745331594155999527939795083271115638703], [-26164126262854160067548528650375475297878843826483005193, 2155394867637724083003409800978909887753677501499589031, 33633375146471397916940235738497722643902977761174827018, -8644835765188780619205713550469050193532412838561128956, 20643688022813424605379055089205066277863325455293165012, -31414643079703328605582410727119793958849833798897435203, 11952200291102391008351963076719860520867345509805585041, -4651110044245671494295296224530628931542529866189981137, 2480801376750156899868963120052739989295876291797894103, -423195209068028154377605958983142145652237376216900818, -20982822911538313693481978250837385481952355805823441, -2698596561496708180419686278969015757620134761014186, 4477922109421876353334703148963939316579627301669780, 2168460792573043203443925543597526319591418949589675, -1879785967397571294027547510151959927477405857838182, -1550007638884465270197948533415298091770839593154747, -593806499273147934366364011103167635078290977547956, 124527540547035554537212581669436716658494539808685, -69534250236279252870605024655774440511824324500174, 29142555410323132587585633703281282890436078681705], [384361163306751795697666922912576840041961441733007245, 469244053924706667778870446235715320189048968248885102, -13368784634102774976789295309318320296005595673791749, -248163925517353486270426862252206952935534261783732987, 144303398324117620154030437263908201560418612561634089, -186183011149854465056838898157174198182524789679211223, 279855317877842513243543445231461345700482666980559367, -109259120774564905604751026171020402842998557154392219, 57666851694085189706425567278109842271414670489615898, -28832793788033457399963034767181415872955337789475442, 8820717499969691864865253334704104959987080270348552, -2639939533077293146233029589006647022562637263744581, 1054372270152762309864329923580781983198985997837249, -358976334791707165137376345157480593333102062882725, 127422818701972503232254666301930830761824407376420, -24195505699105635385763538659235219454497122365377, 29192575613417988028465541475220641592984036691103, 2239411324305232507480150519851304957734477370344, 2065900223640752628567110300641639247951728480475, 370566007577579085165315513325625299278791246041], [-18385354571453222956782566009080155134468253943090492232, 48820856850651929751907577400979399396189333762706628301, -236486598958498951687286782285168079615034627310761004467, 13901136355473717223918098020572186193125973132246483052, -4747426508633659939571713144247520585956078219011580410, 6942677612129950398593872087591983777017363646587705182, -2581119523170441607205393895480717225329516405846272089, -1483261134102728534598586747558730300212049773353457500, -320271663589092011250697967453196407610503499699607360, 8628273846765731251858440754243955131698476482170502, 141641451765487836790067454843742928761129351410774089, -86691711878295964292400255977618160577316522752633247, -9348342407546742811948450645995435545886024676921844, -22359935424317583638825823100947816594109579855254905, 1199761925190582772870040952746989432145912415958526, -1885648919265288562799243837682507453147896218003461, -415113997549265817068681499765678596793613733499171, -376260349509193121083041366735520024685551073213427, -30310959986146913232269043449330273640685983403232, -41626152536617503837757288720612258812618698367300], [60743476536230692951553287388083343165596287886608696823, 91553609738839425206663981944659587674425169042765607376, -579831711870527306038900872931032202619890462282452587, 62104819820876802887404424780629892222266010059899379206, -102304173747263389304857508530630624873815799253813166000, 26383646618049686946296489629079879368321087369503234768, -9070314888802851668827727129664103542732515502745694659, 7458426287500092329060066942138977279420734847201882462, -833589024372801312675056309517585101893557126887226364, 182744904605404243932821537589127903349722232576410384, -284771599594963332848113129028977053424530442792179612, 118678022522106183525888736568465715584194967033233396, -25551872218817641189182824107084816548867064396780197, 10121743090597207015710694048238131488535960614861360, -10564981122837445172274597108388888319881332084894023, -1231662680902810034703106463832705862184557540528968, -35078380696588818750843582444944473955588920881091, 206418442210266158406936383620816472908009766337739, 45895662756782074166221064601816203421349257815030, 46831997865690487828255811568745036541247234055976], [-55601180981795967788094403269119733204604457536738010143, -3793669055958255411375887845401398657934774134548355794, -53424769834736533786723891592108345528632693545614616209, 159817229770940154682034197078054556487011356761354981484, -25835471097183901905711237786741230830291489123598662190, 6515689723855346129610485503563793183923650138881993965, -7076265531407708338015869720498337034393086457678685759, 2988225431949124058732899702710239909924829008201352778, -969071662482636943802746834708460179443719830899342307, 1125631897962093074797542241409384066234101387331948413, -627421793029836033805105230874378826775116816080906400, 205979712397158355255299191198070413638958463503662601, -65992583007130867497657008794708425259526053110800910, 38406348141588458215185109429845463906391311217223713, -5667602598060941242835284678995268265230896005442346, 2617944347284459503231883686249216743912617226138126, -769835300272700617633957379562249236471554058132168, 539570181336625425960857626356977844277733475718981, -102918516736510762691120746878968797628930506266105, 51147626885116205857765955178121302778404449082980], [-146693261196107145724143433993985771019587760379942520369, -61207164445105110150782634236282735967184378884313888702, 20371910302357402243286300137155496595743661740905643964, -3121731125620111954898852237986253021611722872831968687, -15629834703341914762066849632163185396521394811795694221, -12735579260942451410333757871862131766688976389691196814, 14195077331709040282748498206867464369266131773681777978, -12363938686203068720688234635750732175479230020665400010, 8037561708232976744483381007812504278320027319252848624, -4170702108114251692575863368010727293464488539801581621, 1721586182568323513651881035332210793321949387868766780, -634102609576056652993163855252331543924213181677400157, 220764629209775199056754372584486419740306329427251968, -81967406169281281843083188123404943076361932093697725, 22474603626040348265643961243362187099994726552535626, -10048664162840516034593881927801528496541057506606570, 3009413467711886873588247393096660266132649663082639, -1366697167453559544539725543744871526020968204862809, 233276741108580255749504709680830856521370675087500, -69807610106251868410665582014134976070385412596492], [59508404891147022480006114522975029592865895887189323660, -5059001846148429838918336444549952498411680550518804256, -71962568476114100613314261520237295240361104568426624959, 16929773688750538510930279055575914797021436484517847247, -43460304282398230423859152026532720625043144455595528541, 75158389069534884155269621272722013904446968777304212651, -25180006986031621381981481507081944763172421402345211001, 9305499747269828248465282149093955473929296682295110705, -4910683530067025911599051789052647972065069949313014965, 591538929387859504722624919997768724798025129315554773, 237726710927705760434439798377645768889085042204142543, -59365468582669164257307870477801353393189462637062446, 11408569336739741634968301305197604808947277458223715, -16055222344608912831197278572900252032469868334261811, 6494290956273849943219768941125592446587556653190315, 2070777153303781635039490867232944460021694538292344, 1381009640889562202141791785884255222327117029254873, -518987080796461583673965384673012067668209455198844, 162608033224838677676385875292925704042946382820214, -83732272396355068233391779459959163853249559587047], [348384076146353968684196181522320429624091426964573391473, 169489825307760115567612870344160539512833455532733803766, -39357535168553645005760700415006033198352066205639902392, 7359858614590445578492118673888657238567067533818993104, 44000402645734045282204897590401584393303363693969068066, 31483236701219199931166061701664146847833551327630038463, -31043588490995908282798177675700151902092138569933368294, 26991194494703903045665161083064848637222662478901820118, -17776152384067761889121735992395788543058016554201083578, 9372382110068138853781671042517551120712468478023583495, -3651285325084585503696106454415326342058127444597937841, 1391205056153775036507304382399689451660437856094188778, -480540429913769348101796445848735195403902815086278656, 177637277816671955922328080737922330685285513930548518, -45346463745104597358281473844092215038107811021819601, 22535038274054401841748392988427718535258738187542947, -6647810376328181273765343062022010909668711549338294, 2872360236170987645152798570819645064575279030086656, -528068174701871903906763048691814419626446634413073, 126896437333458365855675117843187969536195208731305], [-86781484864668350625382039802277318475180194334910079827, 64492120693120771831412878305829330278911982065508296369, 40908515723664555349423188382504654695552874334976859409, -27640072958608122438225715052263392106706913182590206983, -9081280684719859594155827710404109957564913557659318523, 9722445172410423185672243959603777951034390865399520339, 12234103966238971795094613358817414716134863833490301420, -11681687653615975544255948647096563693192013577105585230, 7034457367978752369868725354931865036018328670419062497, -4947946281400368515889315541076493054326791533262817028, 2353325235754928935900190206613746970830710267127609558, -786775766864434321346852884664950455225816070116378966, 296166622681634061588502853020693688955346265053049997, -110666746985489142473426595794857599261460166084325075, 35045699126430780542809174406285049444095047028989735, -9572643217392739400860163377813299628762461937479446, 4768043463421544414305082514875910113696059266808032, -1805117982026977144693127065076359172411502840385243, 407105908315015806251508841754760743351644946672000, -136169057659341559777098701449327232475703932010477], [-11991678327859155063935163794340112135935678654341613576, -22346855516827407727215621051405814980160102636921524860, -27455900918748782483335315302621357050160920427263614111, -5734040022850346319079692112835107369386524188150960811, 17063955585438088751992693240293838446659311987591592945, -12465639236517121214069391591469514625458319556117597356, 14420458330454656131553912864368107599212703553244182412, -17607697694920326997354371846088502100888636149540921610, 8388521734531185440448516993786736522217794780079993234, -4520980973936147493791213802402507469321363182378173941, 2243406708735935331359056332934344264351246397271446797, -800058764039022794141395742141508022343268814780537792, 262482762690067656426574031096745703449518336270887849, -100175394992499923838960771897372418205705775548471879, 34232377569258404111474121207594557536860815195045497, -11495017512813023593995793528475212449316807259095079, 3189224626759584356431365425549743925507327690832295, -1978352991635447903975550737485953950058092824934021, 197385623730719518763200569035300525711894534935517, -140296796503513021318191033206247532246084738800704], [-920692569691355892468268361184426199392313206735132988, 796772882258431309300054958871541908798966990295035561, 546190034148436035664219341489798992756789772195661774, -331577413565416908993894768561676024173176322425150112, -127043403738518793442031499341722974095066024677400689, 135707097013365009993306898921206894942208252066286181, 136847422024419814490669272054896407514934097974363366, -131174071091795004924640543805103663522879631851825754, 77509171036270712600022135836329500024471400124227158, -59191576556600601408579012040013103641112134606637916, 26434454582126419110374954754217011793068531827012609, -9009581294520102933112751004352888594791617677261748, 3351133055567712915079731182714658266762926218057885, -1263884227462768142352963262107155350390991503211220, 399113880740701856411068370950610745519078621587437, -106921321647443198733860514047442805587935666055774, 56325119237526710124739535183577704922930957809202, -19924056389329031675782205586486610580624079925915, 4853264643839790124878335408947264341067369300045, -1499716798186498966411368143731154866522800573312], [1795933701469055831900154773415176869122059159286181153, 274809226888259435303926793300084201997739917602676102, 621600541069020889179381733900479927656558686868030315, 657523477360673661412736006704750658737997454162088872, 50102083474711541159903038388551518427334678402794830, -68322163520643133351108864167988383858935694216528294, 50169943221399934479226426847034818426544954398093751, 114080891350723314258771163713336908778018820452052702, -37101847509735475210259262215644482118002346188715053, 36159424066484484766347966527618320645254255548633738, -22320218224149815658773417663370817160555412009443182, 8355506779007930748822078563849305229202778086317580, -2407236016681742886653631058565057641852112182972771, 1231757918575017862509472449517831280199397154977916, -326950423992586633360047810057599029058232105931672, 127885276965438887865677758547149801929916858416200, -17863999894216624342592991712394262478193043531126, 28752429096416932999815578875999847009060661309012, -1569626514815398416219657318205801676174822534491, 2485659180327286664902845323903059732806798299647]];
    Rf_basisdens := [1, 1, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 1885598511817982668247912813269604422925409642676447349, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 1885598511817982668247912813269604422925409642676447349, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 205530237788160110839022496646386882098869651051732761041, 1885598511817982668247912813269604422925409642676447349, 1885598511817982668247912813269604422925409642676447349];
    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_115_g();"
function MakeCharacter_115_g()
    N := 115;
    order := 11;
    char_gens := [47, 51];
    v := [11, 9];
    // 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_115_g_Hecke();"
function MakeCharacter_115_g_Hecke(Kf)
    N := 115;
    order := 11;
    char_gens := [47, 51];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 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 := 2;
    raw_aps := [[-1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, -1, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 1, -1, 0, 0, -1, -1], [0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 1, 0, 1, 0, -1, 0, 0], [0, 1, 0, 0, 1, 0, 1, 0, 0, 1, -1, -1, 0, -1, 0, -1, 0, 2, 0, -1], [0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 2, 1, 1, -1, -1, 1, -1, 1, 0, 0, 1, -1, -1], [0, 0, -1, -1, -1, -2, -1, -1, -1, -1, 1, 1, -1, -1, 0, 1, 0, 0, 1, 1], [-1, 0, 1, 1, 3, 0, 2, 2, 3, 0, 0, -1, 1, -1, 0, -1, 3, 1, 0, -1], [0, -1, 1, 0, -2, -1, -2, 2, 0, -1, 2, 2, -1, 1, -1, 1, 0, 0, 1, 0], [0, 1, -2, -2, 0, 0, -2, 0, -1, 0, -1, 0, 0, 0, 0, -1, -2, 0, -1, 0], [2, 1, -2, 0, 1, 1, -2, -1, -2, -1, -1, 0, -1, 2, 0, 0, 0, -2, 1, -1], [2, -1, 2, 0, -1, 1, 1, -1, -1, 1, 0, 1, 0, -2, 1, 0, 0, 0, 0, -1], [4, -1, 0, -5, -4, 0, -4, -6, -6, -1, -1, 0, 0, 6, -1, 0, -5, -4, -1, 1], [0, 0, 0, 1, 1, 0, -1, -1, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 2], [0, 0, 3, 3, 3, 1, 0, 1, 4, 0, 0, 0, 1, -3, 1, 0, 3, 6, -1, 0], [0, -1, 2, 0, 0, 1, 0, 1, 1, 1, 0, 0, 2, 2, -1, -1, -3, 0, -1, 0], [-1, -2, -2, 1, 0, -1, 2, -2, -1, 0, 1, 1, -2, 1, 0, 0, 3, 1, 1, 2], [-2, 1, 4, 0, 2, 0, 2, 2, 1, 0, 0, -1, 2, -1, 3, -3, 1, 0, -1, -2], [-1, -1, -2, 0, 3, 1, 2, -3, 0, -1, 2, -1, -1, -1, 0, 0, 0, 1, 1, 0], [-4, 0, -1, -1, -1, -1, -1, 3, -1, -2, 0, 1, -1, 3, 0, 2, -1, -1, 0, 1], [0, 0, 6, 4, 2, 0, 4, 3, 2, 0, 2, 0, 0, -2, 1, 2, 6, 3, 0, 0], [1, -2, -1, 0, -2, -2, -3, -2, -3, -2, 2, 2, -2, 4, -2, 3, -5, -5, 0, 2], [-2, 0, 2, 8, -1, 0, 0, 5, 4, -2, 1, 2, -1, 0, 0, 2, 6, 4, 1, 1], [0, -1, -3, -5, 0, -1, -3, 0, -5, 2, 1, -2, 0, 0, -2, 1, -3, 0, 1, 1], [5, 0, -4, 0, 0, 0, 0, -1, 0, -1, 0, 2, -1, 4, -2, 0, -5, 0, 0, 3], [-1, -2, 0, 1, 2, -1, 2, -5, -2, -1, -1, -1, -1, 0, -2, 2, 2, 0, 2, 0], [7, 1, -4, -4, -4, 0, -7, -7, -4, 1, 0, 1, -1, 2, 0, 2, -3, -7, 0, 2], [2, 1, -3, -4, -4, -2, 3, 1, -4, 0, 2, 1, 1, 4, -1, 1, 4, -4, 1, -1], [8, 1, -4, -7, -7, 3, -4, -6, -4, 1, 0, -1, 1, 3, 1, -1, -8, -7, -3, -2], [2, 0, -2, 1, 0, -3, -2, -2, -2, -1, 1, 0, 0, 5, 0, 3, 0, -2, 2, 2], [-7, -4, 0, 1, -1, -4, 4, -1, -2, -3, 2, 0, -5, 1, -3, 5, 1, 4, 2, 4], [-8, -1, 0, 6, 1, 2, 3, 3, 4, -2, -2, 0, 0, -3, -2, 0, -1, 3, -2, 1], [-3, 3, -3, -2, 3, 2, 4, -1, 4, 1, 0, -2, 1, 0, 2, -3, 3, 3, -2, -2], [7, -4, -4, -5, -8, -3, -5, -10, -8, -4, 4, 5, -3, 9, -1, 4, -7, 1, 1, 5], [-4, -1, 5, 1, 0, -2, 2, 4, 3, -2, 3, 2, -1, -2, 3, 0, 1, 2, 2, -3], [-2, 1, 10, 6, 3, 1, 3, 0, 6, 0, -1, 0, 0, -6, 2, -2, 3, 6, 0, 0], [2, 1, -5, -5, -3, 0, 4, 4, -3, 1, 0, -2, 2, -1, 0, -1, -4, -2, -2, -1], [2, -1, 4, 3, 0, 2, 5, 4, 5, 1, 0, 0, 1, -3, 0, 1, -2, 0, -2, -1], [-7, 0, 7, 3, -1, 0, 9, 6, 5, 3, 1, -1, 1, -9, 0, -1, 5, 5, -1, 1], [-2, 3, 0, 0, 7, 2, 3, 7, 4, 2, -5, -3, 5, -11, 2, -6, 2, 2, 0, -2], [-4, 0, -1, 0, 1, 1, 8, 3, 3, 1, -1, -2, -2, -5, -2, -1, 0, -1, -2, -2], [0, -2, 5, 6, -1, -1, 3, 5, 9, -3, -1, 3, 0, 1, -2, -1, 5, 5, 2, 1], [1, 1, 0, 0, 1, 1, 1, 0, 0, 3, -1, -1, 1, -3, -1, -3, 1, 2, 1, -1], [7, 3, -2, -7, -3, 3, -3, 3, 1, 3, -2, -2, 1, 1, 3, 1, 0, 0, 1, 0], [-4, -3, 0, 4, 2, -5, -1, -3, -1, -3, -1, 5, -3, 5, -1, 0, 4, -5, 3, 1], [-1, 0, 2, -6, -4, 1, -6, 0, 0, 2, -2, -2, 0, -2, 0, -1, 0, 2, -1, -1], [0, 2, -1, 0, 7, 2, 1, 7, 2, 1, -2, -2, 2, -4, 2, -4, 5, 5, 0, -1], [-8, 3, 0, -5, 2, -5, -4, 0, -4, 1, -1, 0, 0, 0, 1, 0, 1, -4, -1, -3], [2, -1, -3, 0, 1, -1, -4, 1, -3, -1, 2, 1, -2, 1, -1, 4, -7, -7, 0, 1], [0, 1, -1, 3, 11, 1, 2, 0, -2, -1, -2, 1, 0, -11, 2, -2, -1, 0, -1, -1], [4, 0, 1, 3, -5, 3, 3, 1, 3, -2, 0, 0, -2, -1, 0, 0, -4, -5, -3, 0], [5, 3, 3, 4, -5, 0, 3, 2, 3, 0, 0, 0, 2, -3, -1, 1, 3, 4, 0, -2], [2, -1, -4, 0, -8, 1, -1, -5, 1, 1, 3, -1, -1, 4, 1, 0, 0, -4, -1, -1], [-7, -1, 8, 6, 7, 0, -1, 7, 10, -2, 1, 1, 0, -4, 0, 2, 10, -4, 0, 1], [-4, 0, 9, 9, 7, -2, 7, 6, 6, -2, 2, 2, -1, -2, -1, 2, 0, 9, 1, 1], [0, 3, 0, -2, 2, 3, 1, -2, 0, 1, -2, -1, -2, -1, 0, -1, 0, 0, 2, -2], [-9, 4, 0, 7, 4, 2, 11, 7, 11, 4, -3, 0, 6, -7, 4, -6, 1, 11, -3, -4], [14, -3, -14, -8, -1, -3, -6, -4, -5, 0, 1, 0, -3, 6, 0, 0, -1, -5, 3, 1], [-4, 0, 7, 3, 5, 1, 0, -2, -2, 2, -2, -2, 0, -5, 0, -1, 0, 7, -3, -3], [-6, 1, -7, -7, 0, 0, 1, 1, 0, 1, 1, 3, -3, 4, -1, 4, -6, 6, 1, 4], [8, 4, -7, -8, 4, 6, 4, 2, -3, 6, -5, -5, 5, -8, 4, -5, 3, 0, -5, 0], [-11, -1, 7, 9, 3, -3, 1, 5, 1, -4, 0, 6, -4, -6, -6, 1, 11, 3, 3, 4], [0, 1, 5, 4, 11, 2, 4, 8, -3, 0, -3, 0, 0, -11, 0, -3, 5, 8, -1, -2], [1, -1, -1, -1, 2, -1, -1, -2, -3, 0, -2, -1, 3, 1, 0, -1, -5, -3, -3, -2], [0, 0, 2, 0, -7, -2, 0, -8, 6, 0, 3, 0, 0, 7, -3, 3, 2, -8, 0, 2], [-2, -4, 13, 2, 3, -2, 3, 14, 9, -2, 0, 0, 0, -2, -4, 1, 3, 0, 1, 0], [1, 2, 9, -3, -3, -2, -4, 1, 3, 0, 2, 0, 1, -3, -1, 1, -4, -3, 0, -1], [4, 3, 3, 6, 4, 1, -3, 6, -1, 0, 1, -1, 3, 2, -1, 0, 6, -2, 0, 1], [-2, -2, -3, 2, -2, 0, -2, -9, -5, 0, 1, 1, -3, 12, -2, -1, -13, 0, -1, 0], [0, -4, 1, -3, -7, -1, -9, -6, -2, -6, 5, 6, 0, 7, -1, 5, 1, -6, 4, 1], [9, -1, 0, -2, -3, 2, -10, -12, -3, -1, 1, 0, -4, 12, -1, 4, -2, -10, 1, 1], [-8, -1, 8, 0, -3, -1, 4, 1, -1, 2, 3, 0, -5, -4, 0, 0, 6, -1, 5, 3], [-4, 2, 2, -1, 0, -3, 0, 0, 0, 1, 0, 0, 1, -4, 0, -2, 4, 0, 3, 1], [-11, -5, -3, 11, -1, -6, -1, -5, -8, -6, 2, 2, 0, -4, -5, 6, 10, 0, 6, 0], [-2, -2, 5, 8, 4, 2, 9, 0, 6, 0, -2, -5, 0, -6, 0, 0, 4, 8, -5, 0], [4, 0, -8, -8, -1, 0, -9, -9, -1, 0, -1, 0, 0, -3, 1, -3, -2, -4, -2, -3], [9, 2, 3, -1, 5, 2, 1, -7, -2, -4, -2, -1, 2, 5, 4, 4, -6, 2, -4, -1], [3, -5, -3, 3, -5, -5, 0, -4, -1, -5, 5, 7, -5, 0, 0, 7, 1, -1, 5, 5], [2, 3, -2, 2, 2, 3, -8, 1, -1, 4, -2, -2, 2, 8, 0, -2, -1, -1, -2, -2], [5, 0, -10, -7, -15, -5, -13, -8, -8, -8, 8, 7, -1, 10, -1, 5, 0, -10, 9, 9], [-12, 5, 10, 10, 4, 0, 4, 4, 4, 5, 0, -5, 5, -4, 0, -4, 10, 12, 0, -4], [0, 1, -8, 3, -3, 2, 2, -7, -4, 1, 2, -2, 1, 5, -4, 0, 3, -5, -1, 4], [-3, -1, -1, -2, -1, -4, 6, 1, 0, 0, 4, -5, 1, 0, 0, 0, 1, -2, -5, -1], [-8, 2, 6, 6, -5, 0, 5, 5, -5, 2, 1, 3, -3, 0, -1, 0, 7, 8, 0, 0], [-11, -3, 3, -1, 1, -3, 6, -1, 6, 0, 0, -4, 0, 0, 4, 3, 11, 1, 3, -3], [-6, -2, -3, 0, -15, -4, -5, -15, 2, -2, 6, 2, -6, -1, -4, 2, -8, -8, 0, 2], [12, 1, 0, -5, -2, 9, -5, 5, 3, 8, -5, 0, 3, -5, 8, -3, -7, -5, -5, -1], [-6, -3, -3, 0, -11, 0, -6, -11, 6, -3, 4, 3, -4, 5, 0, 2, -6, -6, 0, 3], [-3, 0, -1, 0, -5, -1, -5, -1, -1, -5, 5, 3, 0, -2, 0, 1, 0, -1, 4, 4], [4, 3, -12, -6, 6, 1, -3, -9, 0, 2, -7, -1, 3, 11, 0, 0, -6, -11, -2, 0], [-13, 1, 14, 13, 13, 3, 16, 15, 5, 3, -4, -3, 1, -8, 5, 0, 13, 8, -3, -5], [7, 0, -11, -7, -9, -2, -9, 0, -11, -2, -4, -4, 2, 11, 0, 0, -11, 0, 0, 0], [16, 0, -12, -10, -10, 0, 3, -8, -8, 0, 0, 0, 0, 16, 0, 0, 0, -12, 1, 1], [0, 2, -5, 0, -5, 6, -3, -5, 6, 6, -7, -2, 7, -2, 6, -7, 3, 3, 0, -6], [-3, 1, -1, 0, 5, -4, 0, 5, -1, 2, -1, -1, 1, 1, -4, -4, -7, -7, 0, -2], [0, 3, 6, 0, 8, 7, 8, 4, 9, 7, -7, -7, 3, -3, 3, -6, -3, 0, -6, 0], [12, -1, -1, -1, 3, 0, 0, 0, 3, -1, 2, 2, -2, 7, -2, 7, -6, -12, -3, 7], [2, -1, 2, -9, 5, 3, -4, -4, -4, 5, 0, -1, 5, -1, 1, 1, -2, 5, -3, 0], [4, 5, -4, 13, 2, 5, 0, 7, 5, 6, -2, 1, 0, 0, 0, 1, 7, 5, 0, -2], [9, -3, -9, -9, -4, -3, -9, -6, -1, -1, 4, 0, -2, 9, 0, 0, -4, -1, 2, 4], [8, 0, 1, -18, -6, 4, -1, -17, -1, 1, 0, 0, 1, -1, 0, 0, -8, -6, -4, -1], [1, 2, 6, 6, 1, 0, 4, 4, 1, 2, -3, 2, -2, -2, 3, -2, -1, -1, 3, -2], [-8, -3, -2, -8, -3, -4, 4, -5, -1, -2, 4, 4, -3, -4, -1, 0, -8, 4, 2, 1], [3, -2, -2, -2, 2, 5, -9, 2, -8, 0, -5, 4, 2, 8, 2, -2, -5, -2, 4, -2], [-5, -3, 7, 8, 8, -4, -8, 2, -8, -6, 0, 1, -6, -4, -1, 3, 5, 8, 4, 2], [11, 2, -11, -10, -4, 2, -8, -11, -1, -6, 4, 6, 1, 8, 0, 6, -12, -1, -1, 4], [12, 1, 0, -10, -1, 1, -2, -1, -14, -4, 2, 0, 3, 1, -4, -3, 1, -2, 2, -1], [-16, 0, -1, 0, 10, 0, -1, 10, 16, 1, 3, 0, -3, -9, 0, -5, 8, 8, 0, -1], [0, 4, -2, 11, 2, 0, 16, 4, -4, 5, -2, -5, 0, -2, -1, -2, -2, 4, -4, 0], [-6, -3, 16, 6, 4, -1, 4, 11, 13, -1, 0, 0, -3, -10, -3, 3, 13, 0, 3, 0], [8, -4, -3, -1, -3, -3, -11, -7, -3, 3, 5, 3, -4, 12, -3, 0, -1, -12, -3, 3], [-6, 7, -6, -6, 9, 3, -3, 4, 6, 0, -3, -3, 4, -6, 4, -4, -6, -6, -3, -4], [2, 4, -6, -7, -2, 7, 6, 5, -1, 7, -4, -6, 7, 0, 6, -7, -7, 4, -6, -6], [8, 6, -18, 0, -8, -1, -12, -8, -9, 4, 3, -6, -3, 7, -1, 2, -1, -1, 0, -4], [13, -1, 0, -15, -7, -1, -5, -10, -15, 0, -2, 0, 0, 10, 0, 0, -9, -5, -2, 1], [2, 0, -3, 0, 7, 6, -3, 7, 4, -2, -3, 0, 3, 4, 6, -3, 2, 2, 0, 2], [0, -1, 6, 11, -5, 4, 17, 11, 5, 6, -2, -6, 0, 5, -1, -2, 6, 11, 1, -4], [-10, 6, -2, 10, 8, 4, 8, 6, 4, 4, -3, -3, 0, -9, 6, 1, 10, 0, 1, 0], [12, 3, -8, -8, -22, 0, -14, -14, -22, 3, 2, 0, 0, 4, -2, 4, -21, -12, 4, 4], [-2, 6, -3, -3, -1, 0, 8, 8, -1, 6, -4, -8, 8, -3, 4, -3, 6, 2, -8, -3], [-1, 3, -2, -9, 1, -1, -1, 0, -6, 8, -3, 1, -1, 1, -3, -8, -3, -13, 3, 1], [-8, 0, 12, 8, 7, -3, 12, 4, 4, -1, 1, -1, -4, -5, -4, 3, 0, 12, 1, 1], [0, -5, 0, 10, -2, -4, 5, -1, 3, -7, 7, 0, -3, 1, -7, 3, 5, 5, 7, 5], [7, 1, -1, -5, -15, -1, -21, -8, -21, -3, 0, 5, -3, 0, -5, -1, -7, -15, 1, 7], [-7, 2, 1, 13, 14, -1, 6, 3, 6, 3, 1, 1, 2, -15, 6, 0, 13, 15, -3, -6], [-19, -1, 14, 14, 11, 0, 21, 21, 11, -1, -2, -6, 6, -1, 2, -1, 11, 19, -9, -1], [0, -2, -9, -14, -3, 3, -13, -1, -10, 1, -2, -1, 0, 3, 6, -2, -9, -1, 2, -3], [8, 2, 2, 0, 6, 3, 4, 6, -5, 2, -6, -2, 6, 14, 3, 0, 2, 2, 0, -2], [0, 0, -7, 0, -10, 6, -7, -10, 6, 3, 0, 0, 0, -12, 6, -4, -4, -4, 0, -3], [12, 0, 0, 11, 6, -5, -11, -6, -6, -5, 5, 3, -3, 17, -3, 5, 0, 0, 1, 1], [-14, 0, 1, 14, 12, -7, 12, 7, 1, -7, 0, 0, -2, 6, 0, 2, -4, 0, 2, 0], [-7, 2, -5, 2, 11, 4, 6, 4, -9, 0, -4, -4, 4, 9, -4, 4, 2, 2, -4, -4], [1, 0, 4, -7, 0, 1, 7, -6, 0, 0, -1, 3, -6, 0, -1, 1, 10, -7, 3, 6], [-3, 6, 7, 2, 13, 3, 3, 6, 4, 11, -6, -3, 3, -13, 1, -11, 3, 4, -1, -3], [0, 0, 7, 6, 8, 2, 14, -2, 12, 8, -3, -8, 0, -8, 1, -3, 7, -2, 0, -2], [0, -3, 0, -9, 3, -3, -4, -1, -3, -1, -3, 2, -3, 4, 0, 2, 2, -3, 3, -3], [12, -4, -8, -12, -1, -3, -1, -15, -12, -3, 5, 5, 2, 1, -4, -1, -2, 0, -1, 0], [0, 4, -2, 1, -1, -4, -4, 2, -5, -5, -4, 4, 4, 4, -5, 0, 1, -4, 5, 5], [-8, 4, 6, 6, 4, 0, 3, 3, 4, 4, -3, -6, 6, -2, 3, -2, 16, 8, -7, -2], [1, 0, -4, -2, -1, 2, 0, -6, -6, 1, -1, 2, -7, -1, -7, -2, 0, -4, -3, -3], [-1, -5, 1, 11, 1, -5, -4, 2, -4, -2, -1, 1, -1, 4, 0, 1, 3, -4, 1, -1], [12, 2, 0, 8, -5, 11, 5, 1, 10, 2, -1, 0, 4, -1, 2, -4, -6, 5, -1, -2], [5, 1, 0, 0, -3, 0, 11, 3, -1, -1, -2, 0, 7, -3, -1, -7, -5, 11, -2, -1], [11, 3, -13, -10, -8, -5, -8, -7, -8, 3, 0, 1, 3, 10, -1, -3, -11, -8, 5, -7], [3, 9, -10, 8, 2, 5, 4, 5, -1, 0, -5, -5, 5, 1, 2, -2, -1, 8, -5, -5], [-1, 6, -1, -1, 7, 0, -3, -3, 7, 6, 2, 2, -2, 9, -2, 9, 6, 1, -1, 9], [2, -9, 11, -2, 10, -4, 10, 7, 2, -4, -5, -5, -5, 2, -9, 1, -1, 0, 1, 0], [-1, 4, -6, -3, 11, -4, 1, -6, 1, -3, 0, 5, -3, 2, -5, -4, 1, 11, 4, -1], [-17, 9, 9, 0, 9, 5, 18, 9, 22, 9, -11, -9, 11, -19, 5, -10, 11, 11, 0, -9], [-8, 0, -8, -4, -6, -3, 9, 15, 15, -2, 2, -1, -1, -5, -1, 3, 0, -8, -1, -1], [0, -2, -1, 5, -5, 0, 2, 3, 10, -3, 8, 3, 0, 5, 7, 8, -1, 3, 2, 0], [-3, -5, 10, -1, 5, 2, -1, 5, 4, 2, 5, 1, 2, -1, -3, -2, 7, 10, 3, 1], [-2, 0, 6, 17, 6, 2, -1, 4, 13, 0, 0, 1, 2, -17, 5, 0, 8, -5, -5, 1], [0, 10, -10, -10, -3, 9, -2, 1, -5, 8, -4, -8, 0, 3, 2, -4, -10, 1, -10, -9], [11, 0, 0, -13, -10, 4, -10, -3, -14, -1, 3, 0, -2, 3, -1, 2, -7, -10, 3, 0], [0, 6, -8, -18, -24, -2, -14, -9, -5, 4, 0, -4, 0, 24, 3, 0, -8, -9, -6, 2], [-11, 3, -1, -1, 14, 0, 5, 5, 14, 3, -7, -6, 6, -6, 7, -6, 12, 11, -8, -6], [16, -6, 0, -1, -14, 2, -8, -6, 0, 0, -2, 6, -6, 0, 2, -2, -2, -1, 6, 6], [1, 2, -7, -5, 5, 2, 1, -5, 9, 1, -7, -2, 2, 4, 9, 0, -5, -4, -1, -9], [-6, 3, 7, 2, 10, 8, 2, 14, 18, 5, -3, -2, 8, -7, 3, -5, 15, 13, -3, -2], [-25, 1, 0, 13, 8, -3, 10, -2, 12, -1, 2, 0, -6, 2, -1, 6, 10, 10, 2, -1], [23, 2, -23, 0, 0, 2, -16, -4, -5, -8, 0, 3, 5, 16, 0, 3, -9, -5, -5, 0], [-16, 2, 13, 19, 16, -1, 17, 24, 17, 5, 0, -1, 5, -15, 1, -2, 16, 16, 1, -6], [4, 6, -4, -4, 14, 0, 1, 1, 14, 6, -3, -3, 3, -7, 3, -7, 0, -4, 5, -7], [11, 4, -11, -12, -15, -4, -32, -3, -26, 0, 4, 3, -3, 26, -7, 7, -29, -12, 3, 3], [-6, -3, 13, 6, 17, -10, 17, -11, 10, -10, 6, 6, -4, -8, -3, 1, 9, 0, 1, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_115_g_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_115_2_g_b();".
// 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_115_2_g_b(:prec:=20)
    chi := MakeCharacter_115_g();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    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_115_2_g_b();".
// 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_115_2_g_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_115_g();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![1, -5, 14, -4, -2, -1, 5, 8, 4, 2, 1]>],Snew);
    return Vf;
end function;