
// Make newform 725.6.a.a in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_725_a();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_725_6_a_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_725_6_a_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 := [10, -27, -34, 0, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0], [-17, 3, 1, 0], [-17, -3, 1, 0], [-25, -67, -1, 2]];
    Rf_basisdens := [1, 3, 3, 3];
    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_725_a();"
function MakeCharacter_725_a()
    N := 725;
    order := 1;
    char_gens := [552, 176];
    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;

function MakeCharacter_725_a_Hecke(Kf)
    return MakeCharacter_725_a();
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 := 6;
    raw_aps := [[0, 0, 1, 0], [7, -1, -1, 0], [0, 0, 0, 0], [58, 0, 4, 12], [-41, -21, -29, -20], [85, 10, 38, -60], [-44, -14, -50, 4], [-540, 168, -80, 116], [368, -146, -14, 140], [-841, 0, 0, 0], [-4849, 485, -319, -92], [2712, 712, -544, -40], [-682, -366, 1950, -804], [4969, 341, -1603, -772], [-5979, 1675, -449, -72], [-2529, -1898, 2258, -628], [-2780, 3098, -2466, -140], [11164, -3142, 3582, -2396], [2476, 4428, -4676, 1032], [-12234, 3250, -3598, -96], [19500, -3784, 2200, 1504], [-25087, -1457, -5901, 2864], [-15168, 5038, -2566, 1108], [29082, -842, -7382, 4380], [8790, -3962, -7150, -7180], [29024, 10240, 10656, 1592], [126, -5562, -538, 4928], [-10214, -2960, 17908, -8260], [51629, -4202, 10454, 4372], [-73370, -316, -19636, 6224], [43508, -324, 11732, 16772], [-128448, -10964, -15404, 12908], [-18564, 20868, -4940, -712], [-220296, -16114, 47010, -796], [-111029, 11630, 4514, -12548], [-168558, -5204, -4432, -6660], [-110678, -40726, 38702, -36900], [-37871, -10595, 69157, -14624], [124462, -25146, -11474, -8616], [-115042, 37100, 756, 30072], [-289286, 18450, -11326, 2176], [260903, 9590, 7118, -4124], [-247740, -54552, 26520, -20380], [-590770, -29890, 21970, 30132], [323566, 37144, -31032, -38192], [-437482, 52236, 29512, -3772], [-633021, -20349, -541, 8072], [-288362, -10958, -46446, 6264], [-113230, 69446, -74018, 88688], [-142082, 42854, -90758, -45956], [-668479, -76116, 166812, -33080], [364172, 102254, -31518, 84916], [-198751, -66544, 150464, -71488], [607757, 85097, -100415, -7296], [510039, 39592, 12004, 17584], [-337467, -67205, 159175, -36204], [-214084, -104138, 69898, -36060], [-312631, -91869, 93703, 80676], [768482, -215512, 75032, 24208], [-667501, 51220, 27148, 5304], [14552, 31478, 87698, -22628], [-473782, 175952, -102608, 110232], [1249605, 95225, 219073, 2612], [942996, -214120, 91112, 38164], [2015979, 45364, 38800, 81272], [-726392, 24518, 178578, -21268], [68287, 123419, -69869, 24464], [399172, 47282, 49974, 123028], [-438138, -8742, -247094, -121888], [169805, -218494, 57158, -7580], [986082, -136292, 100404, -163352], [2180809, 52507, 216231, 10352], [-1662980, 31916, 196980, -20524], [-235899, 326902, 265614, -54172], [-1164512, -233028, 380196, 155604], [-236222, 146720, -444252, 205844], [-825384, 330640, -233400, -128912], [1400953, 20166, 69766, -113804], [-344365, -56456, 516752, 37504], [-1203194, 191172, -402940, -174608], [-874886, -205486, -161414, 380776], [750036, -9130, -9014, -175092], [2491716, 213746, 89294, 36268], [407088, -120544, 164560, -176752], [658760, 162366, -59406, -380644], [401456, 9480, 623896, -139604], [553214, -204344, 739080, 261064], [-1407926, -498868, -471468, 38072], [693314, -212800, 284224, 94960], [-2595560, 267310, -637062, 8380], [1583129, 144005, -495475, 133036], [2504369, -31789, -527289, 63540], [-2396370, -445372, 34896, -142324], [-2196459, -30295, 710897, -53076], [-134664, 53642, -1018690, 22572], [1288631, 170141, 559337, 216924], [-4888179, -420986, -648614, -212628], [3971095, 271024, -123764, 8528], [4589640, 439140, -397812, -136880], [897504, 275416, 554696, 197464], [759978, 134572, -335368, 221764], [-7213742, -326168, 180472, -282976], [5540877, 592393, -277695, -453056], [2608682, 155032, -610928, 14672], [-3289748, 149156, -684100, 267752], [-2819084, -240362, 159954, 602972], [5921080, 694794, 607374, 616436], [7558557, -1424888, 599540, -290368], [-3613603, -332861, 209191, 455320], [-2138362, 1437294, -1029110, 484836], [-1326313, -392851, 326201, 387804], [-6724481, 631646, -1077274, -56988], [1935068, -794028, 368996, -422952], [-9064445, -331825, 199271, -108344], [-4214554, 378266, 1343898, -460328], [-2908012, -862462, 848310, -208436], [8011446, 202128, 887412, -135252], [-9546748, -221690, -772326, -1008276], [1261590, 301302, -344478, 727708], [3642769, -941251, 943461, 556056], [7087470, 754448, 639872, 386272], [-9611625, 188884, -882540, 318840], [-3599254, 221100, 821532, -428136], [5015320, 46404, -227772, 595368], [-3763652, 812072, 573880, 597112], [-1824273, 1561166, -2077942, 28940], [2931283, -1615082, 250258, 264188], [11763770, -606078, 72834, 808088], [-2890228, 75376, -1792816, 695356], [-5766440, 42500, -1362020, -593488], [-7660099, 365549, -1512579, 228672], [-4999200, -1752232, 353712, -1356980], [-3504324, -1217676, 2293324, 542964], [-2464020, 616454, 1737562, 812044], [-9401918, -1511916, 1249804, -734808], [-5092256, 1576902, 951218, -522796], [-4649010, 670118, 2464522, -125660], [1362770, -1444806, -297782, 190360], [15017580, 1308038, -1469534, 170636], [-3596776, 81604, -2518972, -911552], [6242934, -1813572, 205480, -852708], [-5518349, 684970, -2940218, 1649604], [-489236, -190924, -2084164, -163868], [-7147179, -1195067, -2350811, -660208], [-1658748, -243782, -2499890, 237212], [-32261, -403511, 993533, 1352008], [-13207014, -577248, -95376, 466968], [14420783, 408308, -1984224, 887400], [7873845, 109105, 1496713, -2143692], [-6263654, -1081678, 808474, 1249488], [-1071497, -867954, -2451846, -1024756], [3966250, -2304, -207544, -1868168], [4662850, -2279640, 2617980, -810708], [3429229, 273759, -4262045, 1472244], [11863416, -1866712, -2283848, 873900], [14099209, -208741, -103889, -880380], [2882802, -603694, -4188918, -680840], [-10916126, 3135960, -939272, 1317840], [-6589950, 2287736, 993096, 1425952], [-9908051, -484866, -2160914, -2871500], [-13837507, -2535163, -2158555, 1037092], [7214801, 2320216, -4468296, 474416], [-37019, 892851, -4346617, 112312], [1416264, 1950384, -381104, 1817020], [12942847, -1810376, -1997828, -1077760], [4377009, -3389073, 1894883, 321056], [-29522630, -1273386, 1662254, 204096], [-20313312, -2474620, 160020, -2619392], [15089629, -3789744, -1329108, -664464], [-22775220, -1244724, -245348, 2399496], [18981022, -3536796, -58448, -1662284], [-2688171, 2790470, -5055202, -1323116], [6050630, -1938562, -3057850, -1080280], [3191426, -2072684, -1762820, 923552], [-15218188, -3527490, -4548638, 481788], [-27772202, 1571340, 3052740, -543336], [20741656, 1442140, -1467596, -649744], [-8144576, -4913238, 4543342, -1929068], [-13293281, -3162159, 226509, -2743760], [-19500142, 26364, -3763212, 121720], [-8431765, -3058491, 1907201, 252688], [18104843, -3287537, 300279, 315008], [-5772802, 1620088, 967224, -1674544], [15362171, -1982440, 5258292, -535696], [-11048728, 2634912, -6819056, 295736], [-753013, 1076198, -5404994, 411668], [-31884144, 3637934, 1862250, 531780], [16209240, 2676780, -3180012, -1980580], [-2705004, 267790, 6968362, 1179220], [-37646514, 528248, -3475100, -2587172], [-9150589, -4532984, 5618264, 657536], [23556723, -5682137, 4494527, 2918464], [-19896297, -1183013, -2895517, -1641780], [23310912, 3359264, -9452584, 1274344], [-13683976, -981548, -1318884, 941636], [2954014, 3603092, -3428772, -187464], [18560320, 5745788, -7603820, -763360], [44757470, 1184716, -5121260, 1316504], [-48220145, 4354124, -3629636, 2695016], [-12571132, 3575928, -4592112, 876680], [4393814, -990202, 1793418, -14764], [-30616376, -3307838, 729318, 3441628], [-67260282, 3936430, 141594, 755212], [8378234, -4119954, 4662786, -5277740], [456392, 6927564, 244724, -30292], [-2660475, 4037314, -2059398, 875804], [-46788387, 1377187, -5828665, 2307488], [-30388110, 4805010, 4063906, -2384552], [-7304081, -15924, 4847792, -262344], [8315613, -6331995, -723243, -3385900], [-35848058, 3571554, -2234682, 3243196], [-23059270, -1702784, 33712, 6523888], [21509011, 6698761, -9702123, 1597804], [-21731103, 3867829, -5690083, 57420], [-16749044, 2338232, 2075064, -3697964], [6261689, 814848, 7850964, -1371744], [16193896, -456876, 925364, -5349616], [33863948, 6414216, -7780264, 1969496], [45586064, -3474384, -6571888, 1854960], [13013590, -9940540, 4548924, 547816], [51809796, -608598, 8284302, -1302652], [-29060058, -174132, 1290296, 973468], [52297198, 4666268, 5768620, 1297280], [39165195, -6306735, 1059877, 2897504], [-14029720, -9155108, 2388916, -1838216], [24931202, 8466888, 5373360, 2807792], [-9731768, 10744132, -12418956, 6992616], [72173524, -15175240, 5765128, -1786660], [21234997, -2839533, 13485975, -1307016], [32892742, -4146868, -1652704, 3905100], [-11866424, 7707268, 9163596, -1073328], [-64272352, 5790800, -3079672, -1536608], [-1705648, -1102032, -3271496, -3540660], [-3983056, 2199876, -8623852, 4879376], [1266326, -1811466, -8587970, -1382272], [8963668, 3039708, -4416844, 4761980], [-23177236, -6134278, 13106478, 3703364], [69350842, 6027098, 10754102, 8852516], [-3751018, -9803456, 7229252, -3281724], [-71722625, -7043043, -2370087, -3741004], [13037927, -4458825, 13073191, -3720796], [26397870, 5289578, -8653414, 4265496], [-12368442, 7462038, -13703250, 6551872], [22023004, -12305768, 2565864, -626160], [45223982, 7208568, 4769624, -8585712], [-46247750, -1487062, 7791490, 3608576], [43385640, 1852738, 15135590, 5979420], [111059800, 2174782, 330314, -5229468], [-12233570, -2567554, -11248602, 2232480], [5865895, -12042339, 15011601, -7964120], [-14572552, -8244318, 891678, -6226460], [-23526261, 13845680, 3618780, 85776], [47000243, -3454455, 10746133, 6678436], [-39891440, 784368, -8202000, 5858296], [100204286, -4464122, -5085326, 1164900], [58083284, 2207348, -1953956, 9242792], [5734770, -2024882, 3686450, 2570500], [-3065305, -4206177, -3265681, 3700224], [68602930, 1123132, -9536460, -2128872], [-27714665, -7009588, 16021956, -2461976], [31422660, -8286416, -7420720, 2626980], [55178801, 5468601, -9089879, -2362300], [-23516382, -2376140, -4276084, -4049560], [62200544, 9075394, -13543906, -3077924], [-42524428, 9501986, 4239398, 1993300], [-11093005, 7678735, 2103671, 1185956], [-13014304, -15018912, -1986320, 2010584], [2247280, 453634, -3730730, 6385892], [71911176, 8659840, 3191040, 1004780], [16214907, -16066622, 4725810, -2099476], [-116516723, 9196758, -4444646, -2267780], [-9468662, 6931126, -3115842, -4337952], [13585003, -5534908, -7609524, -65704], [-76006340, 4257748, -9174948, -7848612], [-43729264, -7863988, 2554260, 3686736], [-81483643, 15905491, -10635937, -2333572], [-97876392, 3227060, 19779516, -2994076], [31785087, 5362206, -11660434, -6364636], [8868044, 3082096, 3787312, 8023520], [-48222656, -4986998, 6359942, -12429188], [-74262434, -12674310, -5427910, -8683320], [35232854, 13120982, 968950, 11986560], [35425008, 15761636, 23871004, -4590616], [-1905046, -3286784, 19422096, -2816336], [63450528, 7339244, 5797332, -16273332], [-32053728, -2268488, 24767568, 108612], [-12662336, -7277498, 17491330, -15283532], [-55693618, -5790678, -7641642, -13698468], [-74129646, -4608268, 4987888, 3386364], [-140823791, 14490560, -1172360, 6160432], [-116612197, -8430758, -9450118, -17513476], [132365208, 7336738, -9801434, 904220], [-7442213, -15477368, 20143792, -16902576], [-37156459, -10304371, 10179213, 6075368], [8138566, 7806544, -7060992, -9564624], [136235587, -19716806, 13576206, -5949900], [121071, -8225427, -24118303, 10848880], [11612855, -8480614, 6950774, 4589908], [-79394294, -12209208, -5711324, 4615668], [61846728, 7052224, 11036880, -8192084], [84460160, 16954502, -7573910, 19016196], [75124362, 14357376, 17217168, -737680], [33901748, -10823408, 1178240, 11090108], [-42466327, -16260531, 37301, 9117700], [-111372712, 619200, 8744208, 2208516], [-111404741, -17508732, 27538536, -11782152], [11849165, -28906003, 19278445, -6504752], [-110441857, -2231186, 14857562, -8072276], [174693354, 1107676, 14558728, -6970028], [-49379259, -5806766, -13247078, -5970900], [169174412, 7577962, -22688706, -548044], [203710250, -12196598, -10378962, 2484132], [132009378, -31096912, 20598864, 9550128], [-16880632, -5572074, -18812294, 3834444], [179856174, 2555844, -13157680, 2956964], [-53287237, 7076988, -1191436, -6574296], [-73754160, 16453120, 10164096, -2342884], [-173687230, -8716910, 16916890, 2786504], [12242283, 4059264, -38695692, -4252848], [214519876, 5878126, -1060694, -10599164], [-8311255, 16634857, 10389257, -7249960], [-230311261, -1826320, 7499964, 4000400], [-82975346, 3726072, 627176, -8286704], [-87427305, -9447095, 28930061, 12665628], [-51083747, -10783956, 32144548, -5196808], [-399926, 4935302, 12272322, -6342268], [-110087722, -7810926, 13640458, -6611200], [150893364, -77724, 25718636, 16301272], [-32224477, 19357281, -19098427, -8193552], [-114215573, 14141774, -15059978, -10461132], [47721772, -18065232, -42857728, -3213112], [120515229, 9057310, 26726818, 61324], [-49375868, -6526412, 171868, -288120], [-129201616, -20217660, 30680940, 9479124], [-38327547, -25419883, 14725445, -20487708], [-23933456, -13014368, 51487992, 8277832], [289426350, 14327184, -30799936, 10026992], [-360103658, -941440, -10199560, -4919272], [-37246630, 24950996, -30528156, -13698120], [-97249452, -4321276, -25638724, -1415968], [14122368, -844702, 5457038, -7613340], [203564670, -3866020, 5279812, -5907224], [-125021980, 7163466, 9584870, -7330708], [103074968, 22598076, 26752012, 6223912], [36654254, -13596396, 2974572, 12472024], [-25485685, -3776149, 9992779, 17438276], [-96406684, -4192262, -25007890, -2185892], [67886424, -8610580, 32106724, 26975700], [-15037347, 17179379, -522937, 23297464], [-15597954, 8665156, -52477940, 1374864], [-27220100, 8001882, -3699026, -17113428], [103661410, 26359340, -37157436, 3082168], [154058110, 22368556, -12818116, -25689800], [-64645088, 20766470, -41554166, 22271772], [780292, 35431758, -8576326, 6360836], [169630916, 16431138, 14108254, 21709300], [134821995, 19800949, 12335785, -5187452], [-298814198, 7295852, -25079808, 13797116], [-65162156, -14569346, -10971494, -18515620], [-200169410, 28824670, -14857794, 3846568], [55621361, 7724586, 12157146, -22126180], [34208905, 10874804, 4999076, 28008488], [-58302765, 16739933, 16117113, 20070848], [-103697602, -35104934, -15802502, -24294016], [-29882619, 37266041, -53843023, 18830996], [190786958, 3342426, 6990182, 22238940], [-76069976, -15148008, 22226064, -35469656], [-5529262, 3042458, -5257782, 438440], [-38309710, 267028, 12771284, 29369144], [-310824777, 12981787, 5632675, 8376552], [-32376190, 32611034, -5109366, 16398912], [149865242, -15149828, 24569104, 3793836], [298500094, 6560040, -44133240, 4842672], [-243711596, 6334562, -28207010, 17951340], [173383483, 15269882, -25710470, -27662708], [120241656, -3155312, -58472112, -10758748], [153328745, 16214747, -2226897, -7454644], [124977008, 13628750, -17267302, 21377964], [234607523, 28069540, -9436024, -3646840], [-120307545, -2408564, 26719128, -9430296], [252995752, 1768900, -33096724, -8987784], [164862531, 18204484, -18939288, -18231560], [-200926887, -22145677, 56762143, -8943728], [308004260, 28560426, 9313158, 9613564], [23366738, -38536132, 21674816, 20945436], [17367946, -58668476, 10984408, -16553564], [149454172, -31428192, 20865584, -9267260], [75559001, -26703558, -26551346, -21993820], [78697253, 12205905, -24711959, -39423768], [-86797128, -30484560, 13819368, -39781532], [-269181954, -15202212, -49455324, -7411440], [303824703, -3899474, -149638, -13215140], [137394065, 41908057, -31542663, 30726656], [118109899, -4207361, -42149657, 10117932], [43713651, -21683963, 36667065, -20597724], [370983639, -14142344, 3672116, 13365872], [65586468, -56458736, 46344192, -16816056], [-116313220, -6081308, 42174172, 6124816], [94104102, 41563118, 44975822, 4582488], [20725030, 442760, 36949240, 9793384], [41720190, 18924452, -17988052, -23591528], [-21680218, -19557784, -13027376, 33292624], [288880928, 15972848, -76685464, 13758860], [-120239549, 13021260, -21857044, 37893848], [511110451, -2656810, -3027686, -5479508], [-141999716, 31986310, -56533878, 26236028], [-142775773, -4127470, -38843062, -11631572], [241901104, -10693654, 12769126, -32709756], [295109161, 21732685, -43574555, -13904700], [-43565180, 20800056, -21680128, -26715376], [-38427614, -2898712, 8652328, 2200384], [321071, -56313606, 2317614, 21536244], [-390511762, 5499508, -16329200, 4749692], [-37775328, -20042782, -38653842, 3006764], [12389038, -14622126, 69991142, -2124932], [27961014, 1853880, -18425616, -25119480], [44613073, -24599065, 75074147, 7664756], [27446582, -50481098, 12365078, -30632608], [-166039948, -42521380, 36629428, -29358072], [-243930641, 57797641, -5838699, 14715952], [-46640110, 5993568, 27131152, -26293232], [-95684522, -45441004, -49614284, -14091824], [8534763, 57858453, -23423287, -19109468], [347473233, -7471247, -8193519, 4063916], [140164377, 23914608, 69254456, -35008160], [-125305033, -39291474, 59935350, 11701492], [-255872500, 7776230, -766846, 692036], [381712256, 313300, 45782300, 42457208], [-142908244, -34074238, -26348274, -37988868], [-431292235, -38664625, 72826275, 19855260]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_725_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_725_6_a_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_725_6_a_a(:prec:=4)
    chi := MakeCharacter_725_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 6));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(2999) - 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_725_6_a_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_725_6_a_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_725_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<2,R![196, -168, -69, 0, 1]>],Snew);
    return Vf;
end function;