
// Make newform 25.32.a.a in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_25_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_25_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_25_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 := [-4573872, -1, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0], [-12, 24]];
    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_25_a();"
function MakeCharacter_25_a()
    N := 25;
    order := 1;
    char_gens := [2];
    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_25_a_Hecke(Kf)
    return MakeCharacter_25_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+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 := 32;
    raw_aps := [[-19980, -1], [-8681580, -432], [0, 0], [-15128763788600, 71928864], [-3891176872559388, 29000909200], [-37354476525130310, 4661016429888], [-8612303914493544690, -45085348093056], [-6185281664011082020, -157805792764560], [-948672420994955609640, 18557618179251808], [64288072108608527903670, 234192357384448960], [62866763758980919396832, 2412621171020361600], [416907603527008455512530, -32224244113578511296], [4362462167831462920335642, 184255453144847033600], [9198552646889719354186300, 342671050720390776048], [-47725481982428095396574160, -513692578237745847616], [-97411254236860549491830430, 1204064567949614050368], [-99361631773882756995373260, -44066863235081760754480], [-6028109100556502180578828138, 11293924028102214264000], [4844070401436128497016123860, 88972104812545561003344], [27892288312517328756439143672, -953870049554263710708000], [-31117047966043049375276477690, -158900135892158937624192], [-59582095546649852482106355280, 4664754735614659537824960], [132431686840784572812678798180, 6271396268534390818352528], [-1077207307123335145801360947990, 26068082391832856589194880], [4530383997437016307764978602590, 16565775598601516231731584], [-8791393879771179938036512865298, -79779056976143045647745600], [-12308620796461795648593023550680, -132718540654129769746254432], [-18422235677352642357910628276100, -255439221008141559055646736], [-43512657752217620754893648778010, 144361856133410493663184320], [-36415351217255374548675172478610, 412259616739409207392089088], [98907056805331031759920767137920, 9159794335229744785447540224], [-312899292131453333878936733467668, 6447502809852498355317153200], [361697228694303195730989348911430, -4059336591488913756301271296], [1616779348284388381173808462428260, 5134887064162921725611617680], [6036308068014339754011629014943550, 11898396352882263761411921600], [-4489507560592339327380664577948248, -40901020366721576563527573600], [1923733500470541321719671991835850, -349822111081251129705368876736], [4251303103686457370816199498156340, 235681836737405725486015355088], [17355053993263333253288230557197160, -665555561703049643672408649056], [-33626466647285596365590015300801190, 328340819982094384767657574208], [-10175578138307984928138801611830980, 308879672294894624584570091760], [13415168840223021821403718095959582, 2614169594404206315179152632000], [91875140034966412817958740270428992, -2643698823944797635048052985600], [-42814502684358742316070579793712450, -4302557189544493482508243700352], [262875268504325896172184579762245490, 191018247554565229658052427584], [384718072979787298802471253636961400, -1305420840541301402960139751200], [-1019232550488266823864073649428668388, -21076032735005547217595102067600], [1255434815347815229765111484054299360, 26680761452728574658789305332608], [-149182169543548930252784358141629580, 644754454865610853501740764624], [1710514187365924125449426819383714670, -6053510833669221526553109675840], [-3772075924838189545954134111583188570, -65834161172288997653810011615872], [-5475237703867049486612952419587891440, 164448967844954733029815761788480], [-4384432781662453455004212471728536558, -54959017129594404478382183472000], [8586556034248353533810317673018715252, 17375812577725847742218882370000], [-36766447067591276747726831615462088450, 101621237080257571448754476990464], [-21800874652021320911198857104993147960, 669693631480205573862093409760288], [1363587301153268843713289856148194630, 624186640574550547268667977903040], [-2315911964917059478596651510155219728, -32912947303863794537893842254400], [60035188499087695242224043215159759170, 378827637988953716861089494901824], [-49090752809893317317919445625508648918, -2342266775821424415132701831062400], [-56607018049179099946255659788128123220, -1210408146468791323187273629288272], [-43687490328410746653806357367261442350, -965004195276024618380888736527552], [390847731576564708910474052261716312900, -3507238457013637922978107002141936], [75882224890507201982155606482947125512, 6797135203383632229536286597389600], [-244336116672981045174210881951704192010, 10753870589444172120598285806060288], [320782728170113651523385035156286792810, 12775494565758434661415309752110144], [21703993391307585489337661058624932, 16181349285331193418356710039750800], [-1493214789785427400162886897882979957170, -6852778227289845407889959354896896], [3673991622256517672325194940435052616940, -1470383646893505220978626725800016], [588650721339814912624825319623987397750, -3493737338551542625145180754254400], [3903941371320995887992713874376678635870, 27687932069899968619264739874272768], [-1020427484587799575192174355970586680360, 99919716525519460878360291919885920], [-7584461423580261353029869758289413060240, -37346787381064999652278689650849856], [1373939844335637939378475696188194741410, -130241015650018033154858317103750592], [-1339034517967455785166052019888690618380, 153978044321328567972930029638161360], [-7027573975677510686359448374961413269120, 41329553963480295682395593151190528], [-3564450981669621416338551725124571517490, 357370055363999964881981860638623680], [-15289004572695379967258144600956631539910, 106991960908998505449556444057694784], [-7335736029905081906228053601187821766798, 361072945081666236180783559004547200], [8574778412271028949693834441923593688490, -624732822064648806221013771251162880], [-11763978280045728402165665076416288557620, 1091449831872774540241592297592027440], [-3823346672220559235307533805563075402578, -818723553819590133154190639936174400], [52626466125885634116290549680121571031632, -1344608094076657380374087576046916800], [-5203582992929115458902238583580930540370, -39253943800858117418101730985478272], [45564112048424445576596712519240893108360, -552527940016823755671090123807057120], [-6790603861598141599948240217277219314100, 312038556508366834865295146304224048], [121445887075069445312091830066733699830850, 1143644109320932655675027861678121600], [-33988398603654421546729649973589995856250, -708471919441920274788364666243911936], [-44708932272502516678865491309574607222138, 452143876994651284852442448402366400], [-114233941148683324367285537226416549414960, -4959571537450356546868699693340382912], [315380230516930898437483250820944958738660, 386630117073517787858236818827040144], [90811468215578308157470085505505735871520, -5242129248892755655210993217374701440], [-284259137854526847796203310129577374450520, 11307190269843175505988108990328166304], [-268919044907512857024071171655933368346108, 10834087661166054895870006616819574800], [-831077814024120800285290405402673145924100, -7023965380249508529060769144864016400], [-147544806015601651597219162202500712644680, -873091633392307940127043943881100832], [-543843724185354752742324407848340625101610, 2642321589816775186548169421317104320], [673359581897480944653298029873334767582522, 3948550759396461116219671689303993600], [1504923998436299913869373160321733509784860, 303631072355319774998239935018461808], [2275590115764803489200039208266872514479542, -1924114609966146968707302811526740800], [-3162985139756478410499990474576034450403660, 11551680680915899571528864150901426384], [4137991222087245651221954742632854909061850, -24319177387164407621135114958125075136], [1320031668231021439372150349675529013046340, 82927476453869256983172431068966524688], [-889105501830989827546967705166240042753270, -41184275191321368368165924051814613760], [1037496300345925790405764140244985844440372, 176195579371637746790928488656127662800], [6349116293470666090181058130643362616734270, 13085186967280092831660693377995175424], [-8010439380638820001416362281451501500589220, -149085178957695071536664649302320894096], [-8481010286443387293081131215187129189814450, 194776422466235834324384276905148341248], [-5828006953226995227325435033724269514751000, -53412957006731831152911839202445890400], [8901581807280196418699193717404407315194602, -226346963070111688906269289242848496000], [7658835359016092846244775289914837063036000, -254370043950861236140812478381539486336], [-212287640200782366625522338674449665187310, -127855025792584673812044108792607403712], [-9214230944099493145050053482303076243203290, 195866034912589911346066067844034178944], [10453389758897293542865248411971749585442180, 59113590315831375959277774394194381840], [-10574663667513656593266273427120324561805368, 115376551438937647629346102343593274400], [26371713216347462760827176811923515262061442, 314165644380052246297223941071975798400], [20028983393403711743938189572685910471943700, 648567965474927594765303970324478740048], [-17906267988481959122100854398332052493912760, 544645585969396694035641188109441444384], [49742340302266926382801525648957980228902970, 586113631265407218384040236709090658368], [60731424479942747670795083268866841916008540, 285815278972498422814209823920596990320], [-31677781254911668006959783135442851148051138, 558637822079799284742194342089685649600], [18223896499718217336099760062530711692516510, -755864749949814570757408534810977892992], [59864187700452775164732480194504276705957970, 853876826038793252102140480890205634624], [-20479225441570086753289972425443877474449220, -1584698426567040638969508323706026982672], [127819977863151162916874347600028045644658492, -296026762613748634592803611374790819600], [-10710508379718413689238509937155803429137898, 805245812551116238746727196081412753600], [66292435694342326965507722039486238503285390, -3092583379182453637677220203384414396480], [-157698898663285026939225082814595899906803920, 1261145306007482708064927574359380495040], [145939973181348471850403726388713344483540120, -5468675695553285609117015956555556604576], [20862921390337892816872598063427205319051530, -4240058774181585962226940724366719553472], [4848420871648597591484350079038059403461260, -6739266491599130982235802254193374176720], [170103844394784948470203148958510226319154600, 1845320420332287295145501149330084486048], [506958734959465339704520568286868227143163152, -2313932408826428783710812964241547518400], [-94957520256825095000056063739087444031005150, -2258991942304764343926471703398197574336], [-1056924579470406917115899189812087694438838, 652122205988066414255671320074421382400], [31183303263816446189591310682743199668112130, -13051759291659249490573926218084586648960], [541203298193603433889379449371258146299711410, 5600109612563271340211825835689628499008], [145224629229731392065235518602556227672710180, 12900144002114626821867194138695351772304], [-297730070777660637781951885854296589559395510, -10182470161493960243020289877355519630016], [-660117930665393273935209997365565126722331110, 8460228536150541416580475931834281893120], [-795472324274305621267400288629961564508368188, -12273828482056662558510301921774158313200], [533481608397980504406306379505258299813637022, -14969300841189031847007960404524947329600], [-1089809433398681062494085140222887308493221640, -22870745227116890287303571407224035656992], [-1630006561927694163900099703735767908240380980, 9964315263240983674526798668300569605424], [-1536081708819806968429585237779419275102708330, -12870591514692277145760942536369701074240], [2307862670155502702446296239203639864575738360, 27488316190145831454585957643037649645280], [494840454972427891326246332761767283966659970, -58140278339905344113963802100770183248832], [71081400651460206020758456217136891112828950, 15528631487821550713215124096276223646464], [1506195316538121374419402377889061003443441940, -57319109947274518594888286883944664872880], [613052513796995876507008189759776960697945440, 64384220610117698439144579231449391228288], [1593095394549728882198721823036448439979410970, 19599565442485000754648636775069415055424], [-2288904622750851138456436623452526418528734318, 64881927264980666413267134110289442521600], [-1108711800214217209352298635135265851086545020, 39758007846707905243555968593404911398928], [-2497287027573362107732380549019000319944568520, 10858190680774399501181814550884198951904], [3966192088710095017427940295596427338750943900, 80580554008740393888161355010575359908464], [557456126387704583784213475403694586772902512, -231841062326891832059739884400905830644800], [1571990947833189056579360627165432097808589480, 241410503911670806758291611244745877031840], [-6508164894596850065487917877002394126994185630, 64108574338373296182671600289486399468160], [-12272781981422815555215781559360874495517878170, -41444809190947605460022916007497866234496], [-14373062137797821822756255172621505795634900058, 9642930085765019084845151389973379531200], [-9569832952441272107133626267313006931128153660, 256326543858125828330437484744695472243984], [-524388954470152173251888688692056387626101130, -158023276521629950439346301431131069720832], [22129432003852015935438053575385956943063821960, -222209900985374701426289020107880706194656], [-2265059921150446572168921955586263844234897628, 373768742964316359608423881494844361389200], [-1732363599903236438731844627844642225085646130, 352935276194937987425070541480542623511424], [1336598308870092292251598260048723846465641880, -272981901137232486500155903934404937191072], [-21390089568564588696624497257697283972923082208, -249450967453543457286940880751678578889600], [-33111091040065178952689699987845590298220313710, 28255281416415486170309022811665103185984], [-21000769319032735480988507751527754306922716910, -532053536245236575515713392384778446762880], [10739732491733095930588182452012317617220288290, -342978123641033137555086321749338304491712], [70103567717471919779899353959588539373883844980, 199575490585544097790243475063565639359440], [-33113667757097470280614584705909723037648097578, 574229952319005070496930777875860454603200], [21574157840072699285190116454038840136018155832, -494456900593603843455390191475541363386400], [-23656766581904615469058959523748043662898963770, -278534955269173675721950873626801392057472], [-10427199445556017823746955030211237649198401040, 1191047349485792576866274902378947507986880], [-7833926945468123437625299146784408852103400150, -1887304062910462199814592464217563224828800], [46487718942415154057124701056767733801456506452, -38945515701504761560637626842078349172400], [-69218731364480055550476871088367739822029213138, 1267208784827065517295039872467349440920000], [-50706993637665133950157071837677806958255687960, 696068805688370655054389515661044969699488], [64238103470640601105327481463762516510941928230, 74588869476377273929712496966219415170240], [114055540375737478941998504496010660261227042880, 957848167522731799923198954398384914946304], [-129765242320882026461289578211051922283233521108, -1148616411534333882346964405213658993227600], [-62131239868962503821991503855357143507060193550, 1466629083463743899617323180870168778006848], [59803440523233100948091602099144302752788541190, 139185023962836452906658898669451605209984], [-96098175470970078542766749520473942526707432880, 671592386390928032764207875483024476200768], [-100325795640614801247423812472492830595510817410, -3359931233852881207734937759852336863529280], [-64882698811811896923170382525030136760886076790, 1860772976381929178559272961468656368666944], [166308254066470495014793083331511380026725423860, -2585215626478944556043436600862229184927792], [71720871080696516255674733448643708817767422170, 3557893868464210387116210973876125199714560], [123209353136916872754813613824247697384633185152, 3365157960600987090723322462604388305088000], [-43004174637732338277191010781557565123018105730, 3070981661715778940852645604487497683885568], [432213050987166483058608550352770980518575958940, 270044838829196848892202768313071821349488], [-37859783818514036466257394544639378508510200228, -8225153420136701924219250403363424038650000], [175322861041169653801190670499612440861439888182, -11383170698444100276843898123694742004289600], [-242986261596552934467740174686693059918274147020, -7456170848754058579154494716179855100718896], [453167596205423481728963113555973469848016085350, 8364361441707355402736754445727674953854848], [163988862444929310239306957449169169499147410002, 7009587981193601160814772970625636226995200], [194822593232311900148756323871576656822665869290, -2435852134911657203365891581869746406622912], [185599176378837257054804457040828613144969477310, -870509389385775162617173843041482159712256], [89139872623165270573131840530093367735086407560, -13172863255869548371745943792466430839610592], [430894467024247318844845801036706998864548180870, -9541534664747993763929074904933123456799040], [-712371874240976010991932441064036553981407849168, -3144020321800635062335110940535664586747200], [415534245518808960565968533880088691997075292930, -773630340928799552382738164172122880616896], [1384917160916571720473109753324536548358919068450, -2763642474208070423451224366211924408115200], [1219071817047912222352003446143861269638839764740, -19061242373940085584971221845482914312055280], [-1070334093445229907290150181698963416100267177430, 10600171973348963194844496036835489265999424], [-1898392419808230627893956919341992930403256423680, -9242545273435292919952788381705884798653440], [354769679730804485707049693489593981386148447380, 5769464458699224721680355372235871208898128], [-604778052202945931399658414853787131092113486790, 34736737802815012351460338573827490293642880], [2181213195749765422491501485907035141374999019492, -4378669512208757390290106902100817031398000], [-47099469940009843665559466051048465544150836210, -2701808995670445553560557590082725055730816], [805106933265239282782297065218838019235001677502, -19618035700276664582218059696258538048955200], [1448704165753058069895923021763050528708852821720, -35661776205559662689922825659579025166576032], [134644019425202349859105080667995204165399485100, 9887762496817882797297500399441208223730864], [-855495590700849415332312945475395784703099295720, -1707837854439438893049004327397519961062560], [-867271313027088500410892657197273603521860527078, 56936154777586844354261454836343988970784000], [-2047769810037751468999607666718576706237267881680, 21697495441837817079784425722560065662034624], [2961425414333988320513877408680251906172874224562, -31470277079839560501528676050281696804374400], [4294664032507108902258815627582231606962268372760, 2773104557310150374667014009620252238946144], [4625885943618244015782273021013925912861567715210, 54543363179216702917521784639958971312748608], [-6872491238714592931770910976544606029122006201618, -32334622029774518407867820880907131482913600], [4982801205310210250549290093708274193462694886600, 16433884440478864258942198077054354272032800], [1638282869523279019522423356598849698138470697090, 54532705387278958907929805979724744627195520], [-3858895557841285531699697950161664740454817456240, -158017064574826021400689007107037645812780992], [-433152273512141886840584257096853516314010821980, -102307664575739668175976393264889945749432176], [4241801404128777850724194102808897627543670763070, 63224149099278846580200164661687100600896960], [347900846184222136760862141114993070057844767830, 279856792967915737779397663356682439436038528], [5703462664167508672951750424147107091083461540960, -42353154350649033778911193463980872876462720], [-960222521032935796044298757092540559254061246360, -41835680757346915070150688691579490559294816], [-4953635503288263356494443706207612011355442594748, 117632963151401633860933617587482226893565200], [8220728203765224585357084162270528177121910126170, 67558980110710100568032149827304880110690368], [-3459809653941287501350772501105718538104216325060, -208849194054973310521951725946973488370987280], [3819681226795828164977515777216724161236493700672, 186776048681774504106743860364051189266694400], [16269522572594442729261781972416665185684565129082, 213375887198309901245524945722142955766684800], [-18300619866352919927285242490938344382848283338020, 51589670694365865289543911360906191749481328], [-13540053057108909764061118060482828264459945526320, 31068891765255676587892509604221323700087104], [-17100353103344387045219137334453086109367969066190, 203362320827035980090029141495545201562724480], [9500368448730277383484719794463436559169433090050, -104760852985627348198483801133048654862889152], [-13872963167457211996463369805023998021879819867500, -2473365983429883543407190036549324192046000], [-5910996511079013805626115269543752238840878162088, -499721797444541386466510905791615344804253600], [19832685762720816441201793769259865658219158048260, -42932124195092927097348811676880005518020592], [-18314330247459245127079839097271426104020614371468, 467512801640825721973766694532246765814888400], [-14898149328108923338694725730188948035101273036600, 298874049798530375880752307473706816256700448], [9337325269223405594840139482920314448405882823750, -639121748269667643644319217043472399647803200], [-45720619312703048130667551952768608916922977727730, -200053857062839411807626127398889695353272832], [-5167667862355731674261279727122008214804691865560, 438569540041620236554507591988389046025596320], [-1934890568035750759051224280714763989487236867040, -787150305979603265010673362127792175450384256], [-52540826804682082866867094662866549072535618228, -231015869257231918347473570443333114688443600], [22950757831496608432537311814411107970891335802820, -92639679132478987609796354268950115197030640], [32712101772825663461427216044928881828839083704880, 498819768488442451245277127225886635662235328], [-17502474770345210132984005572602247019960372713110, -779731147971636515269580002676538501132705216], [-23632755792591251730576720242361741486405166798398, -841704051393969980067907335561477710715072000], [21729165807951507540741492169693136661760225038600, -35644983642739708711518369419588322489011936], [-28836508794341155964635501745042828927018203035910, 452766839013908546282196637602080460462894720], [30050665146007389428760942391430140122529573572090, -551586767727632048373929912365715480917362112], [24982931491889382642593858378074644611734920052380, -252483544220586820828197454827783365649705360], [-53382718630992292228689564927248005121641270760578, -61973943835083380724371026435497657117691200], [3860260857557173130516351006723960302346711370220, 322613197109857352358548532236708733628565424], [28566259261311320366780011545036490997851218381330, 908971897162986539787921353836346584153994304], [27402785700343862229245585341153361990153175076150, -396057469948409325567659494260312530662369536], [18295565447935730135374201121723722726770908851840, 1849639974617803196294004636099568393293593088], [-75499894523982794231086777063213961035469540072940, -153338400446207067736370526113746310267713456], [18183595094118498120707342184544314466482463770830, -96592090530065818516197947851688127622877760], [10862993653559723893833363036225002196791225077450, 948385577363976049754868401202344650084765248], [-110407692102105746016369996839918894665481661575010, 10714117725948116247636383409963789478451584], [-1451715107182992545164061596403116055467027093300, 3721196565277314914939881492335938466340638000], [186906799518665660086128741395257403614686304999590, -251621931217414932886136868251650613081647680], [37612814213037710233429029434549427786382248720522, -3398852677421052469352432957441658650498979200], [49358942004342817192535810316727716093867982474060, 1911839228178450298572821396911700967564207408], [163113580737152216018490023527689851984530332047730, -2246998931892218686320761517201432489788084672], [178149230531549903575518280592108679309829665124742, -110999893787519701120154826474257410986388800], [-67269091611585231883219456497651540359037860127260, -1082305934308133798418354641465124229905135216], [112824844651291966388761418877675136224796865778070, 4252911415075770513210567351843552387470775168], [-120211591363796471174676204013344544038010018420960, 3433077094381927408260648937179804005776033920], [-12440920589688995335533237205705155415099315392530, 3166962693798099283594846913979202163551041024], [-68590258046535454045454273750807358320516927560520, 2344527357978441760668279774734958572507778528], [-246252706792205936007784712640828629263192841711220, 3530925413081474899280014035188748413059910704], [137655942672821290325590018036503708181597075607510, -2058511940003504095186924473717485022538777920], [44189013825028081957785572970796832860424525638202, -325211461256005636546502865637866176908118400], [368733695104866709692487217843571761236054972827612, 4115180008053009186775037252752768747276870000], [-295342879206911486972706439584894453891981633942240, 537459040239031914091334579065166786546324608], [-164266759765922309500342142562847145085845978900968, -3785441344085373070971804398440716969040240800], [-147325000540541996243685895862116441885147312913160, -8739722803165256235065619041538044204180144416], [-674359358662889362411914023312776397755138780426738, 2182878437613029712364612152178365048020894400], [447068019345136600696327772418727492139287097274460, -8859034161502819013301630527702082950222695056], [390838212073741758269736725427940809577147731421872, 4076178548745072060549875709460146527835153600], [-559099440132406930983039438467801981357028591354290, 33402324563955321962971288224876255257332608], [583591828880428356893163140696875935419184422109570, -8166806787214378269465531445453922009720586176], [240292757773115980014975933918870375652819866930920, -13545317646636839196274029949539273467436313440], [346505146898005441555049633697015105889899066728610, 9809103397189390176811788273034664942526190080], [33762014531621126321460332933530131679622246409702, -11297858479838970862750913118547633633127412800], [325711190813984196347560317924019933843761848832900, 7818474600609144710508089926176557946410728464], [-76259602388418621264933136682835882593860171121610, -4779193966717637851041499199632016482055299712], [-482680060593369744888059142153772760075412642995868, 6469858525716629883555645458604644179149837200], [-602968130205998385791309707062283019853264732611270, -8670034079273745091619678106365773870496935872], [66065407401629403702108171950212194574775871568950, 18887096579325824038183923914300106474972536000], [240462999994774673465216303857749544668472630585952, 22002529743123504123808270140229646416112112000], [1169829600523033369983363997660118576855976929091810, 12026719528378749848002232749879376445563609408], [806557353478294030117232742154002447443774280119220, 20853498654943325676577652660664432638796849360], [82857654234997452281940280388246088025139517220180, 9451878880659248849470061723272466404879585104], [183780712738320859945581084236223045259101299618950, 27231009548909651074013074099643106744064328448], [-341859553626393839156010910931941793270538018789510, -46746577129602105279113118028001446884350913216], [-93298658562844619098875032942225618081727158414800, 4589018011459717201499037484787742902682628800], [-2192503620732686690194465855182026185653935070417180, 4913431289420536138991549729912380574335585168], [2065447425986027135239855985573105562605132006693012, -11371297899299025430939614567491685167884897200], [-997092681807065007634721653052527844044432507373090, 32663299981524200980890257859071712003747241344], [677229392947251445924713029749343765636186476647420, -24166141706815500018818892675707478391613468176], [491938172438933774274122316094933410665926254196070, -17538636510781029920866712559827286062443717440], [-1052490379604953451212042482496429313556776605619640, -12003569993805327230557791755719874334776919520], [-287229317942781613532890191026294517505150657962830, 15081744984272498390708149434713695450719048768], [-1375504099196959363179765810773428540971328416011760, -2151956994069833338234970150889846306613131712], [1327698013076067853099695299106913269047162926980030, 66460848320537221059480583347130391305399477440], [1774610967410405248372523368748173912082662953242082, 5871802371813255358347572153859541393894134400], [112590507386396978462185573795410041192514216064180, 12878181984819791438186661411639901095340344528], [2774482890034149577830178727767581158660291748674280, 49493442760317960029687979028572396303578015904], [952998563327800585486703760543968253328500487306010, -9325052590204251211699614600085493606570997120], [-995447913659328358786621051747879655152908560415300, -2907248584570095178623577172189516746671587600], [-3881340937590295412739243303752901481052988173057088, -16931177394695081941456845188888309404586656000], [918352866416063328409544053280128594278268030742590, -17194490376733477659799119805464217962380378112], [767330660764986879430004685289144815240835812526770, 55587687073590239447828521024433186967262376960], [-3223585706657723947302198697599861986247127988429668, 22205336590238893457636565432854447740503577200], [80063409953176149972262445701972147351143625598230, -29072456682118798141293416481350822803242276096], [515521392753069277420953406403078029221489927943542, -67076748428524347836425052268678938454586651200], [-4533561942254792861274312556791439385191062194679200, 38472232494500845362809481532469768260387544448], [2865819487353087451350477866729297165232965141592870, 111376786976523856320151063985435186729263923968], [3821293123435189280148190752906157770124244201327762, -18767249068744961148727640532759803716088188800], [4543761498764890729377009902857258170322866680458220, 116807758420385999550306842513938603739541616560], [9964791230857922201563562746163326679150431401714220, 29672152684217628800931496914243864770151035568], [-7961234773593559321642094534371006525551669353167200, 18941286618207238948654739881454914025775131264], [-1279067795581345006252328730169058535273713030344110, -186760397571604355959609431848146525492499512512], [1816058348737662341812369934628389733568560683885222, -2301503667930791690582730172630107048275246400], [-6407222184238469791642856534851544252037621615669270, -21148648077903888214832232983248018960168181696], [1875657284172431214829527647480404715535365859556160, 227853875393423564478206023390441602793913498880], [-365412884001690460148021082052250066364488378909100, 168445439202593474867698352619928524469499367248], [2676831331823793061664477793341102848950060819708452, 33016812151276300988730056005350349067303110800], [13309535562996800747340834948976080490531102596298860, -67293157866730418057887469402755918577622539856], [-3714452237433298573940839125752699555186229804936970, -95346320354878893914704452318029552121747639360], [-3941467953324842559444943584248615913174279357222690, -222826930461725363675724261970117171540954491392], [6955741023119432497666285212811252761823124522849882, 95478686616708059320945706209295511155604508800], [2320418118268567627023255418070759203436199297341680, 398558613587972650480748680806563263045831034304], [-447587026842028594899242211497331220881139335926750, 252473419678862603245803782177447304504772822848], [-10013046989332200485591174823390047331355959028443210, -106640456181418316465234844376995307560971074816], [412224086342622898506787332129171188183736342170190, -58475191076840907937967848521661753697374703680], [-4637701351123341867796367373508821087434098569759688, -208812465838477533282668662999485122994544135200], [-3631869588437239737079446675299633542678101916108470, 326797854571281670157530858898454687299502724928], [11147526730861068428258199909349191423501430170397260, 329288248099314118751371810803184759987452056880], [15327416839224967250233765290030575490675268434186542, 73902865768133762915972989579462406775103800000], [334950189303711663135426603585443663932816258958140, -524375402340082270730127236389381555671316947216], [15960183146273431842066606102685479977367100360108752, -85274312651184683823784696476978861285967774400], [-7679244323409805789484551371035576930780781789045150, 319369110031763312382406407375696230583502496064], [16356210392045417670555442597090293919392848049616172, -134806121898760163632333958113842844415805157200], [-21728723475995261147023308059171523574267032873652730, -255349320515805068864241465252977885816130053376], [-14694560922198530847658804429711013886280364647021818, -48633922072637005080223752773374003919483694400], [25604182560551653889182152426924624247814523594540880, 302292930069090801301311619614706976350242078528], [-15841323183964395413566397247277361523906328690671490, 154266084842443993518017139686272220230207999680], [-12683579785154268416723039514584418359942151614927850, 376254218339909523452437945072662774851933950848], [21222632025332028345760473949797277521693743594839200, 458447550974225803659758922892367190958257987200], [899082956483712541216390998344573448812094136020612, -398243310467900736264979957027527449612039420400], [2507626718330888157191013198192259772744936953676910, 29662595285907389115434261156177685155291138944], [9342284205970897142010981677270886697243162944296760, 201415919421421636380097379186558123739084375008], [-20613324330123370117721000704920928081878384320888270, 655473116244062844204281546177306808385394071104], [-8312887030666571043991229325722619718713379535372358, 379905969457024481156026152858324841780452112000], [3687628470815949954653586194800225230954230861181840, -4695839841379531264813413478571915218458158016], [13928702217874683389794333060174154069285011379350740, 658050885011434274527819468709118158872973315920], [-6308714827580127910403921655342639280074044834452940, -360968971546200649175926854403681098299158718256], [-14625439789411136290308147450915207333376404315924890, -594411735526421335061814518146863964252367755392], [-474805171807400807127048240944850380483860491409830, -230399027535761115500999384331136069765176477376], [-9913361651167405239517193712855491392404705714133880, 824607597132205495057237288936005017113725550368], [20332260296633980398866694557922739281768047827292522, -527558416193881514975194482391742060366877254400], [10558591030322220900345726454069369099514829055105932, -1417888029054074665243727144411449468398796034000], [4513902248762000542949540354586863736700769525971460, 534725842416687736623182088570668436222463460880], [-17798328521963242685810425926058774685774146210256400, 1753697410905176999470648188513619549673428685248], [-6775452734139340185144053335788747936486051015362850, -28630504280481627407394117542498403715144961600], [19127100310190286408900731639631790251505560674785352, 1480667207383949028100934681174336040014356039200], [59172403198342633808568959975741805685329045598244650, 44408551948640765760834146281816282378223744064], [115067532730431853791914434701905549550818865805952220, -534748258199951436318238967127675381710204625040], [72646118739251051181282754063754325626463753598951392, 1354507600853430696791164612748320725801163286400], [-216988689370373112034427278447695142176001601953250, 626505459541669685206942292245273206038943234048], [-174370031717559871768604624377717487089792908516779310, -41254421139607178727105580624989991703605034880], [13621458317491863063121517950677274595766243497841910, 154836573488379112387437370447643745141438207744], [-171880440434449698480091037796244943362001466582378, 440835740911885255238453316634675516535797873600], [80099417677107399916211806441245596590377822202285830, 779369047929034883155800940089461892080801859328], [-8336504059295978757580187142236628734212480884214760, 783322988882793714423829403260866092983489644384], [32357203296491163997248771865656366959418802503481950, 1892869267336406787738613038858941556720358897664], [-48684514832567148312225425504588844403193312943907060, -3459412776804428562431921945255783373951639088080], [-157981418323124364823584902664985752731171575650015960, -1509363619496251603596006500636837647889276054112], [-121030048971072913030495116662329786457662147829039728, -740954099902849790899372808153442179896032984000], [-131587075515798035085332944756679172032270769261492830, 1541848235044728995674116791261353522327691279424], [-40600925039730425645695708153967136180897890614284020, 145809578360656521939456069251414467974616366128], [-91216657018719869548586306529224286071271573358734720, -175347742337496390242778801457798033376491613696], [-182008426933752800454397625234930095527857278177329790, -1273054596125977918993549969866140146367851230720], [-148807114999266385738239823423777406211754664377683150, 1374146632546248291228934499325245160553613046848], [-15137520331837085244895299823233452633188707997350300, 4127050478164803614307443869122987221781684186000], [180686527402677994294448440017451634368954527066120100, -766867251678400256147826686904566873493513607536], [95513802915894764274857085491578428964969225767807912, -2346419801427599090677028768663931018689559778400], [-66655443015830590816432770488148026536429901340196010, 3190717691543560304303248439728646690583602181888], [-71878923332036623394536415043810212174902720251893920, -1518582576723629869605609908382631910228667192960], [-94817765946511452735433098746501622138193276573110630, 4198036516416811547593274345452026643182246088960], [16868279939659125727138624819060750248068270337617732, 1401386845997229838214402082122032820033543216400], [-80488031666889193566793321490010856155374245421119458, -754119199139041698205067272125825661040999425600], [107463021212694673393186573054791928514450287961302550, 3499763554515820497984472158123946037607739723200], [62259573845014669034530728905517074444324463080699070, -2564392779370103592321706296473508645253471496832], [247053328881325542639783236649388452197561408593662160, -1969892617793457926246056122147411066884990974656], [-191182612786555334885025657227656746291910294598733930, 3269438071994148854379470778142426444769698119424], [94015252646998528895636400519430903727397528043168110, -4516243096619410671074090940697987457012224691520], [390288418864113681795383725436011486429963790153787992, 185650114122081786074540496338757764746960380000], [-42176712348710470640219556959646067506926712883716710, 2738441127148682286517307476847831177563173413184], [60311947432922619967593417864614149053285095617104402, 1785989891996090281469917973021975054493297078400], [45502290704619679433269670444755851964921198287772420, 1500093151143981462273372779987038014279559242768], [252272183932190639116740171218435052771723727446588780, -1015464701444395382397936228895989620811690900560], [239072078755676940485326152828782868029682210212335630, 4667251743732548674166596708105087187031259043328], [-331028246748287317492210753488034800654883228461870270, -3799600803905165859798648664553433134622634319296], [225644130831049485430839381336534730388419846600521900, -2608720178819512682093905869859430981336635094352], [464627521403326433831956455858098298310169717120075852, 136086180045922141386689449037028506455098270000], [-292234835739033446041482120595737782944047640046874650, 2528284064707159726499368620924018843543059720064], [219382884524272429465360957675337323783798346151629862, -933846467747931310066311338951582507098805755200], [242846600682750953092928670677156734087661146365309120, 4868818397643528413168084755713697046761586031360], [567099691811555314285752281192072712653890793957545480, 2425680437224991230395736851259974535244459375904], [-442762236867056602505319878535968940738898769425509810, 3639523460191394446141374318792279534791320205184], [290159300835546708002790097276545628603447462012912920, 1686637850427218996873279002473862987449144547168], [-236678635317628205678643212755529351909787597435785610, 1347868285079259683373925271384285099287622422720], [-265901213916228146726326445980397807729796401303191790, -7347928260732578262169551948309172040766882833856], [365553034489507732418592975045783870359293151510590320, -10501844724681116319436598313808303291232658726976], [-454569980962415215649711157724359917381297713509308940, -8306226647044651662732959042598277055446040630320], [769977008389183651470125255625494666219946370258560070, 5990197087626139794307248737789734198191973171968], [-769295004999681026775928301623361153652349624572529350, 3827169640640859905121434731949232398204019705664], [132670862331975696391332816050306530098107916991307940, 6100676678236489929814930468828601859128878828688], [-611721076536369269554237726799504213366811753021366870, 2298658194845229416887677738108182656048298778240], [307255872218950827488514412603497158311012160118121172, 14713313759436555791826248599837819037579082200400], [1127500386371682076886211182077150671870282670564427400, -6402814362388307993180145075359340189634384690400]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_25_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_25_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_25_32_a_a(:prec:=2)
    chi := MakeCharacter_25_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_25_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_25_32_a_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_25_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,32,sign)));
    Vf := Kernel([<2,R![-2235350016, 39960, 1]>],Snew);
    return Vf;
end function;