
// Make newform 690.2.m.f in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_690_m();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_690_m_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_690_2_m_f();".
// 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_690_2_m_f();".
// 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 := [123904, 991232, 2323200, 665984, -588544, 395648, 1218096, -1331000, 1099560, -664202, 334467, -154607, 63837, -23240, 7870, -2342, 691, -172, 36, -6, 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], [1549826118063607120659003021232805291494642156032, 5225140661669375205285555164370811249139230291968, 622607271983409684779096401682879484832373967360, -483147768291760905349062526927756558114289014976, -431464489480858954687580550307519399851170793152, 3035956049991149007515722951863347636726687378496, -3015032770132490720570336247132985249587067970600, 2291180322330082103812811654466465986814027488048, -1328893369365126175318365051110918799688146133566, 659726584084588909966101667382497440332650008137, -299088772852651683742749780203532385785818735445, 121518049313199492391297304815678081733930715975, -43687587525915839278476640470582935406180795352, 14566740465765164000440156605799901062343964034, -4336632252389671050840457840012766566401288506, 1257201447317292448371397780166304865894695961, -307162303976548239835083051510777830110260372, 63430959104396850744060449519800856371511492, -10535170622241429769284244683393856692531658, 1624813749340759219512759617307091765875251], [948889241492114492024989224285998317561633800704, 5422339927900414195173227858072414579704880188672, 1450640805345867123888737084150724509732820988288, 290025106854570800143955595977058539554196594368, -1157972707411272261621854551512263139149470775040, 4854132666937308384423162026233681866963242232016, -4547601525046315260942018975428389964169154526792, 3404936970455408561522238116287065175826615905936, -1972115051118886366832925929733655394384108366748, 971299592637146758770501225953090806426180997815, -438984772465133575890718107143195331774678839299, 177910103079454070520969414506901585740915149383, -63950753835637496936735827445982591463928421260, 21376977972747105000898304290004387139676004018, -6330125045848456356869029899999247960386104068, 1836376014097741066206854044111424974372500825, -450707111979318009355966949276841429112826988, 93255838193061377652716254540218503865229596, -15400219481317003497846176939195631812651016, 2470931371964117321657503855067079666441355], [78927005794925967845611596949144574499295592448, 328489973128525478224269622549234223672924282624, 58384969371875951672734821412499584958325378688, -111607155975146211361513736827912784647600714816, 65139227750263121486972165769049919465175835008, 160125790557892179040062597949253070254666809648, -182225394926795953264874221564668212642286043624, 154158416571284483366787525540992436975510968460, -93474354699846132969261122907238432452575682390, 47295341560043803042756129318629789775011621225, -21943255327280926189859307126347825081095470681, 9068725066299190458422298715980183989286556887, -3317234538229088593911034652454277170907468528, 1121143430220546378953560302672647910005433606, -334513488825152230284960527432405898756325470, 98878639320871946447143260543331792708213025, -24651600369442675460504803707757532244681284, 5135852239439993027481987114448978011717840, -866614267382362982763974456153182615293734, 141924378010081909359972815230618288174619], [-7731233760240814153862310946541110718681070998528, -18732579861933267891139568156283775347566059897088, -4795610856020298683246392376954795654477082827776, 9224622354042521965556874626031412773063279319360, -9299796718788512714898152630614981306494215499392, -3491523028612932947971660124401790675092725828512, 6219020813054484360898173547901687506019021330120, -6152386651138590617938185930279713371191946142084, 3954491993968004072795681937147265837858992455564, -2056423176499007848307895074062781030095564969687, 980139185678906156191164083590143773183326977359, -413696893597481897038080325513711105016817612079, 152920898741047825643672818589466212951267669348, -52470890147289994875679590888589518912737967470, 15736599654952432649886046018086605141011983432, -4722020670659147113899569964351120160548609913, 1191505889056398204579706693497095835767695804, -251794596463888953678192758690380887175601504, 42463752574805088058707569245098000820560452, -7237359901976850821460395002680221886623099], [425318208895603895443696580265460619994849550848, 10465546719689125025088892504478100472554042542592, 6435719777206971243386577406161216396739710702272, -3239563099949476869162777663320479322145868943680, -3167774531854682068481041234038274466739580253680, 13448804113204137362181607925538369428911453853896, -12816236303455716352246872488073006010710763915200, 9535198019277094366870084997975665288353055192282, -5485799129983842651436284431285264090735975651972, 2699181788478889529564883651658538258548814975203, -1215649312909686040487991036920910439184123674221, 489812979014860414148324659994022823134269727791, -175781989741391890145563453888380268976815231168, 58388875050642402792276406876745162637931850752, -17309777219621643078950854890553818224631576534, 4988326546620230168288626339414911124440327333, -1216974301501114521724144613944859206734052108, 249569598865903481967542024913196790036543830, -41381123003669714995352915259791233281093494, 6385197704637210407916979970107409535480663], [-10469075696012516009232202586643992614045576932864, -32194168336366397651145748317664297204539923929344, -8025037217075324694066764462002654241633073272704, 6428106867866135394796006558763339548436090396736, -796871992404306764912925255057297612087712037536, -22255684866784126539158657506951409006813696563712, 22719303248612392830012446489008275427137398623976, -17995993178799171548243811337530027704918324909664, 10666549489189490605380606022932596338363679745248, -5322605312443120290913332995154293600342732290743, 2438495606678323843646008133370068361906848327267, -998442716212425728034307044240666698837694495699, 361982667946179994808693701429438188303342587268, -121758298789013487310400473391759066898511947946, 36191871927252936191975222708299183678732638704, -10603730801045044498728654005630746960158561325, 2624605469297577864609247916096178133112587868, -545634313319174973406883933306496363905044812, 91002657250452739858560874401360421049875356, -14814038095302928334480610635634070842612103], [4337548008073003482053371872431143921576380433920, 32682064945262559203159621742423487889095625549824, 9620509132331089188980722969120364834679170168832, -6698502379352543150993688527692457738536579556608, -3648313587072703762959461051913601751316959509536, 27752198619316847565364010738593695711986228186176, -27196166238592964412643854098093625455516457998872, 20785666284686594577205966003577465586967953011616, -12115864487081263911264883726912777921624835744584, 6000841089580045331729171087724939851305797703457, -2723861899072314411517589477890116153843199052405, 1105662395279941587807472770445059103998718427869, -398709953690147179956935257411468628684897745516, 133201287193694282487702825992063429404922163126, -39544049219158358880904874850842427359148965384, 11485131712837947646896133827234352367443902883, -2820953656251884839310761579605871386291296836, 582195271957793512950296112825575203324082004, -96841001576454818969082300867998149282679372, 15316523138754430720961215526310664991632777], [9124648491129725050960116544519472421742595625216, 20933930662929907230806330483379156062340537273472, 6728824250566300317570831479538219964644657621824, -1262263073663359642643420237288306855959942442560, -1659688222550797538370564621745547595982444227520, 16289438387224740826094295495693593522464733245184, -15697143332972964121822736900186267736698220594952, 12112378831771696344250755390959664494589034558016, -7119383440375595638081190790601810088015886172320, 3528884582734050427154677030549884009062384373039, -1606532413401861653720495581556384942604791730491, 655791280399459060989669796463413221321601889259, -236814594773927958962486372977003390171348824900, 79672080137257194590366753707285986697759995290, -23593117870346124214643425420666820673691805584, 6897371422804125829071658159219634222045859541, -1704543587533218891137717321721842727472799708, 354950987583011455025608549253262728058010124, -58687925586286398372328458688447427453221692, 9697573423805815997641308966295138884033503], [14346936565678963519972938010983262165635813912576, 56873264883418447655154420492864439461384332916480, 17626926305767298357782407532108169999795981207296, -13860419142642549736885367601096611469496758896000, 3825841063105738369177187027328265792682862648576, 36502641003669029401597944965721213176544642651136, -37879406149932973440533891343231483158083257547096, 30164998876805211118583097645267153106798953829092, -17935504421883084986060030115318838827936159864556, 8965392360890938743671171750210020082624363420037, -4110771872055184271839129993537288622502471126837, 1684357514586091876153621279818338381677926404021, -610518407710298236770818817431808915217654800908, 205553616215145238918351140646163472893630859682, -61103193708570662450064481312644560801657223944, 17900769720006823887588733504749804246590577075, -4429710773886421941954102944042870535978406036, 921666613363056212194239149948867234527352792, -153349006185110410548303962664960770388798748, 25016563114404815351546407238391097809508041], [13752284739794238254482414781333828821992637876224, 52077835445981614184361068802287515525811349454336, 22114050916816707624627265609103822670254621881472, -18176635266955288122695340201782559509938047634624, 5326769618957994016025400241946637741502761732096, 36282324346624190342870449155236752509257241905872, -38232486389980967491847417447335600710977485745960, 30558672077662045452459975219186746635235851582312, -18182232143841597624834424193031570984207906889618, 9095256192542428343445506157949294193993223982691, -4171074575559079756092946025853633216000214662847, 1708435659229362082021443571499776828017377233957, -619374965848652514256217075326316200806562644936, 208347469924862238257473974448149494751420065438, -61966254126758504844601433336313553304802112990, 18140459634953925844521670575129748714916517451, -4485761663274813988511616461478046264167817404, 932079152490804595500073786617127833079000564, -155288277904737886731382873137069302498666254, 25173691706494294056755941320157026212258761], [-8988204381510707822858892242684360466710265509376, -52602915211536441518016808286404731754062775079680, -23848285632930550718750576296393062939046273473664, 18706594779686167243204411483893785361700466706880, 165275090408318087084958092790281564427934364192, -42821747679029992218973110109575363330843317694496, 43660956809871196029824112550193034712824577088304, -33982857254910943064431536354357702186668034432904, 19962505219806468878651121491617868178057039299136, -9933432660136315388947132990302021413760739831019, 4525740881753793087405058537858548943743701971127, -1842317326085732755509646530351417431160306352703, 665650284189567201605448947778228793308695604348, -222745317627801149328129412436449213426980859026, 66206388582832348369925276809624324668620521496, -19268296754897594234934198417249330225444805281, 4739347944776378561491178667841828657630266420, -979328649188033096379045222163226938407535804, 163122095357865900943792453438894512884568164, -25851966406183222571624531721507911996430339], [-11381589576528873006848801986779435346848370648064, -58050133850855442594307035769618091796735811332864, -21876741624862515010422562490997066707339824302208, 13256909909672399010446813211935657139539056469504, 6260458611167420405795542461660443733565320666336, -50253721572812516442342847779141320324524545005280, 49404280536431673010274043926434792303974377557664, -37760080972634101050895088855359590777756037915652, 22011850474398788507779275752122969668958052357708, -10903383116935424258116435081512974154140549290541, 4947671061007183255516894578207299586120775731765, -2008408061486180514322602289507427001623278268277, 724051874542839642608649513718544016074007206724, -241867162029241073261766693014859781907344677674, 71801590234356617143133534376789247820713342088, -20849845392438874867600831854494082908614964483, 5118736138518870138737568415178246860535341788, -1056542761145888098792881556824073109190259760, 175641153898466218667540498225252043924826684, -27764655464262163869907840591073498790139129], [15053344257698424590848481183963787594447398347264, 66447661673684006491421668218939013403445751843328, 28613407537808677022553058896410254245944518292224, -18359532322774481426185477961716993686342266267136, -2368390729854184201918635527627177683671631075968, 54773002725878289036773603342572723394417420029392, -54932511972430331544033350537397144702293909118320, 42476631213764399299720480281319065015053661515620, -24909789917721089030283040857559542911682334560064, 12373851707732610530657399195396910315459474992739, -5631024989254260115852095475075955738858233394963, 2291688807790252234540711027357362567451369003935, -827210085746181107686865248034743555277979018692, 276942994965881098979859202990948793038611588310, -82246354030902085308320585862497117165400920052, 23933689055581684057034986980432031693934959513, -5886858723010067303363769695627020418368825092, 1217895356801812374145785712718763910671387272, -202342691727856168736014420291304186652028680, 32262791395858969602867748969078999678407995], [-23273345272870041302417262340785432730206685189632, -118250252041653296065932528037337522428774860880128, -43081787555646417611416268089343770992412448193280, 20348904962807317371848002851306953499140721286272, 16412389617696688203218058840227597245906329939392, -109118165418414931502591322027652425482901292335088, 105541070052911576817089533997857918771212704251832, -80338399497429530805100077380758893783183871651772, 46794566689660025701282598578180822746751672424092, -23143048044792054504006127642375560408371585284779, 10495418561574292287091361693983818987442682735083, -4259610475033667562570489215490341951922908456451, 1535041414683565939459733732635574670808383713988, -513174012457034701211412743864828024625794398462, 152197594037309208469385415147074618138362972864, -44208652108883293101218150025577216898033686773, 10862641647722186297638381299147649349645882636, -2244372603002049904276866716985418367691754552, 372465760263181698810754747764624073550853788, -59358720573826783771809045200504976353332991], [47090065206771699303677644015351268600701175483392, 221533929527909218954187703051468290929918466389504, 89245876565746161659816560507623036249809594548864, -54456455079483107047708585016881551352708212596416, -20195823279545458444975989713769140249718617573024, 196266871362092634335435542979792392448825738028864, -193691302802643153891160020460693530327564109662712, 148553236082703453657687111462003105970719431169356, -86736950960398533009271785234570322465978258466292, 42992093032076928099535761499937538992727198582783, -19526494583393306087307417638275893993123935841407, 7932018323236182734779782988264063079915055448719, -2860834859456139470630545031964786004874820634964, 956324257090720283526585852106410248342634987126, -283913770929420689325951118696100093033372662152, 82500334089356553750569123097018747333111039369, -20270131825464236063818695602205584844494374252, 4186597306972907650370004468215201513884300248, -695999218830088232167260022693237456808170308, 110372907574222303833306549001776787480575883], [-52641758929963682768848751202842919744462246848000, -231687187235963699269209128972463368890518845136640, -96869135837619531871898240915103059655459925853952, 65074632298032117728815080118200178395228115142592, 5969566534034096735545460785351188511953979970464, -188029053772857483853726093206491846458771368203264, 189190364510810612578013510499793603098192363121112, -146771821671649200930468364897915093146791922312400, 86159722979952134205266446923293655823635142643870, -42828196100223131616687181815716096929253273640221, 19503261975001091211942890189337972076706727795849, -7941430930116514695330350401703243427227723132315, 2868085879637714042107256043529816225129824938296, -960474048715009349266315538455177262553348442410, 285299114884435115851480335801520524671122599738, -83069877980173842923463905752193724754680435557, 20442778082205611795576090042598978164327213172, -4229789638170525719277704826110477158644478852, 703348844534043958506236090000838761132459386, -112208293441911371130595144962212069004374903], [-61090094209059458161783979913510002566991905809920, -265279955486618154129201342905156382954890803995136, -96495070933896329194629422962798703490573481145728, 74494275790590376772807000616772901024072520994560, -10982583269284534629046601171000724239725010668256, -185938817446087814001609557949816037110531854883920, 191648802837001167516815831982859927154190990048712, -151225573352443493309406734635155253703169387642656, 89452956398354641415147637725915819995183670945718, -44634519861699581541074525329763798393877163216525, 20411729556097456183282162815677746381707403393625, -8342356944278188533116890971084730697932909226947, 3019838302121110938565250301481604309252818732040, -1014093130573814633598078380309517741901291720090, 301473077038034800135155829106838093387034573826, -88087080034953125373708157786758900516332979261, 21742294002904808992288706105311313809810150100, -4511320294776781085259628400836137340339597476, 751140992670686759648938668188245343930682162, -121031374236312214987127994780004806312491311], [38760637807334529010633558341123614290418784706560, 155172716102750953440561214389546364059458849459840, 52692454032107771581622079885378003384910097437504, -41994067197534599947765788691185552882122483110400, 7922618864123661992266207495370910931707999039408, 105526663991579436609651172932517294308904815159224, -109093084163490700565535295371175290852756523621656, 86377747956040762914685543992351159485998169273674, -51179940378952659909862943418572967352039978021135, 25555218067126861918295838038806926775800114992235, -11697706846274324551500531292610894188659733196649, 4784904178043299353684085610769020366673353005704, -1732977241771769774329906149814430491617446122614, 582433378308856815992641921094756536025216666838, -173150766258155174410640380697741477500646865943, 50638280682118678327039157845192087288925914380, -12509847455679697690703411344606401037471088868, 2597773157766404317164509716306117520802097062, -432542517928934677816090569437273010400500493, 69954031899512062621486165570051175992790160]];
    Rf_basisdens := [1, 1, 1833273956360687088137644865093170395189120913664, 1833273956360687088137644865093170395189120913664, 79707563320029873397288907177963930225613952768, 3666547912721374176275289730186340790378241827328, 1833273956360687088137644865093170395189120913664, 3666547912721374176275289730186340790378241827328, 3666547912721374176275289730186340790378241827328, 1833273956360687088137644865093170395189120913664, 3666547912721374176275289730186340790378241827328, 3666547912721374176275289730186340790378241827328, 3666547912721374176275289730186340790378241827328, 3666547912721374176275289730186340790378241827328, 3666547912721374176275289730186340790378241827328, 3666547912721374176275289730186340790378241827328, 3666547912721374176275289730186340790378241827328, 3666547912721374176275289730186340790378241827328, 3666547912721374176275289730186340790378241827328, 1833273956360687088137644865093170395189120913664];
    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_690_m();"
function MakeCharacter_690_m()
    N := 690;
    order := 11;
    char_gens := [461, 277, 511];
    v := [11, 11, 3];
    // 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_690_m_Hecke();"
function MakeCharacter_690_m_Hecke(Kf)
    N := 690;
    order := 11;
    char_gens := [461, 277, 511];
    char_values := [[1, 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, 0], [0, 0, 0, 0, 0, 0, 0, 0, -1, 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 := [[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 1, 1, -1, -1, 0, 1, -1, -1, 1, -1, 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, -1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0, -1, 2, 1, 0, 1, 0, 1, -2, 1, 0, 0, 0, 0, -1], [1, -1, -1, 0, -1, 1, 2, 0, -2, 0, 0, 0, 0, 1, 0, 0, -1, 0, -1, 0], [0, 1, -1, 0, -1, 2, 1, 0, -1, 0, 0, -2, -1, 2, -2, 0, 0, 0, 1, 1], [0, 0, -1, 0, -1, 2, 1, -1, 0, -1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1], [1, 0, -2, 0, -1, 2, 1, -1, -2, -1, 1, 0, -2, 2, -2, 0, 0, -1, 0, 1], [2, 0, -1, 0, -1, 1, 3, 0, -3, 0, 2, -1, -2, 1, -2, 1, 1, 0, 0, -1], [2, 0, 0, 0, 0, 1, 2, -1, -1, 1, 0, -2, -2, 2, -3, 0, 0, 1, -1, -1], [0, -1, 0, 1, -1, 2, 1, -1, 0, 0, -1, 0, 4, 1, 3, 1, 0, 0, 0, 1], [-1, 2, -1, 1, 0, 1, -5, 0, 1, -2, -1, 0, 0, -1, 2, -1, 0, 0, 0, 0], [-3, 1, 1, 1, 0, -3, -1, 1, 3, 1, 0, 1, 1, -5, 5, 1, 1, -1, 0, -1], [-3, 2, 0, 1, 1, 0, 0, 0, 3, 1, 2, 0, -1, 1, 0, 1, 1, -2, 2, -1], [2, -1, -1, -1, -1, 4, 2, 1, -1, -1, -1, 0, 1, 2, -3, -1, 0, 1, -1, 0], [1, 0, 0, 2, 1, 1, 0, -3, 0, -1, 2, -1, 1, 1, -2, 2, 1, -1, 1, 0], [-2, 0, 0, 2, -2, 1, 0, 2, -1, 0, 0, -1, 4, -1, 0, 0, -2, 1, 0, 0], [3, 0, 0, 0, -1, 0, 3, -4, -7, 0, 2, -5, -2, 5, -3, 0, -1, -1, 2, 2], [-2, 1, 1, 0, 1, -1, -3, 0, 4, -1, -4, 3, 1, -3, 0, -2, 0, 1, 1, 1], [-2, -1, 0, 0, -1, -3, -4, 2, 0, 0, -6, 1, 0, -3, 1, -1, -1, 0, 1, 1], [0, 0, 1, 0, 0, -4, -1, 2, 1, -1, -4, 3, 3, -1, 0, 1, 2, 1, 0, 0], [0, 0, 0, -1, 1, 1, -1, 1, 0, 1, 0, 1, 3, -1, 4, -1, -1, 0, -1, -1], [-1, 2, 0, -1, 0, -2, 4, -4, 0, 2, 2, -4, -5, -1, 1, -1, -1, -2, 2, 0], [-4, -3, 0, -1, 1, -7, 3, 3, 3, 1, -4, 0, 6, -3, 2, -1, -1, 1, 0, 1], [-2, 2, -2, 2, -2, -2, 0, 4, -4, -1, 4, 0, -2, -2, 0, -2, -2, 0, -2, -2], [1, -3, 2, -1, 0, 1, 0, -3, -1, 2, 0, 0, 6, -3, 1, 2, 1, 1, -2, 1], [-3, 0, 0, -1, 2, -3, -4, 1, 3, -3, 0, -1, 3, 2, -3, 0, 1, -1, 3, 3], [2, -2, 0, -1, 0, 0, 5, 0, -5, 0, 0, 2, 0, 1, 4, -2, -2, -1, -2, -1], [5, -4, 2, -3, 2, -2, -2, 2, -6, 1, 2, 0, 1, 2, 2, -1, 0, 2, -2, -2], [-2, 0, -3, -1, -1, 2, 3, -2, -4, -3, -3, 0, 1, 0, -2, 0, -1, -1, 0, 1], [-3, 1, 1, 2, 1, 7, 8, -7, -7, 1, 6, -6, -9, 8, -8, 0, 0, 0, 2, 1], [-1, -3, 1, 0, 1, -3, 2, 1, 4, 4, -4, -1, 0, 0, 0, 1, -1, -2, 2, 1], [-2, -1, 0, -1, -1, 0, 1, 1, 0, -2, -1, -1, 2, 1, 0, -1, -3, 0, 0, 3], [4, -4, 0, 0, 3, 5, 2, -3, -1, 0, 4, -3, -1, 2, -2, 1, 1, 1, -1, 0], [6, -1, 2, 1, -2, 4, -1, -1, -7, 1, 2, -3, -1, 5, -4, -2, 1, 4, -2, 0], [-2, 3, 1, 0, 0, -2, -3, 3, 11, 0, 0, 1, 0, 0, 8, -1, 2, -1, 1, 0], [-4, 5, -2, 3, -2, 2, -3, 6, 0, -2, -8, 9, 3, -5, 6, 0, 0, -2, -1, -1], [-7, 1, 2, 1, 2, -2, -2, 0, 2, 0, -5, 3, 6, -3, 1, 2, 2, 1, 1, 3], [7, -3, 1, 0, 2, -2, 0, 1, 0, 1, 7, 1, 3, -2, 2, 1, -1, -1, -1, 0], [2, 1, 4, 2, 4, -7, -2, -2, 0, 2, 3, 0, 3, -4, 1, 0, -4, -2, 0, -2], [1, -2, -1, 1, 0, 3, 3, -3, -8, -2, 0, -4, 2, -3, 3, 1, -1, 2, -1, 1], [-4, 1, 6, 1, 3, -4, -9, 0, 6, 3, 0, 9, 2, -9, 1, 0, 0, 0, 1, 0], [-3, -3, 1, -1, 1, -4, 1, -1, -2, 0, 0, 1, -2, 4, -6, 4, 2, 0, 2, 4], [5, 3, -1, -5, 0, 4, -2, -3, -8, -2, 4, -4, -8, 8, -5, -1, 1, -1, 0, 0], [-3, 0, 0, -1, 3, -3, -4, 12, 3, 1, 0, 6, 10, -5, 3, 0, 1, 1, -2, -1], [-11, 0, 2, 0, 2, -8, -7, 7, 9, 3, -5, 11, 0, -7, 6, 2, 1, 1, 0, -2], [-3, 1, 1, 3, 0, 9, 9, -10, -3, 0, 8, -9, -4, 9, -9, 3, 0, -3, 3, 2], [-6, 0, -1, 4, 0, -1, 1, -1, 1, 0, -2, 1, 5, -2, 2, 4, 2, 0, 1, 1], [7, -3, 5, -3, 2, -3, -1, 0, 1, 4, 6, -3, -5, 6, 0, 2, 2, 1, -1, -2], [7, -2, 1, 0, 0, 6, 6, -6, -10, 3, 10, -11, -12, 6, -6, 0, -2, 2, 2, -1], [-5, -7, 5, -2, 2, -5, -2, 4, -4, 3, 2, 4, -1, 1, -2, 1, -1, 0, -1, 1], [4, 3, -1, 0, -2, 7, 0, 0, 0, -1, 4, -6, 6, -7, -2, -1, 1, 1, 1, 0], [-2, 0, 2, 2, 4, -2, -3, 0, 8, 2, -4, 6, 1, -2, -2, 0, 2, 4, 0, 0], [1, 3, 0, 0, -2, 7, 1, -5, 3, -1, 2, -3, 0, -5, 1, 1, 2, -1, 2, 2], [4, -4, 3, -2, 0, -6, 1, -8, 2, 4, -6, -8, -7, -2, -4, 0, -1, 3, 0, 0], [1, 0, -1, -2, 1, 4, 4, 4, 2, 1, -2, 3, 1, 4, -5, -4, 0, 4, -2, -2], [7, -4, -2, -3, -2, 6, 10, -2, -7, 1, 10, 0, -7, 7, -13, 0, 2, 0, 0, 0], [8, 1, 5, -3, 2, -3, -4, 4, 6, 4, 3, 3, -2, 0, 0, 2, 5, 0, 0, -5], [1, -1, 3, -1, -1, 2, 3, 1, 3, 4, 7, 0, -6, 1, -4, 4, 1, -4, 0, -4], [-6, 7, 3, 3, 3, -8, -10, 8, 17, 3, -4, 6, 7, -10, 5, 1, 0, -1, 3, -4], [5, 2, 0, -1, 0, -4, -3, 0, 3, 0, 4, 0, -7, -3, 2, -2, -2, -1, 2, -1], [7, 0, 0, 1, -3, 1, 8, 1, -1, 0, 0, -9, 2, 8, -2, 0, -1, -1, 1, 0], [-5, 4, 2, 1, -1, 0, -8, 12, 5, 2, -4, 0, 6, -9, 2, -2, 4, 4, 2, -1], [5, 0, 1, -2, 2, 0, -6, -5, 5, 4, -4, 5, 4, 0, 4, 0, 1, 0, 1, 0], [7, 1, -2, -1, -3, 2, -2, -9, -9, -1, 4, 0, 2, 13, -7, 1, 3, 2, 0, 2], [-5, 4, 2, -2, 2, 5, -3, 7, 3, 3, 3, -3, -5, -2, -3, -2, 4, 0, 4, -2], [6, 0, 0, -4, -2, 4, 2, 15, -4, 3, 0, -3, 8, 7, -3, 0, 4, 0, -1, -3], [-5, 0, 2, 0, -1, -2, -3, 9, 7, 0, -10, 10, 4, -10, 12, -2, -3, -1, -3, -3], [2, -1, 1, 0, 2, -7, -5, 4, 0, 0, -4, -1, 0, -1, 1, 0, -2, -1, -1, -2], [5, 0, 0, 2, -2, -8, 7, 3, 8, 4, 0, -5, 1, 3, 12, 0, -2, -1, 1, -4], [5, 1, -3, 1, -1, 8, 3, -8, -12, -6, 10, -1, -4, 3, -7, 3, 1, 0, 1, 3], [5, 7, -3, 0, -3, -2, -7, -1, -2, -4, 2, -15, -16, 0, 0, -3, 1, -2, 2, -1], [-10, 2, 4, -1, 4, -7, -1, 7, 14, 5, 3, 0, -2, -10, 0, 0, -4, -4, 0, -4], [10, 5, -1, 3, 1, 9, 13, -16, 5, -1, 13, -16, -10, 4, -11, -3, -5, -5, 3, -3], [6, 0, 0, -1, 3, 0, 5, 6, 0, 0, 0, -6, 5, 7, -4, 0, 1, 0, 2, 0], [-7, -3, 1, 2, -4, -1, 6, -2, 1, 5, 2, -8, 3, -2, 3, 4, -5, -4, 1, 1], [1, -2, -2, -3, -2, -1, 0, 0, 0, 0, -3, -1, 1, 2, 1, -2, -2, -3, -2, -1], [3, 2, 3, 2, 1, -10, -5, 0, 6, 2, -9, -3, 11, -5, -4, -3, 1, 2, 1, 0], [12, -2, -1, 1, -3, 11, 14, -8, -16, -2, 8, 0, -3, 10, -11, 2, 3, 4, 0, 4], [10, 1, -1, 2, -2, 12, 7, -7, -15, -3, 8, 0, -3, 7, -11, 1, 2, 5, 0, 5], [-1, 0, 0, -1, 2, 0, 8, -7, -5, 2, 8, 5, -7, 8, -2, 6, 0, -6, -1, -1], [-9, 2, 4, -2, 4, -9, -17, 0, 17, 0, -6, 2, 7, -7, 1, 1, 1, -2, 2, 3], [-9, 0, 3, 0, 4, -25, -8, 21, 13, 2, -4, 10, 0, -12, 11, 1, -1, -1, -1, -4], [-2, 3, -3, 1, 2, 3, -4, 12, 1, -2, 0, 10, 0, -6, 7, 1, 5, 2, -5, -5], [-7, 0, 1, -1, 1, -4, -3, 0, 3, 0, -2, -1, 7, -3, -3, 2, 2, -1, 0, -1], [-4, -2, -1, 1, -1, 4, -6, 7, -4, -1, -3, 1, -4, 7, 10, 4, 0, 0, -4, -1], [-1, 0, -2, -4, 0, -3, -5, 5, -4, -3, 2, -1, -5, -3, 3, -4, -1, 0, -1, 2], [-5, 5, -1, 0, -1, 1, -2, -9, -8, -4, -2, -9, -8, -4, 0, -1, -1, -2, 2, 1], [8, 0, 7, -1, 0, 0, -8, 8, 4, 3, 4, 1, -1, -11, 11, -1, 2, 0, -4, -7], [-4, 2, -7, 4, 0, 3, 9, 0, -9, 0, -2, 2, -11, 9, -3, -2, 0, 2, 4, 2], [-9, 3, 2, 0, -2, 5, -5, -3, 9, 3, -4, 5, 0, -9, 3, -1, 4, 1, 4, 2], [1, -4, -2, 0, 2, 5, -8, 0, -2, 5, -10, 3, 0, 6, -3, -4, 3, 7, -4, -2], [-1, 0, 0, 3, 6, -8, 2, 2, 8, -2, 0, -4, 7, 1, -2, 0, -3, -3, 0, 2], [2, -2, 0, -3, 1, 4, 0, 12, 7, 1, -11, 1, 8, 0, -5, 0, 0, 0, -3, -1], [-9, 0, -1, -4, 0, -12, -11, 11, 6, -7, -18, 13, 20, -20, 20, -4, -2, 0, -6, 1], [12, 3, -5, -1, 0, 16, 18, -18, -7, -2, 10, -8, -14, 16, -16, -1, 0, -3, 3, 5], [16, 0, 0, 2, -8, 16, 18, -3, -16, -3, 0, -12, 2, 10, 3, 0, -2, -1, -3, 3], [6, 1, 4, 2, 4, 7, 0, 0, 0, 0, 8, -5, -7, 5, -8, 3, 3, 2, 1, -6], [-11, -3, -2, -3, 1, 5, -2, 2, -4, -2, -14, -2, 5, -3, -1, -1, 2, 2, 1, 3], [6, 6, 0, 5, 3, 13, 13, -12, -4, -5, 20, 0, -13, 4, -13, -3, -3, -2, 0, -2], [-3, 6, -2, 7, -3, 7, -2, 6, 0, -9, 3, 0, 6, -10, 1, 1, 3, 3, 0, 3], [5, -1, -4, -5, -4, 6, 12, -3, -9, -4, 0, -7, 4, 1, -7, 0, -5, -5, 0, 5], [1, -3, 1, 2, 1, -15, -2, 0, 2, 0, 0, 0, 2, -17, -1, 1, 1, 2, -3, -2], [14, -3, 1, 0, 0, -2, 5, 0, 0, 3, 2, -15, 0, 2, 0, 3, -1, 2, 1, 0], [-13, 0, 3, 1, 0, -3, -5, 13, 13, 1, -14, 6, 6, -10, 16, -2, -3, 0, 5, 5], [-22, -1, 4, -2, 2, -16, -18, 16, 5, 4, -24, 10, 17, -18, 14, -3, 1, 1, 3, 2], [10, -3, -7, -10, -1, -2, -9, 1, -10, 3, -8, 0, -7, 10, -2, -6, 1, 0, 0, 0], [-8, -7, -3, 2, -1, -4, -5, -3, -12, -1, 2, 5, 5, 2, 0, -1, 0, 8, -8, 0], [3, -5, -2, 2, 0, 7, 8, -8, -9, -5, 0, 1, 5, -6, 6, 2, 0, 5, -3, 2], [-3, 5, 2, 2, -2, 9, -2, 8, -5, 1, 12, -5, -1, -5, 4, -5, 2, 0, 2, -5], [-9, 0, 0, -1, 2, 8, -10, 0, -8, -3, 0, 6, 2, -5, -7, 0, 1, -2, -1, 3], [-1, -3, 3, 0, 7, -1, 2, -5, -3, 3, 6, 5, 0, 1, -3, 4, -3, 0, -4, -7], [6, -2, 1, 2, 2, -1, 3, -9, -17, 4, 14, -8, -1, 4, -10, 3, 1, 2, -5, -5], [-4, 0, -3, -4, 5, -9, 3, -3, 7, -2, -4, 4, 10, -2, -1, 7, -1, -8, 5, 0], [-5, 6, 0, 4, 0, -1, 8, -8, 12, 0, -8, 6, 12, -6, 6, 4, 2, -6, 0, 0], [3, -1, -6, -1, -7, -5, -6, 1, -8, -7, -6, -3, 3, 0, 0, -7, -6, 2, -2, 6], [18, -5, -1, -2, 0, 17, 7, -7, -12, -5, 9, -2, -7, 6, -6, -2, 2, 5, -4, 1], [-4, 8, -2, 0, 0, -12, -16, 6, 18, -2, -12, 10, 1, -2, 3, -2, 4, 0, 4, -2], [9, 0, 0, 3, 0, 10, 12, -4, -10, 1, 0, -10, -2, 7, 7, 0, -3, -6, 3, -1], [-13, 0, -4, -2, -4, -5, -3, 0, 3, 0, -14, 10, 13, -3, 11, -1, -1, -2, 0, 1], [-13, 0, 5, 7, 5, 6, -3, 0, 3, 0, 8, 7, 13, -1, 3, 4, 4, 7, 0, 1], [23, -3, -1, 4, -1, 2, 4, -10, -9, -3, 1, -5, -2, 8, -22, 5, 2, 0, -1, 0], [2, 3, 1, 2, -4, -1, 15, -3, -11, -4, 4, -6, -10, 15, 5, 1, 0, -1, 2, -1], [3, -5, 5, -2, 3, 2, 10, -1, 5, 6, 6, 0, 2, 11, 0, 3, -2, -3, 3, 2], [1, 0, -3, 1, -1, 13, 15, 4, -4, -3, 2, -10, -1, 2, -11, 2, -2, -2, -2, -1], [0, -6, -5, 0, -5, 1, 11, -2, -6, -5, 0, 0, 0, -4, 5, -7, -6, 0, 0, 5], [-4, -3, 6, 1, 6, -5, -3, 0, 3, 0, -12, -9, 7, -6, -2, -7, -7, 1, -3, -3], [-8, -4, 2, 2, -2, -14, -14, 12, 11, 9, -13, 16, 6, -4, 10, -4, -6, 0, -6, -4], [0, -6, -3, 2, 0, 5, 7, -7, -12, 2, 2, -8, -5, 8, -8, 2, 7, 6, 5, 3], [-2, 2, 2, 9, 0, 5, 5, -5, 13, 3, 4, 8, 4, -17, 17, 9, 2, -2, 1, -2], [11, -9, -3, -6, -5, 13, 9, -6, -7, -5, 3, 4, 7, 9, -8, -3, 0, 3, -6, 3], [0, 0, 0, -5, 6, 0, -5, -7, 0, 0, 0, 4, -12, 1, 4, 0, 5, 3, 5, 0], [-6, -2, 7, 2, 7, -7, 0, 2, 8, 4, 0, 0, -3, -9, 2, -3, 0, 7, 0, 0], [5, 3, -3, 2, 2, 3, -2, -8, 21, -1, 0, 5, -1, 7, -13, 2, 5, 2, 0, 0], [-2, -5, 7, -2, -3, -14, -2, 5, -6, 6, -17, 1, 23, 3, 5, -4, 1, 10, -3, 0], [3, -2, 1, -4, 4, 8, -3, 2, -11, -4, 10, 4, 6, -5, 11, -5, -6, 0, -6, -5], [-6, 2, -4, -3, 1, -17, -9, 8, 8, -1, 0, 0, 11, -6, -1, -5, -1, -2, 0, -2], [7, 0, 0, 2, -3, 20, 9, -7, -20, -1, 0, -8, -4, 6, 1, 0, -2, 5, -5, 1], [-5, 7, 1, 0, 5, -4, -5, 11, 7, 2, 7, 9, 0, -17, -2, 6, 8, 1, -4, -5], [4, 5, -4, 1, -4, 7, 17, 0, -17, 0, 5, -3, -9, 6, 0, -3, -3, 1, 5, 0], [-3, 4, 5, 1, 2, 4, -1, 7, 4, 2, -4, 10, -2, -1, -6, 9, 0, -9, 1, -3], [14, -1, -5, -2, -4, 20, 5, -1, -21, -3, 2, 0, -11, 7, -11, -1, 4, 7, 0, 7], [8, 1, -1, 1, 0, 0, -4, -4, -7, -7, 4, -1, 2, 0, 0, 0, -3, 3, -3, 3], [-28, 3, -4, 5, 1, -16, -17, 11, 14, 0, -16, -5, -6, -18, 0, 1, 1, -2, 2, -1], [-2, -8, 5, 2, 7, -5, 3, 5, 4, 5, 0, 7, 4, -3, -4, 3, 4, 4, -3, -2], [0, -4, 3, 3, 6, -3, 11, -3, 1, 7, -6, 8, -10, 5, -6, 4, 3, 6, 1, 1], [-8, 1, -4, 1, -4, -5, -5, 0, 5, 0, -28, -7, 7, -6, -6, -1, -1, 1, 1, 1], [-13, 0, 0, 1, 4, -17, -12, 2, 17, 3, 0, -16, 0, 15, 3, 0, -1, 0, 4, -3], [5, -6, -1, -1, 1, -7, -3, 6, -6, -1, 4, 15, 7, -2, 4, 4, 3, 3, -4, 1], [19, 3, 6, -3, 0, 10, -1, 1, 2, 3, 0, -4, 0, -1, 1, -3, 1, -3, -3, -6], [0, 1, -2, 3, -3, -5, 3, -20, -7, -3, 18, 0, -5, 3, 8, 3, 0, -3, 3, 2], [7, 5, -5, 0, 0, -5, -4, -2, 4, 1, -4, 4, -7, -5, -2, -5, -5, 0, -5, -5], [23, -3, -5, 0, -5, 21, 8, -6, -28, -2, 16, -6, -14, 23, -18, 0, -3, 0, -5, 0], [-9, -1, 2, -2, 1, -11, -1, 0, -10, 6, -10, -4, 11, 11, 8, -4, -4, 1, 1, 0], [17, -4, 5, -1, 1, 13, 13, -15, -11, 4, 12, -14, -21, -2, -19, -2, -1, 0, -1, -2], [5, 1, -4, 2, -2, -3, -3, 16, 15, 3, 0, 7, 4, 2, 0, -2, 3, -1, 1, -3], [-11, 9, -9, 5, -5, -2, -8, 6, -8, -7, 8, 8, 2, 5, -3, 5, 5, 0, 5, 5], [-21, 2, -9, 7, -9, -6, -1, 0, 1, 0, -16, 7, 19, -13, 9, -2, -2, 7, 2, 9], [12, 14, -9, 1, -9, 9, 12, -2, -12, -13, 20, -20, -16, 8, -2, -4, 0, -9, 0, 0], [-12, 1, 5, 0, 4, 10, -7, -18, 4, 1, -2, 11, 0, -5, 2, 6, -3, -4, 1, -4], [2, 4, -3, 0, 5, 3, -1, -9, 21, 1, 8, -9, -20, -16, -7, 0, -4, -8, 5, 0], [13, -4, -5, 1, -4, 21, 23, 3, -3, -3, 5, -11, -6, 11, 0, -4, -5, 2, -2, 5], [1, 2, 1, 1, 8, -1, -5, -13, 1, 0, 12, 0, -8, 4, -9, -7, -8, -2, 0, -2], [9, 4, 0, 1, -6, -4, 14, 5, -2, 0, 10, -1, 3, -1, -3, 3, -8, -8, -3, -1], [6, -7, -8, -4, -8, 7, 18, 0, -18, 0, 6, -9, 1, 11, -9, 0, 0, -4, -7, 4], [11, -9, 3, 2, 2, -3, 14, -4, 5, 11, -4, 2, -5, 20, -3, 8, -1, 2, 1, 1], [5, 0, 0, 8, -3, 18, 13, -12, -18, 2, 0, -13, -6, 5, 6, 0, -8, 2, -10, -2]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_690_m_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_690_2_m_f();".
// 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_690_2_m_f(:prec:=20)
    chi := MakeCharacter_690_m();
    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_690_2_m_f();".
// 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_690_2_m_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_690_m();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![7921, -27679, 1059283, -225140, -174878, -1404325, 1534992, -477373, 199834, -177870, 76330, 21912, -6516, -2760, 3060, 309, 132, 106, 12, 2, 1]>],Snew);
    return Vf;
end function;