
// Make newform 10.32.a.a in Magma, downloaded from the LMFDB on 26 December 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_10_a();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_10_32_a_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_10_32_a_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 := [-17573188320, -1, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0], [-90, 180]];
    Rf_basisdens := [1, 1];
    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_10_a();"
function MakeCharacter_10_a()
    N := 10;
    order := 1;
    char_gens := [7];
    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_10_a_Hecke(Kf)
    return MakeCharacter_10_a();
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]];
    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 := 32;
    raw_aps := [[-32768, 0], [-2952378, -1], [30517578125, 0], [9008282546606, -346983], [-8708060715668088, 223468614], [-12744906116705698, -5232049212], [-8198115373981823574, 444000586548], [-53940208464132541420, 2658218638356], [-288535577410916066718, 91477511266479], [33524402916348678140070, -1193940448492248], [28454900017786708900532, -4772250936420882], [1400576695286129968847966, -5567952842142072], [946815600348857160773442, 318189095849736732], [12663817950077478097478342, 479041318271025627], [-102418416441636043580149914, 2631309061855262217], [46692020519033895537222822, 1073808555143583468], [200996867239579401396955140, -80242389211075561896], [-261743578127693111785820938, 95858261165915256336], [1762987710474788642836740626, -1008122536794506016159], [-77683819119127568891286240228, -418662376690319544474], [-60580901661359639952340179118, -72476714026447842012], [-53162630742839938391015547880, 6713950858419770857596], [-82996115403306903320155633338, 990759162273758068215], [298386904075213319076193732410, 33764308970871150010680], [4154027847511395766670564918186, 48721555094557494782700], [-408902387219853537806551919298, -250203849032231177272008], [1648152644649935649343012888922, 464887461191025358021755], [9635310569815233986608293969906, -1021800392676856513926579], [-6536132059929793584785804630410, -745931001956299621307112], [56036817153161851316421919592802, 3065978842638409027215864], [-704702053894462458706720680518554, 3157820800535056696020801], [-210505889504245538148902394140568, -38937096376776959413379478], [122674176400888301486034141372666, -56770193947040437662791328], [-279211300072630243360863680712940, -34481972508467491561056216], [-2601469073356484036016615791860050, 43217285603085280617481320], [2165035607292076404123168470086652, -163072469160819988824110610], [7253108495535728659009994358826406, 211158029268653703792900072], [-21155150349062344384183760778011698, -358683494912310424933963365], [-8161444120119217944611373274319274, 336852853803965601774330981], [-702628086054804814858377784368618, -3521166591055546006963529880], [-125801395106321693419175854032889380, -244592697394480488423561072], [-9884700929748348418270385766079618, 3452645188892577164649734928], [76416299624369566427087162612502492, -656691056933963887951168134], [-38241111398643414464193578351856358, 15460194095758640721163746660], [285812408101504828988874629841260886, 3699525730090614144031835916], [146041911067439681367473978289284600, -12582259610261735897718480768], [-174269463641046763446679845573300088, -20605380745789097250950823150], [-393881212285853293777244394331056718, -66109588328640752731590489069], [-2616345931716455433442041209819801454, -110372214909175156089665717487], [-3704026675129060242502705272750709330, -89377986016749692412787216416], [-4563539415806530552996859551894007838, 76043850695773784876469472812], [1220239859590914452004349239172025160, -76565450449026690065788038924], [5586547918708941417780794471707209242, 183289334945416070944366693740], [9072281097613127985521673820797596952, 599499957235735258514909989830], [-20326696597829038470743679220497105294, -736136738053779783836312876952], [6286444754873215380377862130910736402, -779366470518378141856099682529], [-47465074436756871981638552512476250170, 1638408376266399861686378474688], [28695485566382058557210475833463116972, 1497899161387209905212849175082], [62928402769812112005339935130039236846, -1062506165063279002629233668728], [-17859258391101839383627031680435500318, -641022891170534532185964383820], [25119087951835714182730182532437268262, 5921508332099820081204785029971], [-28972034258859401716615326158565203058, 3602517189232017611020284038160], [231160401478597242743778343169462690306, 5402489255937459382613162916465], [286237056985139032674640947672865590612, -11021010818269080612289532209662], [538460852631212979910658204366537787002, 9232541844060921876439364952552], [577084732883460493852302549411786032526, 3871382890161511829783406870036], [1218707456375224024793416891274368186832, 1781108005792009140521434855794], [695514680398967298954000325033200104066, 15205208678055761519230652384760], [-1552015810269467942124116062609104154014, 40863676890466778044215971920029], [-2652442395210409450221945198554806345450, 10284262965850198467396971445744], [2592197472915806724254508117255311198322, -95468385182143032349621755217032], [-5969306552061291144041804019403645154760, -42722026069240014575273305342128], [86196437005075010898073872548136459326, -105631917572749418208883399823667], [7816020280172830609453096465530182739182, 111745952662970885130231473692440], [-2174067471396839759814423739670177603380, 373598790203125602221975792871492], [6293253760472746180203264065634885882162, 189530037393715669228941617409987], [-1062419289667519845253228395084727522290, -794584231428366940959208268504736], [-3896969669915489656818423552138488748514, -762408052640037527449329467786076], [-3050393359251102573388727681629070286798, -134507008405753747238929305983712], [-14555207963545620329920489338742869407710, -875650293174976609057353242191788], [-19850926087766029731529729375998776659620, -417284747903572085200106195768136], [5845264858030245669516916003170758725022, 1924463178540670412924076222961320], [-49838492953006286113693943339796436360068, 3456712140393675896824709229894930], [-89205641467570311267591187000918936541638, -511931567061885173193770556670788], [-80720368721287814458916596454068498477240, -713468229484712142234636914757408], [-38246168302838545555231007162956793293458, -1869863101339357841204541639844977], [14443036148239291759982160833782880572650, 6592439002699688231759799038441436], [51612915312937190271293199330866608682906, 4395519484720492874493885265882800], [-37340544978038426953373921432507056908138, 4958873233607293097099666130382680], [-174372880664087987379602739189200863613998, 4859320878361950366227484559087083], [-170112568454824640120083201431445453389174, -864581055777800249198610211881459], [-42212118455123545848946124875092305055480, -5544290667171290401585556111402820], [-187573205782908276961220771075219763538234, -16614706290884914879953454028454867], [-34106746250362156295073553477939552610808, -23171559797560497265241310474228522], [112152768450531962021991281618045320075700, 18022629008904587302369548040084692], [-621443564885066587185056782384840161919878, -25931787864745394694244212572329533], [1127630848299860191683196316796589264304790, -5505868155384651576873238895472864], [725291333230368353304556749620383258571322, -50556591174979358344773550580442240], [88317845884459247394161938954621513418582, -21366365315770800613826803658314173], [2043764935549806274599575678143718148962342, 45225676337024775965071346208097896], [2596165825360120581426688379883901848410786, -73416367619446996102648485869330487], [15855447401825046143602051811350421854806, -198714568984479747347105623655135736], [-6517694480270227593421965813841100123637498, 44497482469909182844470724338646887], [-751201532573898594070016164180946714159070, -26740524020596789963082962219101756], [206320688696257907774894601340020482400272, 22551580994683580732780518782874170], [1730748224593216351466794631807938908454946, 73096985368824998738405055507199248], [-5305493474296767727629215293260547306350534, -286135588628749567640930106804528279], [3928246221256360482419294062937578972919442, 87263299495895192111788216253617488], [-8786046704880183833602122881720583790430400, -328830780267286190533198013385375132], [16457531224632827645120750047974946460121602, 25526079493777869457225156260512964], [13393219022074222336360202323412736584567606, -259282977339079342909885721023441527], [20247951321204076404531936616541279740023302, 16959938830851962940012522471746244], [118536271481376077547446380167812390878626, 850953914828761968386989904865712140], [-7834044821640773089001017715345249354717620, 208526040379702639684926850938191340], [13351459289818437490227493942278819477793532, 941610014395834607604303429874838718], [6322756690431040569627352255723750096154442, 582058196159151323344350667030641420], [19272520007441980048349335308344388551004542, -1508177376854527997962366867767151053], [-51417196485156653320393777492881913044685914, 213366496987261086532087428437028717], [-45220634542320259150082958466146592188742578, -1478786385676238963885243677202201172], [-44107869601465223095913715280063763304035460, -854982103519029413727490997995557552], [12675836267283496397677887713315867024800862, -855839066251852006137485215793706192], [39500865873338067713437817944599695331589082, 48591883661475810518196268659693780], [64231787799749267035374074167732519111266246, -2283378160306175887184152195917875004], [-54651899815081602223779920702812337825976138, 2862390197395038366849927959395217091], [65581556315388332929851612808729463977796192, -2794533823027997338322249555457621690], [-39976072669856935257155575190087007813004698, -8492256118293255434705196818610010056], [-87500041699460229558912037111140991231231810, -2633719391467460362518561247620349944], [-55604002012037872074527632151494559405335320, 3251403495402985694016754211654002740], [191386368672161119052069848784360643645431246, -7479375744105827677117005900795849663], [-306711107284764048192460470796768597285324138, -2457406600407582336474564155722976016], [120920425342650401274464886416609014894592060, 1851513949547504019465049688338096488], [-536298782766802630290476093855039006628477558, 458733397247407446156213864809437635], [340880556408525621675011468704408059080797652, -4699286295283672238836533751514899818], [-174662598603263726574791939687524563613580194, 8979780161447540914302106826285093568], [-56441828311376424349784553962829529437533238, 20547667522821250222227123386420956224], [60799692105898614830155897535443314576605330, 38470317231489016310604006673734335256], [-349648435202334492809834441439625582464197418, -4256246831289638718525253859218930260], [471741825684896545054129788330810109222514666, -11344029664622152037021356400397290883], [-388668736364545089578487088315116436294275714, -45446156047167815623996520970730892532], [644309224799094354687781385571539822880820890, 49624454027709573060426051805571772096], [730377186647747594898205825292325081253355912, 4951419944844634294614259362673022454], [-1107273090785979849926195177593198466528585778, -58556048791409450655890723831404968312], [452764075477026985316703786492746148182123282, 57961421924850317875418321638741243431], [236301316542328178800415088358271118964936146, -9406317339537039311860613097082976811], [-2415315179245271963831405122488595652266024330, 38715710208971597636286195872910719184], [-1203888673620268077254731694338267167639360240, 80504365223169332837575209752690709636], [-1180883232282302375268054582232105419402457978, -41610893683110653332142655557644496916], [1566450214489067919303662516073115978722597306, -4186521030114922756947462055053725064], [-1065464537948851791382290285802958676086621260, -110947114053817062466272148749210021168], [3396945840207522604222765861834049425166727402, -46597361402928129763162400189454537273], [-2210030687846165417338433035226147256230848954, 47066016205701375247572731158213739280], [7035159388161333916924704877177556853651697482, -62615050789436307054016374042105928140], [-434093570585327440249964923072449576534961738, 142889004691038787998761079311910345615], [6039917648717858565101922422927974552451823966, 129148431791675245831276183192762543305], [-3244660952430759181199956587350374807308391894, -102161573024788421193103930802071281039], [-2659689075684389688411241413730475401641042588, 110290432447692115196439893428481633310], [-13519977206615882863881454841476282769717044720, -35329381298443329788484027634267673028], [2158874920279938896596510412414622157639093770, 685765616463859744712639582622041855580], [-6545414358381694537587561867543640364964883534, -60058580112256084446367370547551370300], [2244382391377106970900897863103598825698152742, 223796758973858153940458107374654115008], [-3375201504815669609951159068967265115782660414, -548234664840886061247824870255080306095], [1070004265410826978062325946551112402217386922, 743717344462041751256262272036552398512], [-22472481758333427089302638240583945278165527074, -157372219576176017540153917854235736895], [3042728464247978874883687861753890670721172672, 435940557213911370997240130038266142170], [4220520387193649412282359918632426823751979146, -1007266148360960748120549925716226072668], [-3946203407932368717270983079889332283994602638, 141852575672979569254733313937083197607], [-18018905266870052507294419487661918663972046108, 1155323367449051239549619855298632764950], [2750099767934995645376497341284992548078562886, -283069498256793485938419536327155745436], [43822873505042970712510988868491958184844249090, 535648103516232881104538722986311802792], [19402998165737910378981730094619751792319190102, -456050161184338739732138325665704691628], [-10756225810964344642690851636450386208248531220, -1386991727125294412661955681054093190988], [-51219282262799805684907064933284665648187327978, -94118120097189206281761815018969616288], [-37357471963179710444655458980658207453462735868, -852872144240979495528387968519400969150], [-1547409490827397142087809863187428539944031038, -3977253567956506879867441886069000073684], [-16493295006850944772406964822630765877169429440, -228065596337604188079018903445117798728], [280385378151391495434595727913152256788132250, -511517434297916956427976961711551132696], [-32764082908245961537442201357337515369316703648, 1395217058466976465548691028524621966914], [-56199854528089974901129288196322470459393838738, -803163091650766438479419990065832851872], [10688446882371273117895975115446955134830219602, 1711959703703544013095826918802046371631], [18576897140369417906877224282014128510156053030, 6147301952332583243475879980858197423488], [20839865214734106870983182330083794692877396366, -3798550117726701538985181976727333602563], [-70628098246870834957186407290035528167441814008, 240036436942602783751025656057558973946], [3361837907295197161340822444734415953543958342, 6780167401648940712388069279420785352308], [-8734517574908620440156908305323583731587881614, -2822980469745650355881861866240518458412], [73648096220044540002572817789761185956120052122, 1289081332393147929998189888506022381367], [-15774497972785744565431756673189018457301913010, 1855332267534746624837626279534385757048], [-117669582864256450399601941980706157283131978074, 1203829480679861897805639195097519753224], [-125258398145029614476004516431980619007858958018, 1167713355419209554448698782528823900579], [-130036996122501146071191778078936055321418559630, -1692391501956208556583019804060168222716], [6274787580150651471102545341047733805586366852, -128734360339314682369747328975737971210], [-96901696271492673743903738876215977751678985278, 5233262219667959247777023193503353640544], [480126549934994999747976178709546822955380069502, -6193911991826449249734521259837740541153], [9994147832101503091146303618677094535823293472, 16083043262086481707767690404031032860086], [290951736531049884971379091714556962136546999382, 10727628053322041633458950589572104458800], [139401593143772460294057058956173862504890397066, 2192392978463622483689642331978905837637], [-287285124173693502544449944084184498440135914158, 4898958023646849182256158443567234492212], [9894317301204896153480187884339685833815069802, -32199199059091281346755588791791364201916], [-282439263295510611013203307837283346419332850098, -13953332301178185549814289702401035002508], [437111112398889859053760166283506475690535328226, -14280282670321197784482275547538777731216], [-1255431953456491126472950876429888771092880518, 37910267581853442861031137012766763933499], [-474370768813531502892185273319484575589766292330, 613269346597383126698936375569473842904], [141704225940490963055742456695021531337863495132, 36435960674457485553417754470415858143186], [-661287603257989145817009441037374959087969608234, 13625660143229212891202615957168814779364], [-741753603022242543646291465681964551270829965150, 10408242851304102960206276498911375043136], [1251445397601216396108642162046096620299944715940, -9340036757355678280582749359488609430832], [348222145539925657477156527868400534412910992246, -59897391337836007245924721144929735441936], [933192585903901427543494123198139213067524033120, 52737937027261874432004603185850866612112], [-664491410818663569269443841759551473123335587938, -87917422514784282878132182528300598651229], [-7466625870254283055100703087739162824495006390, 41553349580432507011887781314871409724504], [-265544110687853476554809976205816717439217613408, -61798581865793959898706271640925012955254], [571585680255609657983213804324304919434569907386, 17649485419204841917708775005496309899020], [-858466382170377495593456537398582487072508794898, 62876611855443805006876494628544691179016], [-612591799573037322492532083199009009210122990478, -106358053262423505598090188307955099841273], [58440864121121220668823202447933866273525700506, 79898950539437408703821430541814941938993], [1297778169632817615938140646380142116188250292880, 70020091292504813997342046371915435831060], [-30127079667734523064874305751020437964288822078, 140194040576268607082891679412737344976348], [-935108236428845753219625565293084358566507945754, -111955231929962619770868187597131901220919], [1902792708624433474071439750609547637495888469362, 5475514944300768102706273908798780621984], [-2541414859333342072230258130300197767127929348874, 214525258239060063751848048356973171751965], [2094905517135531426205866958865834163316525717182, 224608882724143263770884406914936179885132], [172374464447928057880673773151713011797495890382, -134851744316866946506050528074724621987888], [-7919163389770829573582954196754474594066707985600, 43616118043821015482424967864168422750612], [446561703965460158514746245812430086740595540690, -39010448955688209998185496097321196011720], [1378377915991971573243687409044505231919274374282, 68494750563664710811316250903064575095487], [2860250594425766257948735483805670677754970954746, -88283771501029994788034287438825260847083], [-4638312334032533626068964398025421702667926361730, -332723389105812926224650729773159851570464], [10818066396797888079521765382464715102106838372562, 34127634808090108268378934960399179965980], [-2933743421941232197435538507322279140500336776240, 198479316013853440739359112344047373714536], [-1351239554358107497309379947840778435575641065314, 266424501526229099741936357264109670661169], [-8032753034056470987606923133070614010870988875248, 443360919249859479628300030711437530288226], [-1862921890818949286563137873594869569927493152978, 69388002575136900824371789069697496355884], [-14705358624678280904297301066829700663072072400460, 3386281092005015364790177695884420351604], [-9455537131968329659022199734966538965915684094628, -250509436449068030398168211632474432251078], [-2013971177573501621490690133860966161787280319118, -474629739906098527155534522207322946047596], [-10452455200486126382834665163037303463628943022738, -555012789766911856526092805079256413817689], [-12625272957973473954123713848585316872938594795834, -248226300265202222434082022631515787635831], [-24248401958775529633138909998345016504825667425990, 247496706567253566732173203173458250449004], [1887958597726632483792366225612961286359120778742, 159671493059372381910539997990494385131796], [-1578799050397287779074466934904806955017755528100, -112345731990252735872686130019318402180372], [-16207881556811573659975309737527797360206119496588, -209837176198193045323435911911800706976390], [19782270073366842615563591825770456594047200710182, 382743105162022041058861171498971685096503], [13405370668173598879676586576289705245364556304632, -978201258275322705582387463182051384893034], [-5595687617996631926806332223547169120106627899958, 1555516016009736981522834239037778037099091], [31161018469312169972426256017407855052489790299750, 360077705787676544256023626702649874561072], [19309926043567602102480324031675537277725666510722, -452044383907340458535800055201255145590376], [29588148620011917329738801165385833455503249544440, -1218406435389552825192912570313796858291016], [17095162702197815200780090689229151759477859731126, 2038750071285607666436314457216139384222057], [-13626525309339786394389526938023626179108143728128, 886777807584335716433985705587105308798686], [56636679724343283026600734818490795040705806036820, -313027505239377886045916851706931535194888], [605504460888182582595848062838229677674558888962, 637941959366280265098842624080034190126723], [14554301981390100277678360798846063499298845791886, -1473108923958986566441079984093127013190124], [-54191378916538376365143631775248707882616845679998, -1440049674540005996904756707299420656783840], [26981237532106657378884908127977420335531837108806, 425651853625365436958087208751223711934333], [-32055859542767026230363268614041860190986339344910, -184801932070666275651417119440874903582700], [-86729525026740939075622352873293537449593892796698, -350742505001121450326991689968012467049008], [-58954337970144415410240596558844059762536830195420, 1276302187073605885860078532932046872511692], [13132449460016154561509429512212850673624332425422, 1372539421109855395294488640088083847941944], [-40558810839803006353190201690657251906527814789054, 3108790018966015967695929108629612910110061], [-66725615542853478104188652780372341529678530757634, -293396242169862086209714489986022105515048], [44741238148265606373821328709496828559866955200906, -2285535965924637355644647500494047259455712], [19262055677964054125473972764262051405266743087402, 4186194166293317249828916147094148707022679], [16188288928558946274187371708131388786080939498226, -2178658614097885361446080210947934267348591], [72590484851872510810104772071894928761752703114830, -1251120449786249718158591664759327015368256], [-57055602286001030162762136388341895520758660537258, -200387186019096544428970172150730876109008], [-17399255561587335646709792428236884408079291368214, -1537020626412780393705273714376882545992916], [61917340441423947589665811843007926028145149838500, -6978955705537348325253638322409447608074748], [-18154590583929443968323613078939024728134292232410, -2884877524015592051061241201051609616165568], [-29133064983841062606469788391816542839731286920278, -3298866444881106962220465965031988465177296], [-118390626316810112307501794078369926731032182969618, 4063494430611514001286902798061523509456207], [207301451596562259606200549951073454139260255511262, -2671997020600090475702426745077351716758216], [-74182881078846925173614530941332052425199630021658, 1914215882856644705898637938522364175060112], [84697369899553191542411096557020895892731569225386, -4116608196859300750043917878451189280434371], [-36474630904935541116446261214159361559356716762478, 1561883577710981399159936587982116171839900], [65131493038743081373272504870178927774830829456640, 728578450546400032623826813770070365038160], [76738328459093657760659892565750831942724449533746, -2942144618837429008159769359141086229569744], [6209562491837093780370000909217072834509525427562, -6823154505917290016554979569312768900012821], [-131427941589362274923889779477141845147096735193334, 3080998951566733633759286908522962958255209], [129233698625043560769657517793264355781665998544710, -2914678954428525411518579908292956804011288], [435121134115101196887545259451441992059366339230802, 1232516569593970591421147477384557189002564], [-147627138354482757450787239895119773892036980063688, 15795576182927583843207968009132874224870970], [52781672415891221897289206592361248140554692083082, 9609124446386425295743621434407741638694103], [-25696239651372531164383515201788751806065897676668, 22368333157226024598390874704564589133016114], [364471256363278948321959339810837249425348870014686, -18537592841406057830321734505675391066791511], [-104299202884704758579256866867211135143952478028338, -15813746872486969816822672280083056573302496], [307483326934511572210500267695324350355041704153626, -6773075351089963544079605513497156664341959], [-317213445161960700336590077330240294281724957916028, 13845112438672663732983324356591633665582830], [-91621645760008434864904800710497999557759394468918, 13286580187303271841698025150680139272919492], [-355860218538626699557796958041012455102758272682954, 14135735581555807790744670606413120299101876], [301244248581915261852311206633684526418980385917120, 8330162474149021522286943178722000894672420], [581226880775804056057651721894687054724582990526410, -17079845042127868872914689157109300562802532], [-315271238540062326083425938241080541495148787651498, -3937458559562727100570800785713761107915544], [-853385867738218018048074261711857346154818728178294, -2159818951065449385093476565554272725888771], [650853122683137786915570590008375396023781765154802, -13169844600639169048816204732187736437844324], [-254800763712943691679043000942635099979988196348168, -4886105193702886986624052203654605923597842], [59528166084303411217842904756505780170315880447462, 28518408378726171385337389334222181075549744], [178336059518105771879426496231987067954084307794950, 5169705915219575650287330136780945551844728], [1280853231399434807512805185000143202195924000093652, -10486167930730427548965665913592437053403810], [605520667294424837728727581972767238682591189602782, 10073923388739315436858315200676152658908960], [573518350950838360788957574604003062570090313656620, 65221089866908102361059494900555772829780148], [-1088962400183591217475663259990006870229511842332134, 42149406577963512440374607239722373724397453], [765465444278040236260514682515597601515101515074042, 7509649293176958109586171290384202266769088], [-503243163786887415080353875558975183493671412803114, 8004320485717660724860867231704323457017016], [554412590562680509938399446897340223923065919465800, 8793626798401469150948119837826797553142468], [-592252476368080961355490049483017770655803620738178, -80191495001368843272392534729811808721676885], [-1920789176036148030386920704537282658740908690443288, 4252453908883098516450292787997092003746830], [-1520176269810345382252068364749705131340685247827174, 36353667013871874268527892654383719257727892], [-1083829769054606393426740119919838941108619814069654, -16631789219017659290967778467596796444277407], [-1302074219129291179594563639249556648623537135023530, -64453589316594506547767251466621541045193944], [-199066860051181711094910136805711904622836596532840, 62721572266908882217452930647542595930888568], [638703577384149546395944204704954401302955455073822, 35401106876024717202170984206367728761353976], [380722278494159066336414017471300869928497129091602, 159743500554196003031374100498727590893086891], [-1845672869618098693301907971444850217819515726273570, -108290231775693611649635257898312007338020560], [-573212926259354372631024824358007043957466002717118, -130685987841775830562491443786711811310472688], [2547147374296658972440395291292206900879096091561862, 69426040712160642555252830906465288858729871], [622542941218611123394189207470704109530189280054966, 32411891327339536236558103072266477236455605], [-3988696805538572495853336674007692116362048621449590, 8109624736534589149486179394828086832769640], [-2978477978353937819530669200270940249504359634698300, -54450639907109895978849526392231901659194100], [3208234338149105498127381166013780600842500269061012, 7881878872512055756423456435450507148479854], [4214487778313893592223140012415209867053696873518002, -67598297165470471525267151310365346127790808], [-3780635826381558962804666942161654605724964416000230, -25345618198406823080241586237509564180177540], [894059457932207631112567485463122838822490799150032, 92581632623634943755771425516229579057002526], [-526058204640993096366050487596052534900829366756534, -81763750833175248233204109716850917041550832], [1602047759292995734788547723982853454357641303945942, 120166858238584241283215257952536128278064528], [2093651776767387519886813008550201907594656177620242, -161684650824130638132583817312828146105404189], [-3388558190315424603082964255861214051398191541579478, -20530984469425375345205329814751636491104200], [-2704217736962732425572430262314576531283262279423238, 118549769753852260732846421475453594152748156], [-3820045542098509980570919563603630835695692147815180, -132730363552613711973094377550463186560963572], [-6973701351676710317882318777712975266353904674743778, 35474054999808362190444558062381079430077735], [-457000268763190923893907532995064327084581917029194, -124960496051225093757191675757532803934071255], [1905924301157135315445203243816599092377321388436902, 24873675290353042545790336625857847668318740], [-3039446861666723575339434904514783188436601377590378, 201053950992008848724859847098587970302887080], [1167244380117930175181185815211363110066943645494966, 231390089622172187617347762450080085496788336], [6190481903024471154340888324991197749474753353612360, -297582900668119534928698056018174873766625940], [-3975711730846001780124788924722475410965558653286858, 10887571979710263674032910198188986798595527], [-263036577648573463797766160750481095444275296956248, -434045872535505691996866775452400514015118954], [-1043339588968358005643598307036074728338071960536574, -104312995651544007927668962240866609848559411], [2487424915192318902389109412996720719745633814073830, 120506308785988557741264935472298126885541544], [-4536347366781360125839705165929915752702705462244318, -122030365392141584503607852029612708008298368], [-527581845986054288971034446514683079127476425937518, -342811513031905103678826824159302045897878924], [3514879026114464593476990353890682726936264700346766, -121160346915282539338322498113398422209931067], [-17634874296938343451334681918551565556982902558695458, 75206984286723026653606560072820526890575360], [13592167440360678707529099490849779992984596211254986, 31804521187728364071554145537058773112992192], [-5949515041347109521951585035348843346725488495777410, 10034253148177586288138786990853873337863432], [-4523984386053418439787673156469554390098008770116388, -369653804295216235392830376640627057948551258], [-7659782316369796649144947421409426548082498518442138, -155067815856380601506377057014439853065885368], [-1857625582164441605441304355071103869048600707261340, -884534408297540559567667274252407658339588508], [-15696892825800800836605699257911817842765250248534258, 550376000349801495413595146363713569379766352], [1371442281248380415679425982952031036811797802207986, 650705254338624084104769215393727064246775277], [24574732562413393089436087875638125860853701340188852, -191524695897033266713149684488608994256484410], [28670312259559860594291320609443252614293264924964006, 111515366473571690180334264703343740064382828], [-25869753113768031788318260964757683360443971640812328, -219543894632127391703601609020553909631483278], [-439952888030541582409195046444129853043279178716054, 521539402286003658002632459412415733373337576], [22860765715567385107375795133113492858438051966349382, -185711778591641103077092238300714433747348000], [2098209154311798620440745566997587520986031578734362, 449892714300328932947872584038446471953562359], [4046074835839969349979060861011520442141797210296510, -6610403046963141824188845294062531913309984], [6634867739630736996040337120358150263950276771723842, -399302447078220760704077935984638112455793884], [24017454011205807870537705477604527577617214347929400, -343256971830404267659064270328561845433335676], [23635592580449318898991244745541888610617914127122912, 776122608193292454892014842851950127967761530], [17657165269274799255898230424278552949496358659338026, 1414331970661393775245106145271915824688376580], [28865292353683939629022883736016572323329777086493482, -36184580026476523541204841618335952778871733], [-10438275370313726394080498341954467348496521732420634, -1317261336961135652846564797036907741186095932], [-1646021973479620666477233735568210704720205446260358, 462948693047348121682951813010236682265199776], [-6953972559069130580363699334753164648827959389479314, -1905859784345173738665810138554186614251709179], [-16444716099262779145685916968057122028748727750648860, -1397144381426950761778615406630720250469598280], [-34480805551274662678086983277610823975790322638184774, 548108154120491951779999242043472830863723213], [17423801552513405970672274306497094591129809856328882, 1736643428223605924883195634616215136533649988], [15074796108671671621363722325987055064095342293493646, -1896754645322633299510338880443184297625222340], [60196133082422551221415229736609209287320654160943522, -811663216383128941701396641743520552137392297], [-6754589861276456632923334574298921848548289881360078, -2658268227581229974371954427950064109820866036], [-106455119852925981718590972066812257260623215416664968, 17167672085522936481647053038995726181401682], [17161083549309883363820176269478732248667697995576460, -1854218719870818346603336551857940560057589876], [35767647099596237713067247239065382293952157193533042, -3055522133746017546546946792175809459605563637], [-63167526250349808930724010969579050762536128419336050, -475001715259488372827570196577465792985905464], [-10395498020032129130961082613856078211625163558704548, 3792274629090613499445219683234803941490584462], [34267724566877484668468987688137763061268722474483406, 2669844742011333842423707017985592920196919060], [33735147316843469558278682064158855628456018807748020, 2754198198393272137964627106753727759091674884], [29847977787200138837547811084365443623169797833495492, 370339285015946863319949885273442153196180550], [92554235890229370499708852831441569538176988433742242, 381264654775928256997185958966292047893269664], [-75964377493841643884222102671319425349383263249475110, -1277478772273066095827326505606381037182702100], [128001291375542523657997694503832945635938774928917626, 775393688573415118103470950508389040303555944], [-66726507153246263018703537282710858080774802957319978, 2242982705012627049452240636597916531015430368], [-109425920043501774665912837705758153609577646157582038, 985434620162725878357906391873745185736431752], [-34078360985111524733169859335872862703916190632833714, 420734344597630550397708759659108494185934017], [-135785206642708168068802445257278237949273159058139294, -1930460499288470043784063664191316552391298656], [137724137954421194039678121191485107117145170351118340, -1498265014364874151955169921219037959272687820], [93193546002932856226651913879576292100708405798336002, 1113706411223658446792629110855909525830428119], [-30079686893072302911696576938936996362016107595329828, -6747553833304310244912542149866549565108515006], [-55333276651480016076284726151367941727890709217688754, 6403959477365593676900134070995281512433279912], [-58121046518068005375426256666940113063464078419870338, 6830357994579779687414638709634301706996885127], [-146482360120024249472298114541408424641143328368411834, 1746690334507105442554706834349433985004984081], [51866051067418042663557516518385795582411922743368810, -2133891099034485639809608219048394698075871940], [45195375944902506208858964487016919308511441631165342, 2287346649889148810609130993487109155187159544], [60781163303152914595787445464517268478689411263879300, 6536528140536303645518727189981892357431239568], [-8931741291695417320306821927805506153279118001981494, -8855424180953007518194750114450366065642205683], [-123579131239094563552501503776859186038382767264011188, -1754398296107986593867743808208079979649757658], [16966458674387891228587226732690748064621062331655402, -7485122572978905160002684264205756880422225824], [15239626691283206949475877323846535601444300419869880, 7957778289242149943288915893240460836410885540], [-41347676141771093955485741246049015970717801998961830, -358102287381457385585247795286626300961178592], [-110829839732869936293279596163914060859404315149868968, 6022309993449105333300223673522432503116483630], [47087116880735762398187046362383600652138721206603742, 9925711826200034166938833144122752586802211232], [136955545683885823866321679125393124138820718958924550, 6408712646939944766600995831971035265259719336], [116617437112241199406237536886945296354204771082039722, 2663863835284291568735891653904807080526603004], [-205102692316982061381987353278492983309177498550619074, 1542139629190042216078876916519679766343111517], [-75570531934738956775825823920562690572042812011277654, 11806386183179190968438124359116285751269491552], [-74236877467719829630538946044207284838734229245843890, -16979099276110486954635970708507615923311437104], [-35659877341604146463975347161310314575326162396363108, 14923158679694867997909052374855350294692363158], [376916990378813926074719884760587880696613250549611086, -3021853889731559053927894468644950569085464260], [-196910779659293405010745772131172246387711931679888398, 9999650687839186917327007029155203383761576016], [-191099316951302023177386584329375947579595884487564378, -13626985060087620591808333513325906338230498825], [-170917288630149001199384750307934360599002061850912020, 13036557212878019449335609580327894736055169248], [189248891729018964120045585340586711428970203235374562, -8847785651749877066294536128014507314984605912], [295321585321964192275094140352871007083524519467908366, -13064329848017418363667350370176109413700014792], [272599089269829192145256632059814662404613704092923942, 3600117186641404345376030399930043252357546963], [24756415731151211925751274625088543366352175993622952, -1332355295448179625366122470364786624716161222], [348082247265680302797750904551458372341903775865137906, 13156172085202784521981283169499305510117967332], [366535864389766123165765891305279078079998366573729462, 10176105072215142736509207603691904871460757016], [-33901653407405632376096809088168589271099143997356480, 26956577010330665720058732963953260097454434880], [197282787278436019473525121538146689940110387609472166, 14715867805447561985240183168556149109908975373], [603480777450076144093605990560864518641172816271712186, -2563103765830312840356657318066520349628761364], [417577075296571860972470396025870521955304964023938522, 20918450211932341578585444667508063534882504163], [55757313696817456175098661649802193996117829582114390, -20088564198340026633027316650431361946800670896], [563256023656486608916097749815444837592663298722226726, -4436722373853165877252474679909667042071811084], [-715156554911603679349154831768291639321400836674780554, 12777601149013413759190847213756195857291179585], [529738472474901815455606218341782464225686887275408660, -11858748388579749124388640407830207500114161520], [156818850669742799280671493078780640658119480462658522, -8603112072979230330173542395745011591261362256], [-238316489756447129163490380819181118197822332827134794, -15226036603019967454390805050082032325590805208], [-104890411091775064601761084471623752433990549526180098, 10309704959422167601205322268514439386224485003], [-315929399531780006978378447416024845045809707644927870, 22782337844464408144501810935006590024970034788], [-620346280858577486005528430776517944352657505893085328, 4981574754664737314562645789557064362988590298], [-40954859326374854087481513566824873718771972264573400, -6575380111890455861642420603247063786831300432]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_10_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_10_32_a_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_10_32_a_a(:prec:=2)
    chi := MakeCharacter_10_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 32));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(2999) - 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_10_32_a_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_10_32_a_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_10_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,32,sign)));
    Vf := Kernel([<3,R![-560654765721216, 5904756, 1]>],Snew);
    return Vf;
end function;