
// Make newform 4.19.b.a in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_4_b();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_4_b_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_4_19_b_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_4_19_b_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 := [71754930984829630, 109263554839035, -2740871824195, -17082875145, 20786973, -835887, -10969, -3, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0], [-88793056460566, 2791956824311, 17028333372, -18180591, 868794, 10969, 0, -1], [-183524160977116930, -1862342586261691, -5640029463756, -9178232109, 212100462, 525867, 53248, 349], [-1178329490020766798, 326556690092287747, -174632082951444, -970946160987, -27079663422, -138717939, 1163264, 11435], [2323538655384380498, 11524748595809651, -70678087605588, 1232855754933, 14563817058, -19301475, -1163264, 2971], [-3111102958052283814, 14732116446484319, 162963069743580, 18432717602409, -15638480214, -477828111, 3555328, -27353], [-29061431548193611526, -51067895636057393, 23405771210053020, 18428744008569, -190583341494, -1646666367, -3604480, -3817], [-386322136343476179118, -3116216988267892237, -13315004464282452, 33370477920309, -422692546206, 7547727645, 75218944, 683035]];
    Rf_basisdens := [1, 1099511627776, 5772436045824, 23089744183296, 23089744183296, 23089744183296, 23089744183296, 23089744183296];
    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_4_b();"
function MakeCharacter_4_b()
    N := 4;
    order := 2;
    char_gens := [3];
    v := [1];
    // chi(gens[i]) = zeta^v[i]
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    F := CyclotomicField(order);
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),[F|F.1^e:e in v]);
    return MinimalBaseRingCharacter(chi);
end function;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_4_b_Hecke();"
function MakeCharacter_4_b_Hecke(Kf)
    N := 4;
    order := 2;
    char_gens := [3];
    char_values := [[-1, 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 := 19;
    raw_aps := [[11, -1, 0, 0, 0, 0, 0, 0], [0, 0, -1, 0, 0, 0, 0, 0], [107404, 412, 0, 0, -1, 1, 0, 0], [830, -1625, -212, 0, 37, 1, -1, -4], [144228, -281582, -7027, -96, 6454, 94, -94, 136], [-829399428, -5906116, 2240, -1064, -11565, -59, -160, 0], [26801771634, -139732656, -57120, -33796, 231506, 3978, 4080, 0], [-198258484, 396408006, 808391, -115360, -235566, -3830, 3830, 18904], [-870391550, 1743739865, -7363444, -572864, 2373659, 58879, -58879, -107516], [1400584209868, 8369709052, -5166336, 1812576, 31335047, -5166887, 369024, 0], [10135097264, -20285879176, 173527704, 6368320, -8476504, -200120, 200120, -439584], [-19886537299364, 51176592220, 33557440, 16942904, -97681077, -43575379, -2396960, 0], [56517846273858, -157662503232, -114985920, -45941560, 444474836, 51660084, 8213280, 0], [-226124931400, 451522490140, -12491192927, -112812096, -799969196, -9099260, 9099260, -22017040], [-354956213780, 710552737510, 35009178912, -221856320, 414851794, 12553002, -12553002, -21504168], [150825467277404, 2446020459740, -164767680, 412305736, 179388467, 1009679189, 11769120, 0], [2171804976848, -4358862449752, -309143961027, 1669289216, -12908193160, -214844904, 214844904, -245323872], [19584100735068, 6979854447548, 37231040, 1419556600, 747126531, 496912309, -2659360, 0], [-5658952202900, 11360854443350, -668400677341, -4246117920, 38377256450, 829865210, -829865210, -1333067240], [-19575023727274, 39075469379571, 362461952036, -9450370624, -79911935223, -933928619, 933928619, -2248653140], [3953987020103122, -34348076057936, -7396837280, -9214838164, 8432281890, 17223684266, 528345520, 0], [23559674457084, -47041367624306, -2211792569896, 11779375360, 86170108426, 1078518210, -1078518210, 1433520376], [54003124111680, -108130665729440, 4989695541347, 35206512768, -81115932512, -1382695520, 1382695520, -5329669760], [20163314821388082, 174377798622384, -148870386336, 29305132556, 776056236146, -44933568006, 10633599024, 0], [-151545495406221806, -653457354805616, 55987358560, -113144315956, -152420362614, -224664357982, -3999097040, 0], [365560007997020604, -793220352889764, -303434685120, -205581654040, 1025025106787, 199871040453, 21673906080, 0], [-101136887607250, 204689176617215, -9271194266796, -116687961152, 2236202124269, 40363717993, -40363717993, -18216118692], [-61224127034500, 121664848123230, -14824135820947, -26810408608, -870147584742, -24549480782, 24549480782, 109030191928], [226815085583162476, 745965166077436, 549088309504, 274400296736, -1412111089305, -902047787335, -39220593536, 0], [-419183907831008126, 2456410246348480, -1342168396800, 418192715136, 6791660625392, -46102611056, 95869171200, 0], [203968160952600, -398490864844020, 197861486275080, -143967426240, 8725977397668, 110548395924, -110548395924, 354415445424], [-3806636813042316, 7627599922904474, -83537570522261, -2565369721824, 11453731876814, 248488372886, -248488372886, -189781524568], [-10135221070233961502, -13012252867956224, 642835421760, -2803955460216, -7349163039100, 1514697733444, -45916815840, 0], [1398929778709672, -2833754372567788, 25488817714217, 1828048068672, -31830474685636, -413076905908, 413076905908, -1410138582320], [18498474030137739724, 9362421044704540, 19722237220224, 2943325559856, -95557580887177, 5524645265977, -1408731230016, 0], [25060470462331650, -50094645630962855, -1471776861558100, 14043277267264, 39401752608667, 402807452799, -402807452799, 131203453444], [42682904360102309820, 61959883107854012, -2980786271680, 14465457262984, 48591027707787, -20073292306883, 212913305120, 0], [8927732039082760, -18016376008590780, 2512864434763135, 9131145338176, -147000689015604, -2601046080100, 2601046080100, 421996088720], [-44319735732188650, 88671407991075635, -1741508712255876, -27768452255488, -5227379840119, -690441903723, 690441903723, 10776338090412], [109152435365635951324, -157905885513084740, 1244278486080, -32972347787064, -39345029588053, 506797509469, -88877034720, 0], [-29965130491422856, 60037029524863164, -74950401556381, -19136537530048, 93086361553332, 2958143703652, -2958143703652, -11370644473232], [116174593174991226476, 313683361785789852, 71325452298240, 67403735696640, -309217109540481, 40372284402561, -5094675164160, 0], [-4743705912894968, 9089331909021892, 16282208950017192, 6141557106496, -386117473036724, -7292524701924, 7292524701924, 8764162779024], [-165462669751639465902, 676237518893165072, -119885494183840, 133287337942636, 707259898721466, -8798088197870, 8563249584560, 0], [244770162351021278316, -199312619434152420, -102463318742400, -40668571092016, 542237160900743, -99864372207159, 7318808481600, 0], [194877619232938110, -389402247829434105, -9424189912853220, 109245251213952, 481201964387781, 9913330072737, -9913330072737, -38792736877188], [156099617040151128, -310503707400037972, 27830192688578923, 51295406148416, 1703052634135940, 28349806414836, -28349806414836, -12930160552912], [338088188752756240, -679466505955581080, 14650432197346536, 283339044492224, -2863437839549192, -46666683426088, 46666683426088, -50018199175008], [171782868761043200, -343235332904084480, 73178192421121495, 99365938773248, 475717650710272, 13306821949952, -13306821949952, -72560737835008], [-443830283902841380308, 2086887589447413404, 138718224788864, 432537231693616, -385619971232169, 164199857492569, -9908444627776, 0], [622205018712847901394, 856265089551983280, -231840939499680, 194465888458316, 1665647021348882, -378216703820646, 16560067107120, 0], [341687801025176852, -678819416054940358, 44271850905832872, 81585071416832, 4430442640920014, 63365041102902, -63365041102902, 80598343704360], [602967993185841894642, 225715204834704080, 1037948680828640, 191447569206460, -3920228044374510, -781511024611190, -74139191487760, 0], [-478408144810151280, 962740266659231880, -151056776248923795, -413923010688768, 5418931715365656, 107880017322552, -107880017322552, -124637721770208], [2191681836499441670242, -3004933374905724992, 1603523221090560, -541997698558176, -8477968017926656, 376503705655840, -114537372935040, 0], [55942772781738390, -112771779704925485, 51730862200462100, 2812427709504, -1291058683929815, -76320263934347, 76320263934347, 560277498059308], [-6060772521342314614068, 1673096843634072444, 3587541809975424, 893675228022416, -12792839761813249, -3226182114334191, -256252986426816, 0], [576329844717098836, -1136812477209020934, 223842162772000816, -62938644786752, 15166970324989518, 235226315048438, -235226315048438, 146850625303592], [-4942870129381676829284, -536756405715488420, 236206292042560, -352758414478936, -4461049253688957, 2994746891009381, -16871878003040, 0], [4748167905646023063922, 13510767212995642480, 2409046384090080, 2627421526271580, -13098686835163510, 4369175407867570, -172074741720720, 0], [-2806780999238349540, 5581925700546025070, -70738718428928183, -855193317000736, -31338778428931894, -480965473458654, 480965473458654, -190781871825544], [-1568652316692484401620, 6300198483334836508, -8910245402513280, 438738746645136, 39908402975272103, 2535778383221353, 636446100179520, 0], [-12988193265161883780, 25998313998452643870, 51189973117048383, -7930548842547744, 15183636284711130, 617030349337842, -617030349337842, -2420777697058248], [2823350091633610018, -5658002679690714487, -149270065062447052, 2054934967025920, -7853853883491733, -31562110462385, 31562110462385, -1330583352052028], [958907577345680681058, -29108416633015398208, -3185303098640320, -5782369855936184, 15510415559733396, -6276356522079500, 227521649902880, 0], [7352691956073660366220, 10312932784105099132, -8437063330053120, 2022491279912064, 47497107174724727, -5699888767419383, 602647380718080, 0], [10801163065664180764, -21541988897086793426, 383748640504018149, 4842749185090400, 63119734180849546, 937050806549090, -937050806549090, 186147632710776], [-32051211423295355356478, -20870712238845416192, 18579520930176640, -3625226339836336, -98614653892453656, 7400257453213160, -1327108637869760, 0], [-17201919375669592120, 34409444319502382180, 136068710331472557, -11039963163646528, -12476621281421140, -891632975583876, 891632975583876, 8825492232140304], [54625747437549426453100, -37017441610956500612, -20444412190702976, -11139369504000304, 63381236974371999, 21860193849227441, 1460315156478784, 0], [-45765317910461667348030, -57186050349362402112, -3224883964391040, -12807533705467984, -4684157754623992, 7079648452713768, 230348854599360, 0], [-29503387618899319282, 59027729632763402223, 4266182665584804788, -17697512894310208, 3593729427347133, 475761764551417, -475761764551417, -1288370885996516], [-11323240346228852020, 22518237786636501910, -264934548127180016, -3440766665939904, -127062149559304862, -1956984598496774, 1956984598496774, -707553730843624], [27318124197683766284668, 92523394133262970972, 53913158051300800, 22293063485014136, -244059445962702549, 12190478634441485, -3850939860807200, 0], [59570033543886475224, -119030951625684942996, 1669810349769392709, 32936195779631424, 144199497468542148, 2533680393761844, -2533680393761844, -7215200388426960], [37675514592369735840, -74816795558529993520, -3578423330455984448, 8861563851194880, 524659535644917104, 8269062148962992, -8269062148962992, 1897530117829952], [29249812555763211826716, -45371946883066048164, -1352916805240896, -7295893232457544, 25689912987249035, -26607769852142355, 96636914660064, 0], [86702714646198248519980, 62128370264770898812, -62230351727183360, 9875619776692544, 320598280696828887, -17351002777700503, 4445025123370240, 0], [-27062053037285662686350, 69579563682649295824, -41828864406204960, 2870724580468380, 100478015653425218, 99585926842009402, 2987776029014640, 0], [82325069903161939887522, 7595168714322085184, -27384792822068416, -9219622300969304, 17988354086368356, 101891761202413444, 1956056630147744, 0], [-169956522428984104404, 339455311776974266166, -576736883544704549, -88730136333590304, -533949578248998238, -7553828723351014, 7553828723351014, 2594018368167320], [-186361302499595023203444, 487693044795564857372, 39272144451384320, 106625781039729280, -58429194451857441, -20085134064939359, -2805153175098880, 0], [107947913784822921364, -217380623610525007686, 16206626624593731544, 98981713727759488, -1343991819398740530, -24327316053275722, 24327316053275722, 6832124353886504], [119107831707223391142514, 474838653751923860560, -48026131589303840, 87841311833943836, 222592213554267042, 91658004343537754, 3430437970664560, 0], [136466719415040865442, -272960101394218582583, 7865043044807867092, 79615682379416064, 44730000849614635, -1718865018112241, 1718865018112241, 11660847429174212], [89504369074953980260, -178635178395694390190, -26706396693273109047, 41441962505871136, 386941739754404470, 3615100315475742, -3615100315475742, 20829776334085512], [124654504778262747976850, -253909239829046561392, 18920919698208864, -7087733893432724, 421458628424980634, -517744983752826574, -1351494264157776, 0], [502094854362675063986946, -858399996710402015680, 321380244198681920, -165533279770764056, -1794843448263777852, 114231874413513316, -22955731728477280, 0], [-29801512498710071319348, 940168056939525750780, -487493395541496960, 161110489589918960, 2466597210595169615, -7303570595336415, 34820956824392640, 0], [-100661349194452049380, 203906491888870181150, 34603270270260946200, -122078829549697280, 2380758129653142458, 41165259482109874, -41165259482109874, -1373978200977096], [-467416109571049248300, 934958964398635729290, -5914909192934424081, -270732723816032352, -93100060810619106, 9856267383969318, -9856267383969318, -70599941236119192], [-375309616837174016656, 749058205430246460184, 44932738791008540104, -188526866826781504, -1755386778755659256, -32690814671279704, 32690814671279704, 71213297169864032], [-944220417649690841770, 1886348629894876491795, -14265606469062818164, -496723489248824704, -2472552758816427351, -26072907345756491, 26072907345756491, -64230320246076116], [1091842866698314586112, -2181432453533054725888, -31620233544220996343, 584944360592776704, 2763771295521363200, 35349170674559744, -35349170674559744, 3754587296740352], [-313186019188651953600, 629244879771262110560, 29197041958123345195, -250392247165168768, 2561001855484573856, 49851231730591392, -49851231730591392, -38255172152722048], [522387941167780203690, -1046447566936020947955, -46129697900722855716, 346744556281843776, -1276167318509883657, -27148480015894869, 27148480015894869, 5524234362976596], [422657070977450048967612, 1022598077562777617724, 1102767768985641024, 246859459675195976, -5517169329461278069, 565266449632737789, -78769126356117216, 0], [103388843926228986330722, 3190742301676783825280, 522158959816200000, 830345957900593960, -187228256543977420, -1444032310403228620, -37297068558300000, 0], [-1054315734348199430740, 2105643985692726305910, -38253223084986585019, -545850197089349152, -3442869229344850590, -48045616403126054, 48045616403126054, 5627261389197976], [2274932025033945254562652, -300136238197162321220, 2265402358250610880, 52196060286109400, -11241693129387463245, 614135215063549925, -161814454160757920, 0], [-2145715630543326502580, 4297484791103392283590, -130005472769418993573, -1417857753218412064, 4347498590922808402, 82373761399038218, -82373761399038218, 123426149799981528], [4614729906441431416930620, -3186834662281656148548, 8149365372657600, -689936456951509576, -1008280283732635933, 279925390024311957, -582097526618400, 0], [283711465558801208220, -578020608177324198610, -163834069255679176865, 390271033110321888, -10167976880763772918, -210646388546693278, 210646388546693278, 381863631245699192], [564994281372220926180418, 1095171582714732702592, -282981727555859136, 105777621446396136, 252779966919802772, 1187054370147072148, 20212980539704224, 0], [3309762237020908776276, -6620373022054854688054, -71659674170038460039, 1988743078217146016, 1393087532529709022, 18810188947158246, -18810188947158246, -290512845244015000], [-6737011715247125255648798, -3270937259877208744832, 882487728168376960, -437258397960560176, -2492577661514735736, -2104980026382458680, -63034837726312640, 0], [-2933166807546049264700, 5853655617702390759490, 102212901234092127741, -1462041607503765344, -14173221432199994426, -263474988461775186, 263474988461775186, 560132411912009544], [-5786619716408459077758750, -1643931298584255478272, -1782668826773103360, -677757060168433504, 5383045523614313168, 2343207599576169168, 127333487626650240, 0], [-4403990866621065704630, 8802296031872405265725, -9534220948960906540, -2402303093316009344, -7555924850073001657, -40023348549838469, 40023348549838469, -452032915869474284], [3606313324101352687631730, 8623909562353871757104, -730923238685291680, 1798637378461448140, 5817676253934924018, -573257893099957958, 52208802763235120, 0], [-602374125863205801320, 1222964595927641588780, -222599847115854870592, -828725785631205504, 16555541604540066500, 252894010690183412, -252894010690183412, 326288789678347312], [-5054840617362810424177396, 2218604330684337623580, -1053547598189076480, -105356459441992704, -840299065497796833, 5701666997518593249, 75253399870648320, 0], [7983226400605324691305426, -12920672162182520433680, -1157858900829956640, -2685064013683675236, 3965140896310463498, -1191727234652914574, 82704207202139760, 0], [-464956827294430736684, 906760316152966639306, 375659004085139592981, 339596642437152800, -21688500277797634466, -311768322985194010, 311768322985194010, -501704869689658776], [10398978961043549286634, -20783124285252731796051, -212317432128850522436, 5740721035156046656, 20139334572275352279, 240581097012948491, -240581097012948491, -46138896778425388], [-6089832477976798020360110, 6388294157052075616144, 1694089899274923360, 1815615292888155660, -2059970369705364502, -4110838148273975678, -121006421376780240, 0], [8276317954846925814220, -16544593021223474751610, -238832003198381044717, 4677656803085196000, 12635070170288380562, 151929852003286346, -151929852003286346, -218384600832880424], [-1084501698841572164810, 2190030162956883880995, 634911463231528797652, -1177236711559358912, 18953273394995168793, 301081206192742565, -301081206192742565, 294092754799538540], [-833431179960216344019444, -10584647705385880069764, 10106661004274513280, -975203082656653264, -42941621143116730801, -5679269531119770783, -721904357448179520, 0], [-918705921676636795952, 1858999262869790039848, -454589344335120131037, -1008202582205529344, 20386321059130169080, 413003028372473496, -413003028372473496, -633110181564197472], [-20693366234489993977360020, 15149736786826470883484, -4304447061711274240, 2418818100599860960, 17716946664849427503, 4994264726675012017, 307460504407948160, 0], [-1619732812977511836410286, -1554111040237056189040, -8892595273048416160, -221303579404097684, 50552853553692119322, -8851922274439397966, 635185376646315440, 0], [-28687734146705437332196068, -9820521587346819094692, -1944752427516575040, -2088991108731462376, 8341513446997033019, -1262385968864641635, 138910887679755360, 0], [-6723191485432468885760, 13499001857527456928640, -450365651078981994503, -5462019431910944768, 43526115640504648320, 555176031261106304, -555176031261106304, 2520399527581351424], [-568247232313183094888, 1058361906729083293132, 246418444062773548227, 1317869158286692928, -76518632891858103068, -1552248305455432492, 1552248305455432492, 2808440763772764336], [10706486702267235942452700, 18715777565595662694204, -2849413549614945600, 2820676731667268120, 6016754015663511923, 10236872307045642597, 203529539258210400, 0], [-25776103887882968284263204, 10614429370672216182236, -15736276435717719616, 289482141464888056, 65606183850031486155, 8868601488388365805, 1124019745408408544, 0], [23927263914536028273036, -47884559261274546081834, -400056698126959549464, 14337460836635196288, -18370102719865427742, -995190850623819462, 995190850623819462, 4666513055258727192], [1337204051106035427210, -2771747271752393733155, -3238761614828372938060, 3205641366247148416, -90691809398382207449, -1494839553274861605, 1494839553274861605, -452039669143799660], [29564769536899214017106380, 9136270739934132862588, 7421276394322792960, 1814635404357317696, -40667659882540206057, 7496277999375785513, -530091171023056640, 0], [-15350397104383308559008, 30842069608480132810032, 2333836531516162699767, -12726160032091219968, 121793692880685074064, 1918093308333467472, -1918093308333467472, 2919360184072463040], [6709559646738972764630, -13452001064419630913965, -649734509679293851572, 4966607103241465472, -24952309970410984087, -247791711539894667, 247791711539894667, -2467270444953145812], [-56578070334333603913820, 113144075208232380878210, -1707084607583312401000, -32757755393815906944, -43336122807480243802, -33792026258952274, 33792026258952274, -1419508968644708024], [-26236070293257308894721268, -42392729539866441598692, 31980099472448641920, -5331932118858855696, -142592701236902141481, -13502556966357454695, -2284292819460617280, 0], [21158139855470770996083298, -7998113026216330836032, -17883453537113841600, -1622629910913096120, 98645823048525187796, -15960743427330173516, 1277389538365274400, 0], [-82489794881094421701662190, -32279228844784996243312, 38539256551599753824, -6525896619685157204, -218755306982250837126, 30544343762166840466, -2752804039399982416, 0], [-3075812874768932510853348, 13707865484169698515164, -12462005748133488960, 1977218367249279896, 61122774763221034715, -396100726199592579, 890143267723820640, 0], [14356690799421747129160, -28728277801093763810140, 678067914596040941771, 9128600072745978048, -2392498046536058260, 178153605441695036, -178153605441695036, -3731411341870905584], [61010122130553452933211196, 204548229889864854753340, 50691483610443359040, 43642481894919726504, -228857797765899871237, 33526142640158047981, -3620820257888811360, 0], [-25578983482488666814967358, -6998244867212512339776, 46571380587358906944, 3814624720298103176, -194530152691258476364, -21206016785992553196, -3326527184811350496, 0], [-16408067872032881437692, 33334063635194085577698, -1310376730676751175467, -22193464263442068576, 480067768582203723174, 8331862921420088334, -8331862921420088334, -997067560163266104], [8789477883666630336850684, -256743315375899835986084, 4202903906931549120, -57723681194591346120, -127975859189125644853, 50438488147571281453, -300207421923682080, 0], [-38435582659680507991550, 76973913487529130465785, -5457134630512917363244, -26267097577707525120, 62993712467163295931, 170135945008343903, -170135945008343903, 13147086233226973828], [45932521176013160781100, -91749768078523515113610, 89143930548598134625, 22944123144794757472, 124625986260936155874, 410763281554104026, -410763281554104026, 12770883823556842136], [50955350316577148142086972, -107541510460642121200836, 71603727614310717504, -13292708199626063544, -305701469656371643509, -45151668725004945411, -5114551972450765536, 0], [-865515204836503432498, 1942646592978971615407, 6749933439579323363692, -4617988320152354560, 209246875004244227773, 4639937621122195385, -4639937621122195385, -11528555260676222692], [43689611467127379804663004, 201415206066512134875100, -132636897721537952960, 31851487372246454696, 652041269637606295587, 5098449850461937349, 9474064122966996640, 0], [8033704931931308077576066, -16334853605337927121280, 94568736708859963200, 4992917268271046184, -424569290715264567052, -16261836501089927564, -6754909764918568800, 0], [168646821106399835787768, -337298231206936369744132, 7035790970088522413053, 98629871822283158336, 90851440564014073460, -549286816075399644, 549286816075399644, 4288010753721715568], [-35321807037553871091200, 70683587630511592378080, -4446710353621359426920, -20944999377845808320, 24075792326445050208, 1536820602182343584, -1536820602182343584, -8120877504805350016], [-57600681280486236692887092, 322124189279326987825916, -11107737788498592640, 73089102243100090384, 201483287432781482655, -76029135615330884111, 793409842035613760, 0], [29937433682446739758357634, -201659549641710394253824, 180598945530602901120, -19542663772292223920, -763631854980501198808, -107305837721776130392, -12899924680757350080, 0], [172608265837753931768660, -345409017497420027095350, 745873596938714686007, 107008680908440891040, -70371666982366487586, -1770357219646332698, 1770357219646332698, -11564759582063514008], [198605791781505388832290, -397357137896235287449015, -11684590623844518713404, 122224586308301610112, -305882401181313493, 318626905728127375, -318626905728127375, -23661118326483115580], [-9902711229262787948960, 19519278524463799080880, 4518985932964405441713, 4061670709503663104, -248754811398652780016, -1078607558906820400, 1078607558906820400, -31170236835806733120], [-124921102247906363826652, 249826707915724038742498, -16218278289142782970112, -75338653862437296064, -111008067589002684410, -3198090113343352114, 3198090113343352114, 26569013864563181768], [-41372707327919075301454, 83325747766126185690801, -7708519140688841928004, -39068090573983715392, 517654181414433989283, 8470555963075783783, -8470555963075783783, 6669726373465815652], [341964312461145975596412178, 317098816155478555024912, 55795634739062781024, 59898714028752621036, -325552285129509323398, 122414435388394548178, -3985402481361627216, 0], [-150139347501102797313695534, 240019933171075903307440, 414152090354440194400, 82422588516265100684, -1852127302186658314062, -17881392396580358854, -29582292168174299600, 0], [-354002379505717296032624468, -263634834239199025071620, -74984918737227878400, -71949121426150617600, 150836591172487173335, 130714618591150778665, 5356065624087705600, 0], [-125115001778565022655220, 249535360218675929813350, -19467659050581022055473, -53885907608671925664, -705279044433864807758, -7997794429625656982, 7997794429625656982, -27254612769671301032], [163216058984482539998722626, 553776230348874211462656, -231827286029320497600, 111010746394946181896, 1347665211108080714564, -143754402003480758268, 16559091859237178400, 0], [247952338926762728570990, -495755162534806401076225, 41246056037375877753324, 143312689216602149632, 301082069918109681581, 4230484746861557737, -4230484746861557737, -16715031476174581668], [386805640349820935711056, -774687949031220881555544, 5065749460212387835921, 251165300621836730752, -808375743088259287560, -19526067683604312808, 19526067683604312808, 21924847498294510496], [518580946142748154766716338, -23447760572316474844464, -82888100578653730080, -27746588113597578436, 169165888462122489170, 193845711866504659914, 5920578612760980720, 0], [-83731140390204865738790, 168352899450108978890245, -23324326861489888919388, -74329970099077796096, 758935604035594500511, 9982591851984114291, -9982591851984114291, 37387911860606887476], [-321347980869474812337048, 643437481999379661626772, 2517732058565605626192, -206454822448180050432, 512766592065064105212, 11947517122703823948, -11947517122703823948, -1596188328614850864], [763149988728399382445254620, -1060962624724065714598948, -407184154073551731520, -279584076889362925736, 1320290068824014271867, 319708294919080965277, 29084582433825123680, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_4_b_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_4_19_b_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_4_19_b_a(:prec:=8)
    chi := MakeCharacter_4_b();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 19));
    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_4_19_b_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_4_19_b_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_4_b();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,19,sign)));
    Vf := Kernel([],Snew);
    return Vf;
end function;