
// Make newform 135.3.g.b in Magma, downloaded from the LMFDB on 18 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_135_g();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_135_g_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_3_g_b();".
// 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_3_g_b();".
// 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 := [62500, 0, 0, 0, 85684, 0, 0, 0, 16269, 0, 0, 0, 286, 0, 0, 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], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-4873078, 0, 0, 0, -311181, 0, 0, 0, -3932, 0, 0, 0, -13, 0, 0, 0], [0, 0, 276667814, 0, 0, 0, 38743349, 0, 0, 0, 667056, 0, 0, 0, 2321, 0], [0, 0, -716392442, 0, 0, 0, -116230047, 0, 0, 0, -2001168, 0, 0, 0, -6963, 0], [-119060250, 0, 85463648, 0, -90533915, 0, 47801228, 0, -1801800, 0, 901592, 0, -6535, 0, 3212, 0], [119060250, 0, 85463648, 0, 90533915, 0, 47801228, 0, 1801800, 0, 901592, 0, 6535, 0, 3212, 0], [0, 0, 0, 276667814, 0, 0, 0, 38743349, 0, 0, 0, 667056, 0, 0, 0, 2321], [1230609250, 0, -1196183036, 0, 461261475, 0, -351886026, 0, 8190750, 0, -6344094, 0, 28525, 0, -22304, 0], [-1230609250, 0, -1196183036, 0, -461261475, 0, -351886026, 0, -8190750, 0, -6344094, 0, -28525, 0, -22304, 0], [0, 14728508500, 0, 4704420474, 0, 3906293750, 0, 1776026659, 0, 70111500, 0, 32721196, 0, 246250, 0, 115811], [0, 17685119500, 0, 21982956458, 0, 7423611250, 0, 3680309603, 0, 135308000, 0, 63721432, 0, 476250, 0, 221887], [0, -41228914500, 0, -21982956458, 0, -8201563750, 0, -3680309603, 0, -145138000, 0, -63721432, 0, -508750, 0, -221887], [0, -5379027000, 0, 15373435302, 0, -2810996500, 0, 3712885557, 0, -53400500, 0, 66425108, 0, -191000, 0, 233253], [0, 10053767750, 0, 19324603646, 0, 3358645125, 0, 4487598261, 0, 61756000, 0, 79941784, 0, 218625, 0, 280369], [0, 18849159000, 0, -44827490374, 0, 1484273500, 0, -9556655309, 0, 21626000, 0, -169538296, 0, 71500, 0, -594161]];
    Rf_basisdens := [1, 1, 908888, 227222000, 113611000, 45444400, 45444400, 227222000, 227222000, 227222000, 2272220000, 2272220000, 2272220000, 2272220000, 1136110000, 2272220000];
    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_g();"
function MakeCharacter_135_g()
    N := 135;
    order := 4;
    char_gens := [56, 82];
    v := [4, 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_g_Hecke();"
function MakeCharacter_135_g_Hecke( : Kf := false)
    N := 135;
    order := 4;
    char_gens := [56, 82];
    char_values := [[1, 0, 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]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := ISA(Type(Kf), Fld), 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]];
    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 := 3;
    raw_aps := [[0, 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, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 1], [2, 0, 1, -2, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0], [0, 0, 0, -5, 1, -2, -2, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 1, -1, 1, 3, 3, 0], [0, -2, 0, 0, 0, 0, 0, -2, 0, 0, -4, -1, -3, 1, -3, -1], [10, 0, 5, 0, 0, 1, -1, 0, -3, 3, 0, 0, 0, 0, 0, 0], [0, 0, 2, 0, 2, 0, 1, 0, 0, -4, 0, 0, 0, 0, 0, 0], [0, -10, 0, 0, 0, 0, 0, 6, 0, 0, -2, -1, 0, 2, 0, -3], [11, 0, -5, -11, 5, -1, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0], [0, -6, 0, 0, 0, 0, 0, -1, 0, 0, -1, 1, 0, 7, -2, 1], [0, 0, 0, 0, 0, 0, 0, 8, 0, 0, -6, 1, -1, 2, 2, 0], [0, 7, 0, 0, 0, 0, 0, 10, 0, 0, 4, -3, -4, -2, -1, -3], [-19, 0, 3, 0, 0, 6, -6, 0, -3, 3, 0, 0, 0, 0, 0, 0], [-19, 0, -5, -19, -5, 0, 1, 0, 0, -6, 0, 0, 0, 0, 0, 0], [0, 8, 0, 0, 0, 0, 0, -2, 0, 0, -2, -5, 0, -2, 6, 5], [-47, 0, -3, 47, 3, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 43, -2, -4, -4, 0, 7, 7, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 19, 0, 0, 13, -3, 4, -1, 0, 1], [0, -21, 0, 0, 0, 0, 0, -19, 0, 0, 4, 2, 2, 2, 4, 2], [32, 0, -8, 32, -8, 0, 3, 0, 0, -6, 0, 0, 0, 0, 0, 0], [0, 5, 0, 0, 0, 0, 0, -18, 0, 0, 1, -7, 0, 14, 0, -6], [-15, 0, -1, 15, 1, 13, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0], [0, 34, 0, 0, 0, 0, 0, 12, 0, 0, 12, 11, 3, -4, 4, 8], [0, 0, 0, -36, 18, -3, -3, 0, 4, 4, 0, 0, 0, 0, 0, 0], [0, 4, 0, 0, 0, 0, 0, -27, 0, 0, -16, 6, -2, -8, -4, 4], [-9, 0, 2, -9, 2, 0, -8, 0, 0, -14, 0, 0, 0, 0, 0, 0], [0, -16, 0, 0, 0, 0, 0, 27, 0, 0, -3, 1, 0, -10, 4, 6], [0, -2, 0, 0, 0, 0, 0, -6, 0, 0, -6, 9, 13, 2, -2, -4], [0, 0, 0, -19, -1, 1, 1, 0, 7, 7, 0, 0, 0, 0, 0, 0], [0, -25, 0, 0, 0, 0, 0, -29, 0, 0, -22, 0, -7, 7, -11, 0], [-47, 0, 14, 0, 0, -8, 8, 0, 9, -9, 0, 0, 0, 0, 0, 0], [-30, 0, 17, -30, 17, 0, -9, 0, 0, 3, 0, 0, 0, 0, 0, 0], [-51, 0, 23, 51, -23, 2, 0, 0, -9, 0, 0, 0, 0, 0, 0, 0], [0, 41, 0, 0, 0, 0, 0, 4, 0, 0, 4, 9, 8, -8, 3, 1], [0, -6, 0, 0, 0, 0, 0, -35, 0, 0, -11, 1, -7, 7, 1, -6], [0, 37, 0, 0, 0, 0, 0, 25, 0, 0, -6, 7, 16, -2, 4, 7], [7, 0, -1, 0, 0, -5, 5, 0, 25, -25, 0, 0, 0, 0, 0, 0], [0, 41, 0, 0, 0, 0, 0, -46, 0, 0, 8, -5, 0, 12, -1, 1], [29, 0, 10, -29, -10, -9, 0, 0, -22, 0, 0, 0, 0, 0, 0, 0], [0, -36, 0, 0, 0, 0, 0, -1, 0, 0, -1, -3, 1, -13, 3, -4], [0, 0, 0, -139, -10, 14, 14, 0, 13, 13, 0, 0, 0, 0, 0, 0], [71, 0, -9, 0, 0, -3, 3, 0, 19, -19, 0, 0, 0, 0, 0, 0], [97, 0, -24, -97, 24, 10, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0], [0, 10, 0, 0, 0, 0, 0, 9, 0, 0, 9, -6, -12, -3, 3, 6], [0, 0, 0, 50, -4, -2, -2, 0, -9, -9, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, -44, 0, 0, 10, -5, 4, 10, 9, -1], [0, -20, 0, 0, 0, 0, 0, -16, 0, 0, 42, -5, 12, -22, 16, -5], [-11, 0, -4, 0, 0, 4, -4, 0, 38, -38, 0, 0, 0, 0, 0, 0], [0, 11, 0, 0, 0, 0, 0, 6, 0, 0, 19, 8, 0, -4, -6, 15], [0, 91, 0, 0, 0, 0, 0, -18, 0, 0, -18, -11, 1, 6, -6, -12], [0, 16, 0, 0, 0, 0, 0, 76, 0, 0, 10, 0, 16, -10, 6, 16], [0, -11, 0, 0, 0, 0, 0, 17, 0, 0, 14, -16, -37, 5, -9, -16], [-123, 0, -47, 0, 0, 5, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-21, 0, -1, -21, -1, 0, -4, 0, 0, -6, 0, 0, 0, 0, 0, 0], [0, 29, 0, 0, 0, 0, 0, -12, 0, 0, 2, 27, 0, -28, -13, 3], [-11, 0, -9, 11, 9, -22, 0, 0, -26, 0, 0, 0, 0, 0, 0, 0], [0, -17, 0, 0, 0, 0, 0, -24, 0, 0, -10, 0, -17, 10, -7, -17], [92, 0, 16, 92, 16, 0, -25, 0, 0, -5, 0, 0, 0, 0, 0, 0], [0, -103, 0, 0, 0, 0, 0, 65, 0, 0, 18, -16, 0, 48, -8, -14], [-79, 0, -14, 79, 14, 11, 0, 0, -20, 0, 0, 0, 0, 0, 0, 0], [0, -115, 0, 0, 0, 0, 0, -14, 0, 0, -14, -19, -18, 38, -13, -1], [11, 0, -21, 0, 0, -18, 18, 0, -26, 26, 0, 0, 0, 0, 0, 0], [-101, 0, -39, -101, -39, 0, 17, 0, 0, -38, 0, 0, 0, 0, 0, 0], [0, 11, 0, 0, 0, 0, 0, 1, 0, 0, 1, -27, -16, -47, 12, -11], [0, 0, 0, 107, 23, 18, 18, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, -21, 0, 0, 0, 0, 0, 75, 0, 0, -16, 6, -27, -8, -29, -21], [0, 65, 0, 0, 0, 0, 0, 72, 0, 0, -34, 0, -24, 24, -17, 0], [90, 0, 2, 90, 2, 0, 41, 0, 0, -8, 0, 0, 0, 0, 0, 0], [162, 0, -13, -162, 13, -8, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 71, 11, 17, 17, 0, 44, 44, 0, 0, 0, 0, 0, 0], [0, -24, 0, 0, 0, 0, 0, -30, 0, 0, 17, -2, -22, -9, -33, -24], [0, -14, 0, 0, 0, 0, 0, 11, 0, 0, 22, 33, 19, 47, 44, 33], [211, 0, -24, 211, -24, 0, -21, 0, 0, -11, 0, 0, 0, 0, 0, 0], [0, 14, 0, 0, 0, 0, 0, 21, 0, 0, 20, 18, 0, -22, -7, 24], [0, 0, 0, 61, 10, -12, -12, 0, 16, 16, 0, 0, 0, 0, 0, 0], [0, -74, 0, 0, 0, 0, 0, -88, 0, 0, -18, 10, 15, 5, 1, 10], [-1, 0, 21, 0, 0, 3, -3, 0, 1, -1, 0, 0, 0, 0, 0, 0], [0, -22, 0, 0, 0, 0, 0, 39, 0, 0, 48, 46, 0, -10, -41, 12], [29, 0, -29, -29, 29, -32, 0, 0, -46, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, -74, -20, -13, -13, 0, 24, 24, 0, 0, 0, 0, 0, 0], [0, -18, 0, 0, 0, 0, 0, 67, 0, 0, 31, -11, -7, 13, -5, -18], [0, 29, 0, 0, 0, 0, 0, 11, 0, 0, 60, -22, 26, -70, 8, -22], [-229, 0, 37, -229, 37, 0, -78, 0, 0, 26, 0, 0, 0, 0, 0, 0], [0, 53, 0, 0, 0, 0, 0, -20, 0, 0, 8, -13, 0, -8, 17, 29], [72, 0, 32, -72, -32, -23, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0], [0, -7, 0, 0, 0, 0, 0, -23, 0, 0, -23, -20, -13, 41, -16, -7], [0, -3, 0, 0, 0, 0, 0, 34, 0, 0, 46, 2, -12, 16, 25, 2], [173, 0, -11, 173, -11, 0, 65, 0, 0, -64, 0, 0, 0, 0, 0, 0], [0, 8, 0, 0, 0, 0, 0, -1, 0, 0, -40, -2, 0, -30, 17, -8], [0, 0, 0, -54, -12, 44, 44, 0, 38, 38, 0, 0, 0, 0, 0, 0], [0, 4, 0, 0, 0, 0, 0, -106, 0, 0, -3, 3, 1, -9, -5, 4], [0, 64, 0, 0, 0, 0, 0, 64, 0, 0, -44, -15, -37, 7, -37, -15], [0, 146, 0, 0, 0, 0, 0, -192, 0, 0, -2, -31, 0, 50, 6, -21], [42, 0, -28, -42, 28, -88, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0], [-147, 0, -35, 0, 0, -64, 64, 0, -8, 8, 0, 0, 0, 0, 0, 0], [-229, 0, -35, -229, -35, 0, 36, 0, 0, -55, 0, 0, 0, 0, 0, 0], [0, 24, 0, 0, 0, 0, 0, -49, 0, 0, -49, -69, -23, -37, -3, -46], [0, -45, 0, 0, 0, 0, 0, -103, 0, 0, -3, -12, -33, 51, 6, -45], [0, 195, 0, 0, 0, 0, 0, 160, 0, 0, -20, 5, 30, -20, -5, 5], [143, 0, -9, 0, 0, -3, 3, 0, -41, 41, 0, 0, 0, 0, 0, 0], [373, 0, -15, 373, -15, 0, 3, 0, 0, -24, 0, 0, 0, 0, 0, 0], [0, -88, 0, 0, 0, 0, 0, -23, 0, 0, -23, 8, 30, -19, -1, -22], [0, -9, 0, 0, 0, 0, 0, -123, 0, 0, 38, -13, 4, 14, 5, -9], [0, -37, 0, 0, 0, 0, 0, -35, 0, 0, 38, -45, -28, -62, -26, -45], [242, 0, -33, 0, 0, -24, 24, 0, 22, -22, 0, 0, 0, 0, 0, 0], [-194, 0, 12, -194, 12, 0, 17, 0, 0, 110, 0, 0, 0, 0, 0, 0], [-116, 0, -45, 116, 45, 36, 0, 0, -5, 0, 0, 0, 0, 0, 0, 0], [0, 99, 0, 0, 0, 0, 0, -16, 0, 0, -16, 50, 74, -48, 8, -24], [0, 0, 0, -35, 91, -10, -10, 0, 10, 10, 0, 0, 0, 0, 0, 0], [-513, 0, -59, 0, 0, 41, -41, 0, -8, 8, 0, 0, 0, 0, 0, 0], [0, 128, 0, 0, 0, 0, 0, -87, 0, 0, -10, 27, 0, -52, -1, 15], [77, 0, -41, -77, 41, 21, 0, 0, 123, 0, 0, 0, 0, 0, 0, 0], [0, 123, 0, 0, 0, 0, 0, -10, 0, 0, -10, 18, 3, 90, -25, 15], [0, 29, 0, 0, 0, 0, 0, 27, 0, 0, -1, -4, 33, 17, 46, 29], [0, -92, 0, 0, 0, 0, 0, -114, 0, 0, -12, -38, -22, -54, -44, -38], [-211, 0, -21, 0, 0, 6, -6, 0, 47, -47, 0, 0, 0, 0, 0, 0], [-273, 0, 32, 273, -32, 27, 0, 0, -76, 0, 0, 0, 0, 0, 0, 0], [0, 20, 0, 0, 0, 0, 0, 34, 0, 0, 34, -4, -40, 42, -2, 36], [0, -5, 0, 0, 0, 0, 0, 144, 0, 0, -16, 16, -21, -48, -53, -5], [-194, 0, 2, 0, 0, -11, 11, 0, -52, 52, 0, 0, 0, 0, 0, 0], [0, -52, 0, 0, 0, 0, 0, 95, 0, 0, 35, -26, 0, 12, 20, 49], [0, 0, 0, -79, -73, 48, 48, 0, -114, -114, 0, 0, 0, 0, 0, 0], [0, -164, 0, 0, 0, 0, 0, -168, 0, 0, -50, 3, -18, 24, -22, 3], [-49, 0, 109, -49, 109, 0, 18, 0, 0, -6, 0, 0, 0, 0, 0, 0], [269, 0, 25, -269, -25, 36, 0, 0, -116, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 116, 2, 26, 26, 0, -23, -23, 0, 0, 0, 0, 0, 0], [0, -5, 0, 0, 0, 0, 0, -176, 0, 0, 73, -23, 18, 19, 14, -5], [569, 0, -132, 0, 0, -15, 15, 0, -35, 35, 0, 0, 0, 0, 0, 0], [48, 0, 41, 48, 41, 0, 16, 0, 0, 189, 0, 0, 0, 0, 0, 0], [0, 104, 0, 0, 0, 0, 0, -100, 0, 0, 6, -7, 0, 6, 4, 7], [0, 0, 0, 501, 30, 59, 59, 0, -82, -82, 0, 0, 0, 0, 0, 0], [0, -21, 0, 0, 0, 0, 0, 182, 0, 0, 72, -32, 11, 56, 35, -21], [-168, 0, -58, -168, -58, 0, -12, 0, 0, -89, 0, 0, 0, 0, 0, 0], [0, -113, 0, 0, 0, 0, 0, 75, 0, 0, 75, 58, -17, 75, 0, 75], [0, 119, 0, 0, 0, 0, 0, 40, 0, 0, 28, 19, 112, -74, 33, 19], [100, 0, -16, 0, 0, -65, 65, 0, -70, 70, 0, 0, 0, 0, 0, 0], [0, -223, 0, 0, 0, 0, 0, 122, 0, 0, 12, -85, 0, 132, 19, -35], [-144, 0, 14, 144, -14, -23, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0], [0, -182, 0, 0, 0, 0, 0, 54, 0, 0, 54, 68, 22, 22, 8, 46], [0, 0, 0, -317, -5, 52, 52, 0, -76, -76, 0, 0, 0, 0, 0, 0], [0, 58, 0, 0, 0, 0, 0, 52, 0, 0, -52, 44, 24, 64, 18, 44], [-278, 0, 87, 278, -87, -38, 0, 0, -85, 0, 0, 0, 0, 0, 0, 0], [0, 40, 0, 0, 0, 0, 0, 66, 0, 0, 66, 75, 21, 18, 12, 54], [0, 0, 0, -363, -69, -28, -28, 0, -36, -36, 0, 0, 0, 0, 0, 0], [0, 23, 0, 0, 0, 0, 0, 100, 0, 0, -107, 37, -14, -41, -18, 23], [-153, 0, -88, -153, -88, 0, -12, 0, 0, 61, 0, 0, 0, 0, 0, 0], [0, -73, 0, 0, 0, 0, 0, 75, 0, 0, -88, 33, 0, -82, 8, -39], [-9, 0, 101, 9, -101, 101, 0, 0, -24, 0, 0, 0, 0, 0, 0, 0], [0, -216, 0, 0, 0, 0, 0, -43, 0, 0, -43, -13, 14, 21, -16, -27], [502, 0, 6, 502, 6, 0, -50, 0, 0, 113, 0, 0, 0, 0, 0, 0], [0, -73, 0, 0, 0, 0, 0, 48, 0, 0, -102, -53, 0, -16, 61, -33], [0, 0, 0, -274, -163, -7, -7, 0, -9, -9, 0, 0, 0, 0, 0, 0], [0, -265, 0, 0, 0, 0, 0, -266, 0, 0, 54, 2, 30, -26, 29, 2], [465, 0, -46, 465, -46, 0, 97, 0, 0, -30, 0, 0, 0, 0, 0, 0], [0, 98, 0, 0, 0, 0, 0, -91, 0, 0, 5, -92, 0, 60, 62, 37], [0, -71, 0, 0, 0, 0, 0, -69, 0, 0, -69, 12, 23, 163, -58, -11], [0, -10, 0, 0, 0, 0, 0, -87, 0, 0, -58, 3, -13, 46, 36, -10], [-603, 0, 47, -603, 47, 0, -57, 0, 0, -36, 0, 0, 0, 0, 0, 0], [0, -166, 0, 0, 0, 0, 0, 97, 0, 0, 11, -25, 0, 70, -10, -34], [0, 218, 0, 0, 0, 0, 0, -32, 0, 0, -32, -3, 10, 44, -19, -13], [0, -21, 0, 0, 0, 0, 0, -88, 0, 0, 81, -46, 25, 103, 82, -21], [-185, 0, 140, 0, 0, 4, -4, 0, -67, 67, 0, 0, 0, 0, 0, 0], [-241, 0, -2, -241, -2, 0, 63, 0, 0, 19, 0, 0, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_135_g_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_135_3_g_b();".
// 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_3_g_b(:prec:=16)
    chi := MakeCharacter_135_g();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 3));
    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_3_g_b();".
// 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_3_g_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_135_g();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<2,R![62500, 0, 0, 0, 85684, 0, 0, 0, 16269, 0, 0, 0, 286, 0, 0, 0, 1]>],Snew);
    return Vf;
end function;