
// Make newform 135.4.e.c in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_135_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_135_e_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_135_4_e_c();".
// 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_135_4_e_c();".
// 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 := [82944, -345600, 1572480, 276096, 765088, -55412, 209529, -2346, 23232, -1800, 1605, -60, 48, -2, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [81270546705718272, -25921241556287616, 117092812833806688, -133752262646177216, 42605333749130392, -12904342916750307, 5773718546261598, -1600654919494992, 450465462773892, -67214635202751, 13978725434868, -1952416155384, 306116042626, -20061126179], [-369476279701107552, 6194785124854656, -27963212119701408, 10219300793943656, -9866977978344872, 3457808885441637, -725079600799218, 477221262020472, -94549569675372, 34529619637641, -2918043973788, 1064588155344, -82456841566, 22166149189], [-2210405597805603456, 596188555794615168, -2693134695177553824, 2735119017287992768, -979922676229999016, 296799887085257061, -132795526564016754, 36815063148384816, -10360705643799516, 1545936609663273, -321510685001964, 44905571573832, -7040668980398, 461405902117], [-938118109152615552, 4270983905386306656, 1212833497402579392, 2121139439941287256, -124169043517445147, 598583661371575587, -2094038662074018, 66938437996344372, -5089407312211947, 4675917826251741, -170511125461188, 140176351013994, -5818762419041, 2939472898789], [-151618728389601024, -27531838320098812128, -2244630978869685696, -3348134540804039128, -118462098926273989, -909577124872999731, -40625080105218366, -91169239329210036, 3730669538430411, -6643335867117933, 132817332275844, -197347051822122, 5840830212833, -4311956453557], [-12006669009869986176, 1684926478378585728, -7608540836151643104, 4047922399621175428, -2727332233923655736, 888751903849359831, -311253896559943734, 116695416419025636, -27530297983639836, 6890658953255283, -852176307382044, 206799337599372, -20338354293458, 3624809887207], [1092066335356503456, -59581912466659968, 268805158085037024, 33113810256137507, 92606673596866616, -35980494240629511, 4000390641337554, -5279610483102441, 813936495689766, -466101951126423, 24987551185914, -14594710056057, 807058989248, -339722329867], [329917593181289472, -69248724231494016, 312659128000523808, -125550199699308896, 111404616057029192, -37340718386691897, 11980770075177338, -5002206599731152, 1102936081827852, -323151061131341, 34103389012188, -9801117027144, 832866413286, -186796009849], [12195535418984002176, -55522790770021986528, -14743286395511282496, -27574812719236734328, 1614197565726786911, -7781587597830482631, 27222502606962234, -870199693952476836, 66162295058755311, -60786931741272633, 2216644630995444, -1822292563181922, 75643911447533, -38213147684257], [865669107974139648, 44372519492525103456, 13010969046201734592, 18234187650761679256, 2006361678123808678, 4869631254226923387, 325883614198349082, 494867402090484672, -10068906328572222, 34423672857863691, -419258143612788, 1017802448048844, -23844974735516, 21668969460439], [5293342838335594752, 293393520272780838144, 77654542904070931008, 120100675074344365544, 3627454938231067472, 32933043161636304213, 1076459109197437518, 3494434903961891928, -171119940620060628, 244694685132153609, -6020747943649212, 7286328629729856, -238501344274534, 154567151645861], [-1434988464326182656, -64265975857864778112, -20764095410388901824, -33857480051091500632, -146620457009399956, -9404521820749452339, -153477777563319954, -1031515255651505304, 62930618485836984, -71499331595603127, 2170528579809636, -2135735197960968, 78652198588502, -44692378643083]];
    Rf_basisdens := [1, 1, 341183023574083200, 28431918631173600, 341183023574083200, 1023549070722249600, 1023549070722249600, 341183023574083200, 28431918631173600, 15163689936625920, 1023549070722249600, 511774535361124800, 2047098141444499200, 409419628288899840];
    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_135_e();"
function MakeCharacter_135_e()
    N := 135;
    order := 3;
    char_gens := [56, 82];
    v := [2, 3];
    // 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_135_e_Hecke();"
function MakeCharacter_135_e_Hecke(Kf)
    N := 135;
    order := 3;
    char_gens := [56, 82];
    char_values := [[-1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 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 := 4;
    raw_aps := [[0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-5, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 0, -1, 0, 0, 0, 0, -1, 0], [0, 3, -3, 0, 0, 2, 0, 0, 0, 1, 0, -1, 0, 0], [-15, 4, 0, -1, 0, -15, 0, 0, 0, 0, -1, -1, 1, -1], [22, 0, -1, 2, -2, 0, 0, -2, 2, -1, 0, 0, 0, 0], [40, 0, 3, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0], [-11, -6, 0, -2, 0, -11, 2, 0, 0, 0, -2, 0, -1, 0], [0, 15, -15, 0, 0, -46, 0, -1, 3, 0, -5, 0, -1, 3], [-37, 8, 0, 9, 0, -37, 4, 0, 0, 0, 9, -1, 1, -1], [61, 0, -14, -11, 0, 0, 0, 1, 1, -5, 0, 0, 0, 0], [8, -4, 0, 5, 0, 8, -2, 0, 0, 0, 5, 1, 9, 1], [0, -29, 29, 0, 2, 82, -2, 0, 0, 5, -12, -5, 0, 0], [0, -4, 4, 0, -2, 30, 2, 8, 1, -5, -9, 5, 8, 1], [74, 0, -4, 24, 4, 0, 0, -4, -10, 4, 0, 0, 0, 0], [-1, 53, 0, 1, 0, -1, 10, 0, 0, 0, 1, -4, -3, 13], [0, 101, -101, 0, -2, 95, 2, -8, 6, -7, -20, 7, -8, 6], [-171, 21, 0, 12, 0, -171, -8, 0, 0, 0, 12, -7, -5, 0], [89, 0, -144, -3, 0, 0, 0, -7, -7, -1, 0, 0, 0, 0], [293, 0, 29, -3, 10, 0, 0, -3, 3, -4, 0, 0, 0, 0], [0, -58, 58, 0, 6, 322, -6, 16, 16, -8, -6, 8, 16, 16], [0, -138, 138, 0, 0, 223, 0, -3, -8, -4, 14, 4, -3, -8], [-406, 0, -133, -13, 2, 0, 0, 19, 13, -20, 0, 0, 0, 0], [0, -175, 175, 0, -22, 307, 22, 7, 3, 8, 37, -8, 7, 3], [0, -126, 126, 0, 4, -340, -4, 22, -8, -4, -22, 4, 22, -8], [-195, -160, 0, 19, 0, -195, -16, 0, 0, 0, 19, -15, 1, -33], [400, 0, -73, 17, 14, 0, 0, -4, 13, -10, 0, 0, 0, 0], [-21, 0, -119, 6, -14, 0, 0, 18, -2, -11, 0, 0, 0, 0], [394, 50, 0, -62, 0, 394, -28, 0, 0, 0, -62, 4, -10, -16], [346, 0, -366, 1, 14, 0, 0, -8, 17, -3, 0, 0, 0, 0], [68, 204, 0, 16, 0, 68, 22, 0, 0, 0, 16, 4, -30, 14], [0, -55, 55, 0, 18, 339, -18, -15, -7, 34, -121, -34, -15, -7], [105, 257, 0, 17, 0, 105, -26, 0, 0, 0, 17, -4, -37, 5], [263, -39, 0, -74, 0, 263, 6, 0, 0, 0, -74, 9, -2, 2], [0, 28, -28, 0, 10, 243, -10, 51, -31, 25, 85, -25, 51, -31], [22, 26, 0, -12, 0, 22, 48, 0, 0, 0, -12, 26, -8, 38], [-311, 0, 396, 27, -4, 0, 0, -53, 21, -31, 0, 0, 0, 0], [-428, -158, 0, 93, 0, -428, -20, 0, 0, 0, 93, -43, 72, -23], [0, -98, 98, 0, 36, -372, -36, 20, -36, -38, 72, 38, 20, -36], [139, 0, 154, 59, -4, 0, 0, 51, 3, 3, 0, 0, 0, 0], [-52, 0, -167, -15, -8, 0, 0, 79, -61, 60, 0, 0, 0, 0], [0, 458, -458, 0, -54, 281, 54, 9, 21, -13, -59, 13, 9, 21], [-708, 369, 0, -166, 0, -708, -14, 0, 0, 0, -166, 21, 22, 42], [192, 0, 40, -96, -44, 0, 0, -20, -10, 60, 0, 0, 0, 0], [659, 0, 34, 101, 56, 0, 0, 39, 5, 1, 0, 0, 0, 0], [-971, -474, 0, -113, 0, -971, 70, 0, 0, 0, -113, 43, -23, 19], [0, -46, 46, 0, 80, 1392, -80, 8, -17, 29, 75, -29, 8, -17], [0, -357, 357, 0, 32, 1280, -32, 96, 6, 61, 128, -61, 96, 6], [-642, 237, 0, -89, 0, -642, -32, 0, 0, 0, -89, 10, 107, -41], [10, 0, -59, -130, 50, 0, 0, -2, 8, 13, 0, 0, 0, 0], [672, 218, 0, -46, 0, 672, -6, 0, 0, 0, -46, -64, 86, -56], [0, 836, -836, 0, 18, -272, -18, 5, -49, -5, -87, 5, 5, -49], [2, 0, 51, 298, 92, 0, 0, -12, 22, -15, 0, 0, 0, 0], [-2391, 495, 0, 111, 0, -2391, 62, 0, 0, 0, 111, -24, -123, -53], [0, -244, 244, 0, -4, -771, 4, -19, 63, 79, -13, -79, -19, 63], [-2165, 0, -71, 24, 38, 0, 0, -64, -48, 111, 0, 0, 0, 0], [1765, 0, 350, -165, -96, 0, 0, -47, 15, 43, 0, 0, 0, 0], [0, 108, -108, 0, 52, 719, -52, 1, -17, -31, -213, 31, 1, -17], [0, 687, -687, 0, -80, -2531, 80, -70, 6, 15, 4, -15, -70, 6], [-2219, 58, 0, 58, 0, -2219, 78, 0, 0, 0, 58, -28, -115, 38], [-1563, -36, 0, -55, 0, -1563, -56, 0, 0, 0, -55, -15, -49, -19], [1058, 0, 155, -313, -84, 0, 0, -8, 89, -40, 0, 0, 0, 0], [-1111, -700, 0, 133, 0, -1111, -78, 0, 0, 0, 133, 43, -71, 73], [0, 227, -227, 0, -62, 824, 62, 118, 36, -119, -186, 119, 118, 36], [0, 696, -696, 0, -180, 1545, 180, -67, 53, -75, -45, 75, -67, 53], [0, 176, -176, 0, -112, 4264, 112, 20, -14, 86, 46, -86, 20, -14], [-771, -665, 0, 325, 0, -771, -58, 0, 0, 0, 325, 106, -141, 55], [-1890, -851, 0, 464, 0, -1890, -18, 0, 0, 0, 464, -99, 108, -80], [0, -593, 593, 0, 96, 408, -96, 119, -11, -32, 27, 32, 119, -11], [0, -133, 133, 0, 54, 4227, -54, -15, 31, -36, 143, 36, -15, 31], [-1699, 0, 274, 653, -54, 0, 0, -33, 15, -27, 0, 0, 0, 0], [0, 56, -56, 0, 32, 3601, -32, -51, 159, -53, 251, 53, -51, 159], [-594, -2200, 0, -20, 0, -594, -32, 0, 0, 0, -20, -12, -4, 146], [2259, 0, -823, -393, -112, 0, 0, 77, 51, -102, 0, 0, 0, 0], [1713, -216, 0, -541, 0, 1713, 0, 0, 0, 0, -541, 1, -55, 83], [0, 243, -243, 0, 134, -5111, -134, 122, -148, 49, -26, -49, 122, -148], [1100, 0, -18, 354, -60, 0, 0, -14, 74, -188, 0, 0, 0, 0], [-371, -649, 0, -277, 0, -371, 14, 0, 0, 0, -277, 148, -47, 165], [2645, 1109, 0, 175, 0, 2645, 94, 0, 0, 0, 175, -94, -327, 75], [1307, -498, 0, 397, 0, 1307, -66, 0, 0, 0, 397, 29, -5, 9], [0, -168, 168, 0, -52, -2436, 52, 2, -38, -206, -202, 206, 2, -38], [-4002, 0, 820, -14, -98, 0, 0, -228, -16, -30, 0, 0, 0, 0], [-5158, 0, 285, -418, -282, 0, 0, -118, 6, 17, 0, 0, 0, 0], [0, -910, 910, 0, 22, 3748, -22, -74, 112, -112, 446, 112, -74, 112], [0, 1607, -1607, 0, -146, -2803, 146, -179, 118, -119, 220, 119, -179, 118], [757, 0, 2029, -253, -126, 0, 0, -141, 179, -110, 0, 0, 0, 0], [0, 481, -481, 0, 218, -3070, -218, 254, 4, 199, 58, -199, 254, 4], [0, 183, -183, 0, -60, 2438, 60, -347, 37, -210, -799, 210, -347, 37], [1873, -592, 0, 781, 0, 1873, -98, 0, 0, 0, 781, -125, 319, -257], [-3820, 0, 199, -18, 6, 0, 0, 138, 74, -131, 0, 0, 0, 0], [0, -286, 286, 0, -154, -2208, 154, 54, 342, -186, 248, 186, 54, 342], [2591, 0, 814, 851, 42, 0, 0, -1, 99, 71, 0, 0, 0, 0], [10631, 255, 0, 117, 0, 10631, -92, 0, 0, 0, 117, -34, -33, -85], [-4183, -233, 0, -421, 0, -4183, -112, 0, 0, 0, -421, -80, 237, 77], [7262, 0, -670, -281, -24, 0, 0, 102, 21, 67, 0, 0, 0, 0], [-2708, 711, 0, 23, 0, -2708, -52, 0, 0, 0, 23, 96, -493, 41], [-1645, 0, -1134, 474, 0, 0, 0, 254, -48, -36, 0, 0, 0, 0], [5456, 0, 1806, 523, -126, 0, 0, -180, 309, 11, 0, 0, 0, 0], [-4938, 0, -339, 151, 328, 0, 0, -99, -105, 62, 0, 0, 0, 0], [0, -2139, 2139, 0, 92, -3460, -92, -2, 1, 72, -391, -72, -2, 1], [1532, 0, -1074, -222, -20, 0, 0, -398, 62, 32, 0, 0, 0, 0], [-3727, 619, 0, 274, 0, -3727, -14, 0, 0, 0, 274, -151, 581, -36], [0, 21, -21, 0, -102, 6975, 102, 299, 165, 144, 101, -144, 299, 165], [1895, 15, 0, -1009, 0, 1895, -118, 0, 0, 0, -1009, -252, 153, -165], [-11599, 0, 1251, -209, 34, 0, 0, -277, 127, -240, 0, 0, 0, 0], [0, -857, 857, 0, 44, -7420, -44, -250, -45, -8, -77, 8, -250, -45], [7007, 0, -1624, 715, -116, 0, 0, -381, 47, -1, 0, 0, 0, 0], [2214, -1140, 0, -666, 0, 2214, 102, 0, 0, 0, -666, -278, -176, 180], [0, -1819, 1819, 0, 302, -5047, -302, 361, -405, 198, 699, -198, 361, -405], [2194, 1632, 0, 99, 0, 2194, 206, 0, 0, 0, 99, 17, -488, 141], [-1699, 0, -892, 701, -156, 0, 0, 61, -125, 61, 0, 0, 0, 0], [6093, -1371, 0, 229, 0, 6093, -218, 0, 0, 0, 229, -68, -41, -221], [0, -717, 717, 0, -2, -1082, 2, 278, 282, -323, -156, 323, 278, 282], [-5500, 0, 3338, -106, -90, 0, 0, -2, -156, 144, 0, 0, 0, 0], [0, -540, 540, 0, -66, -324, 66, -665, -3, -99, 19, 99, -665, -3], [-1545, -1453, 0, 286, 0, -1545, -74, 0, 0, 0, 286, 297, -213, 0], [-4908, 0, 278, 267, -52, 0, 0, 316, -107, 115, 0, 0, 0, 0], [2779, 3884, 0, 347, 0, 2779, 12, 0, 0, 0, 347, 351, 245, 193], [0, -344, 344, 0, 134, -2490, -134, 84, 38, -132, 252, 132, 84, 38], [3804, -1846, 0, 30, 0, 3804, -64, 0, 0, 0, 30, -240, 334, 94], [0, 2450, -2450, 0, -416, -10699, 416, 165, -171, 183, 439, -183, 165, -171], [0, -1872, 1872, 0, 112, 1009, -112, 585, -7, -319, 191, 319, 585, -7], [2540, 0, -1215, -782, -10, 0, 0, -414, -70, 391, 0, 0, 0, 0], [0, 3040, -3040, 0, 210, -1386, -210, 124, -60, -18, -238, 18, 124, -60], [-681, 0, 1323, 102, -278, 0, 0, 358, -68, 83, 0, 0, 0, 0], [0, -6027, 6027, 0, -164, -2790, 164, -159, 293, -36, 561, 36, -159, 293], [6222, 0, -460, -932, -180, 0, 0, 130, -76, -24, 0, 0, 0, 0], [0, -244, 244, 0, -378, 6620, 378, -46, -219, -145, -593, 145, -46, -219], [784, -1102, 0, 82, 0, 784, 156, 0, 0, 0, 82, 388, -46, 282], [6573, 0, -1623, 795, -66, 0, 0, -315, -359, 326, 0, 0, 0, 0], [-16249, -2190, 0, -474, 0, -16249, 344, 0, 0, 0, -474, -84, -245, -170], [-4839, -2050, 0, 161, 0, -4839, -112, 0, 0, 0, 161, 293, -585, 23], [-2733, 0, -3450, -379, 128, 0, 0, 265, -189, 95, 0, 0, 0, 0], [7352, -741, 0, -775, 0, 7352, -558, 0, 0, 0, -775, -722, 187, -393], [5136, 1039, 0, 65, 0, 5136, -250, 0, 0, 0, 65, -134, -33, -705], [8030, 0, 474, -406, 252, 0, 0, 170, -26, -388, 0, 0, 0, 0], [-7605, 1484, 0, -867, 0, -7605, 92, 0, 0, 0, -867, 11, -437, 101], [201, -696, 0, -897, 0, 201, -500, 0, 0, 0, -897, -277, 289, -251], [3731, 0, -1523, -1003, 378, 0, 0, 325, 37, 492, 0, 0, 0, 0], [13207, 0, -1645, -761, 76, 0, 0, -263, -45, -76, 0, 0, 0, 0], [0, -1271, 1271, 0, 78, -5795, -78, 216, 266, -47, 828, 47, 216, 266], [2232, -5084, 0, -1, 0, 2232, -406, 0, 0, 0, -1, -287, 570, -399], [-9234, 0, 778, 863, -284, 0, 0, 112, 27, 371, 0, 0, 0, 0], [-5023, 0, 613, -544, -154, 0, 0, 496, 482, -177, 0, 0, 0, 0], [0, 2560, -2560, 0, 528, 4963, -528, -339, -349, -115, -1751, 115, -339, -349], [0, 920, -920, 0, 280, 227, -280, -473, 271, -113, -1723, 113, -473, 271], [0, -378, 378, 0, 260, -19797, -260, -25, 421, -155, 25, 155, -25, 421], [-10756, 2393, 0, -960, 0, -10756, -598, 0, 0, 0, -960, 349, 276, -146], [6228, 0, 2438, -843, 32, 0, 0, 912, -153, 181, 0, 0, 0, 0], [2929, -638, 0, 1639, 0, 2929, -204, 0, 0, 0, 1639, 17, 257, 191], [-10197, 0, 727, -678, 264, 0, 0, -324, 554, -217, 0, 0, 0, 0], [4753, 0, 1487, 122, -490, 0, 0, -113, -196, 173, 0, 0, 0, 0], [4845, 5078, 0, -617, 0, 4845, -20, 0, 0, 0, -617, 407, 785, -29], [0, 1927, -1927, 0, -50, 11445, 50, -43, -62, 37, 1444, -37, -43, -62], [0, 4366, -4366, 0, 184, -13702, -184, 494, -376, 534, 180, -534, 494, -376], [14320, 0, -5926, -628, -118, 0, 0, -190, -38, -150, 0, 0, 0, 0], [0, -2396, 2396, 0, -776, 19380, 776, -330, -158, -166, 1730, 166, -330, -158], [-4978, 0, -1850, -1002, 456, 0, 0, 378, -212, 592, 0, 0, 0, 0], [10636, -2003, 0, 1369, 0, 10636, 184, 0, 0, 0, 1369, 120, -31, 829], [0, -169, 169, 0, -364, -7125, 364, -107, -334, 239, -1014, -239, -107, -334], [15542, 0, -951, 148, 66, 0, 0, -40, 490, -501, 0, 0, 0, 0], [-11747, -1350, 0, -1122, 0, -11747, 66, 0, 0, 0, -1122, 588, 399, 588], [-10877, 0, 1598, -787, 136, 0, 0, 815, -123, 677, 0, 0, 0, 0], [22660, 1699, 0, -94, 0, 22660, 710, 0, 0, 0, -94, -217, -638, 560], [0, 96, -96, 0, 178, 17723, -178, 177, 308, -738, -158, 738, 177, 308], [-1380, 0, 2432, 934, 88, 0, 0, -264, -250, -26, 0, 0, 0, 0], [0, -2712, 2712, 0, 132, -15738, -132, 516, 478, 112, -884, -112, 516, 478]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_135_e_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_135_4_e_c();".
// 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_135_4_e_c(:prec:=14)
    chi := MakeCharacter_135_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 4));
    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_135_4_e_c();".
// 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_135_4_e_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_135_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![82944, 345600, 1572480, -276096, 765088, 55412, 209529, 2346, 23232, 1800, 1605, 60, 48, 2, 1]>],Snew);
    return Vf;
end function;