
// Make newform 90.2.l.b in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_90_l();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_90_l_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_90_2_l_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_90_2_l_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 := [25, -220, 972, -2780, 5736, -9024, 11224, -11276, 9297, -6328, 3580, -1668, 642, -196, 48, -8, 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], [-740270, 4090718, -11605609, 20953396, -26670871, 24694320, -16554394, 7025637, -718793, -1878159, 1783997, -1075015, 417198, -134821, 25062, -4341], [-142555, 929924, -3418428, 8598668, -15739188, 22138664, -24527176, 21928484, -15945783, 9554736, -4666596, 1879372, -594074, 151876, -25920, 3456], [-887140, 5420814, -17033716, 34301505, -49692993, 53902394, -45536907, 29556405, -15006590, 5261069, -1167140, -172588, 187861, -104426, 21310, -5033], [618310, -3615388, 11716753, -25401631, 41221233, -51541475, 51829741, -42069895, 28225918, -15479146, 7044831, -2581266, 766484, -172311, 28180, -2793], [-1883725, 12999216, -45658062, 104335813, -173497381, 221440773, -225133368, 185376534, -125576015, 70027507, -32236863, 12106306, -3642449, 856169, -141262, 15977], [218885, 510382, -6949514, 27082796, -61611091, 99711814, -121073088, 116711850, -89528958, 56590650, -28666706, 12097498, -3923413, 1056740, -182630, 26630], [-1160550, 9836888, -38723333, 96732560, -172095024, 232995743, -248665697, 214412142, -150958920, 87680143, -41702827, 16323908, -5050631, 1251886, -210508, 26630], [2084995, -14057775, 49547624, -114781987, 195077805, -255307874, 266547330, -225835284, 157187286, -90382731, 42720111, -16612682, 5122693, -1262932, 212086, -26630], [-2071845, 14507768, -52073476, 122001074, -208344314, 273082466, -284726942, 240513840, -166733397, 95362110, -44845414, 17314892, -5311527, 1296070, -216820, 26630], [18365, 2298926, -14757489, 48537906, -103510253, 160694617, -190504608, 179666959, -135892302, 84494792, -42377599, 17608509, -5670854, 1499462, -258470, 36479], [68035, -2916691, 17186797, -54727158, 114735201, -176142373, 207156088, -194109639, 146094250, -90418577, 45195343, -18706521, 6010234, -1582764, 272482, -38207], [2511045, -17509319, 63408155, -149985982, 258909506, -342616589, 360531571, -306917288, 214327527, -123326697, 58331291, -22629771, 6974027, -1708695, 286908, -35414], [1923500, -14369552, 54462313, -133562723, 236754314, -320295829, 343052922, -296756698, 210008510, -122465653, 58552587, -23008412, 7154021, -1779751, 300623, -38207], [-2009900, 15004412, -56891621, 139751975, -247979262, 335743585, -359704402, 311199378, -220210458, 128389438, -61370331, 24106424, -7493401, 1863053, -314635, 39935], [-1312670, 11232929, -46393946, 122374471, -229677473, 326718848, -364427829, 327539991, -239041170, 143951776, -70523459, 28575749, -9056462, 2335837, -399016, 54184]];
    Rf_basisdens := [1, 17095, 17095, 17095, 17095, 17095, 17095, 17095, 17095, 17095, 17095, 17095, 17095, 17095, 17095, 17095];
    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_90_l();"
function MakeCharacter_90_l()
    N := 90;
    order := 12;
    char_gens := [11, 37];
    v := [10, 9];
    // 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_90_l_Hecke();"
function MakeCharacter_90_l_Hecke(Kf)
    N := 90;
    order := 12;
    char_gens := [11, 37];
    char_values := [[1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1, 0, 0, -1, 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 := 2;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0], [0, 0, 0, -1, -1, -1, 0, 0, 1, 1, -1, 1, 1, -2, 0, -1], [1, 0, 1, 0, 0, -1, -2, 0, -1, -1, -1, -1, 1, -2, -1, -1], [0, 0, -1, 1, 0, 2, -1, 1, 0, 0, 0, -1, 0, 1, 1, 1], [0, -1, 2, 1, 1, 1, 2, -2, -1, 1, 2, -2, 1, 2, 0, 1], [0, 0, 1, 1, 0, 1, 1, -1, -1, 0, 1, -1, 0, 0, 0, -2], [-1, 2, -3, -2, -1, 0, -2, -1, 1, 0, -1, -1, -1, -2, -3, -1], [-1, 0, -1, 0, 1, 2, 2, 0, 0, 2, 1, 1, -1, 4, 1, 2], [-2, -1, 0, 1, 2, 2, -2, 1, -1, -3, 2, 0, -3, 2, 1, 2], [0, -2, 2, -2, -2, -2, 2, 0, 2, 2, 0, 6, 2, -2, 0, 0], [-4, -2, -3, 2, 3, 3, 1, -2, 1, -1, -2, -5, -4, 3, -1, 2], [4, 2, 0, 2, -2, -4, -4, 4, -2, -4, -4, -4, 0, -2, -2, 0], [-1, -2, -1, 2, -2, 3, 2, 2, 0, 0, 0, 2, -2, 1, 4, 0], [4, 4, -3, -1, 2, -4, -7, 3, 0, -2, -4, -3, 2, -4, -3, 4], [1, 1, -2, 2, 3, 3, -3, -1, 0, -5, -1, -1, -4, 5, 1, 2], [-3, -1, -2, 1, -1, 2, 5, -2, -1, -1, 2, 0, 0, 1, 1, -2], [2, 0, 1, 0, -1, 0, -1, 0, -1, 0, -2, -1, 2, -2, -1, -2], [3, 2, 0, -2, 4, -6, -6, 0, -1, -4, -3, -2, -1, 0, -6, -2], [-1, 2, -2, -1, -2, -6, -1, 1, 1, 1, -1, 9, 0, -2, -2, 0], [2, -2, 10, 2, -2, 0, 5, -1, -1, 3, 4, 4, 2, 2, 4, -2], [3, 2, 3, 2, -1, -3, 2, -3, 1, 2, -3, -4, 3, -2, -5, 0], [-5, 0, 0, 0, 0, -4, 2, 0, 5, 0, 5, 7, -5, 3, 0, 7], [6, 2, 2, 2, 2, 2, 0, 0, -4, 2, 2, -4, 0, 4, 0, 2], [0, 0, 0, 0, 0, 1, -2, 0, 0, 2, 0, -1, 0, 0, 0, -1], [1, -1, 6, 3, 1, 7, 5, 2, -2, -1, -1, -5, 0, 2, 2, 1], [-11, -1, -5, 1, 1, 1, 2, -2, 2, 1, -1, 0, -2, 0, 0, -1], [-5, -1, -4, 0, 0, -1, 1, 0, 2, -4, -1, 1, -1, -2, -1, -2], [-2, -1, -4, 1, 1, -1, -2, 0, -1, 2, 0, 1, 0, 1, 1, 0], [-3, -6, 3, -6, -3, 1, -2, -3, 3, -2, 3, 10, 3, -4, 3, -5], [3, 2, -1, 0, 0, -2, 0, 0, 0, 1, -2, -2, 2, 0, -2, 0], [10, 0, 4, 0, -4, -2, -6, 4, -4, -6, -4, 2, 4, -8, -4, -4], [4, 2, -2, -2, 2, -4, -2, -2, 0, 0, 0, -2, 2, 0, -4, 0], [-3, 1, -3, 1, 1, 1, 0, 0, 0, 1, -1, -11, -2, 2, 0, 1], [0, -3, 1, -3, -1, -1, 1, 3, 4, -1, 0, 1, 3, -7, 2, -6], [2, -4, 5, -4, -5, -4, 5, -4, -1, 5, -2, 3, 6, -14, -1, -10], [-1, 1, -1, -1, -3, -3, 2, 0, 2, 3, 1, 4, 2, 0, 2, -1], [0, -3, 0, 3, 6, 8, 0, -3, -3, -3, 0, -10, -3, 6, 3, 0], [0, -2, -4, -2, 2, 4, 0, 4, -2, 0, 4, 4, -4, 18, 6, 8], [-3, 1, 0, 0, 0, -5, 3, 0, 2, 2, 1, 1, -1, 2, 1, 2], [-4, 0, -4, -2, 0, 0, -4, 2, 0, -4, 0, 2, 0, -4, 2, -4], [-2, 0, 2, 0, -2, -2, 6, -2, 2, -2, 2, 4, -2, 0, -2, 2], [5, 0, 1, 0, 1, 6, -5, 4, -6, -5, 1, 5, 1, -12, -1, -6], [3, 4, -4, -4, -4, -4, -8, 8, -1, -4, -3, 5, 1, -5, 0, -1], [4, 1, 2, -1, 0, 0, -2, 1, -1, 3, 0, 0, 1, -5, 1, -10], [1, -4, 7, 4, -1, -1, 6, 5, 1, 4, 5, 6, 5, 4, 9, 5], [-4, 2, -6, 2, 6, 6, 7, 1, -1, 7, 4, -2, -6, 14, 4, 8], [-4, 1, -8, -1, 2, 5, -4, 1, 3, -3, -6, -14, -5, 5, -3, 12], [2, 2, 6, -2, -2, -2, -8, 0, 0, 2, -2, 0, 4, -10, 0, 4], [13, 1, 6, 0, -1, -1, -7, 1, 0, -13, -1, 8, 0, -1, -1, 0], [0, 2, 7, 2, -7, -8, 7, -2, 5, 1, 0, 9, -2, -2, -9, 6], [13, 6, 9, -6, -1, -5, -18, 5, -1, 8, -5, 0, 7, -6, 1, 2], [-6, -3, 0, -3, 0, 6, 10, -3, 3, 5, 6, 6, -3, 6, 3, 0], [-2, -6, -3, 6, 2, -6, 4, 0, -4, -2, 2, 4, -4, 12, 4, -6], [6, 8, 3, -8, -7, 1, -5, 4, 4, 3, -1, -2, 7, -8, -1, 9], [11, -3, 1, 3, 0, 7, -10, 3, -9, -8, -6, -6, 3, -6, -3, -6], [-12, -4, -5, -5, -4, -4, -1, 1, 8, -4, -4, 9, 0, -1, 1, 3], [0, 0, 0, 0, 0, -1, 7, -3, -3, -7, 0, 1, 0, 0, 0, 1], [-7, 0, -5, 0, -5, -1, 2, 3, 7, 2, -5, 4, -5, 2, 5, 1], [2, -2, 0, -6, 2, 6, -2, -8, -4, -2, -2, -6, 0, -8, -8, -10], [-6, 0, -8, 0, 0, 0, 0, 0, 10, 0, -10, 3, -10, -3, 0, -3], [10, 0, 14, 4, 0, 4, 4, -4, -4, 10, 4, -4, 0, 0, 0, -8], [8, 3, -8, 3, 6, 0, 4, 3, -3, -1, 0, -6, -3, 0, -3, 6], [-16, -5, 0, -5, 5, 5, 16, -10, 5, 16, 10, 5, 0, 5, 5, 0], [-2, 4, 2, -4, 0, -2, 0, -4, 4, 4, 0, 0, 4, -6, -4, 0], [-1, -1, -12, 1, 1, 1, 13, 0, 0, -1, 1, 0, -2, 3, 0, 0], [7, -11, 17, -8, -5, -5, 10, -3, 0, 9, 11, 13, 16, -13, 3, -8], [-8, -10, 12, 10, -6, 6, 16, 0, -2, 6, 8, 8, -2, 12, 16, -2], [-7, 3, -5, -5, -10, -13, 2, 5, 5, 14, 2, 18, 7, -10, -3, 0], [2, -1, 7, 6, 0, 2, 5, 6, -8, -1, -7, -7, 1, -2, -1, -2], [-12, -8, 8, -8, -8, 8, 12, -16, 4, 8, 12, 12, -4, -4, 0, -12], [-1, 5, -3, 5, 5, 5, -8, 0, -10, -11, 5, -10, 0, 13, 0, 8], [-3, 0, 3, 0, -3, 1, 3, 0, 6, 3, 3, 2, -3, 0, -3, -1], [1, -1, 5, 1, 1, 17, 4, 0, -2, -1, -1, -10, 0, 0, 0, -1], [4, 5, -8, -7, 0, -2, -12, 7, -3, -1, -2, 2, 5, 0, 5, 4], [-6, 6, -12, 6, 12, 10, -22, 3, -3, -22, 6, -8, -12, 26, 6, 16], [-2, -1, 2, -1, -2, 0, 0, -1, 1, 1, 0, 2, 1, -20, 1, -2], [2, 9, -5, 9, 5, 5, -4, 0, -7, -3, -2, -28, -7, 0, -4, -5], [1, 2, -5, 2, 3, 15, -6, -1, 3, -6, 1, 10, -5, 8, 3, 5], [1, -4, 5, 4, 6, 1, -6, 4, -10, -10, 0, -6, -4, 7, -2, 0], [0, -4, -4, -4, 4, 3, -4, 4, 0, 13, 0, -2, 4, -3, 8, -6], [-4, 4, -6, 4, 6, -10, -14, 4, 2, -10, 4, -2, -8, 2, 2, 12], [5, -2, -12, 2, 12, 10, -10, 0, -7, -12, -5, -16, -7, -2, -10, 4], [6, 14, -8, -14, -8, -12, -13, 7, 7, 1, -6, 6, 8, -14, -6, 2], [-5, -10, 3, -10, -13, -3, 18, -3, 13, 18, -3, 20, 3, -38, 7, -24], [13, 4, -4, 4, 4, 4, -18, 8, -9, -4, -13, -17, 9, -1, 0, -5], [-10, -10, 7, -3, -10, -10, 17, -7, 20, 10, -10, 13, 0, -20, -7, -10], [6, 0, -6, 0, 6, 14, -13, 6, -6, 1, -6, -20, 6, 0, 6, -14], [-7, 7, -3, 1, -7, -17, 4, 8, 14, 7, 7, 19, 0, 8, 8, 15], [12, -5, 17, 5, 5, 5, 10, -10, -7, 5, 12, -12, 7, 12, 0, 7], [-12, 2, -18, -4, 0, -2, -6, 4, 0, -14, -2, 2, 2, 4, 2, 12], [-4, 5, -7, -5, -6, -8, -3, 1, 6, 5, 1, 9, 1, -5, -4, 1], [-2, -6, 2, -6, -2, -2, 10, 0, 4, 18, 2, 18, 4, 2, 4, 4], [2, -8, 12, -8, -4, -10, 10, -4, -4, 10, 4, 2, 12, -16, -4, -12], [-3, -2, -2, 2, -5, 1, 5, 2, 3, 3, 0, 5, -2, 3, 7, 0], [0, 9, 5, 9, -5, 1, 5, -9, -4, -13, 0, -7, -9, 7, -14, 6], [-7, -1, -7, 1, -4, 5, 12, -5, -4, -2, 5, 0, 3, 1, 4, 11], [10, 15, -10, 15, 10, -4, -20, 15, -5, -15, -10, -20, -5, 16, -5, 20], [-5, -12, 0, 12, 14, 15, 4, -6, -6, -8, -2, -17, -14, 12, -2, 3], [10, 10, -6, 10, 16, 6, -16, 6, -16, -16, 6, -20, -6, 14, -4, 12], [7, 0, 7, 0, 7, -9, -2, -5, -9, -2, 7, -16, 7, 18, -7, 9], [3, -3, 0, 8, 3, -13, -3, 5, -6, -3, -3, 2, 0, 5, 5, 2], [-1, 11, 4, -11, -17, -32, 5, 6, 17, 7, 6, 38, 6, -11, -5, 6], [-7, -13, -4, -2, -4, 11, 27, -2, 2, 10, 11, 15, -9, 13, 13, -4], [-8, -2, -14, -2, 14, 14, 3, 0, -6, 20, 8, 6, -6, 30, 16, 16], [15, -1, 16, 1, 1, -4, 1, -1, 0, 0, 0, 9, -1, -4, 0, -10], [0, 4, -3, 4, -1, 2, -3, 5, -1, -3, -5, -1, -3, 2, -1, 3], [4, 14, -12, 7, 0, 0, -16, 7, 0, -18, -14, -26, -14, 7, -7, 7], [1, -8, 30, 8, -4, 12, 11, -12, -4, 13, 12, 0, -4, 8, 4, -12], [6, -1, 4, -1, -4, 16, 14, -1, -3, 9, -6, -2, 7, 8, -3, -8], [8, 18, -3, -18, -2, -4, -16, 0, 10, 2, -8, -5, 10, -25, -16, 7], [-14, -1, -12, -1, -2, 4, 2, 1, 1, 17, 2, -8, 3, -2, 1, 0], [-4, 5, 3, 5, 2, -3, -11, -3, -2, -11, -3, -10, 3, -11, -8, -3], [-3, -3, -1, -13, 0, 3, 2, -13, 7, 6, 10, 10, 3, -6, -3, -6], [-3, -4, 4, -4, -4, -10, 7, -8, -1, 4, 3, 10, 1, -12, 0, -2], [22, 0, 4, 0, 4, -6, 1, -5, -3, 1, 4, -10, 4, 12, -4, 6], [24, 12, -9, -12, -12, -12, -24, 24, 6, -12, -18, 7, -6, -7, 0, 5], [6, 0, -5, -11, 0, -11, -11, 11, 11, 6, -11, 11, 0, -19, 0, -16], [3, 6, 5, -6, -5, 21, 2, -1, 5, -4, -1, -22, -1, -6, -7, -1], [12, 11, 0, -1, -2, -12, -8, -1, 1, 3, -12, -10, 13, -8, -11, -2], [5, 3, 7, 3, -7, -7, -8, 0, 2, -23, -5, -15, 2, -23, -10, -16], [0, 9, -16, -9, -2, -14, -16, 9, 7, -7, -14, 12, -5, -14, -7, -10], [4, 4, -5, 2, 8, -4, -11, 6, 0, -8, -4, -6, -4, 10, -6, 2], [6, 2, 2, 0, -2, -2, -4, 2, 0, -6, -2, -2, 0, -2, -2, 0], [-9, -11, 19, 11, -4, 15, 24, -15, -4, 6, 15, 0, -7, 11, 4, -10], [-5, -7, -13, 7, -3, 19, 10, 0, -2, 3, 5, -3, -2, 1, 10, 6], [-3, -18, 19, 18, 11, 29, 16, -9, -9, -2, 7, -22, -11, 18, 7, 11], [0, 1, -1, 1, 1, 11, 12, 2, 1, -1, 0, -6, -1, 8, 0, -3], [5, 0, -5, 0, 5, 1, -18, 9, -1, 8, -5, -6, 5, 0, 5, -1], [-7, 7, 6, 0, -7, 7, 13, 7, 14, 7, 7, 7, 0, 7, 7, 14], [0, -5, 13, 8, 0, 3, 13, -8, 2, 5, 3, -3, -5, 14, -5, 22], [-2, -2, 0, -2, 0, -4, 6, -1, 1, 6, 2, -2, 0, -10, 2, -6], [-12, -1, 12, -1, -2, 0, -20, -1, 1, -9, 0, 2, 1, 6, 1, -2], [-42, -15, -24, 15, 12, 10, 18, -15, -3, 3, 6, -2, -9, 10, 3, -10], [10, 14, -12, 14, -2, 2, -22, 16, -2, -22, -16, -10, -12, 10, -2, 12], [12, 0, 4, 0, 16, -11, -16, 0, -16, -16, 0, -16, 0, 11, -16, 0], [0, 8, -8, 8, 8, 15, -8, -8, -16, -12, 0, -22, -8, 17, 0, 2], [1, -4, 13, 4, 1, 3, 2, -3, 1, 4, 3, 0, -5, 4, -1, 31], [5, 5, 9, -9, -18, -10, 4, 9, 9, 8, 4, 6, 13, -18, -5, 0], [-18, 1, -2, -17, 0, 6, 16, -17, 19, 17, 18, 18, -1, 2, 1, 2], [-8, 0, 8, 0, -8, -23, 17, 4, 20, -1, 8, 31, -8, 0, -8, 23], [1, 0, 0, 0, 0, 1, 13, -13, 13, 13, 0, 1, 0, -2, 0, -1], [-36, -5, -11, 5, 5, 5, 10, -10, 1, 5, 4, 6, -1, -6, 0, -11], [10, 9, -2, -3, 0, 6, -12, 3, -15, 1, 6, -6, 9, 4, 9, -4], [0, -6, -4, 6, 10, -14, -4, -4, -10, -4, -4, 10, -4, 6, 2, -4], [-7, -12, 5, -12, -5, -8, 19, -6, 6, 19, 7, 9, 5, -28, 7, -20], [5, 18, -8, 18, 8, 8, -20, 0, -13, -32, -5, -21, -13, 31, -10, 23], [-2, -2, -2, -1, -4, 2, 10, -3, 0, 4, 2, 3, 2, 3, 3, -9], [12, 10, 3, -2, -14, -14, -9, 12, 0, -8, -10, -8, 4, -16, -12, -2], [0, -7, -3, -7, 3, -11, -3, 7, 4, 9, 0, 25, 7, 3, 10, 14], [-16, -7, -20, 7, 9, -2, 14, 2, 9, -18, -2, 0, -16, 7, -9, 4], [-6, -5, -7, 6, 12, 11, -1, -6, -6, -1, -1, -11, -7, 12, 5, 0], [-4, 4, -14, -4, -2, 4, -4, 2, 2, 0, -2, -6, 2, -4, -2, 8], [-9, -1, 7, -1, -8, -7, 0, -7, 8, 0, -7, 2, 7, -27, -6, -14], [17, -7, 10, 6, 0, -3, -7, 6, -20, -10, -13, -13, 7, -14, -7, -14], [2, -2, 10, 1, 2, -18, 8, -1, -4, -2, -2, 6, 0, -1, -1, -3], [23, -10, 32, 10, 10, 10, 20, -20, -11, 10, 21, -3, 11, 3, 0, -7], [15, 14, 1, 14, -1, -15, -34, 7, -7, -34, -15, -28, 1, -16, -15, -1], [-6, -8, -4, -8, 4, 4, 0, 0, 2, 4, 6, -15, 2, -23, 12, -27], [9, -12, 16, -12, -4, -8, 7, -8, -4, 7, 8, 8, 16, -20, -4, -16], [-30, 1, 12, -1, -18, -10, 18, -1, 19, 19, 0, 18, 1, 8, 17, 0], [14, -12, 16, -3, 6, 6, 2, -9, 0, -8, 12, 2, 6, 3, 9, -3], [11, 12, -9, -12, -5, -7, -18, 7, -5, 4, -7, 0, 17, -12, 5, -14], [-4, 0, -10, 6, 12, 4, -6, -6, -6, -8, -6, -2, -12, 12, 0, 0], [19, 2, 37, -2, -3, -4, 0, 1, 1, 2, 1, 5, 3, -2, 1, -2], [19, 1, -3, 19, 0, -3, -22, 19, -17, -20, -18, -18, -1, 2, 1, 2], [27, 1, 9, -3, 1, 1, 8, 4, -2, 25, 1, 2, 0, 12, 4, 11], [1, 0, -9, 0, -9, -3, -6, 15, 3, -6, -9, 6, -9, 6, 9, 3], [9, -9, 7, 4, 9, -13, -2, -5, -18, -9, -9, -7, 0, -5, -5, -14]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_90_l_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_90_2_l_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_90_2_l_b(:prec:=16)
    chi := MakeCharacter_90_l();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    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_90_2_l_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_90_2_l_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_90_l();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![6250000, -7000000, 3920000, -2390400, 1088624, -207200, 6400, 26016, -20276, 4656, -128, -592, 476, -144, 32, -8, 1]>],Snew);
    return Vf;
end function;