
// Make newform 75.9.c.g in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_75_c();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_75_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_75_9_c_g();".
// 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_75_9_c_g();".
// 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 := [53656344, 57910464, 38943804, 16418988, 4580249, 744964, 49747, -2220, -433, -4, 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], [-41556905602917131304, -26368627529241277344, -7040333543796566448, -729928185416215536, 70247377969529165, 24034596572099589, 990054798966676, -139312194537578, -6737848279449, 422181448349], [-99448719178577647032, -100831437416662664760, -57088531569013327680, -17795559339495076908, -2458438926995637625, -58417514622643089, 15118967492581288, 747028733465068, -32087853683079, -841473910807], [-242344663543802056212, -216018284274101641824, -118607149615439990316, -35870255949722934420, -5720291048548337495, -346055941008215076, 19289070838345274, 3086200896610772, 17194261561041, -6879197511740], [800650718482326923502, 755831170532971489212, 343439705000073915834, 107042477283133106598, 23081818850588387035, 2352734348605750248, -23822779850815138, -18113468206466596, -350484802552473, 44483873323468], [3706328693842315207416, 2974947403732593082056, 1417103842213530925932, 473018846177807052624, 80815548954089098445, 5255287102548253479, -228579204628224404, -44817254387356808, -568404995899629, 109711893437129], [43967186031010138947, 23598699740950329252, 5136779992679729574, -1614543556494422667, -821281727371129715, -105724507575719997, -421768766042128, 724171099736024, 19249058755332, -1878004954637], [-7938106245290166372, -14111578454734683072, -7963478217835526964, -2510925159374547408, -477314477298806960, -41865053898939493, 734225342449588, 335214403336196, 6345736290088, -840821834983], [-266808787100784239616, -251006256373906552488, -145339100154485863800, -48455738232873071260, -9264455406837371097, -838169724132957331, 10554077001145712, 6695590157611632, 145830337403353, -17345250624505], [-40965639394617137664, -1705297277238606110184, -1415358878010966713808, -674005837504097073076, -160717211888589734885, -14963861967528523091, 289787991456492936, 113829264342245552, 1608380604841541, -261825563207441]];
    Rf_basisdens := [1, 1314779316311147940, 525911726524459176, 262955863262229588, 657389658155573970, 1314779316311147940, 17299727846199315, 7688767931644140, 58434636280495464, 876519544207431960];
    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_75_c();"
function MakeCharacter_75_c()
    N := 75;
    order := 2;
    char_gens := [26, 52];
    v := [1, 2];
    // 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_75_c_Hecke();"
function MakeCharacter_75_c_Hecke(Kf)
    N := 75;
    order := 2;
    char_gens := [26, 52];
    char_values := [[-1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 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 := 9;
    raw_aps := [[0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [11, 2, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-717, 3, 7, -2, 1, -1, 1, 2, 0, -1], [-2, 334, -10, 0, -2, 4, 0, 0, 1, -5], [5552, 26, 38, 14, 4, -7, 10, 36, -3, -7], [-132, 544, 482, 0, 28, 65, 26, 0, -14, -38], [-23192, 2, 74, -122, 52, -49, 46, 6, 3, -49], [251, 6947, -1191, 0, 205, 96, -165, 0, -1, -76], [632, -2508, -3088, 0, -382, -196, 8, 0, 213, 9], [89814, -3200, -8440, 290, -258, -39, 336, 350, -297, -39], [-466508, -5702, -15378, -4902, -680, 131, 418, 652, -549, 131], [-4608, 71516, 23070, 0, -1088, -949, 1420, 0, -961, 1115], [-777145, 5505, 11221, -3988, -1031, 1238, -1445, 788, 207, 1238], [-7849, 38231, 24421, 0, -3451, -580, -1161, 0, -2815, -1726], [-2652, -91276, 13718, 0, -4258, -215, 6432, 0, 2970, 1302], [6644, -387820, -28224, 0, 10448, 7244, -1574, 0, 2101, -2807], [2254558, -30672, -84304, -2594, -5590, 2695, 200, 2134, -2895, 2695], [4696311, -20627, -56503, 54508, -2811, 738, 1335, 2792, -2073, 738], [23246, 623662, -83622, 0, 8474, -4108, -9590, 0, 172, 3550], [12986750, 10276, 15348, -25396, 2392, -3658, 4924, 15196, -1266, -3658], [16276056, -15650, -51930, 81854, -56, -3373, 6802, 16150, -3429, -3373], [37839, -1463533, -148295, 0, 9187, -3532, -10299, 0, 4755, 2976], [-11304, -467136, -50268, 0, -12720, 14790, -8016, 0, -726, -25158], [25925026, 5284, 103124, 153720, 24732, -13428, 2124, -64120, 11304, -13428], [40400, -491036, -202212, 0, 27498, 44194, 23420, 0, 35325, -18735], [32164483, 277935, 694091, -199938, -2323, 25747, -49171, -26162, 23424, 25747], [141885, -278135, -798189, 0, 5233, 17336, -69761, 0, 17321, -49600], [3055922, 136740, 284780, -212826, 25430, -27785, 30140, 97570, -2355, -27785], [-97360, -2487908, 257546, 0, -120264, -13157, 56250, 0, 11330, -18850], [-31280575, -179951, -529171, 47810, -65949, 48729, -31509, -2410, -17220, 48729], [-185746, -4622570, 1096886, 0, 247930, 77220, -55880, 0, -105437, 18805], [-39304, -3014724, 392450, 0, -211836, -219509, 27666, 0, -37132, 127424], [125934200, 410938, 1383826, 381030, 68012, 14311, -96634, -336786, 82323, 14311], [430520, 16327312, -1775066, 0, 494554, 338187, -50500, 0, 148560, -116160], [131572726, -1323944, -3630648, -716498, 59962, -233749, 407536, 584518, -173787, -233749], [-336115016, -296786, -958566, 310650, 19180, -83209, 147238, 309400, -64029, -83209], [470573881, 876655, 2109491, -1694808, -50925, 118776, -186627, -62092, 67851, 118776], [-928293, -8336253, 3316649, 0, -272435, 91916, 163463, 0, -151655, -146402], [730864, -31434520, -1462398, 0, 548598, -240355, -279716, 0, -67788, 374796], [656492, -15743556, -3521464, 0, -776288, -400464, 29278, 0, 229363, 26959], [85305026, -1005024, -2511008, -2374908, -452468, 444386, -436304, -672172, -8082, 444386], [-354738, -24456474, 1060570, 0, -786218, -144364, 569370, 0, 249354, 35940], [263461234, 4953184, 11916824, 782940, 499140, -247254, -4632, 962960, 251886, -247254], [1356612, -4930900, -3496662, 0, 1146206, 414391, 353372, 0, 575986, 335398], [-442515512, 2325886, 6557022, -2243294, 415444, -167143, -81158, -367442, 248301, -167143], [544305950, 3173936, 8379232, 4050042, 542886, -294807, 46728, 121858, 248079, -294807], [845314597, 3511813, 7508257, 1767138, -111385, 210721, -310057, 1004862, 99336, 210721], [-948489, -161439869, 3274889, 0, 1173879, 1057452, -220367, 0, -269509, -580696], [-319284282, 5645156, 12304812, -2943484, 224624, -92978, -38668, 2013368, 131646, -92978], [2878196, -60166520, -12641666, 0, 1466816, 523475, -1168038, 0, 305402, -374086], [-1586844, -101183060, 6254564, 0, 1933512, 1569936, -272336, 0, -464056, -739348], [-737785070, -1384784, -2675408, 597202, 181766, -196367, 210968, -499302, -14601, -196367], [196370, -2393566, -5728142, 0, -3884262, -1590836, 89020, 0, 227065, -306785], [1922144, 41613780, -9894858, 0, -2729176, -990331, 1205566, 0, 1368250, 228526], [-1640401, 18159207, 9956397, 0, 4759977, 3823156, 1449287, 0, 658899, -718524], [7378448, 44493112, -28673974, 0, -2761450, -2762575, 727292, 0, 2362512, 1745496], [-3281155694, -5278748, -15189836, -5336546, -1161850, 583435, -5020, 828606, -578415, 583435], [2009570940, -6333686, -23259666, 10324990, -1957964, 518909, 920146, 5927560, -1439055, 518909], [-9430456, -268218748, 40499970, 0, -4556276, -2212923, 2204160, 0, -2019667, 1036865], [-3295386783, 191255, 2822211, 19012972, -175609, 611494, -1047379, -3043372, 435885, 611494], [-6561920, -186095672, 25187470, 0, -6763862, -4079813, 595036, 0, -2122416, 995400], [1213262405, -19900825, -43047589, 15263252, 1995679, -2869282, 3742885, -2837352, -873603, -2869282], [-5456422, -378710902, 15156998, 0, 3507326, 3425888, -3210370, 0, -2866584, -3277410], [-5365978670, 543024, -982976, -6355800, 1502536, -2097796, 2693056, 5189600, -595260, -2097796], [-2376740, -207433020, 5391982, 0, -4839182, -3281435, -1470428, 0, -1814742, 126630], [-2279106354, 8605136, 24954512, -3961438, 1637182, -619339, -398504, -2003742, 1017843, -619339], [-2476764850, 4014796, 4770708, -35210416, -2270468, 2105732, -1940996, 2025316, -164736, 2105732], [5956291, -101879113, -39429147, 0, -5067529, 1530516, 2498289, 0, 4589335, -2815136], [-3378180290, -40134412, -96835524, 2660320, -869548, -1746644, 4362836, -2188636, -2616192, -1746644], [-8797648, 652382100, 5074286, 0, -9799440, 3740029, 2774874, 0, 1334804, -7252312], [-8223556, 328271092, 41180380, 0, -4203448, -4949044, 128676, 0, -3625954, 2911658], [-5510429757, 41738335, 103834131, -8723558, 2326897, 678197, -3683291, 996958, 3005094, 678197], [2054026616, 11321342, 11009210, 32580566, -865424, -929251, 2723926, 17790684, -1794675, -929251], [-1088481044, -72714618, -187603426, -605162, -9001000, 3472135, 2056730, -2155754, -5528865, 3472135], [-3622047, 14626209, 47106875, 0, 4144027, -2551312, 5928113, 0, 215599, 7587382], [-43040504, 79919968, 183133450, 0, 521638, 8682889, 12088264, 0, -5495346, -2377938], [-12634732972, -12078474, -16998182, 27798014, 7488400, -7543339, 7598278, -1910464, -54939, -7543339], [15164880, -68363400, -25107680, 0, 6723140, -1107980, 9492580, 0, 8311400, 9215840], [-11657405290, -9454136, -22534152, 13775322, 5827990, -7403635, 8979280, 9216442, -1575645, -7403635], [-25629832, 172256224, 110783260, 0, -23266496, -4743588, 22976342, 0, 5241447, 4598511], [11243263894, -6148256, -46869072, -10567682, -8260646, 3875327, 509992, 23492782, -4385319, 3875327], [3571014, 888707366, 2383338, 0, -7141558, -11175044, -174130, 0, -1431482, 7517200], [16418901506, -106877076, -249224356, -42092920, -4444108, -726908, 5897924, -19463480, -5171016, -726908], [-24859440068, 6657018, 13483946, -22042070, -9257896, 10829197, -12400498, -12299546, 1571301, 10829197], [-10076499, -301815903, 28489747, 0, 7944485, 7603108, -5508341, 0, -4902715, -6385036], [-12719280, -1091242460, 38871010, 0, 29989000, 29091725, 377940, 0, 648285, -13908255], [-38818371910, -59423820, -161466004, 11733512, -5281396, -941432, 7164260, 11207188, -6222828, -941432], [-69478632, 1062304844, 200774540, 0, 12386658, 31612434, -13977920, 0, -21675469, -32408065], [32593199097, -10686499, -34995887, 16700314, 7653399, -11199447, 14745495, 23305786, -3546048, -11199447], [-371623, 2301393917, 60184199, 0, -13393215, -16751204, 19225863, 0, 6137525, 19667528], [56855852, -386622572, -210156396, 0, -11272680, -33567140, -22805512, 0, -1761072, 16528044], [-24876410879, 27625237, 61292545, -59138154, -16174429, 19877179, -23579929, -20193846, 3702750, 19877179], [-27795638, -2564401214, 105041090, 0, -51367858, -33039084, 5722000, 0, -8855931, 10216155], [-7317571076, -31097842, -70993914, 17243590, 17948816, -22406657, 26864498, 24630374, -4457841, -22406657], [-24582915, 543343525, 42436303, 0, 572467, 24003740, 7198113, 0, 3310587, -20118450], [-20230936, 749206540, -30374424, 0, -15958562, 21301764, -2239884, 0, 1896761, -30400987], [-14899984, 3775089544, 137109552, 0, 21427748, -14059936, -15732080, 0, -21090638, 16907770], [16115160275, -2874039, 39311493, 33682724, -1428903, 9176982, -16925061, -56388024, 7748079, 9176982], [-28442670006, 30829480, 81250120, -10841200, -22134568, 29088856, -36043144, -44332560, 6954288, 29088856], [-33471755887, 298770251, 663779743, 16230164, 20129235, -12444234, 4759233, 105654736, 7685001, -12444234], [73873712, 3855065088, -311216450, 0, -14517338, -36298317, -36689260, 0, -3399942, 10695018], [31253619, -348890929, -73782955, 0, 114297435, 61460700, -19137383, 0, 2286509, -13880674], [113475408, -1568810124, -338510446, 0, -9562232, -79195471, -42634648, 0, -8296973, 53097031], [32571472874, 194037652, 544009204, 144072114, 34077698, -13768331, -6541036, -28107894, 20309367, -13768331], [12910102822, -199875484, -434758052, 135454404, -38947536, 39604278, -40261020, -124008704, 656742, 39604278], [254205879, -1692414653, -1013005751, 0, 78144663, 18818928, -28551475, 0, 63708421, 5977666], [92320016, 4701234036, -500113810, 0, -52233152, -15462123, -6156206, 0, 31246720, -13732556], [92224640, 996292408, -416776304, 0, -45302324, -59305872, -47008120, 0, -4980750, 13150650], [-37052584858, -369190672, -861254384, 256228086, 14628114, -37544973, 60461832, -16863266, -22916859, -37544973], [4518515813, 561962633, 1423668717, 112279058, 71997371, -34039691, -3917989, 51276242, 37957680, -34039691], [27813384140, 74378774, 228418874, 443509850, 5611396, 6730259, -19071914, -46396500, 12341655, 6730259], [-193402412, 112441248, 681737650, 0, -58989984, -8973991, -14473074, 0, -64863674, -27757538], [-104678475472, 89552906, 290306962, -17093874, -1053996, 19763187, -38472378, -86714882, 18709191, 19763187], [-49330920014, 462883804, 971525908, -65801222, -26033134, 37998373, -49963612, 134668662, 11965239, 37998373], [-325363848, -656488300, 1526158838, 0, -15671760, 12091935, 99173320, 0, -52225351, 29658845], [-113480185257, 126565133, 435328017, -244037792, 81652001, -64894376, 48136751, -13194808, 16757625, -64894376], [-51251011, 2097906981, 276032583, 0, -81562949, -105333084, -39832107, 0, -58516927, 44635556], [171830588, -5278605148, -633338786, 0, -92588342, -97163727, 17141792, 0, 48891240, 59440452], [28063804, 1253774316, -320557672, 0, 3903840, 65233520, 4043486, 0, 32470211, -61259857], [-119711348642, -788737296, -2091640832, -403936082, -59288582, -16524361, 92337304, 106677662, -75812943, -16524361], [-31701234414, 76298772, 120830420, 214668976, -46541164, 49003504, -51465844, -2357576, 2462340, 49003504], [-277038140, 4195208220, 1172340378, 0, -23454722, 63715219, 123385880, 0, -5505580, -13749640], [-259111907, -8525940311, 995741315, 0, -99060303, -38296372, 4714643, 0, -80268721, -8876458], [-128764225382, 404449964, 1029308588, 114606538, -2142782, 39234689, -76326596, -58489758, 37091907, 39234689], [-408022440, 15426299784, 1789293818, 0, -155713542, -89865951, 68439760, 0, -105790660, 46229060], [-40075112354, 215727620, 520467260, 446112664, -26066516, 45246272, -64426028, -39427740, 19179756, 45246272], [-362179652, -7153706852, 1436631788, 0, -42241428, 114985916, 181558412, 0, 15421532, -45327424], [-138472567355, 220710929, 713247389, 138840270, 9128311, 34654559, -78437429, -191560470, 43782870, 34654559], [-49976827628, -831046430, -2090075834, -127158798, -48518584, -14725481, 77969546, 2925948, -63244065, -14725481], [-126176133308, -325776930, -737398410, -327237746, -78879720, 77718915, -76558110, -194202690, -1160805, 77718915], [238243633, 3477449785, -990612189, 0, -79662761, -90150920, -23146075, 0, 51068327, 38746502], [108980458258, 556638228, 1583021996, -221767094, 34092890, 38515885, -111124660, -212895866, 72608775, 38515885], [-52874699812, 572477218, 1399698662, -351135322, 48479076, -14101551, -20275974, 69835472, 34377525, -14101551], [254148408, 118290736, -714577136, 0, 257707812, 29040396, -101843440, 0, 523246, 48891790], [-60222550714, 136503680, 377536080, -589148976, 89567984, -87074528, 84581072, 95581640, 2493456, -87074528], [-66401268, 5355102692, 226665498, 0, 120119894, 23623363, -151324252, 0, -109941410, -39225542], [49596752201, 1859678487, 4755411395, -22028404, 89945351, 67739494, -225424339, -128981996, 157684845, 67739494], [-124745188, 1087168548, 425660134, 0, -396982198, -221139751, 103292172, 0, 2514806, 74294738], [-140712896, 2175060336, 787653868, 0, -201276340, -180791670, 55997996, 0, -45623134, 108152498], [230053423254, 1020728024, 2980560488, 38305178, 181673134, -55434583, -70803968, -282469278, 126238551, -55434583], [-71121664, -6869447296, -232786398, 0, -213087662, 30321309, 64162260, 0, 53995622, -104784010], [-65324245793, 270410443, 187972167, -776371602, 51809065, -119252029, 186694993, 633210502, -67442964, -119252029], [652855145, -10325949379, -2539129785, 0, 90501945, -165680960, -251849605, 0, 21382935, 85007130], [31978029018, -364801988, -868524556, -828944962, -117119178, 113485611, -109852044, -215525614, -3633567, 113485611], [-227312144, 22268384312, 948222888, 0, -227116804, -127642212, 71687184, 0, -44621726, 49927402], [120255918996, 324378318, 1343160322, -780718982, 113944924, -17201797, -79541330, -458040268, 96743127, -17201797], [311500864, 3886417604, -392424550, 0, 587595852, 257842883, 124983266, 0, 154340240, 98446676], [81649499320, -1379737494, -3217045678, -79965074, -23995564, -48266957, 120529478, -196028882, -72262521, -48266957], [469118737, 5969558897, -805046781, 0, 124575859, -113514788, 258608081, 0, 227076047, 305106758], [368413259736, -1956589930, -5018280174, 230103082, -30092380, -149075609, 328243598, 260834768, -179167989, -149075609], [-699830736, -767805500, 2686380166, 0, -480741140, -196016665, 141183900, 0, -147900327, 26238045], [93031210933, -2019354549, -5030339217, -370925256, -290181585, 173273496, -56365407, -336411444, -116908089, 173273496], [-282131887, -25525500855, -146057949, 0, -326147905, 126574124, -38493983, 0, -16741595, -308895068], [-367515161445, 669191165, 2161488841, 564789832, 30770649, 101285328, -233341305, -574410932, 132055977, 101285328], [805025918, -14931732690, -3222651038, 0, -682258390, -622520860, 5040390, 0, 177064946, 283911860], [475907023036, -2673090606, -6293147062, -217935458, -79755604, -64779437, 209314478, -364677818, -144535041, -64779437], [-292477008, -9773068532, 521965294, 0, -702938800, -334619525, 6834988, 0, -88458217, -13432381], [305971565142, -1093259192, -2896856608, -144504632, 6234000, -125662704, 245091408, 292488332, -119428704, -125662704], [-444261688, 912507796, 1368850060, 0, -491892578, -309512394, -138139180, 0, -238345521, -5503485], [-262628213, -4621120361, 859157661, 0, 92132459, -82511160, -399810843, 0, -330307289, -71328032], [864485432, -2155604980, -3109496814, 0, 677498820, 259605919, -152351866, 0, 185604714, 2967558], [480395275831, -1768013277, -4379251953, -1206890442, -111085191, -10938177, 132961545, -85385658, -122023368, -10938177], [460031366, -32088191690, -732912026, 0, 628861550, -78921880, -339739920, 0, -147643723, 223482695], [-29984244, -21198177112, 1245207718, 0, -199196652, -488108421, 9719498, 0, -134638364, 393369844], [-468530531, 1045770645, 2530010631, 0, 319376563, 190135216, 140912441, 0, -75571645, 40009286], [424672695290, 1209422180, 2911164900, 1017016470, 129695438, -69257921, 8820404, 246496190, 60437517, -69257921], [-653824239912, -1665628134, -4617321402, 2083288894, -174880620, -10316799, 195514218, 376127556, -185197419, -10316799]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_75_c_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_75_9_c_g();".
// 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_75_9_c_g(:prec:=10)
    chi := MakeCharacter_75_c();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 9));
    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_75_9_c_g();".
// 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_75_9_c_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_75_c();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,9,sign)));
    Vf := Kernel([<2,R![224550432000, 0, 9610475200, 0, 143194100, 0, 850776, 0, 1673, 0, 1]>,<7,R![20950685488530000, 263729201400, -38916314892, -10349514, 3578, 1]>],Snew);
    return Vf;
end function;