
// Make newform 7.10.c.a in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_7_c();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_7_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_7_10_c_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_7_10_c_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 := [761760000, 1034227200, 1399072384, 30575648, 16136944, 23608, 146753, 61, 430, -1, 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, 2, 0, 0, 0, 0, 0, 0, 0, 0], [-728499442105846008000, 6390233594342311200, 8633477355188858864, -8455568604050729964, 79251473775272906, -527825025841115, 306747495137243, -2080323777608, 543280294119, 174976544647], [457911692363235156681600, 619444498139966557897152, 9561128363649180087824, 7135341367123388280552, 10142716689341838644, 64699967753173288309, 25877873507020493, 189413411414469730, -359425911506973, 439915122044593], [1498083923068056865537920, 8753915285372555954400, 11826911844414978154768, -451992977525138313948, 108565778922995107222, -723062074883078005, 263155948009015381, -2849814149431096, 744234087958953, 9108600924689], [261687922576606706402880, -707264155426816927200, -955543953106873546384, 1145664200820139449324, -8771467558811176486, 58419104028555565, -51400958387300173, 230247989821048, -60129676436289, -44987322634457], [1379362333342473784891584, 22965336024722535832800, 31027145658538503980816, -297921422945101274472, 284815366892851129814, -1896907038176377685, 897435986095250741, -7476304878007352, 1952450458321161, -10228081391315], [-60375780584089979592902400, -81614206561156272103139328, -538575932743903852034896, -830194281200809808698368, 2305464026693842938944, -5152118620797417711701, 9874684454720909303, -13545670542188346350, 42692492469767637, -24593260288252157], [2076654230999456261004489600, 2809343727409862629926750912, 57713122284011650146364784, 32599014210284667922809672, 53897632103545345431524, 300834508490249091273979, 146171516473387214363, 883784357122680443350, -1639595498403371523, 2067492150283470103], [1059612788993006122246454400, 1433445544800945125082504768, 40035573671756716045423216, 16592811419754117068838168, 26156328254249575048396, 152247759899824475413931, 69678488713722111187, 446731469300652376670, -1349683788498539907, 1042602787806930287]];
    Rf_basisdens := [1, 1, 495155599943444664480, 455543151947969091321600, 2310726133069408434240, 6932178399208225302720, 693217839920822530272, 1594401031817891819625600, 3188802063635783639251200, 531467010605963939875200];
    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_7_c();"
function MakeCharacter_7_c()
    N := 7;
    order := 3;
    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_7_c_Hecke();"
function MakeCharacter_7_c_Hecke(Kf)
    N := 7;
    order := 3;
    char_gens := [3];
    char_values := [[0, 0, 0, -1, 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 := 10;
    raw_aps := [[0, -1, 1, -4, 0, 0, 0, 0, 0, 0], [33, -1, 0, -33, 0, -1, 0, -1, 0, 0], [0, 0, 0, 307, 0, 0, 0, 0, 0, -1], [-797, 26, -67, 1430, 2, -9, 3, -10, -10, -1], [8425, 3, 0, -8425, -86, -9, 7, -9, 86, -7], [-32504, 0, 1042, 0, 28, 286, 27, 0, 0, 0], [68163, -8798, 0, -68163, 168, 750, 65, 750, -168, -65], [0, 19463, -19463, 4211, 0, 0, 0, -1397, 826, -109], [0, -7791, 7791, 526371, 0, 0, 0, 4941, 148, 728], [1530044, 0, -5930, 0, 1268, 5538, -959, 0, 0, 0], [3799953, 90345, 0, -3799953, 4158, 73, 1397, 73, -4158, -1397], [0, 132990, -132990, 7949757, 0, 0, 0, -41494, 2868, 2030], [-5185700, 0, -435718, 0, -32816, 26982, -2635, 0, 0, 0], [10269764, 0, -132344, 0, 18832, -66624, -7028, 0, 0, 0], [0, -88975, 88975, 6414639, 0, 0, 0, -113391, -31990, -129], [-5847531, 1630882, 0, 5847531, -11844, 153342, -28672, 153342, 11844, 28672], [10188249, -1888789, 0, -10188249, -107072, -244461, -2652, -244461, 107072, 2652], [0, 307914, -307914, -22604563, 0, 0, 0, -296018, 75684, 23626], [-26836615, 3520839, 0, 26836615, 45732, 133127, 106498, 133127, -45732, -106498], [-118841568, 0, 618504, 0, 247788, -577176, 2478, 0, 0, 0], [-173198403, 2667688, 0, 173198403, -81536, 681424, -22698, 681424, 81536, 22698], [0, 11509413, -11509413, -100369637, 0, 0, 0, 1186521, -190092, -7728], [-11965020, 0, -6939344, 0, 779044, 977208, 48406, 0, 0, 0], [0, -5558276, 5558276, 330210049, 0, 0, 0, 654420, -985432, -144296], [90081768, 0, -6851474, 0, -1237712, -1405558, -123697, 0, 0, 0], [654867911, -4016748, 0, -654867911, -220248, 2479980, 115087, 2479980, 220248, -115087], [0, 20726601, -20726601, 424446595, 0, 0, 0, 687141, 1284696, 140454], [0, -30713333, 30713333, 201976459, 0, 0, 0, 1230375, 1901642, -362957], [-490936989, 29052444, 0, 490936989, 210336, -1560356, -881335, -1560356, -210336, 881335], [-274248016, 0, 21637766, 0, 404184, -3509502, 556199, 0, 0, 0], [-1024701720, 0, -80402312, 0, 874612, 8295704, 526946, 0, 0, 0], [0, -69171537, 69171537, 1000640083, 0, 0, 0, -11567865, 1395492, 1098566], [-527656389, -81995634, 0, 527656389, 2160824, 14809362, -878003, 14809362, -2160824, 878003], [-428647788, 0, 146101960, 0, -579068, 17186432, -764494, 0, 0, 0], [0, -83675952, 83675952, -3154726389, 0, 0, 0, -15338832, -8992664, -1466689], [-454843343, 1730109, 0, 454843343, 1633854, -7335435, -546819, -7335435, -1633854, 546819], [-803744311, -361263182, 0, 803744311, -2039156, -3333610, 1228298, -3333610, 2039156, -1228298], [0, 160101759, -160101759, -4395096157, 0, 0, 0, 24628135, -4851336, 3848908], [-1510318636, 0, 68436524, 0, -4434906, 44055720, 92171, 0, 0, 0], [0, 86490902, -86490902, 4490688569, 0, 0, 0, -14524278, 18165924, -3191400], [412412801, 67057495, 0, -412412801, 15831130, -4253613, -3076381, -4253613, -15831130, 3076381], [4632914590, 0, 160862136, 0, -9633624, -103981520, 3346232, 0, 0, 0], [0, -22492543, 22492543, 3591310279, 0, 0, 0, 84640257, 1859506, -7605633], [-9737890793, -16825410, 0, 9737890793, -6013776, 24915402, 5996487, 24915402, 6013776, -5996487], [-527821492, 0, -90122754, 0, 17330356, -2674230, 3339861, 0, 0, 0], [17214742473, -213173619, 0, -17214742473, -15627486, 19901125, -5815873, 19901125, 15627486, 5815873], [4907547412, 0, -493834496, 0, -17713604, 23463112, 4988466, 0, 0, 0], [-4998008672, 0, 372500784, 0, 22851948, 88783504, -14588254, 0, 0, 0], [1144819665, 412140543, 0, -1144819665, 70539686, 62234427, -351683, 62234427, -70539686, 351683], [0, 111145404, -111145404, -13507721561, 0, 0, 0, 45669756, 4405632, 14859033], [0, -236444258, 236444258, 2253773343, 0, 0, 0, -126058422, -45650472, -12117413], [-2062013844, 0, 1592485628, 0, 27408746, 135566208, 13121633, 0, 0, 0], [-7932065783, -655249296, 0, 7932065783, 12376896, -99806688, -15600012, -99806688, -12376896, 15600012], [-22152764716, 0, -74906472, 0, 17039470, -98946348, -8240691, 0, 0, 0], [0, 6480654, -6480654, -2753328853, 0, 0, 0, -214173486, -61976824, 2930453], [53207857525, 270982953, 0, -53207857525, 125059072, 245416197, -16566074, 245416197, -125059072, 16566074], [-14483976591, -790187102, 0, 14483976591, -191476236, -329126922, -1244086, -329126922, 191476236, 1244086], [0, -1548974811, 1548974811, -34758790357, 0, 0, 0, 252652681, 17675280, -45480206], [-10336541155, -1520480070, 0, 10336541155, -65445732, 645303062, -3446156, 645303062, 65445732, 3446156], [43838655784, 0, -2145792170, 0, 7997616, 68870946, -21632765, 0, 0, 0], [-76623239071, 2000372595, 0, 76623239071, -86228646, 38745767, 37766251, 38745767, 86228646, -37766251], [-47481181034, 0, 2493893360, 0, -212643872, 99129408, 47016872, 0, 0, 0], [24027288772, 0, 1232314432, 0, 57433768, 158853736, -103531044, 0, 0, 0], [67176636741, -3559021423, 0, -67176636741, 139088908, -204146739, -33403872, -204146739, -139088908, 33403872], [0, 3712587056, -3712587056, -90909913475, 0, 0, 0, -710329512, -38550176, -94296038], [0, -313336306, 313336306, 59724351369, 0, 0, 0, 731985858, -56488588, 28352688], [0, -4821603157, 4821603157, 102830837899, 0, 0, 0, 578673003, -125149436, 70563430], [-20441705060, 0, 3935628882, 0, 217176768, 191316766, -1811383, 0, 0, 0], [178518050321, -1417798285, 0, -178518050321, -34625512, 630184347, 21133476, 630184347, 34625512, -21133476], [142130127988, 0, -9133283954, 0, -53378612, 940982122, 17779569, 0, 0, 0], [-46327266425, -2013348162, 0, 46327266425, 152059264, 676918074, 186335143, 676918074, -152059264, -186335143], [0, 6057623125, -6057623125, -81623722969, 0, 0, 0, -473153571, -55096802, -19345067], [45066945693, 7637917933, 0, -45066945693, -353846696, -1637372735, -48895914, -1637372735, 353846696, 48895914], [0, -8028213718, 8028213718, -68414456615, 0, 0, 0, 1122481590, 655899196, 91113904], [10596237276, 0, -2048870432, 0, -376255502, 755229860, -194258785, 0, 0, 0], [0, 4034745537, -4034745537, 185450203191, 0, 0, 0, 928827729, 53953942, 188539997], [244424339463, 7297862244, 0, -244424339463, -669431560, -1428073332, -86475977, -1428073332, 669431560, 86475977], [0, -1290820944, 1290820944, -100196199657, 0, 0, 0, -747698392, -578485320, 73185209], [0, 2940392622, -2940392622, -103787116269, 0, 0, 0, 3159868866, -213781568, -122227483], [-260672553893, 5304064326, 0, 260672553893, 587421408, -1849654806, 18780729, -1849654806, -587421408, -18780729], [-191141859516, 0, -25513129168, 0, -579194392, 302649576, -347399404, 0, 0, 0], [-414643412224, 0, 4182635154, 0, -118198764, -1078179618, 52646559, 0, 0, 0], [224762253537, 11070980929, 0, -224762253537, 7006818, 2019024609, -9221485, 2019024609, -7006818, 9221485], [489352724152, 0, 12844090606, 0, -208777352, 334716442, -271064181, 0, 0, 0], [0, -27060380611, 27060380611, 160238482215, 0, 0, 0, -2438265835, 232630678, 136281681], [0, -3922152205, 3922152205, -362373503973, 0, 0, 0, -2176269825, -316552402, 427931385], [-328827457692, 0, 21650029098, 0, 323267352, 1700578854, -123897207, 0, 0, 0], [0, 14329066080, -14329066080, 564843179669, 0, 0, 0, 1825842136, -76868952, -250763366], [-278851823132, 0, 1183086382, 0, -194902764, 1517257674, 389347933, 0, 0, 0], [17588146912, 0, -28481128848, 0, 1366537344, 2721464512, 284966360, 0, 0, 0], [0, -6059445377, 6059445377, 1138467626523, 0, 0, 0, 2205799527, -843656016, -162100892], [664670972405, 20921652861, 0, -664670972405, 381555300, -2007129519, 566766772, -2007129519, -381555300, -566766772], [459059999477, -22855172999, 0, -459059999477, -448134104, -823147771, -701852494, -823147771, 448134104, 701852494], [-541135743812, 0, 2929590032, 0, 2395347250, 3712255668, 162280727, 0, 0, 0], [0, 34239311607, -34239311607, -371323312237, 0, 0, 0, -737755457, 1336526952, 350243236], [-545329212312, 0, 20877172224, 0, -1040621652, -8396782416, -17535414, 0, 0, 0], [0, 12044400084, -12044400084, -120245111605, 0, 0, 0, 3336419292, -310112824, 221960819], [229340874465, -22318004468, 0, -229340874465, -126604128, -6470311740, 252905720, -6470311740, 126604128, -252905720], [0, 43919343411, -43919343411, 494473057619, 0, 0, 0, -3239805857, -433212486, -587742785], [0, 32964010604, -32964010604, -290689557341, 0, 0, 0, -7132801068, -1199469536, -541241645], [237417375412, 0, -37337154992, 0, -3369543866, 5558098396, 344537277, 0, 0, 0], [-1255172507285, -14471698940, 0, 1255172507285, 882225512, -4471782924, 195365513, -4471782924, -882225512, -195365513], [-924735063287, -509604961, 0, 924735063287, 1013979876, -9892401825, -1354808214, -9892401825, -1013979876, 1354808214], [0, -7516468624, 7516468624, 405035486365, 0, 0, 0, 7520302152, 570207184, 736255842], [1486682986393, -34933279877, 0, -1486682986393, -237222734, 699624303, 757212715, 699624303, 237222734, -757212715], [-794316072103, 27389653176, 0, 794316072103, 434588616, -4317840376, -1041846584, -4317840376, -434588616, 1041846584], [-231320518996, 0, 19259835280, 0, -103147408, 15653206632, -1437119936, 0, 0, 0], [0, -9237742766, 9237742766, -3930539054289, 0, 0, 0, 762781446, 893860968, -210994337], [684744071685, 70605140801, 0, -684744071685, -672090116, -9202128675, -1182660024, -9202128675, 672090116, 1182660024], [970880605104, 0, -12087771074, 0, 627851728, -13767395398, 854683367, 0, 0, 0], [0, -77988924535, 77988924535, 365312543551, 0, 0, 0, -1823154519, 494398198, 1781990353], [-431660477965, -57445998432, 0, 431660477965, 4774410072, 16773125192, -930712979, 16773125192, -4774410072, 930712979], [-554730976764, 0, 36798507842, 0, -4549688344, 1851645294, 2520661997, 0, 0, 0], [1527413317601, 23261266059, 0, -1527413317601, -6632368596, 2014244627, -28334582, 2014244627, 6632368596, 28334582], [1621691031056, 0, 48700489480, 0, -1316971508, -16915833528, 180333790, 0, 0, 0], [-3985847661783, 21578974536, 0, 3985847661783, -5269637344, 13121703960, 76019188, 13121703960, 5269637344, -76019188], [-2640677940724, 0, -69624206600, 0, -5422854080, 2330450160, 237212524, 0, 0, 0], [1046737594253, -3602664527, 0, -1046737594253, 8383228084, 13056471645, -1462369264, 13056471645, -8383228084, 1462369264], [0, -120389660562, 120389660562, 4176079006929, 0, 0, 0, -20049496542, 3107902852, -1037011612], [1786288891644, 0, 94896239752, 0, 1225652716, 16836270144, -2764530146, 0, 0, 0], [-235991608615, 124797732502, 0, 235991608615, 10567003804, -10661417758, 582858482, -10661417758, -10567003804, -582858482], [2904608249404, 0, -88154826174, 0, -2353196256, 26748419518, 605321969, 0, 0, 0], [0, 29541510380, -29541510380, -1557286496457, 0, 0, 0, 28636670220, 2825218424, -3289649067], [319927561881, 27756284083, 0, -319927561881, 4015056918, -1224847017, -67202191, -1224847017, -4015056918, 67202191], [0, -239563747857, 239563747857, 2202486451339, 0, 0, 0, -10521492681, 6658417668, -1045813686], [-2388366073338, 0, -62777199384, 0, 1647994464, -37325123832, -385443996, 0, 0, 0], [0, -70238058402, 70238058402, -56732544915, 0, 0, 0, -1065129142, -15853915644, 298512494], [0, -24972009707, 24972009707, 951929903451, 0, 0, 0, 735994713, -7048311984, -886886294], [-2696155294912, 0, -83554260296, 0, 7143867220, -4352821224, -1089390830, 0, 0, 0], [0, -186151805250, 186151805250, -4960151488887, 0, 0, 0, 20848847378, -2892542100, -2996801356], [5594098689297, -254540045697, 0, -5594098689297, 2983331646, -5498659445, 1208898257, -5498659445, -2983331646, -1208898257], [121206981240, 0, 128262874880, 0, 9813342140, -4419639840, 2740390562, 0, 0, 0], [0, -194116990399, 194116990399, -7421006569441, 0, 0, 0, -9921275999, 884733778, 1228501379], [-1828200614620, 0, -164360473082, 0, -9670719092, -34380916590, 3165377677, 0, 0, 0], [0, 230136040842, -230136040842, 1701113661243, 0, 0, 0, 9940575030, 5067961528, 3826586657], [5957843191604, 0, 9046179066, 0, -13414430064, -31630989690, -2346452331, 0, 0, 0], [-1307077836625, -231801404852, 0, 1307077836625, -15005578280, 25580525940, 35960699, 25580525940, 15005578280, -35960699], [-1917908648119, 191078904351, 0, 1917908648119, 21893452896, 7890482879, 2955636964, 7890482879, -21893452896, -2955636964], [221494767092, 0, 208188023630, 0, -6651422652, -5025280422, 1633105781, 0, 0, 0], [-1236956377611, -464687488304, 0, 1236956377611, -13414430808, -27351498792, -1112967058, -27351498792, 13414430808, 1112967058], [-6238685649244, 0, 11881105416, 0, 4841391240, -28737539616, 1776817488, 0, 0, 0], [0, -53201663404, 53201663404, -799925080105, 0, 0, 0, -76560900108, 13916027832, 4730737725], [609552084165, 243703916625, 0, -609552084165, -2426921700, 52699309453, 4985322104, 52699309453, 2426921700, -4985322104], [1163975377140, 0, 136686235560, 0, -22165175256, -92424007536, 947171568, 0, 0, 0], [2538928042219, 232470989308, 0, -2538928042219, 3791410000, 97230039324, -85271915, 97230039324, -3791410000, 85271915], [-9847219304872, 0, 364735697392, 0, -6446082496, 31583284512, -3009572360, 0, 0, 0], [-2240495399248, 0, 2146611378, 0, 19550307756, 72321946398, -4162935453, 0, 0, 0], [10127166303541, 271636566840, 0, -10127166303541, 7732296040, -24119131776, 6102804718, -24119131776, -7732296040, -6102804718], [0, -176097741189, 176097741189, 4141580343043, 0, 0, 0, -23808763929, 8133989430, -2226195351], [0, 128404703629, -128404703629, 9471295945275, 0, 0, 0, -53231499615, -27990231276, 3570247912], [0, 547312979052, -547312979052, -2445342568117, 0, 0, 0, -44601134348, 2797567200, -1100931041], [-5236138705518, 0, -617799613872, 0, -18153899232, -39671648520, 5732976648, 0, 0, 0], [3102784376132, 0, -441728221680, 0, 11151881220, -7441276440, -3233315274, 0, 0, 0], [0, 35195297445, -35195297445, 10152702011087, 0, 0, 0, -39211081203, 5944200962, 351878519], [-116839299839, -221635295445, 0, 116839299839, -21343574688, 67322989011, -1774092600, 67322989011, 21343574688, 1774092600], [-5110546940184, 0, 518546164216, 0, -33254321096, 16028512728, 3642752512, 0, 0, 0], [0, 63150590637, -63150590637, -9057334192793, 0, 0, 0, -779653275, 34964347350, 10716404097], [0, 158327379884, -158327379884, 1790994303077, 0, 0, 0, -92462370852, 53538741480, -5684240418], [2622097051842, 0, 131978838904, 0, 26922474544, 36200484680, -499723228, 0, 0, 0], [5092379570069, -155817712330, 0, -5092379570069, -8699196772, 118803985818, 5805866424, 118803985818, 8699196772, -5805866424], [0, -488663836417, 488663836417, 107469042299, 0, 0, 0, -23900343033, -29547639996, -15219339870], [18589512761176, 0, 641663090694, 0, 27844746248, 31730168754, -5516542353, 0, 0, 0], [-10109409319760, 0, -483727920488, 0, 22704749572, -29641655000, -5845911414, 0, 0, 0], [0, -547423268885, 547423268885, 13518283317771, 0, 0, 0, 68239833771, -8018470236, 11745160534], [-1588472090313, -599394785098, 0, 1588472090313, 46789183600, 18065905842, 5726678055, 18065905842, -46789183600, -5726678055], [-7853937836103, 745073020005, 0, 7853937836103, 11989751102, -5049604995, -7602181055, -5049604995, -11989751102, 7602181055], [-14089762656971, 789100462269, 0, 14089762656971, -27199518660, -144961989759, -3022085304, -144961989759, 27199518660, 3022085304], [4126600211969, -127188293322, 0, -4126600211969, -49601180412, 27544473314, -3999543518, 27544473314, 49601180412, 3999543518]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_7_c_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


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