
// Make newform 12.10.b.a in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_12_b();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_12_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_12_10_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_12_10_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 := [72057594037927936, 0, 189115999977472, 0, -443455373312, 0, -33287045120, 0, 40456192, 0, -2031680, 0, -1652, 0, 43, 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, 0, 0, 0, 0], [166026255794176, 0, -443455373312, 0, -33287045120, 0, 40456192, 0, -2031680, 0, -1652, 0, 43, 0, 1, 0], [0, -189115999977472, 0, 443455373312, 0, 33287045120, 0, -40456192, 0, 2031680, 0, 1652, 0, -43, 0, -1], [8931773249656767643648, 4345864626033657905152, -26119808701129818112, -509119879538802688, -78059002977583104, -15891641341575168, -1382370481012736, -44517732626432, 1804532080640, 674888696768, -212909683200, -8643744564, 425170816, -22335365, 9143936, 637169], [8931773249656767643648, 537092232695555031040, -26119808701129818112, -652009183016648704, -78059002977583104, -26617326446051328, -1382370481012736, -31482019352576, 1804532080640, 20244830528, -212909683200, -9176048700, 425170816, -8479991, 9143936, 959387], [-251842991552892445392896, 537092232695555031040, 1397128505694416273408, -652009183016648704, 2355279720918024192, -26617326446051328, 43307163991932928, -31482019352576, -183488206102528, 20244830528, 4766870327808, -9176048700, -34687491968, -8479991, -378805888, 959387], [0, 2799334614085140480, 0, 5541582627405824, 0, 70438257426432, 0, 1677154086912, 0, 5013955904, 0, -148986492, 0, -69639, 0, -1429], [57341232764015127560192, 4579691263600036413440, 1798158832522051452928, -3164786379431346176, -847924246012231680, -125936175493939200, -6355661972045824, -166100572278784, -18908811223040, 537653396800, -1087260059136, -45525374076, 2717016704, -51636871, 59467648, 4582123], [0, 839727816458108928, 0, -17850278145425408, 0, 109751967940608, 0, -518784897024, 0, 4422721600, 0, -44601228, 0, 541269, 0, -2177], [-17863546499313535287296, 1152907848672429998080, 52239617402259636224, -1395167900377022464, 156118005955166208, -56642082274541568, 2764740962025472, -68643048943616, -3609064161280, 85568600768, 425819366400, -19729675140, -850341632, -19152761, -18287872, 2045717], [-135591028028648036761600, -10847676109347144859648, -8536207668654821605376, 237644228987340193792, 72188605948785328128, -1083780345646546944, -277462607502770176, 7226284146102272, 2390953246597120, -28258362075968, -11545847514624, 537397513116, 280027605632, -3621851377, -2152808576, 26465965], [-139007216637491323863040, 12687706179602374197248, 166914350852262068224, 5911364222297571328, 6814035570189139968, -702378771081068544, 8059396954259456, 821797006954496, -5182676615168, -9964457906240, 2349068467200, -161265047412, 2170877696, -976370197, -245603072, 31732033], [738782029258875811659776, 6571250440876284968960, -13571989621064131936256, -232475785291032952832, 88515715644669296640, 1293143728846798848, -354167156615151616, -6970082753523712, 3488206238654464, 27878188809664, -39658475693568, -464166558228, 408969810560, 3694309763, -1779665024, -34033655], [477053019108543712722944, -57528434259161943900160, 1831620589367005806592, 379040491276343443456, -27467756501955772416, 35237391340929024, 104248045421723648, 7422759422234624, -638297987698688, -31156196711744, -7633305460992, 1599836006652, -77113794112, -3923470681, 1228670272, -45803147], [267956514250091099324416, -85106232536718198702080, -304660587862533603328, 48943808136316190720, -13321197521838538752, 1102756943301181440, -15014518644015104, 12851483062546432, 22526556962816, 10805594623040, -4473871429632, 1983977581620, -5062507520, -1771244603, 475188224, -94030897], [-1103682226743323094155264, -119888760894863741812736, 1072118997888838664192, 46421072390358302720, 59162117621812297728, 5770129753204850688, 51529025758167040, -4475741811077120, -73634519498752, 65279280922304, 17689637987328, 1715401087932, 27522957568, 5822982103, -2036628736, -275516155]];
    Rf_basisdens := [1, 1099511627776, 281474976710656, 15116050674292359168, 15116050674292359168, 15116050674292359168, 5488762045857792, 15116050674292359168, 2744381022928896, 1162773128791719936, 15116050674292359168, 15116050674292359168, 15116050674292359168, 7558025337146179584, 7558025337146179584, 15116050674292359168];
    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_12_b();"
function MakeCharacter_12_b()
    N := 12;
    order := 2;
    char_gens := [7, 5];
    v := [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_12_b_Hecke();"
function MakeCharacter_12_b_Hecke(Kf)
    N := 12;
    order := 2;
    char_gens := [7, 5];
    char_values := [[-1, 0, 0, 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, 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, 0, -1, 0, 0, 0, 0, 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, -2, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [4, -1, -42, 0, -14, 0, -2, 0, 0, 0, 0, -5, 0, 0, 1, 1], [-6061, -33, -2, 0, -4, 0, -1, 2, -2, -1, 0, -15, -3, -1, 0, -1], [-35, 15, -1624, 3, -11, 0, 11, 0, -8, -3, 2, 59, -1, 1, 8, -3], [-264, 412, -49, -2, -212, 22, -8, 20, 8, 1, 8, 96, -16, -8, 0, 16], [104, -24, 4946, 44, -192, 0, 24, 0, -32, 6, 16, -152, -8, 8, 16, 24], [86, -30, -33230, 290, -210, 0, -134, 0, -95, 6, 28, -182, -14, 14, -32, 6], [-2264, 4884, -54, -102, -259, -219, 40, 124, -40, 10, -40, -480, 80, 40, 0, -80], [689033, -4659, -154, -186, -758, 0, 169, 34, 218, 49, -360, 1455, 147, 169, 0, 49], [968, -480, -401764, 3076, -3428, 0, 712, 0, 2102, 96, -368, -1280, 184, -184, -104, 96], [2872, -4868, 1487, 46, 6368, 1298, 56, -204, -56, -223, -56, -672, 112, 56, 0, -112], [1000, -254, 748226, 6248, 1208, 0, -652, 0, 64, 426, -32, -1206, 16, -16, 270, 254], [-3984, 1920, -1501434, 10648, -9688, 0, -2064, 0, -12941, -384, 1248, 5568, -624, 624, 528, -384], [5776, -1292, 1988701, 16272, -88946, 0, 2888, 0, -2432, -2193, 1216, -8892, -608, 608, 684, 1292], [3139897, 61965, 558, 746, 8206, 0, -47, -1398, -934, -887, -2520, -8265, -2661, -47, 0, -887], [-1488, 3480, 33057, -84, 171536, 13288, 48, 72, -48, -6597, -48, -576, 96, 48, 0, -96], [-10992, 2578, 2760364, 22564, 262280, 0, -964, 0, 2720, 9672, -1360, 15610, 680, -680, -1898, -2578], [1495474, -85140, -860, -1882, -12186, 0, 1320, 1124, 2904, 1584, 792, 22176, 4752, 1320, 0, 1584], [-90952, 213532, -102862, -5186, -572455, -22163, 3000, 4372, -3000, 21498, -3000, -36000, 6000, 3000, 0, -6000], [-18700, 3927, -443508, -4424, -793250, 0, -19074, 0, 11968, -32334, -5984, 31603, 2992, -2992, -935, -3927], [-3367, 2475, 6334196, -41261, 49573, 0, -15041, 0, 245654, -495, 5146, 103, -2573, 2573, -1088, -495], [1951603, -2415, -14828, -3367, -4299, 0, 1227, 4280, -8094, -9321, -31644, -76527, -27963, 1227, 0, -9321], [-47554, 19050, 16336046, -143534, 120958, 0, 35698, 0, -352369, -3810, -3668, 87346, 1834, -1834, 13264, -3810], [-43936, -28304, -672196, 5752, -3730059, 44307, -9120, 6736, 9120, 127620, 9120, 109440, -18240, -9120, 0, 18240], [70776, -16034, -22975625, -193496, -4128202, 0, 27692, 0, -26560, -158607, 13280, -106730, -6640, 6640, 9394, 16034], [-1803795, 1076361, 39030, 26770, 158054, 0, -13987, -25566, -14510, -523, 40392, -88629, -1569, -13987, 0, -523], [-43214, 22710, 33370696, -242186, 269178, 0, -51778, 0, 330684, -4542, 22580, 50222, -11290, 11290, 2336, -4542], [964216, -1659716, -2023714, 17038, -11749379, 211497, 16760, -67596, -16760, 428318, -16760, -201120, 33520, 16760, 0, -33520], [-249528, 61082, -8452875, -107192, -11847886, 0, 75364, 0, 20800, -491901, -10400, 326210, 5200, -5200, -55882, -61082], [199126, -101670, -7155188, 51670, -149862, 0, 192170, 0, -144762, 20334, -89764, -247486, 44882, -44882, -16120, 20334], [-1721120, 3566704, 3330245, -68360, 18690180, -76976, 18656, 99408, -18656, -674737, -18656, -223872, 37312, 18656, 0, -37312], [-194520, 110520, -47106122, 410904, -216408, 0, -362472, 0, 1672571, -22104, 141456, 181272, -70728, 70728, -4416, -22104], [-1084880, 1886040, -4654320, -20340, -25750451, -95393, -17360, 75400, 17360, 905368, 17360, 208320, -34720, -17360, 0, 34720], [-162365237, -10431081, -332946, -124672, -1387556, 0, -54089, 357522, -83602, -29513, 73728, -590151, -88539, -54089, 0, -29513], [416344, -1636596, 5450379, 65142, 31117416, -71326, -66728, 3172, 66728, -1130747, 66728, 800736, -133456, -66728, 0, 133456], [459336, -107388, 125429746, 1096292, 29244352, 0, 53280, 0, -119136, 1220190, 59568, -656076, -29784, 29784, 77604, 107388], [-280536, 95400, -168360566, 1137408, -1420032, 0, 475512, 0, 2031317, -19080, -103152, 606984, 51576, -51576, 108816, -19080], [-136976, 29156, 212815663, 1693760, -35268358, 0, -124856, 0, 81408, -1303899, -40704, 227188, 20352, -20352, -8804, -29156], [2804435727, 14274579, 362734, 128452, 1851376, 0, 113371, -483646, 105830, -7541, -362736, 612357, -22623, 113371, 0, -7541], [-1289640, 306834, 38545166, 309808, 41910008, 0, 52932, 0, 249216, 1468206, -124608, 1783386, 62304, -62304, -244530, -306834], [-1790939726, -10545372, -507852, -343498, -1638314, 0, 226432, 234132, 179144, -47288, -821160, 933000, -141864, 226432, 0, -47288], [991530, -417570, -73017442, 926654, -635150, 0, -426618, 0, 6958983, 83514, -21276, -1711242, 10638, -10638, -239904, 83514], [15300592, -27600968, -2666128, 349756, -14736635, -2606505, 164336, -1028184, -164336, 837464, -164336, -1972032, 328672, 164336, 0, -328672], [-13548848, 27501608, -45443, -501964, 338716, -494476, 100560, 802808, -100560, -91137, -100560, -1206720, 201120, 100560, 0, -201120], [3257880, -10358708, -1029190, 355990, -6242623, 2949501, -325352, -61276, 325352, 22882, 325352, 3904224, -650704, -325352, 0, 650704], [1295892, -268033, -752724032, -6140328, 53078886, 0, 1477774, 0, -895040, 1915230, 447520, -2235205, -223760, 223760, 44273, 268033], [5472388975, -65964141, -2274690, -921844, -8921096, 0, -185813, 2215314, -431002, -245189, -178128, -3321579, -735567, -185813, 0, -245189], [-2942611, 1207575, 187074380, -2123657, 979873, 0, 1760107, 0, 13102370, -241515, -88862, 5249539, 44431, -44431, 768976, -241515], [2241688, -576722, -798883898, -6385032, -50480072, 0, -1740244, 0, 260800, -1866546, -130400, -2622810, 65200, -65200, 641922, 576722], [-12539756258, -2713536, -375996, -157918, -502574, 0, 99796, 116244, -60160, -159956, -779256, -840828, -479868, 99796, 0, -159956], [-1408548, 283557, 76144740, 838248, 89957274, 0, -1901766, 0, 1097280, 3381654, -548640, 2515065, 274320, -274320, -9237, -283557], [2064978, -914490, 753909280, -5186466, 5398866, 0, -188802, 0, 29528, 182898, -259596, -3321666, 129798, -129798, -418896, 182898], [-982144, 327078, -711318264, -6533948, -231832424, 0, 3589668, 0, -1304672, -9394236, 652336, 330718, -326168, 326168, -653246, -327078], [4056216, -1671000, -1110593542, 8952152, -7432088, 0, -2325912, 0, -39420291, 334200, 91632, -7201464, -45816, 45816, -1048416, 334200], [42477208, -74067060, 38649978, 810294, 198482601, 9555509, 661912, -2944412, -661912, -6743966, -661912, -7942944, 1323824, 661912, 0, -1323824], [41977174633, 55899645, 1388518, -10666, 6704730, 0, 1202553, -2383774, 1409850, 207297, -2985768, 9080991, 621891, 1202553, 0, 207297], [7028947, -3241815, 370968244, -822839, 410655, 0, 1369685, 0, 57041118, 648363, -1502818, -10609987, 751409, -751409, -1193680, 648363], [-33420928, 61764864, -43683423, -856704, -247192048, 6852188, -240256, 2193920, 240256, 8153747, 240256, 2883072, -480512, -240256, 0, 480512], [-6303810, 2798010, -840400466, 5222538, -5815290, 0, 477714, 0, 18240095, -559602, 822828, 10105986, -411414, 411414, 1267392, -559602], [50207072, -101245456, -104616323, 1818296, -576444424, -10215876, -319136, -2998320, 319136, 21331447, 319136, 3829632, -638272, -319136, 0, 638272], [668816, -316914, 1138424276, 8900492, -598056312, 0, -6023388, 0, 2395360, -22397064, -1197680, 810790, 598840, -598840, 915754, 316914], [-75441593991, 92191011, 218000, 1967365, 13099209, 0, -1505067, -924596, -3716730, -2211663, -2119788, -28935369, -6634989, -1505067, 0, -2211663], [-3883636, 1768740, -163051358, -430588, 460956, 0, -406892, 0, -65196383, -353748, 722680, 5983348, -361340, 361340, 699904, -353748], [-10690384, 28757592, -9462939, -839412, -65029568, 7415496, 646832, 385160, -646832, 2203655, -646832, -7761984, 1293664, 646832, 0, -1293664], [-121952806237, -251552331, -6684232, -4229433, -34717565, 0, 862075, 6734716, 1774634, 912559, 151452, 13385481, 2737677, 862075, 0, 912559], [-20921028, 5378901, -1575198692, -15415528, -82659110, 0, 16108986, 0, -2378304, -6759906, 1189152, 24516201, -594576, 594576, -5973477, -5378901], [145120130295, -45729717, -526170, -1303832, -6857644, 0, 1129979, 347706, 2081494, 951515, -535392, 15343509, 2854545, 1129979, 0, 951515], [-4141516, 1742460, 5035630352, -40360628, 39128212, 0, 1808236, 0, -108229864, -348492, 80776, 7156780, -40388, 40388, 1005088, -348492], [-18390624, 4552006, 5674890064, 44216116, -518897704, 0, 7460612, 0, 730400, -20679972, -365200, 23490430, 182600, -182600, -4369406, -4552006], [-77028728, 188162884, -119709718, -4851854, -681121507, -9871075, 3129224, 3445260, -3129224, 25130426, -3129224, -37550688, 6258448, 3129224, 0, -6258448], [184999628399, 44014059, 1288742, 2700168, 8155252, 0, -3046181, 692026, -4111594, -1065413, 5942304, -27865803, -3196239, -3046181, 0, -1065413], [55413992, -83663212, 215619307, 242906, 1197715448, -9838122, 1905640, -4297092, -1905640, -41121059, -1905640, -22867680, 3811280, 1905640, 0, -3811280], [38819000, -9185918, -9303567378, -72439584, 1199773160, 0, 306116, 0, -8301312, 47985966, 4150656, -54230902, -2075328, 2075328, 7110590, 9185918], [1810276, -2052420, 12508727966, -94909596, 84089404, 0, 19345820, 0, 130145743, 410484, -6231064, 3841964, 3115532, -3115532, 1884080, 410484], [285881519353, -88169067, -6364154, -2609842, -13483278, 0, 964545, 3290594, -1144470, -2109015, -9220680, -13193865, -6327045, 964545, 0, -2109015], [12296787, -6574815, 10095172936, -80165379, 71494155, 0, 16489605, 0, -263567776, 1314963, -6965538, -13683147, 3482769, -3482769, -462120, 1314963], [-284118809850, 744202788, 19594856, 11044624, 101148960, 0, -405180, -21278888, -2494392, -2089212, -5052096, -21233988, -6267636, -405180, 0, -2089212], [18973532, -3721031, -8948534490, -74684832, 15995750, 0, 29362610, 0, -16357632, -882780, 8178816, -34962787, -4089408, 4089408, -368377, 3721031], [368833435987, 108518823, 10015806, 1493720, 14839348, 0, 1931575, -6850590, 7028366, 5096791, 9495648, 57460569, 15290373, 1931575, 0, 5096791], [-51418024, 12424990, 17683502630, 146860984, 3260316184, 0, 9387404, 0, 6872256, 124619214, -3436128, 68997206, 1718064, -1718064, -10706926, -12424990], [-491886845121, -143425443, -3674220, 6020557, -10855111, 0, -12058849, 12076584, -15715334, -3656485, 25207092, -105261459, -10969455, -12058849, 0, -3656485], [34613424, -74289000, -26813976, 1535532, -235841483, 88114487, -580944, -1909176, 580944, 5396064, 580944, 6971328, -1161888, -580944, 0, 1161888], [60309364, -14415389, -12858213274, -108059776, -3861715942, 0, -5000506, 0, -10591232, -145328904, 5295616, -82668177, -2647808, 2647808, 11767581, 14415389], [55423857, -25638405, -31636574352, 243213031, -247135567, 0, 11992119, 0, -85175108, 5127681, -12216630, -83248041, 6108315, -6108315, -9274728, 5127681], [-518058018202, -1124254428, -26806664, -19137384, -155319448, 0, 4981652, 28311464, 11468104, 6486452, 4514400, 88267980, 19459356, 4981652, 0, 6486452], [76872454, -33090990, 11394297626, -73056702, 89345806, 0, -21887734, 0, -491713355, 6618198, -5091844, -128798470, 2545922, -2545922, -17308672, 6618198], [378944408, -725765300, -840567202, 11311894, -4636619379, -102228639, 678552, -23980892, -678552, 173316750, -678552, -8142624, 1357104, 678552, 0, -1357104], [-55063252, 12733277, 38408571606, 313527920, 152995518, 0, -11704742, 0, 16520576, 11722236, -8260288, 80186961, 4130144, -4130144, -8603133, -12733277], [-56047376, 13630164, -6132608684, -46066976, 5260987104, 0, 13519848, 0, 6106880, 193469412, -3053440, 74257700, 1526720, -1526720, -12103444, -13630164], [-926536272, 1836847960, 208080308, -31572596, 1046677801, 154516915, 3351472, 56442248, -3351472, -50893628, -3351472, -40217664, 6702944, 3351472, 0, -6702944], [-110997392, 25046388, 3307788849, 16955744, -5012261290, 0, -47213784, 0, 43247360, -203950293, -21623680, 168479300, 10811840, -10811840, -14234548, -25046388], [743906896, -1545766552, -390334739, 29807828, -2395001828, 227527508, -8397744, -42820168, 8397744, 81592335, 8397744, 100772928, -16795488, -8397744, 0, 16795488], [190500416, -44948710, 45573672696, 378754652, -3196646712, 0, 6452764, 0, -42822304, -85824324, 21411152, -267565854, -10705576, 10705576, 34243134, 44948710], [-62634236, 25051260, -2895498142, -991596, -29094260, 0, 47639996, 0, -61817327, -5010252, -5022424, 115260140, 2511212, -2511212, 17541968, -5010252], [40372518, -15681750, -50151736692, 389720278, -366229606, 0, -37972326, 0, 2225638, 3136350, 5472636, -76808622, -2736318, 2736318, -12145368, 3136350], [41864328, -370641116, 840609503, 19494754, 5037869596, -140557718, -23278712, 7567916, 23278712, -183602711, 23278712, 279344544, -46557424, -23278712, 0, 46557424], [793824079837, -12585519, 17852542, 3820622, 3078882, 0, -1360515, -4920214, 10211298, 11571813, 38796984, 95983227, 34715439, -1360515, 0, 11571813], [-379832280, 968316148, -1380572605, -26467190, -7868498212, 8672322, 18684712, 15564956, -18684712, 284212357, -18684712, -224216544, 37369424, 18684712, 0, -37369424], [125693898, -61475730, -40344140086, 316798118, -355008950, 0, 79164102, 0, 472398285, 12295146, -43695708, -170806650, 21847854, -21847854, -15037584, 12295146], [1611788, -1780355, -47557623138, -370401792, 10045295582, 0, -53147398, 0, 22038528, 373917588, -11019264, 13136753, 5509632, -5509632, 7289987, 1780355], [72038846, -35259870, 58290377620, -420113626, 397982154, 0, 45782050, 0, 670069690, 7051974, -25169684, -97752086, 12584842, -12584842, -8571080, 7051974], [653490848, -993605232, 701383713, 3302664, 3346928216, 354432476, 21912224, -50429776, -21912224, -117043453, -21912224, -262946688, 43824448, 21912224, 0, -43824448], [-776144193457, -2719531455, -70228552, -57438021, -387683705, 0, 27319183, 60237676, 44647490, 17328307, -29972628, 319869861, 51984921, 27319183, 0, 17328307], [-55342920, 13392414, -67496635201, -560358008, -1552970170, 0, 10825452, 0, 7093056, -88220343, -3546528, 74055126, 1773264, -1773264, -11619150, -13392414], [-127217788, 54534780, -27501268744, 164364628, -193329716, 0, 39781948, 0, -549104548, -10906956, 7331368, 214383340, -3665684, 3665684, 29055184, -10906956], [-91339352, 21639296, -33898128790, -305826788, -14345354160, 0, 239080, 0, 19128672, -574423170, -9564336, 127325152, 4782168, -4782168, -16857128, -21639296], [-543318487518, -992440884, -4216156, -1457594, -120170874, 0, -13706808, 30328804, -1300968, 12405840, 78337944, 29411712, 37217520, -13706808, 0, 12405840], [-1504920008, 2840924188, -537089938, -42326594, -2569895187, -284502359, -6018760, 96690708, 6018760, 84468590, 6018760, 72225120, -12037520, -6018760, 0, 12037520], [261160465869, -846936087, -47220146, -12140642, -115401710, 0, -6501707, 37284698, -22938862, -16437155, -29806344, -186944637, -49311465, -6501707, 0, -16437155], [174373439, -84650115, 39853194220, -321498235, 274070979, 0, 99927721, 0, -2551936934, 16930023, -57573674, -240383135, 28786837, -28786837, -22003232, 16930023], [384845936, -696202824, 359225181, 8921148, 2323275256, -370988448, 3974768, -25791832, -3974768, -64301809, -3974768, -47697216, 7949536, 3974768, 0, -7949536], [60575280, 39505304, 3586480780, -7960660, 19751556281, 224122979, 12612656, -9303992, -12612656, -707867764, -12612656, -151351872, 25225312, 12612656, 0, -25225312], [-59635881, 28947645, 48671315632, -337693503, 353889255, 0, -34132095, 0, 2031619988, -5789529, 19676934, 82226241, -9838467, 9838467, 7530120, -5789529], [-472247064, 373341780, -3936752709, 19264698, -21822869260, 170158714, -43548696, 48567996, 43548696, 751507725, 43548696, 522584352, -87097392, -43548696, 0, 87097392], [-21936120, 6198452, 68383471178, 525460004, -20171514320, 0, 38116096, 0, -11430752, -759394746, 5715376, 19561508, -2857688, 2857688, -9056140, -6198452], [-242352818, 102307530, 18363413114, -161770422, 92665414, 0, 100472258, 0, 2843004901, -20461506, 6370508, 416950610, -3185254, 3185254, 58199264, -20461506], [-234036320, 49414072, 17567260547, 179646656, 19210182458, 0, -228592144, 0, 145520128, 724752009, -72760064, 392590488, 36380032, -36380032, -13034040, -49414072], [-272607347923, -1641131799, -91858850, -64939098, -267514150, 0, 49122053, 31634090, 38019346, -11102707, -180674280, 194807955, -33308121, 49122053, 0, -11102707], [513945527619, 4827219441, 190100516, 49712641, 634739613, 0, 46084539, -191594360, 90675234, 44590695, -4481532, 677823489, 133772085, 46084539, 0, 44590695], [-5500214, -17090610, -34824239986, 149725494, -322123718, 0, 305115014, 0, -3234765041, 3418122, -93035356, 114290150, 46517678, -46517678, 36263312, 3418122], [-351478852, 85836253, 79946997440, 620299912, -6167402126, 0, 98467946, 0, 32535360, -258318246, -16267680, 461716625, 8133840, -8133840, -77702413, -85836253], [2995222632, -5855514284, -3146338513, 96884026, -17532548752, -258065298, -4202648, -185362756, 4202648, 663818665, 4202648, 50431776, -8405296, -4202648, 0, 8405296], [550060958, -242941590, -74685329278, 710924482, -648566642, 0, -60537902, 0, 2312516825, 48588318, -65997716, -888359246, 32998858, -32998858, -112766096, 48588318], [-1899636442415, 5907040677, 286541238, 145410710, 867963706, 0, -56161631, -178498158, -4280182, 51881449, 324129240, 129963255, 155644347, -56161631, 0, 51881449], [286551488, -71864884, 103778934240, 895967912, 10787003760, 0, -151902200, 0, 3632192, 488181240, -1816096, -355692228, 908048, -908048, 72772932, 71864884], [-1060783840, 1660736464, 1569754340, -8367320, 9035855189, 90389059, -31721184, 80177008, 31721184, -349018980, 31721184, 380654208, -63442368, -31721184, 0, 63442368], [-1381920395301, -1287139569, -104356650, -32714180, -191470696, 0, 3137543, 59153274, -38928290, -42065833, -135610128, -359767239, -126197499, 3137543, 0, -42065833], [3122613664, -5907542960, -985062271, 88629352, -4997369132, -828553920, 11458976, -200176656, -11458976, 243923171, -11458976, -137507712, 22917952, 11458976, 0, -22917952], [-805861352, 198396592, -547101674, -76215900, -4286857904, 0, 286318328, 0, 49099936, -272751006, -24549968, 1041082896, 12274984, -12274984, -186121608, -198396592], [-5289351416, 9227659204, -4504168306, -101193038, -24078717951, -101530199, -82046968, 366480012, 82046968, 778309478, 82046968, 984563616, -164093936, -82046968, 0, 164093936], [-3433029890997, -2061909105, -66352610, -57295904, -308895332, 0, 37905775, 38780258, 48239198, 10333423, -82717056, 320435457, 31000269, 37905775, 0, 10333423], [-895923548, 414321060, 30468212308, -379941344, 442272480, 0, -191943700, 0, -1109182830, -82864212, 196893992, 1346360468, -98446996, 98446996, 150145640, -82864212], [1657164679710, -5898933408, -235496524, -36848582, -750428502, 0, -92798748, 259294660, -161799360, -69000612, 71394408, -1177797996, -207001836, -92798748, 0, -69000612], [389051046, -200150430, 176232827870, -1347822742, 1142703142, 0, 398989386, 0, -1930311609, 40030086, -182619972, -475391862, 91309986, -91309986, -28780272, 40030086], [-9038545688, 17458295956, 1035089927, -279069734, 6022373688, 431408998, -4332568, 566804604, 4332568, -322978447, 4332568, 51990816, -8665136, -4332568, 0, 8665136], [-703565102, 335302950, 83255277202, -658034450, 794440002, 0, -305770306, 0, 2625409329, -67060590, 202323956, 1003624478, -101161978, 101161978, 100019792, -67060590], [323440228, -135115500, 153624697436, -1105685976, 1210430488, 0, -156279796, 0, -3570437306, 27023100, -1673944, -564137212, 836972, -836972, -80232328, 27023100], [3118397032, -7029846764, 6327412007, 159507226, 35636644156, 240280866, -79433368, -160147716, 79433368, -1281112879, 79433368, 953200416, -158866736, -79433368, 0, 158866736], [-460799998, 223054710, 61585014982, -619531234, 739212690, 0, -254053490, 0, -8103181493, -44610942, 149062612, 638704558, -74531306, 74531306, 59301520, -44610942], [-2575470448, 7030467656, -3412281068, -208655164, -19075735895, -1214594645, 164059792, 89190744, -164059792, 763053940, -164059792, -1968717504, 328119584, 164059792, 0, -328119584], [-1319310024, 299959214, -264478309453, -2251573720, -29464012898, 0, -475340084, 0, 477892672, -1362966267, -238946336, 1977688742, 119473168, -119473168, -180486046, -299959214], [-2244212941725, 9505411887, 179671150, -9501464, 1130269156, 0, 201641311, -384279694, 198674078, -2967233, -613825632, 1183142769, -8901699, 201641311, 0, -2967233], [93629408, -105434, 142493574520, 1143237332, 20828618280, 0, 838658180, 0, -372830688, 830788500, 186415344, -373357858, -93207672, 93207672, -93102238, 105434], [-6733793794501, 12936975399, 194108390, 20956716, 1572715624, 0, 211061887, -464037206, 152194958, -58866929, -809786448, 736568961, -176600787, 211061887, 0, -58866929], [360259058, -143070690, -22557831740, 445486514, -263472354, 0, -289910642, 0, 10002715618, 28614138, 33778804, -668454506, -16889402, 16889402, -102731816, 28614138], [7073549224, -14625678604, 5650020499, 278879882, 30321389056, 1445432798, -74024280, -409711204, 74024280, -1092476427, 74024280, 888291360, -148048560, -74024280, 0, 148048560], [-693995656, 163735906, -431723650282, -3519189440, 38167972984, 0, -23996476, 0, 156208128, 1250488038, -78104064, 974887658, 39052032, -39052032, -124683874, -163735906], [-5656940647517, -9884196729, -385788426, -97875628, -1295437616, 0, -99328913, 394409082, -190037170, -90708257, 25861968, -1412347791, -272124771, -99328913, 0, -90708257], [-1340411986, 576951210, 332203670856, -2907685302, 2623208006, 0, 382445026, 0, -6138140340, -115390242, 88541836, 2246111410, -44270918, 44270918, 301899808, -115390242], [5860637272, -8468983732, 5646830647, 1863446, 29536861676, -239112434, 232040280, -467807452, -232040280, -896580471, -232040280, -2784483360, 464080560, 232040280, 0, -464080560], [2118357216, -518138006, 88282768712, 917286060, 20046940152, 0, -624029284, 0, -183220768, 1078266828, 91610384, -2773910798, -45805192, 45805192, 472332814, 518138006], [-6274718696, 11628077420, -618889481, -162844378, 2413056, -2684457078, -42547944, 410784644, 42547944, 16092201, 42547944, 510575328, -85095888, -42547944, 0, 85095888], [240853576, -66708126, 335559064714, 2763643576, -20424142440, 0, -367226604, 0, 103915712, -639333438, -51957856, -229624918, 25978928, -25978928, 92687054, 66708126], [-3538124560, 4663782264, -5713106940, 27080220, -31196678223, 905579515, -176187664, 298214888, 176187664, 977265812, 176187664, 2114251968, -352375328, -176187664, 0, 352375328], [-1512594341, 679539945, -805620671648, 5784242653, -5854668501, 0, -12662755, 0, 4277048700, -135907989, 236603054, 2380861661, -118301527, 118301527, 289422440, -135907989], [10470061913153, -17810881233, -851084572, -278576157, -2447285465, 0, -65995571, 689143456, -293932258, -227936687, -485823348, -2447403609, -683810061, -65995571, 0, -227936687], [-130885718, -26252610, -303430169174, 2064265678, -2818831518, 0, 1325740742, 0, 5998463469, 5250522, -387783964, 665306966, 193891982, -193891982, 178140416, 5250522], [755114184, -154745654, 469686164409, 3807056168, -11889962006, 0, 915692804, 0, -544526272, -248499729, 272263136, -1318254542, -136131568, 136131568, 18614086, 154745654], [2750875098, -1209351210, 593602325396, -3770362582, 4131572326, 0, -390246810, 0, 3126528810, 241870242, -303135612, -4473003858, 151567806, -151567806, -574042920, 241870242], [4787195920, -6485110008, 2449727700, -25656540, 8915786081, 2615851347, 224328208, -397343336, -224328208, -275879948, -224328208, -2691938496, 448656416, 224328208, 0, -448656416], [1878860172, -450691303, -520226916580, -4051705432, 64861888594, 0, -216527966, 0, -304379840, 2569826214, 152189920, -2557836355, -76094960, 76094960, 374596343, 450691303], [662106109, -223633905, -362343314296, 2828692179, -2148246107, 0, -1146053845, 0, -15580639352, 44726781, 250769474, -1440801349, -125384737, 125384737, -259565080, 44726781], [-3217984640, 770472634, 236202876512, 1759023356, 9931820312, 0, 316098332, 0, 544376416, 55715508, -272188208, 4396739586, 136094104, -136094104, -634378530, -770472634], [-12570336568, 26156495396, 12385586182, -505980574, 71940960881, -2916937719, 144841672, 722277804, -144841672, -2534667794, -144841672, -1738100064, 289683344, 144841672, 0, -289683344], [-14270284687587, -13337392719, -2102266, -96177998, -1694507226, 0, -56049723, 304455442, 190253730, 246303453, 907059528, 1880432739, 738910359, -56049723, 0, 246303453]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_12_b_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_12_10_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_12_10_b_a(:prec:=16)
    chi := MakeCharacter_12_b();
    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_12_10_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_12_10_b_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_12_b();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,10,sign)));
    Vf := Kernel([],Snew);
    return Vf;
end function;