
// Make newform 60.7.b.a in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_60_b();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_60_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_60_7_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_60_7_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 := [109931031040000, 0, 4432082624000, 0, 62009694600, 0, 399545800, 0, 1266870, 0, 1880, 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, 0], [238344569813409910695520000, 2273205106370932270032000, 7909049931361256107236000, 24679618512876342676600, 85715934913900011034000, -102680523661566568600, 394800526498394495200, -1297601919861485230, 766542184953294600, -3184303169286640, 480484922547160, -2161174211789], [-190675655850727928556416000, 2273205106370932270032000, -6327239945089004885788800, 24679618512876342676600, -68572747931120008827200, -102680523661566568600, -315840421198715596160, -1297601919861485230, -613233747962635680, -3184303169286640, -384387938037728, -2161174211789], [-48219832208291779317152000, 11190527948968977356944000, -4274179677195675252053600, 272810676523576274991400, -77702288100895866594400, 2813510140949802987800, -490174618297762769320, 12411881740750125830, -1141139858880097760, 23031666619364800, -782772258266396, 14002169117329], [-122615523941766187710560000, -68235895851277909278376000, -20781835533952028244908000, -1686557014387694461688800, -421352349445174157939500, -17661448773682443600200, -2767490969487221436850, -78547462319584400360, -6557217479285640050, -146336143747994980, -4531962922254605, -89134437642148], [47668913962681982139104000, 29213744136700452449616000, 1581809986272251221447200, 800386696448907098935800, 17143186982780002206800, 7203044892847178392200, 78960105299678899040, 28052555955197219010, 153308436990658920, 47429962122598080, 96096984509432, 27240080124843], [-9024566708955550716128000, 196113358764323204176000, -331321523682455423480000, 1606538739258979670600, -3539031638755691652000, 42750008345038431200, -15045650595148350000, 416749291051518170, -26668473966991600, 1182517185355900, -15699416590600, 881775295611], [3698258478339303494518256000, 84180774999801132086336000, 144657369969017936072897600, 424288383436038731358800, 1574046063689129398710400, 654192334995046443700, 6733948652627128027720, 18458285237961948010, 11996558150956738160, 74769096794570630, 7088792759002196, 62913551899733], [3041059798899173836641840000, 632124018703190564213464000, 152346284344880422876848000, 18848305539731890937651200, 1732559832651384068884500, 168750654784886128685300, 7399378108506328798350, 609085850997861033890, 13128154976838029550, 932830647249693670, 7744368545303355, 494627258408677], [-948691444751058853270320000, 663510146235169406010872000, -33215843337055182799440000, 19567351658810146139144600, -605889497538782164102500, 175630409351768286301900, -3421815603544074237750, 638169152469944120620, -7050745183199751750, 985633359044175710, -4487268979257375, 526390919884316], [-59586142453352477673880000, -113607772809337622972088000, -1977262482840314026809000, -3247492755298865421929400, -21428983728475002758500, -29927484751307722812600, -98700131624598623800, -115919459073381576930, -191635546238323650, -193869369603471240, -120121230636790, -110435887939899], [0, 8107191565790634863408000, 0, 323206330838086289139800, 0, 3844083953784745264600, 0, 18736813838662692610, 0, 37642739533404200, 0, 24017870888963]];
    Rf_basisdens := [1, 446218982903786501280000, 44621898290378650128000, 267731389742271900768000, 334664237177839875960000, 89243796580757300256000, 1940082534364289136000, 66932847435567975192000, 334664237177839875960000, 334664237177839875960000, 27888686431486656330000, 5820247603092867408000];
    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_60_b();"
function MakeCharacter_60_b()
    N := 60;
    order := 2;
    char_gens := [31, 41, 37];
    v := [2, 1, 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_60_b_Hecke();"
function MakeCharacter_60_b_Hecke(Kf)
    N := 60;
    order := 2;
    char_gens := [31, 41, 37];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 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 := 7;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1], [0, 5, 1, 0, 0, -1, 0, 0, 0, 0, -1, 0], [0, -3, 0, 3, 1, 0, 0, 0, -1, 1, 0, 0], [-14, 1, 0, 1, 0, 0, -4, 1, 1, 2, 2, 1], [0, 20, -3, 14, 4, 0, 0, 0, -3, 3, 0, 0], [-12, -6, 0, -42, 9, 0, 30, 3, -3, 0, 0, -9], [3402, -1, 0, -1, 0, 0, 16, -1, 5, 4, 4, -1], [0, 255, 35, 0, 0, 53, 0, 0, 0, 0, 7, 0], [12, -49, 0, -233, 46, 0, -30, -3, 3, 0, 0, 43], [0, -56, -33, 0, 0, -208, 0, 0, 0, 0, 0, 0], [0, -1530, 147, 384, 74, 0, 0, 0, 7, -7, 0, 0], [0, 793, -84, 643, 115, 0, 0, 0, 34, -34, 0, 0], [-24, -176, 0, -904, 182, 0, 60, 6, -6, 0, 0, 99], [-8286, -5, 0, -5, 0, 0, -52, -5, -41, -46, -46, -5], [0, 6344, 821, 0, 0, 24, 0, 0, 0, 0, -50, 0], [0, -284, 0, -1420, 284, 0, 0, 0, 0, 0, 0, -254], [0, -3634, -538, 0, 0, -366, 0, 0, 0, 0, 76, 0], [52170, -21, 0, -21, 0, 0, 348, -21, 111, 90, 90, -21], [0, 6856, -759, 1966, 450, 0, 0, 0, -142, 142, 0, 0], [288, -532, 0, -2372, 460, 0, -720, -72, 72, 0, 0, -318], [0, 27276, 3400, 0, 0, 196, 0, 0, 0, 0, 68, 0], [-300, -458, 0, -2590, 533, 0, 750, 75, -75, 0, 0, 413], [0, -11563, -936, 0, 0, 2275, 0, 0, 0, 0, -450, 0], [0, -45336, 4497, -114, 42, 0, 0, 0, -162, 162, 0, 0], [-40510, -117, 0, -117, 0, 0, 660, -117, -21, -138, -138, -117], [0, 23249, -2292, 791, 77, 0, 0, 0, 203, -203, 0, 0], [0, 57023, 6666, 0, 0, -2639, 0, 0, 0, 0, 264, 0], [792, 1408, 0, 7832, -1606, 0, -1980, -198, 198, 0, 0, 145], [0, -84879, 8652, -2481, -687, 0, 0, 0, 477, -477, 0, 0], [-721182, 313, 0, 313, 0, 0, -2644, 313, -383, -70, -70, 313], [-648, 1491, 0, 6807, -1329, 0, 1620, 162, -162, 0, 0, 932], [1637466, -469, 0, -469, 0, 0, 3004, -469, 95, -374, -374, -469], [0, 67485, 9025, 0, 0, 2431, 0, 0, 0, 0, -571, 0], [0, 112, -131, 0, 0, -2352, 0, 0, 0, 0, -298, 0], [0, -49162, 5379, -23944, -4762, 0, 0, 0, -67, 67, 0, 0], [0, 53205, -5544, -1329, 151, 0, 0, 0, -1042, 1042, 0, 0], [-1128, 5676, 0, 27252, -5394, 0, 2820, 282, -282, 0, 0, -1015], [3201946, 746, 0, 746, 0, 0, -2672, 746, 902, 1648, 1648, 746], [936, 3340, 0, 17636, -3574, 0, -2340, -234, 234, 0, 0, -2636], [0, -11532, -1484, 0, 0, -11036, 0, 0, 0, 0, -2674, 0], [0, 30817, -3588, 4099, 1527, 0, 0, 0, -1768, 1768, 0, 0], [-1584326, -485, 0, -485, 0, 0, 3272, -485, 181, -304, -304, -485], [6283090, -347, 0, -347, 0, 0, 1052, -347, -515, -862, -862, -347], [0, 132809, 13574, 0, 0, -4617, 0, 0, 0, 0, 4900, 0], [0, 278506, -27489, 4744, 188, 0, 0, 0, 1902, -1902, 0, 0], [-2046358, -836, 0, -836, 0, 0, 7664, -836, 1324, 488, 488, -836], [0, 10037, -1560, 43091, 8109, 0, 0, 0, 1273, -1273, 0, 0], [4488, 1672, 0, 12848, -2794, 0, -11220, -1122, 1122, 0, 0, 9644], [10005322, -81, 0, -81, 0, 0, -3168, -81, -1827, -1908, -1908, -81], [1104, 1120, 0, 6704, -1396, 0, -2760, -276, 276, 0, 0, 14035], [0, 352897, -36036, 62455, 11653, 0, 0, 0, 2095, -2095, 0, 0], [0, -433420, 42669, 49454, 9364, 0, 0, 0, 1317, -1317, 0, 0], [-1608, -16083, 0, -82023, 16485, 0, 4020, 402, -402, 0, 0, -9384], [16755338, 643, 0, 643, 0, 0, -5524, 643, -833, -190, -190, 643], [0, -346925, -37793, 0, 0, 16497, 0, 0, 0, 0, -7021, 0], [2844, -32271, 0, -158511, 31560, 0, -7110, -711, 711, 0, 0, 8613], [0, 370170, 53495, 0, 0, 55406, 0, 0, 0, 0, -596, 0], [0, 140205, -16344, 68727, 15327, 0, 0, 0, -3954, 3954, 0, 0], [0, -556498, -61835, 0, 0, 29186, 0, 0, 0, 0, -8158, 0], [-3888, 15656, 0, 74392, -14684, 0, 9720, 972, -972, 0, 0, -24958], [0, -301722, -36686, 0, 0, 34138, 0, 0, 0, 0, 6476, 0], [0, 281713, -33180, 180307, 38399, 0, 0, 0, -5844, 5844, 0, 0], [35045506, 2277, 0, 2277, 0, 0, -6996, 2277, 3333, 5610, 5610, 2277], [0, 123356, -4056, 0, 0, -111332, 0, 0, 0, 0, 11118, 0], [0, 398234, -35697, -222496, -43960, 0, 0, 0, -1348, 1348, 0, 0], [-13766390, 1034, 0, 1034, 0, 0, -7832, 1034, -814, 220, 220, 1034], [0, 761985, -76884, 155367, 27037, 0, 0, 0, 10091, -10091, 0, 0], [10056, 35036, 0, 185236, -37550, 0, -25140, -2514, 2514, 0, 0, -24526], [0, -168667, -12630, 0, 0, 106171, 0, 0, 0, 0, 9636, 0], [0, -863821, -113297, 0, 0, -37375, 0, 0, 0, 0, 1295, 0], [-20966046, 485, 0, 485, 0, 0, -3548, 485, -319, 166, 166, 485], [0, -724458, 79059, -303312, -61574, 0, 0, 0, 2279, -2279, 0, 0], [12216, -30807, 0, -141819, 27753, 0, -30540, -3054, 3054, 0, 0, 7834], [0, 976157, 132993, 0, 0, 110215, 0, 0, 0, 0, 5607, 0], [13608, 49880, 0, 263008, -53282, 0, -34020, -3402, 3402, 0, 0, 59964], [-17244934, -5009, 0, -5009, 0, 0, 10604, -5009, -9725, -14734, -14734, -5009], [11904, 87176, 0, 447784, -90152, 0, -29760, -2976, 2976, 0, 0, -2031], [51989714, 4291, 0, 4291, 0, 0, -14788, 4291, 5479, 9770, 9770, 4291], [-24768, 52956, 0, 240012, -46764, 0, 61920, 6192, -6192, 0, 0, 17144], [0, -1923552, -256892, 0, 0, -38480, 0, 0, 0, 0, 23276, 0], [-18788742, -9873, 0, -9873, 0, 0, 83928, -9873, 12345, 2472, 2472, -9873], [0, -924182, 85671, 211048, 46420, 0, 0, 0, -10526, 10526, 0, 0], [5028, 44365, 0, 226853, -45622, 0, -12570, -1257, 1257, 0, 0, -28469], [0, 2485786, 313642, 0, 0, -38466, 0, 0, 0, 0, -15454, 0], [-3372, -73406, 0, -370402, 74249, 0, 8430, 843, -843, 0, 0, -78869], [0, 820173, 125406, 0, 0, 125451, 0, 0, 0, 0, -14406, 0], [0, -1331592, 137073, -265530, -50778, 0, 0, 0, -5820, 5820, 0, 0], [-6840, -148004, 0, -746860, 149714, 0, 17100, 1710, -1710, 0, 0, 25244], [0, 669701, 116332, 0, 0, 328667, 0, 0, 0, 0, 16928, 0], [30312, 58144, 0, 321032, -65722, 0, -75780, -7578, 7578, 0, 0, -67529], [-51157582, 18737, 0, 18737, 0, 0, -137276, 18737, -12427, 6310, 6310, 18737], [0, -1504618, 149763, 166184, 28862, 0, 0, 0, 10937, -10937, 0, 0], [-44004, 81890, 0, 365446, -70889, 0, 110010, 11001, -11001, 0, 0, -66025], [-13176, 15796, 0, 65804, -12502, 0, 32940, 3294, -3294, 0, 0, 60662], [0, 1380032, 155547, 0, 0, -11648, 0, 0, 0, 0, 31002, 0], [10010682, 44, 0, 44, 0, 0, 15928, 44, 8096, 8140, 8140, 44], [0, -1098430, -156015, 0, 0, 101998, 0, 0, 0, 0, 62922, 0], [0, 294389, -24840, -153169, -33193, 0, 0, 0, 6398, -6398, 0, 0], [0, -3255336, 336849, -179322, -48746, 0, 0, 0, 32204, -32204, 0, 0], [37716, -212175, 0, -1023159, 202746, 0, -94290, -9429, 9429, 0, 0, -41987], [632322, -7231, 0, -7231, 0, 0, 7396, -7231, -17995, -25226, -25226, -7231], [0, 238728, 18932, 0, 0, -16288, 0, 0, 0, 0, 17746, 0], [0, 2560282, -280617, 1481128, 287836, 0, 0, 0, 20974, -20974, 0, 0], [0, 1836849, -178596, -338649, -64923, 0, 0, 0, -7017, 7017, 0, 0], [82632, -48224, 0, -158488, 27566, 0, -206580, -20658, 20658, 0, 0, -54830], [-57720390, -2297, 0, -2297, 0, 0, -4084, -2297, -8933, -11230, -11230, -2297], [0, -3376217, -455394, 0, 0, -359359, 0, 0, 0, 0, -23106, 0], [0, 409955, 3455, 0, 0, -519687, 0, 0, 0, 0, -34343, 0], [0, 2402861, -225408, -1029445, -196371, 0, 0, 0, -23795, 23795, 0, 0], [-26155902, -3283, 0, -3283, 0, 0, 47140, -3283, 13721, 10438, 10438, -3283], [-74345158, 28839, 0, 28839, 0, 0, -128088, 28839, 22473, 51312, 51312, 28839], [-44964, -136093, 0, -725429, 147334, 0, 112410, 11241, -11241, 0, 0, -24299], [0, 3578026, 441557, 0, 0, 63454, 0, 0, 0, 0, 27256, 0], [0, 6562388, -667395, 185054, 49436, 0, 0, 0, -31063, 31063, 0, 0], [0, 568537, -29244, -1622525, -316437, 0, 0, 0, -20170, 20170, 0, 0], [-82344, -229052, 0, -1227604, 249638, 0, 205860, 20586, -20586, 0, 0, -99303], [-153685902, 2803, 0, 2803, 0, 0, -31684, 2803, -7433, -4630, -4630, 2803], [0, 53516, 33232, 0, 0, -161356, 0, 0, 0, 0, -93424, 0], [0, 6649969, -674604, 492811, 98147, 0, 0, 0, 1038, -1038, 0, 0], [0, -3835750, 405999, -1286800, -251840, 0, 0, 0, -13800, 13800, 0, 0], [-99408654, -28183, 0, -28183, 0, 0, 242164, -28183, 36533, 8350, 8350, -28183], [45216, 301469, 0, 1552561, -312773, 0, -113040, -11304, 11304, 0, 0, 34516], [111742074, 24810, 0, 24810, 0, 0, -225120, 24810, -38130, -13320, -13320, 24810], [128064, 70796, 0, 482044, -102812, 0, -320160, -32016, 32016, 0, 0, -143424], [0, -3428583, -528768, 0, 0, -525993, 0, 0, 0, 0, 68892, 0], [0, 2437733, 105801, 0, 0, -1110329, 0, 0, 0, 0, 120249, 0], [-8944622, 18593, 0, 18593, 0, 0, -224924, 18593, -56683, -38090, -38090, 18593], [0, -2295418, 234723, -608488, -110050, 0, 0, 0, -29119, 29119, 0, 0], [-194514294, -38933, 0, -38933, 0, 0, 271664, -38933, 19033, -19900, -19900, -38933], [0, -6999693, -908593, 0, 0, 429377, 0, 0, 0, 0, 174607, 0], [84408, 479036, 0, 2479588, -500138, 0, -211020, -21102, 21102, 0, 0, -70870], [210498578, -32698, 0, -32698, 0, 0, 73756, -32698, -61216, -93914, -93914, -32698], [0, -2123775, 262332, -1316349, -302649, 0, 0, 0, 98448, -98448, 0, 0], [0, 732342, 48569, 0, 0, 250898, 0, 0, 0, 0, 148672, 0], [0, 3296977, -261948, -1838765, -419377, 0, 0, 0, 129060, -129060, 0, 0], [-191880, 213732, 0, 876780, -165762, 0, 479700, 47970, -47970, 0, 0, 198318], [-304840830, 2573, 0, 2573, 0, 0, -32204, 2573, -8383, -5810, -5810, 2573], [-12288, -290087, 0, -1462723, 293159, 0, 30720, 3072, -3072, 0, 0, -26698], [0, -4187983, -442292, 0, 0, 156455, 0, 0, 0, 0, -123298, 0], [0, -7559256, 770121, -1824954, -327818, 0, 0, 0, -92932, 92932, 0, 0], [337597858, 62203, 0, 62203, 0, 0, -525484, 62203, -76133, -13930, -13930, 62203], [178296, -766028, 0, -3651844, 721454, 0, -445740, -44574, 44574, 0, 0, -82686], [0, -1882513, -275109, 0, 0, 1053469, 0, 0, 0, 0, 342957, 0], [0, -10565271, 992004, 2192487, 472953, 0, 0, 0, -86139, 86139, 0, 0], [-122614334, 68577, 0, 68577, 0, 0, -288516, 68577, 61473, 130050, 130050, 68577], [0, 7371926, -773661, 990080, 225794, 0, 0, 0, -69445, 69445, 0, 0], [0, 4065697, 705789, 0, 0, 838043, 0, 0, 0, 0, -185643, 0], [-131580, -292197, 0, -1592565, 325092, 0, 328950, 32895, -32895, 0, 0, 158985], [0, -8603188, -983015, 0, 0, 264836, 0, 0, 0, 0, -118558, 0], [0, -17272620, 1672413, 1550094, 349764, 0, 0, 0, -99363, 99363, 0, 0], [0, 10981950, 1308375, 0, 0, -322062, 0, 0, 0, 0, 48222, 0], [-232080, -831788, 0, -4391020, 889808, 0, 580200, 58020, -58020, 0, 0, 220264], [132490682, -126481, 0, -126481, 0, 0, 1027660, -126481, 134387, 7906, 7906, -126481], [-109716, -546877, 0, -2844101, 574306, 0, 274290, 27429, -27429, 0, 0, -666211], [0, 18058526, 2148506, 0, 0, -115206, 0, 0, 0, 0, 188818, 0], [273132, -373526, 0, -1594498, 305243, 0, -682830, -68283, 68283, 0, 0, 271467], [0, -18581686, 1878207, 57368, -23836, 0, 0, 0, 88274, -88274, 0, 0], [0, 2872369, -376116, 2955391, 640697, 0, 0, 0, -124047, 124047, 0, 0], [0, 9578943, 1487716, 0, 0, 2801641, 0, 0, 0, 0, 119714, 0], [-280368, 664260, 0, 3040932, -594168, 0, 700920, 70092, -70092, 0, 0, 238251], [0, -22659107, 2242560, 1194691, 238033, 0, 0, 0, 2263, -2263, 0, 0], [0, 15239798, -1569549, 3536024, 665286, 0, 0, 0, 104797, -104797, 0, 0], [-249139766, -60465, 0, -60465, 0, 0, -71124, -60465, -216957, -277422, -277422, -60465], [0, -4332565, -827465, 0, 0, -1627327, 0, 0, 0, 0, 164957, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_60_b_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


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