
// Make newform 10.19.c.b in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_10_c();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_10_c_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_10_19_c_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_10_19_c_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [20667093555813840346094397504, 0, 3470052491961139195356481, 0, 31233027106270421412, 0, 52963214026118, 0, 15200484, 0, 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, 18378248053675851593147151559929698471066032, 0, 136539371251285164830406333633322886757, 0, 225701258493109901998279256900399, 0, 64527456960583686051740367, 0, 4240228015797793237], [-122382031464672534721941178578761258925341793424810832765568, -1449681988711659296603795711959082975218258219419715114592, -2542075097483303874435118084627565892601379109527798814, -17389844246975240227073408464850642607317904309686151, -5079686634554860460812242999458650951075509125670, -31494307539747286727551004999341513005985849345, -1489359902065314628030075732150252663921746, -9130924773318024351510841137462337873389, -98534135581316341827038968263248202, -602507967169188803770724242885523], [-122382031464672534721941178578761258925341793424810832765568, 1449681988711659296603795711959082975218258219419715114592, -2542075097483303874435118084627565892601379109527798814, 17389844246975240227073408464850642607317904309686151, -5079686634554860460812242999458650951075509125670, 31494307539747286727551004999341513005985849345, -1489359902065314628030075732150252663921746, 9130924773318024351510841137462337873389, -98534135581316341827038968263248202, 602507967169188803770724242885523], [-2822228930146450552640071139925408961414698548854639093991552, 38790880087447554293351216141902086531480048958269411395296, -66693889388879524546867389934922812912888028051170956186, 384923231386540129074306754799021698817391135240408643, -139352730295631537912879800087362372538143297713390, 653310925126096391687040015986402750637684781405, -41329219747045430713382195905907460944866254, 187445646315530590185793678115967426251377, -2746476874814375923875171641648333818, 12329892849984189449759887899890679], [-4668474321478809260934782184766759955021475044006264011094016, -49345608383783646133108522874711067939258230815989248091872, -53210597456875816910634842291268824020504103381461157478, -624822622970257393267566668792127220977720841670729361, -80148613078723609151837903721621999040479211232880, -1151961384390227193842550172085226525097529839075, -22460189876517820862858076494846242148330142, -335062082729609591548283159617845757825779, -1466531083100934551703940563267571284, -22131971654698887920862216643160513], [-2058069615938782545502673708751113150415940857190585468035520, -29823159723135646001032589518835790007926718428756588339904, -23499135101649027514154392569427383891689407407030429859, -123648400917720857762352415598065379584884238807667256, -27554289505831980276598687419903566465423356899361, -148263654112701903752105301998069703750117289316, -7225278608244608918519943882241761711106201, -39727726085369238200138451107176402888224, -461096226358787516877080750334316379, -2558240449602282210749811080247220], [-6200308344983027062617458918239558100147103829881285962718912, 76972610503166635981066547884175931143759737583795799262688, 116166922688179035091402536910857605896770228887509087773, 769976322139436005488694181574136106875837381292634993, 267138682375274614285784261488252189243741893509331, 1278014091496689045719657188814081982342568441771, 79704967160301803040446544236818752174788847, 365101273394575055163480246525994258352067, 5302563561532712494632596017666300281, 23982576433489075473873369682124201], [-32150078455631658515707605276436234262625383900938062549078528, 238038744057004699950678327704603875070492125354899002388352, -262837506827874348899466772940908961792864945648674746939, 2317260365195060289508772193205860194900092432508662131, -338337916422687559124128349497964785118414342190600, 4150170895192730025894186922108513652325110020895, -91717369690759319982258270036656873278046871, 1202664484553488492351320812059090182575109, -5925354208972509557700425948824293162, 79359680582084506792792735403215513], [76453060631252234586551050916495896461618608904047714163599232, 1629902076183000039542357696089461458290118560848945358214048, 869955448631599878470526073231844726681385880948141729086, 15033518298921445332549684587916034120879339095326923629, 2018595650152753608530665226618428266280884726350130, 25074048926529979480257458891197707534713366980195, 610474278147113794909317485773931511634773354, 7173708063708893233707587923284408381845631, 40824148552524091060137481949422014198, 471473255593548971080851223068488297]];
    Rf_basisdens := [1, 1392203212957166293882387992118470072062153856, 10199414006776760593725856321850457288474987298733865600, 10199414006776760593725856321850457288474987298733865600, 1699902334462793432287642720308409548079164549788977600, 2549853501694190148431464080462614322118746824683466400, 169990233446279343228764272030840954807916454978897760, 509970700338838029686292816092522864423749364936693280, 1274926750847095074215732040231307161059373412341733200, 5099707003388380296862928160925228644237493649366932800];
    Rf_basisnums := ChangeUniverse([[z : z in elt] : elt in Rf_num], Kf);
    Rfbasis := [Rf_basisnums[i]/Rf_basisdens[i] : i in [1..Degree(Kf)]];
    inp_vec := Vector(Rfbasis)*ChangeRing(Transpose(Matrix([[elt : elt in row] : row in input])),Kf);
    return Eltseq(inp_vec);
end function;


// To make the character of type GrpDrchElt, type "MakeCharacter_10_c();"
function MakeCharacter_10_c()
    N := 10;
    order := 4;
    char_gens := [7];
    v := [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_10_c_Hecke();"
function MakeCharacter_10_c_Hecke(Kf)
    N := 10;
    order := 4;
    char_gens := [7];
    char_values := [[0, 1, 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 := 19;
    raw_aps := [[-256, -256, 0, 0, 0, 0, 0, 0, 0, 0], [323, -323, 0, -1, 0, 0, 0, 0, 0, 0], [-143613, -34238, -26, -7, 0, 1, 0, 0, 0, 0], [-7182853, -7182853, -518, 1, 4, 0, -1, -1, 0, 1], [-468461738, 0, 17633, 17467, 116, 926, 61, -19, 81, 43], [-1185852867, 1185852867, -347, -259245, 935, -2493, -23, -122, 38, -225], [5742509677, 5742509677, 496394, -730, -13906, -12238, -1269, -2451, 1999, 2903], [0, -104693582720, 2696184, -2671126, 85882, 37524, -10323, 4519, 1135, 11351], [-240984937997, 240984937997, 43083, -40659794, -518126, 457694, 5679, 7355, -38033, 35728], [0, -4070056481000, 216841962, -216447532, 2723622, -1252004, 62735, 164473, -59223, 233469], [4407689167222, 0, 32984561, 33171103, -6569396, -3774044, -91760, -221682, -403691, 530591], [28512654807177, 28512654807177, -4627305679, 652497, 4225541, -1817041, -66005, 426936, -586492, -121097], [22300124545582, 0, 5482767114, 5479783420, 88908400, 66972192, 3390366, -3799761, 4879490, -1486401], [-67409866380237, 67409866380237, -9403414, 7401429881, 135040336, -98624168, 3081682, -3727346, 6333462, -5676068], [-333224284498413, -333224284498413, -50001844372, -26688393, -168503722, -44817850, 13513693, 4754943, 13174700, -4681793], [-758744494373167, 758744494373167, 124491405, 16057045323, -498760369, 842523363, -44162252, 71092343, 18154401, 53399062], [0, -3372598217174000, -31800511448, 31914525806, 1218599194, -1708510340, -102863883, 31758067, 161738497, 141130905], [6470478021108342, 0, -116960951728, -117545859830, -2534337168, 874444182, 36828877, 391463872, 209496452, -52881099], [-10840390609781413, -10840390609781413, 731733274305, 54359022, 391735548, 2568862780, -214714982, -405494162, 160355960, 153868542], [19438042455117542, 0, -77881626663, -76805757241, 11537365164, 2527967476, 136096440, -1069316002, -123091971, -19557889], [-23376744402309407, 23376744402309407, -1468590194, -1841009184198, -1002831520, -10847969496, -1078098716, -34364684, 609159536, -1434225510], [0, -20272194266936160, -1803632305052, 1800483361444, -18443301456, 4050291744, -336718772, -1177373920, 687357276, -1620931184], [-11401323777950277, 11401323777950277, 1460215024, 2280747907271, -4101115158, 6690309802, -1747798978, 1560822580, 1388084896, -100607556], [0, 208959694965127280, -6232396159768, 6253531104460, 63068507440, 59767477032, -6361238752, 4087890164, -2628378878, 8057436898], [85354010574075537, 85354010574075537, -12218665838304, 10782674656, 58059002562, -108343291666, 2041762506, 14674939052, -12824437162, -2424283738], [250783596966127682, 0, 22425444213724, 22410726283272, 175299420320, 175449181216, 9429295268, -7104909398, 13824011180, -1430466598], [-117878043567404477, 117878043567404477, 11878819543, -16410388725118, 426692647982, -64141140662, 6917236923, 7744028139, 28796975455, 4134791404], [72014087063384107, 72014087063384107, -6464499640177, -56848687280, -275230546240, 427049797600, 9293744140, -38235666820, 47554943140, -9242679780], [0, 761936237259091700, -11413759677956, 11419113196172, 211189314224, -433406107812, -16140665381, 3358385308, 37684594670, 23539062197], [-504768438127417027, 504768438127417027, -45438044174, -44252079030462, -312859183944, -169903890168, -1809180873, -23356688131, -29525714053, -22081356043], [-3283941740472985093, -3283941740472985093, 119492173314444, -86195325929, -1149601674084, -2236272704064, 48111840937, 79731709161, 38083484992, 91294865495], [8033455370362969462, 0, -126482265853611, -126173761887673, 1854784082516, -371759028126, -36744346545, -121684380153, -77665436819, -72409802421], [-5464086090583769823, -5464086090583769823, -590475096419674, 47379353030, 2116896252134, 4657268020722, 100290270886, 86168147884, -147669623916, -423873764722], [0, 5023181289164328560, 422626743247868, -423398288702814, -2620520371606, -1481492564964, 248230310321, -154822077021, 41569253693, -326923813911], [0, 24395458636808940, 331221204559592, -331191267534360, -6532868235768, 10660774184708, -676083134787, -345938563608, -76493522706, -376701068653], [27815815493359667302, 0, -414479987281915, -414127850343165, 8981692027900, 4179804886940, 231339927100, -724821783370, 145266467305, -3921549785], [11995068608776016997, 11995068608776016997, 419749784858741, -1624295422635, -8034467170387, -1385567718641, 1318131320802, 1123887344243, 306164101833, -1094291070254], [-15631888184942318557, 15631888184942318557, 600793429912, -863821648047417, 12092109912832, -483062827296, 64744455704, 407981247528, 967808289224, 192812182384], [30301339686941210627, 30301339686941210627, 2055543336807686, 2282546700773, 6800812592642, -26735963604910, -753805863513, 1125672705357, -1528740837260, 1455281326733], [67244965803949318033, -67244965803949318033, 5945178456055, -199917954872255, -46360405221145, 46354586284595, -2996557942540, 3553495929575, -115993149315, 2391682526480], [0, 69798306502379486480, -726502058707452, 720534636462182, -17789342773874, -20240399821452, 963784270875, -1349517708191, 1625493993391, -2028626272813], [-146796702112938873718, 0, -363817297131644, -359856418401988, 3698508338032, -17561131932992, -1169128650760, -197003773136, -1723950360588, -870795945172], [-246261341087090105098, 0, -5115036480577883, -5104848520938029, 121981449420956, 9736224725796, -1548539419264, 157350892706, 605712454841, -9402483568137], [80799843336764613933, -80799843336764613933, -9358097168186, 1983888336923046, -30001563277410, -39413376264114, 3337507838631, -6392554984861, -6571564910671, -2965542183325], [172747234704575868537, 172747234704575868537, -3204288562955111, 19317829559921, 113927253046867, 27010166809809, -11529904905819, -6366344811088, -7787924654102, 6281175787077], [0, -395443711894064998080, 194516967272996, -217630637331912, -65801708301684, -87409602790168, 3030920298906, -5301069595998, 7404386106570, -7377294057442], [-632676461711770979098, 0, 1250586022222485, 1240240122579071, 33011297854404, 58104055386094, 2342796653349, 5065545879089, 6920986017429, -3983428906453], [-173423531677840482117, 173423531677840482117, 9926591924449, 148086998524652, 630662886675256, -75715454019236, 41564790295579, -9681381236563, 14869490559445, 19607973161012], [-59824655192034411853, -59824655192034411853, -26836794014446091, 10515516245770, 182516757211978, 521850384020414, -14512064861618, -31640544463352, 3996548615848, -11751797110154], [0, -918178037437502638680, 32360017031019134, -32402620735537844, -153810161090722, -154025676444796, -8902238359785, -14136773384743, 25162939958663, -12206229535089], [-534694507852168810467, 534694507852168810467, -60049262017820, 19693869324585032, -944994505467108, -72957753809084, -19835440178509, -29114808544019, -65146399041473, -30934453473801], [0, -704897341773066662160, -53009383544547868, 53079746976902764, 6416705928268, 618606229196400, -18048670624006, 8359056913694, -36011579629556, 7944125187640], [-2015068111025284844738, 0, -73456034724470710, -73434459026009572, -281985093037456, -254082264028352, -11893569282674, 2605612601967, -22287246015486, 9999504235055], [318239246187776657862, 0, -47192513750106455, -47149924867829605, -82726668272316, -191861244406278, -5812015694437, -31223250557065, -27364856501951, 21811240476603], [1709311453648251287357, 1709311453648251287357, -2641438729774618, 155368777010658, 889037234795468, -326829531128012, -56141398096959, 27782821922273, -99227378913699, 25535080308025], [-1685821143043954035397, 1685821143043954035397, -150044185315173, 95539144862814054, -1663139958366892, -484416690456768, -75895636303823, -47019055445389, -86798179204245, -103025129869784], [0, 1092502431421415926780, 116286282251235020, -116272295310440888, -1046696349150968, 1888978445303388, -86070915234967, -48568883125468, -43114113223136, -66629204538503], [448944885069170329542, 0, 106985253280249689, 106602943767227247, -1189353992484260, 853896414816736, 38113437551118, 231487077026672, 154672633168805, -41963634724153], [1710663953642699336517, 1710663953642699336517, -192183251300235953, 48046331975831, -78429971574557, 113514620544417, -130850941583700, -196581852112477, 82804609607869, 164998339741884], [2011772935656701031342, 0, 164537634698973390, 165266716706031056, 2675889718253296, -1835590891866940, -127134876383352, -235937142147371, -252800767768594, -113209220758349], [-2463129246988590775477, 2463129246988590775477, -176257705543886, 321230802223790937, -274640057455078, -1207231937937918, -110211366853328, -17415926755550, 45013043603366, -158841778788336], [-4630726505415835800867, 4630726505415835800867, -257836819794969, 107137336108483049, 2017476141222823, -2818874860218437, -255305397259307, 65297613623970, 331550913191174, -323134433418939], [230276132080941761307, 230276132080941761307, 1138144399403573837, 817019510274042, 4335790694814092, -2988114823547268, -284853104049166, 198627279676342, -532166406224876, 187481059050430], [3183737648581552149782, 0, -314330675536464259, -314354224459570301, -8372120843484852, -3758195821554120, -69894774831926, -155059992329048, -376518778377847, 625022468644863], [-8693122406626730751507, 8693122406626730751507, -819768720915320, -1084295670714756468, -4892170646665206, -3461688059360238, -94862023891533, -374396922281653, -422171217360691, -445371798633667], [5937609995955673297077, 5937609995955673297077, 447256470668866269, 531785016611141, -51264488501805, -12010402121701927, -153009613628012, 458236694621435, -378775402983129, 617951424160648], [-25649550240090650656778, 0, -903907331693695907, -902587011488525625, -7281062650912636, -9469039198308314, -420546700509775, -386546576499707, -988026575443891, 474799647283091], [17108846320035878809377, 17108846320035878809377, -588619233080445684, -1901728078797124, -7108455456277680, 10550886977533888, 1183957101053208, 355619956340680, 717770977743916, -1405089434990432], [4595120303464853814067, 4595120303464853814067, -357657453472010145, -1162982767632872, -8398805824824630, 5229137963992694, -279332552313936, -1512142469138350, 1442315319946808, 698343358558724], [0, -23420283295885233464840, 1251404482952027458, -1251691123195562644, -8401624981449302, 5763938818897228, -2043227177162379, -778449525292925, 1402616618455837, -148801276948803], [37172836084308786817953, -37172836084308786817953, -749730624280136, -300247038849997136, 31209474803414044, -13899216961881412, 818104008611508, -308505092231624, 1593143804625168, -441225532048512], [0, 19505655939018087667760, 1276588227730285440, -1276364358651344652, 8715272406336912, -9376042402207416, 1453952905264632, 637944415355844, -691931767517070, 347945801332506], [37426315563992793883547, 37426315563992793883547, 1176534511324412112, 3956670091081283, 25981430199818436, -12329853599318328, -196713227068387, 2981898821355381, -3759956864012896, -965976404109869], [55481535194568239890273, -55481535194568239890273, 2907523406135973, 498551085445049467, -16890247867465139, 28520121025615025, 2308477182966420, -321434588698699, -2805265389832601, 3228957994834672], [0, 20277791841677213148160, 586679059890901396, -581018925416653942, 6067308820381910, 34753096656832284, -2428407611219609, 605907493414993, -1209756515271991, 1416062854340861], [52613912830974934629243, -52613912830974934629243, -351062085919159, 1107008450277848596, 24678592020675912, -19360564630903540, -4057415430214685, 2538049608198197, 5277541352399933, -2889111694117356], [0, -80014029289674845533980, 1983937461613460932, -1989579536232279064, -5791414599000008, -35511595235074556, 2331580438776687, -617388788285156, 1330395897533200, -1362709494223089], [-43115601987184971343943, -43115601987184971343943, 11087596334964107639, 5137812179833807, 35275387349222597, -11275845606452233, -219963422651401, 3806404437012372, -4917848757182406, -1562998372385865], [100024019816861273710242, 0, -5128773611066862724, -5119926209714098980, 25387879773967440, -21908738441690552, -1072230376991036, -4817164217572224, -3610154672163460, 652147913962976], [0, 42616863776331170834100, 1354867431780500824, -1348216561647637382, 13828333006490284, 38887404718034264, 8842350595103, 1582479194365640, -3664073123022809, 1413160166070096], [0, -44868015100725446060640, 1253098615360158124, -1272237726052214274, -21108292226919254, -136062299153521932, 3278055828300265, -3227014992731001, 9244494410559691, -3389545460465193], [256581602127345220369862, 0, 8134022227842720120, 8127024748512045298, -70958437393709312, 1300161105994410, 1483910873174799, -895991574737478, 57001379449508, 6352558652787993], [29922438287312983539622, 0, -1178981809073037895, -1188854423857866817, 27676856031324220, 86417983511062296, 7015282308972298, -11608240785627788, 4501298748874645, 9964274512609767], [-55474125909630884528047, 55474125909630884528047, 8012418499425772, 4399790712715058820, -171646057429914478, 93460806081448914, -7689887142400436, 5188115151120358, -5464035528050626, 2824303348305414], [0, 343964069242470883236560, 10205071909396207256, -10192711249645513212, 44948396996411824, 8359793247857656, -6337502566564784, 2012127499060524, 2182525503330598, 6193555188399334], [-108684825080506253051637, 108684825080506253051637, 16944542832151226, 25901014616276161377, 82971249891713186, 93329312976717162, 9299302422530392, 3282219377820354, 1120616069860102, 13662323454330872], [0, 295606609441195290206140, 11128246034839700692, -11091268683859074706, 98422630998644612, 106888320142619232, -16509981916587851, 5535496516167580, -304076573092957, 14627795974777598], [-293997541589503537464963, -293997541589503537464963, 19616151627576967132, 15345718228137672, 80401151709680698, 13785949772249950, -11286667728144577, -8587547073345747, -4059050499993095, 8566808037756047], [-32324798403049586373038, 0, -12144047632605795980, -12126362527111045568, 17408757337874624, -60895899810819504, -2697221670686500, -9412624496997622, -8661736761681916, 3086477434615626], [67403259720526648493603, -67403259720526648493603, 12152753075416161, 35777261422260004052, 126337521662184714, 12501065888363086, -8045278947727579, 11758306597534733, 18395468941386185, 394446477881428], [342481424315935788661027, 342481424315935788661027, -4698828789664748087, -25145354648963970, -39232895886045506, 408950308340301562, 8758898388079166, -14694374142868836, 16386456260884804, -22892530928205562], [0, 32530956472119224086960, 12174796703733298208, -12242662539536617640, -276700312271302060, -44640746140715152, 20154246837468762, -15372392717396134, 689160457088, -32338507087997448], [-134663392263247341669333, -134663392263247341669333, -18749643364227738958, 41985622346039553, 307071154108793720, 166840744141159404, -17628913454431021, -3706018729461305, -24356708891608532, -3238714878846611], [-356137625605586522758378, 0, 23286372417083059901, 23272848108889167351, 209001541976366500, 99806587725629870, -3185601765855275, 36157862116008065, 19838902721495965, -39286854877756205], [0, -144717793252310898682720, 29067368619256603972, -29086970042527852482, -167869255837146446, 43300929808076292, -24105837288432875, -14068367463885309, 21340339628197279, -8298553467598797], [215901510719030334846723, -215901510719030334846723, 17323616524625163, -48495783008073733306, -314854306157919858, 139301672466161338, -37111709375612017, 23743695437372759, 9847825386389435, -6420078912747596], [0, -1172317959016613366794760, -21590876282050870918, 21704560688051017924, 274127722270807826, 406911440587948844, -45419293717976391, 17437641427290551, -9937455855105523, 40890014999774541], [-2652539477346618066316278, 0, 14759631309650731620, 14654391663843820616, -449230389657608000, 208440347800627832, 13744337559458856, 46571343202561594, 35184532977482660, 9739432067407894], [52835309220080033115963, -52835309220080033115963, 7898036868492326, -46297909870143691179, -459298776103295978, 112452434349970350, -46927104540813940, 23048448064993922, 5591957506357078, -15150411196501596], [-1295668482153884343931598, 0, -24784813089050952068, -24664369215303772504, 309426844352520736, -418598000609350304, -30165572332096444, -14453972975143574, -44728753097843124, -31095575342096422], [622308996637017780053907, 622308996637017780053907, 48099891839267630853, 8561274593855594, 5433360788496114, 4562140985173334, -16768758722923082, -23103128901276136, 8207484129067488, 20514986624351950], [2763777973274878354710057, 2763777973274878354710057, 66161723562361900455, -63159492569596337, 291618474673524963, 1940724184369237353, 54258922239883621, -4928649479067552, 8900570329712716, -154832925018360535], [-1436452262455462746410157, 1436452262455462746410157, -43815731515254444, -81714986559464478829, -434240362051083252, -170981322854148452, -27575622298925032, -9858197221815100, -16810767676416676, -33957534293439344], [0, -449246275731096235667860, -87852576288569178376, 87290875470043314126, -2103259469573538940, -792130817798229480, 154589607078333785, -124610221297119240, 34931128443651845, -247569861706759380], [-973803977716057160170858, 0, 165815806794770367985, 165847200342320817083, 200950860206549460, 124996177056290406, 19487906781607073, -90744242352630583, -16583748232584815, 56446536253159227], [1363557643700575453090717, 1363557643700575453090717, -34209278724652717738, 128968305055923618, 706209269778047840, -836146858453283136, -9556178022856051, 103408319690094625, -119412127033067567, -3339080617377731], [3095592470360034000628467, 3095592470360034000628467, 82863736399201033419, -34517015241900924, -444442360556359542, -110220660909318778, -39919909866786280, -93271619113649062, 74436925108687204, 82090341590435124], [-4399767988435956926730047, 4399767988435956926730047, -31483883380654372, 6120330323786953860, 860375129131765868, -53000120886898404, 211847337728833456, -120915770792206068, -117916411742054684, 89431887411551696], [0, 1392912561632216484227680, 32166860635304596124, -31911964541857728888, 766544633411493244, 471708864299772568, -136040700836478326, 35517517276496178, 31807330608640510, 115145205942533242], [-1049484837104492063111698, 0, -117888991800795034242, -117939540553967103456, -1238859706977406064, -358459708015012340, -654755015565252, -4113189806672311, -31351831439402674, 86668529433709451], [-1458328577270761581844173, -1458328577270761581844173, -9090493600729925168, 161388979787300403, 970890623588105542, -1130706173956270650, 18575372990335057, 185324239253309747, -179964352777635460, -45006346019656597], [2740072622797130531766573, -2740072622797130531766573, -496559314660966337, 193271540359185191601, -2216411137722505891, -2904826132775145951, -317306369060731271, -67380558353577020, 21603099432585032, -429178756307389317], [2268709322850491751620877, 2268709322850491751620877, -683337378165470519764, -11980602943688744, -857773008649802200, -1991772900218599232, -47247118982577107, -38236397731681015, 59227721926265851, 183724005336900993], [0, 246716425801082908435440, 115839564665927207976, -116200873638662385690, -3005090615821994870, 1265319384403644716, -282943029972141971, -218720255647358733, 232968496457615581, -192563250602345371], [8778945796139129424899542, 0, 405964333881336793741, 405315357205666915187, 46046101526112076, 3387519412492925800, 228230335295120738, -59806491690238496, 300396176360184441, 180156655704811871], [-446648456914598644289698, 0, 92118734623866980130, 91843967985937114548, 1741544562985860240, 2653174007542383696, 174589646491825878, -204284268200062833, 182101352310482010, 122359907327620527], [-3928190518663115762274357, 3928190518663115762274357, -92599099924309244, 264005300762203836731, 92996128696060134, -1080930345125566154, -231267043405337914, 93186183643275448, 188595031254319900, -185785283567584692], [4429234639009356184743467, 4429234639009356184743467, 74126809513753212218, -800765770285432343, -6559509950196436336, -6903047546634759052, 445949511888066107, 364008763550458119, 354816258397366236, 99801508231450389], [-11541829198487629106504607, 11541829198487629106504607, 800138697243217799, -285515909289583130631, 1755018932912343793, 4431696662390936205, 85079370618239060, 323245626813039953, 186109480815242287, 476893070430177846], [0, -2767241345457142830203200, 72288286644680424572, -71843695378145624858, 4696628401204873434, -3541816149291249884, 351381996942624961, 299271528704549159, -172564778869252857, 324136955903622659], [10902252786334528396827302, 0, -85992544305175100044, -84983572193503093426, -2511253820682446144, -6844578728336902746, -443375777556221435, 272045629817823292, -553595647014837704, -284046316918770771], [5600382520977351921959473, -5600382520977351921959473, 325641011418671408, -568936527584308412648, -2673449731279056814, 3870765266665849250, 449680573471088360, -156825886615177334, -536050308971052766, 482466898033848742], [-5197962940823014356589223, -5197962940823014356589223, 193287840802294675977, 102042936703830089, 220625675896583583, -1766146166016992859, -10216442570053171, 107007557477588628, -91826494133776918, 61011454397782933], [11430412084435234401524403, -11430412084435234401524403, -1337635673147968438, -597636219978737861671, -1480146359285885448, -8130042493535168576, -241120601299748686, -461730507066743082, -115622391637275906, -875905166081225356], [-6475192302980392728514938, 0, -299741095158903793315, -298173796035056039849, 15870689054558403332, 1628696609285148758, -48697274377132775, -764923850622357211, -127366111829878803, -626311887018384677], [-29587527013179869196471818, 0, 252491552981984351188, 253488148842557183790, 250387822942370704, -4297415080996602174, -236338500083767525, -280185155198187742, -490902725163074016, 10830519872196681], [0, 6012437501721128459579080, 351475598952614712862, -351447275276682492916, -2448234973426350182, 6394963088353760980, 303814095544715289, 4477054309549759, -632205487749561461, -304544770582175985], [0, -15024250470256828443064400, -1007229072191457087948, 1007272124259311603340, 474337379928924428, -704993325118638704, -46709810951485942, 10557979395415566, 71073437702861060, 56857715210474944], [-12136321600002585816262533, -12136321600002585816262533, -688037390872964363602, -935243937830024203, -10768657733810401636, -12263499794062273192, 15201764172257487, -349600426864369401, 920042173657766716, 1095278201070022169], [23625491401677549801935473, -23625491401677549801935473, -166411095014497157, -817829514575666891219, 3099666704562274103, 604656513089133491, 1297748538099020996, -762715997930883433, -885260723427380859, 596304902916386276], [0, -20969375996150188922750800, -574762611557426513844, 571668116279255832502, -11094194608250835314, -8315288768037193724, 110318699291987267, -846429902439383095, 1035385908914515099, -1102360767524795881], [1088469303057796549193963, -1088469303057796549193963, 1668545585940849899, 455906354353355287806, 3204348982423261048, 10376355430556115780, 642787334921367425, 402161446102714823, -40709271525390833, 1266384139838135076], [32088681746903900335472022, 0, -1533659987397531965051, -1537887741287197436621, -18255576283780519332, 7610218701423631444, 452167400569488056, 2200381302506733370, 1443006559382461753, 132198627206788391], [-6566753999233386804711483, -6566753999233386804711483, -750466666352965391833, -2999853715855808577, -23263926015295312105, -20571946059792215251, 1599151466138510704, 1095159116617101915, 1400702249717297873, 194268334253267464], [-1413563974663400462787758, 0, 1518202036858507694228, 1520523206429235848356, -16243714669237230608, -20398879020365857688, -1088546816857666748, 335586916053235872, -1769468749155687308, 201259079231964056], [0, -8074534279037095024021120, 362129574379882598560, -358401044721961947616, 25192707810835709292, -18764096592125026960, -1415994387415029454, 1065762666442334686, 1502244953718421236, 2749017557781708040], [38612148079507845158768013, -38612148079507845158768013, 2455113411824955367, 303146385121966161953, -24461029371436058599, 21382637600427266941, -1065861342631906779, 1287984859031434500, -602025213756551792, 1167128552793520867], [9050180947650536248183147, 9050180947650536248183147, 1929225556101440981877, -1032914358460524214, 7326155418415340784, 22752778913550571640, 2309815148787501454, 2661178478938982294, -1276900790326977240, -4160890069138494254], [-22452864761492668191286443, -22452864761492668191286443, -3508202064420698136171, 5611922443039637725, 41060003643381313335, 14377827114330621685, -1711190715263127640, 852124454018268595, -3900731727776510085, -963642401727100060], [0, 52865199326548518228666800, 350313674844475785076, -353443568764496353976, -25886818968916411356, 22249715567640046872, 443754207503228290, -1209298494970999954, -1029861514859603046, -2506702732405943702], [100881238834951279388741222, 0, -3626834191529336758007, -3625089685844862467397, 49427394600495607236, 24389543066755543418, 1397529579865487387, -4199187094439596425, 865654487394011041, 191497342705807387], [21316873859494883188837702, 0, -1245685959867755671724, -1242353314139152924162, 37684785443993397328, 4884566847387626338, -126167542665005797, -1352701384202332742, -64881147895976352, -1788895653839432671], [-99139801259800526383272877, 99139801259800526383272877, 2768036996113481091, 1819131639533509024750, 8493449096290684058, 19029341713996744358, 2471425662967173563, -83757916035650265, -1012012246470866381, 2851794912149131356], [-114152214270189179861919213, -114152214270189179861919213, 3636626633471095509143, 5482955471467418176, 40589110252829118962, 39439936271582796014, -3597070393599118504, -3235858342011832158, -1885885077868299672, 547724341037091852], [0, 27647106542240269718055260, 3144763016929193528732, -3149280405877161059424, -7320288207391556680, -32251036201336145172, -429430784110987903, -1113531416708371884, 3180819323339784308, -652468992030362403], [0, -34079714753581052181854080, -1088983615000855642816, 1103241098863904934364, 48747924217246615452, 26494294541508323224, -4646173913622840338, 2856571649604695354, -667591368909475230, 6087146930912280626], [-68580880041187476788872307, 68580880041187476788872307, -2880379099196153965, 5967172178939121921189, -4477998942942231483, -22192652558512798119, -2977104916980339939, 384988741659046696, 1731492072726861532, -3265367840855200661], [14650756077253880099986497, 14650756077253880099986497, 1207115811550484030906, -13096043779847350942, -74667813557566302154, 3707374413068005842, 6733722156639311938, 1818792971155714696, 6362321623208039004, -3838937281190428414], [0, -151380485638189983684817840, 1647187853890734387008, -1641794228789540491162, -17649828408801858278, 82037947679850381692, -1799490037423073331, 9294173499321475, -4454280882947411207, -869439992675910167], [-65269133955895946681186957, 65269133955895946681186957, 5281326105463900061, -2117486216369344293224, -41615993452265377882, 50001878810753498618, 1481978937743891873, 791198720064612685, -3642700735116952951, 4490127385399287376], [97458778512821514528248517, 97458778512821514528248517, -2443675705715776123607, -948643426495949567, -6106483240067933915, 34581419863759786119, -2477358568081040626, -6004641695430108505, 3426001994576990193, 2274796302536885254], [-170594275654063895947627298, 0, 4898674712808936257190, 4905327331104826337480, 34798561539135420624, -7690050083594890748, -438550510405416792, -4086880313143900195, -2076222696415110426, -50964775925652877], [-49454885028300224565118637, 49454885028300224565118637, -7708722617883646492, 816374431349400214707, 5202753753348695252, -47257308999298992732, 739650059224334368, -3661669719056827356, -1411603241068175060, -4047052898826819136], [-87858402383198071823652693, -87858402383198071823652693, 4082389893106854652782, -4010237945652397883, -45652033360452684888, -62072496645434878708, 974851509767024439, 355437359514170987, 3035386435885373444, 3857093061498015545], [65703449946327524489485867, 65703449946327524489485867, -1268207310702634292961, 11394955633495164696, 74718623807235593928, 28299172876526490392, -5756391328578685240, -2254212202602065392, -5638564304916479456, 1483620970698966024], [-70293670445979311421111658, 0, -14274003309528443370735, -14294131415490767044161, -20084834774962596212, 71653228848802503412, 3430656774159008280, 9472441787667282806, 9700359128982470933, -2475351728485088593], [0, -442432825073624850456729280, 5071909552802812607980, -5072369029224197668312, 26486333801524705524, -18365261444386658440, 9800542593128338982, 3003935765242383982, -6896127493209551538, -558997086708656870], [0, 44067051893339487669611140, 4054210304484689025668, -4053836568487196607030, 12474503048912647564, -57665028127371871520, -9113345501117690693, -1711466028678657828, 10820222891282122117, 3792079416335507890], [401353128046226968538606797, 401353128046226968538606797, 8967853725237241018236, 12141910298603045416, 68651316244920257244, -3692754508167888660, -6379290618760063271, -1918585063522998711, -5762619679842982145, 3775462369548228101], [-127422981374381917446504198, 0, -2905238964271037525124, -2925753342472318453132, -41454982214448295536, 58338763168082769136, 2570661336805218960, 11752818365548861568, 9207613275324054444, -3016714776397206964], [-169539245854180899819341893, -169539245854180899819341893, -21349313625808756383187, -28230890120678403702, -117629016890067279652, 161385322221218089708, 13897504594902781746, -1311147214365745402, 14333385525775621956, -15648037161888592130], [129419434597961669179954413, -129419434597961669179954413, 17409595601440787432, 5223055049315036231980, 99477631629398652702, 88449031300390664774, 8404211057580958819, 4246007682142234223, 3219269322991513889, 13163587919298553209], [204498204818280952990167187, 204498204818280952990167187, -21440339653156152087890, -5718162500528388795, -83229781513871913194, -136638635191712069602, 349126626806135259, -20991461640108779, 5369035873722253536, 9648708943745883737], [181967671164678759428659142, 0, 18648528671256744542405, 18669963655980178069831, 153516925973915956628, -27535797567994412974, -4253619225286311593, -1440331531107622921, -3483696845249793987, -12257337121789798925], [-139019848003804452352309743, -139019848003804452352309743, -5451651344459353009508, 10073843723182540996, 54170233974822335266, -128904169278837983394, 4127006630527960142, 18357492554385582176, -14200850353710501138, -4067735490233718350], [12826357943265024798570923, -12826357943265024798570923, -28988831232064800905, -22606913529921539320798, 358288783947352484216, -281308648262362387052, 10552625453185390713, -12982240497204944577, 14171710884475660351, -16006590734859856328], [5109198082733511250036582, 0, 20834332680473840676525, 20784759434784550950147, -73119733211159843604, 208723445280308207472, 14583272152170722214, 1291458280280251308, 20254651892147554761, 13443863364691198095], [549861710237833169462198677, 549861710237833169462198677, -5085592929493048548989, -13297618126942292981, -36118822943411567027, 153415379555170808151, 5533514147341943654, -4488385608981856057, 7764103979600349327, -10049105700788844422]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_10_c_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_10_19_c_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_10_19_c_b(:prec:=10)
    chi := MakeCharacter_10_c();
    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_10_19_c_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function MakeNewformModSym_10_19_c_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_10_c();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,19,sign)));
    Vf := Kernel([<3,R![2897129117349280287958636716193497793171968, -695363115177496809141020062207863367680, 83449829531891369318495783039078400, -1122028948959367207238323663680, 14822337119257197549163080, -5217212144316016859256, 1042552727944055460, -2611193623920, 5216450, -3230, 1]>],Snew);
    return Vf;
end function;