
// Make newform 225.2.p.b in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_225_p();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_225_p_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_225_2_p_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_225_2_p_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 := [1, 12, 72, 288, 502, -432, 144, -102, -93, 132, -72, 18, 34, -36, 18, -6, 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], [33432180594, 394928996361, -97367215891956, 9515651467064, 17087672692002, -8831452106135, 24987667997140, -9000312527194, -3349022853273, 6402779061545, -6827412737484, 1720995499366, 848040618120, -820783926284, 385788744870, -80029143512], [-80029143512, -993781902738, -6157027329225, 74318822560500, -49690281510088, 17484917305182, -2692744559593, -16824695358916, 16443022873810, -7214824090311, -640680728681, 5386888154268, -4441986378774, 2033008548312, -619740656932, 94386116202], [-5622211270526, 6229211681286, 39778718221026, 69548698425511, -58749535677614, 19963910433530, -14375839504346, -12670141167362, 18125438747586, -10010107392923, 2468033098841, 4819083120574, -5074237635644, 2535236829090, -843322184609, 140020985001], [-1652709999986, -9908294946195, -39600205283397, -68801672173612, 60275329582886, -20209428153588, 14340027118406, 12720523783684, -18433708480508, 10068880032759, -2485960949906, -4783342099524, 5054110370148, -2524530400854, 840493754711, -140094553942], [7166890770427, 51260000406122, 87537780396607, 64517669865637, -70138530799181, 15235400765019, -23866374631831, -7831377865421, 18612405885154, -11091715879228, 5471229679434, 3809266070290, -5449473018186, 2941649532255, -1059314239720, 190424165289], [5660844178894, 37629440983980, 166080601083280, -307914761564074, 171068416087064, -64342714660344, -23942148678807, 81094540846877, -61892560799590, 21076350180684, 12446807908885, -24294968776849, 16582911879478, -6927613311171, 1889212496921, -250381984552], [146893504700, -1923868016767, -184869896542460, -55287519626372, 83865626894092, -35147821517452, 52668080553873, -1175929695472, -23141068580356, 20020382213401, -13014144746287, -1944897155536, 6138067615014, -3674576400880, 1391318146672, -254444403226], [785074438, 6077223668, 38916218628, 112985327352, -90050852224, 31379154942, -16547104520, -22763827488, 28282811704, -14534291253, 2288455604, 7906540260, -7676123862, 3734556994, -1212076232, 196858530], [-11893459432082, -72960092263182, -298633135730430, -259338049254711, 264557518559700, -84926350980924, 91030841771699, 36855540630045, -76380921929866, 47355950801010, -19694741515785, -16017341587322, 21019011866538, -11114551602021, 3890533925017, -677106342206], [-3343669588, -17609140908, -113116110792, -484158220100, 370531312158, -129597823592, 57313765188, 101294734438, -118164117069, 58813815140, -6224799624, -34368654754, 31997236762, -15343416116, 4907305158, -785074438], [-10233974547, -82003950372, -318408624800, -924410484114, 736991238906, -250255719435, 134499720676, 186162436800, -231117756606, 118271636061, -18641341380, -64714538406, 62871582510, -30594542475, 9938916556, -1616321538], [-14351633608601, -88708185746586, -494201049779995, -1096523230221273, 903298035710624, -312115024344538, 190394270523687, 213102612708737, -281602693598733, 149878719509936, -30557686749160, -75496074288529, 76333636000087, -37626995630777, 12360646755715, -2029780580195], [12411058785072, 69635354161975, 423279276478650, 1711060513528000, -1317355191257852, 460873742162788, -208763256058877, -356956659982399, 419879212252284, -209882210310499, 23632381842971, 121395144569897, -113605741903926, 54572756591878, -17485025240258, 2802573231023], [-17972736434118, -143994055202790, -574674020284387, -1622375494927184, 1297608293014434, -439893314072684, 239007446234759, 326089380120540, -406505628692916, 208555923938660, -33753433646508, -113406120362540, 110572117714578, -53872302373806, 17521813816267, -2852772870096]];
    Rf_basisdens := [1, 1, 3707507912227, 3707507912227, 3707507912227, 3707507912227, 3707507912227, 3707507912227, 3707507912227, 1973128213, 3707507912227, 1973128213, 3810388399, 3707507912227, 3707507912227, 3707507912227];
    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_225_p();"
function MakeCharacter_225_p()
    N := 225;
    order := 12;
    char_gens := [101, 127];
    v := [10, 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_225_p_Hecke();"
function MakeCharacter_225_p_Hecke(Kf)
    N := 225;
    order := 12;
    char_gens := [101, 127];
    char_values := [[1, 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, 0, -1, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 1, 1, 0, -1], [0, 0, 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, 1, 0], [-1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, -1, -1, -1, 0, 1], [0, -1, 1, 1, 2, 1, 1, 0, 0, -2, 0, 0, 0, -2, 1, 1], [-1, 0, 1, -1, -1, -1, 0, -1, -1, 0, 0, -1, 1, 0, -1, -1], [-2, 2, -2, 0, 1, 2, 2, -1, 2, 1, -2, 1, -1, -1, 2, 1], [-1, 3, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, -1, 0, -1, -1], [2, -1, 3, 0, -2, -3, -2, 0, -2, -1, 2, 0, 4, 2, -2, -2], [1, -2, 0, 1, 3, 1, 0, 0, 0, -4, 0, 1, 0, 0, 3, 0], [0, 0, -1, 1, 1, -1, 0, -1, 1, 0, -2, 1, 0, 0, 1, 1], [0, 1, 0, 0, 3, 0, 2, 2, 0, 0, 2, 0, -2, 0, -1, 2], [0, -2, 0, 1, 0, -1, -1, 0, -1, 1, 0, -2, 0, -1, 0, 0], [3, 0, 0, 0, 1, -3, 0, 0, -1, 0, 3, 0, -3, 0, -1, 1], [-2, -2, -6, 0, 0, 0, 0, 0, -2, -2, 0, -4, -2, 2, 2, -2], [-1, 0, 2, -1, 0, 1, 1, -1, 0, 0, -1, 1, -3, 0, 1, 1], [0, 0, 0, 3, 0, -3, 0, 0, 0, 3, 0, -4, 0, 0, -3, 0], [-1, 0, 1, 2, 4, 6, 0, 3, 4, 0, -3, -1, 1, 0, 4, 4], [1, -2, 0, 0, 2, 2, 0, 1, 0, -4, 0, 1, 0, 1, 4, 0], [-1, 6, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, -3], [1, 4, 0, 3, 1, 1, -1, 2, 6, 3, 1, -2, -1, -1, -1, 1], [8, -3, 4, 0, -2, -2, -2, 0, -1, -3, 0, 4, 8, 2, -1, -2], [0, -1, -8, -1, -3, -1, 0, -3, -2, -3, 0, 3, -1, 3, 0, -4], [0, 0, -3, 2, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0], [2, -3, 0, -4, -10, -7, -2, 0, 0, 1, -2, 2, 2, 2, -4, -2], [-3, 3, -4, -6, -7, -1, -1, 0, 5, 6, 0, -3, -3, 2, -6, 4], [0, 0, -4, 2, 1, 6, 0, -4, 6, 0, 0, 4, 0, 0, 6, 1], [-2, -2, -2, -2, 1, 6, 2, -1, 2, -1, -2, 1, 2, -1, 2, 1], [-4, -2, 4, -1, -1, 0, 0, 0, -1, 0, 0, 4, -4, 0, 1, 1], [4, 0, 1, -2, -1, 3, 0, 1, -1, 0, 2, -1, -4, 0, -1, -1], [-2, 0, 0, -4, -8, 4, -4, -4, 0, 0, -4, 2, 4, 0, 4, -4], [-2, 0, 1, 0, -4, -4, 0, 0, -2, 0, 0, -1, 2, 0, -2, -4], [-2, 2, 0, 0, 4, 0, 2, 2, 0, 4, -2, -2, -2, -4, 2, 2], [2, 4, 8, 6, 0, -7, -2, 2, -1, 0, 2, -2, -6, 0, -2, -1], [3, 1, 0, -2, 3, 1, 3, 6, 0, -1, 3, 5, -3, 3, 0, 3], [5, 0, -5, -5, -5, -10, 0, 0, -5, 0, 0, 5, -5, 0, -5, -5], [-4, 1, -3, -6, 0, 6, 6, 0, 3, 5, 0, 0, -4, -3, 3, 9], [-2, 0, -2, -2, -2, 4, 0, -7, 2, 0, -7, 2, 2, 0, 2, -2], [4, 6, 2, -6, -8, -2, -2, 0, 2, 12, 0, 2, 4, 2, -4, 4], [0, 2, -4, -7, -3, 2, 0, -3, 4, 6, 0, 3, 1, 3, 0, -1], [7, 2, 0, -1, 8, 2, 8, 4, 0, 1, 8, -4, -8, -4, 0, 8], [1, -4, 0, 4, 3, 0, -5, 0, 0, -8, -5, 3, 5, 5, 4, -5], [-3, 1, 2, 6, 11, 5, 5, 0, -1, 2, 0, -3, -3, -10, 6, 4], [1, 0, 0, 2, -2, -6, 0, 2, -6, 0, 0, 0, -1, 0, -6, -2], [-2, -6, -2, -4, 1, 10, 2, -1, 2, -3, -2, 1, 5, -1, 2, 1], [6, 1, 0, -5, -7, -5, -1, 1, 0, 2, -1, 6, 1, 2, -6, -1], [0, -3, 2, -1, 0, 1, 1, 0, 0, 2, 0, 4, 0, 1, 1, 0], [-9, 0, 3, 0, 3, 10, 0, 0, 3, 0, -3, -3, 9, 0, 3, 3], [0, 7, -1, -7, 0, 3, 0, 0, 10, 14, 0, 0, -1, 0, 0, 10], [-1, -1, -1, 1, 1, 0, 0, 0, -1, -5, 0, -2, -1, -1, 1, 0], [-4, -5, -8, -9, 0, 11, 4, -4, 2, 0, -4, 4, 4, 0, 4, 2], [-5, 3, 0, 0, -5, -3, -5, -10, 0, 3, -5, 0, 5, -5, -6, -5], [1, -1, 0, 7, 1, 1, 0, -2, 0, 5, 0, 4, 0, -2, 2, 0], [0, 0, 0, 7, -3, -4, 0, -4, 3, 0, -4, 0, 0, 0, 3, -3], [-4, -6, -2, 3, 4, 1, 1, 0, -1, -9, 0, -2, -4, -1, 2, -2], [0, -6, 10, 6, 3, -6, 0, 3, -12, -9, 0, -3, 2, -3, 0, -3], [-7, 2, 0, -1, -6, 2, -6, -3, 0, 1, -6, 3, 6, 3, 0, -6], [-3, 0, 9, 10, -3, -4, 0, -6, 1, 0, -3, -9, 3, 0, 1, -3], [-17, 13, 0, 0, 7, 13, 7, 0, 0, 13, 7, -12, -7, -7, 0, 7], [12, -3, 4, -2, -10, -8, -8, 0, -6, -6, 0, 12, 12, 16, -2, -14], [-7, 13, -8, -7, 8, 15, 15, 0, 8, 0, 0, 7, -7, 0, 7, 7], [-8, 0, -2, -1, -10, 4, 0, -2, 2, 0, -4, 2, 8, 0, 2, -10], [10, -2, 0, 6, 3, -6, -1, -1, 0, 0, -1, -10, 1, 0, -4, -1], [0, -4, -4, 5, 0, -5, -5, 0, 0, 9, 0, -14, 0, -5, -5, 0], [-3, 0, 3, 0, 5, 2, 0, 0, 1, 0, 3, -3, 3, 0, 1, 5], [2, -11, 0, 4, 2, 7, 2, 4, 0, -7, 2, -8, -2, 2, 18, 2], [-8, 0, 8, 3, -3, 0, 0, -8, -3, 0, 8, -8, 8, 0, -3, -3], [10, 0, 10, -2, 1, 1, 0, 5, -1, 0, 5, -10, -10, 0, -1, 1], [-5, 2, -9, -7, -5, 9, 5, -10, 6, -1, -5, 10, 5, 5, 5, -5], [-6, -2, -3, 4, 14, 10, 10, 0, 3, -6, 0, -3, -6, -10, 7, 6], [0, 5, 6, 8, 0, 5, 0, 0, 10, -3, 0, 0, 3, 0, 0, 5], [-1, 0, -14, -14, -1, 4, 0, -2, -3, 0, -1, 14, 1, 0, -3, -1], [-12, -6, -10, 6, 8, 2, 2, 0, -4, -12, 0, -12, -12, -4, 6, -2], [8, -2, 8, 0, -4, -14, -8, 4, -8, 2, 8, -4, -2, 4, -8, 2], [10, -11, -1, 5, -4, -9, -9, 0, -4, 0, 0, -10, 10, 0, -5, -5], [5, -6, 8, 10, -5, -14, -5, 0, -15, -16, 5, 0, 11, 5, -5, -25], [13, 0, -2, 0, 2, 2, 0, -2, 2, 0, -4, 2, -13, 0, 2, 2], [-1, 14, 0, -11, 8, 11, 5, 5, 0, 0, 5, 1, -5, 0, -3, 5], [4, -8, 12, 4, -8, -8, -4, -4, -12, -16, 4, 4, 16, 8, -4, -16], [-1, 7, -5, 6, 0, -7, 1, -1, -1, 0, -1, 1, 4, 0, 1, 2], [-4, -2, 0, 4, -4, -2, -4, -8, 0, 2, -4, 10, 4, -4, 0, -4], [2, 1, 0, -3, -1, -1, 0, -11, 0, -1, 0, 15, 0, -11, -2, 0], [2, -3, -1, -5, -3, 2, 2, 0, 1, 3, 0, 0, 2, -1, 1, 6], [3, 3, 8, 5, 3, -2, -3, 6, 4, 4, 3, -6, -3, -3, -3, 3], [-14, 15, -7, 3, 4, 1, 1, 0, -1, 12, 0, -7, -14, -1, 2, -2], [0, 4, -8, 1, 12, 4, 0, 12, 8, 15, 0, -12, -16, -12, 0, 16], [7, 0, 5, -4, 7, -2, 0, 14, -4, 0, 7, -5, -7, 0, -4, 7], [-20, -3, 0, -4, -10, -7, -2, 0, 0, 1, -2, -9, 2, 2, -4, -2], [9, -7, 6, -1, -4, -3, -3, 0, -2, -14, 0, 9, 9, 6, -1, -5], [5, 0, -17, 2, -2, 3, 0, -7, 3, 0, 0, 17, -5, 0, 3, -2], [-1, 4, -12, 5, 1, -7, 1, 0, -4, -1, -1, 0, -23, -1, 1, -9], [0, 0, 5, 8, 10, -21, 0, 5, -5, 0, 10, -5, 0, 0, -5, 10], [11, -6, 0, 11, -2, -11, -7, -7, 0, 0, -7, -11, 7, 0, -5, -7], [-4, -5, 16, 9, 8, 11, 4, 4, 2, -10, -4, -4, 12, -8, 4, 6], [2, -5, 17, 9, 9, 0, 0, 0, -5, -8, 0, 4, 2, -13, 5, 4], [8, -12, 17, -4, 0, -8, -8, 8, -12, 0, 8, -8, -9, 0, -8, 4], [-5, 2, 0, 1, -2, -2, 0, 4, 0, 5, 0, -14, 0, 4, -4, 0], [-1, 13, -3, -9, -3, 6, 6, 0, 3, 14, 0, 0, -1, -3, 3, 12], [-11, 6, 0, 0, 14, 6, 8, 4, 0, 0, 8, -4, -8, -4, 0, 8], [4, 0, 20, 2, 4, -5, 0, 8, -4, 0, 4, -20, -4, 0, -4, 4], [4, 0, -12, -13, 1, 6, 0, -4, 6, 0, 0, 12, -4, 0, 6, 1], [6, 2, -3, 0, -3, -3, -3, 0, -3, 0, 0, -6, 6, 0, 0, 0], [-7, 4, -6, -1, 7, 11, 7, 0, 8, 5, -7, 0, -5, -7, 7, 9], [3, 1, 0, -2, -10, -2, -7, 7, 0, 2, -7, 3, 7, 14, -3, -7], [2, 0, 6, -6, 12, 6, 0, 6, -6, 0, 12, -6, -2, 0, -6, 12], [-18, 0, 6, 0, -10, -1, 0, 0, -2, 0, -6, -6, 18, 0, -2, -10], [-1, 15, -13, -13, -13, 0, 0, 0, 15, 13, 0, -2, -1, 11, -15, 2], [-1, 13, -4, 12, 0, 2, 1, -1, 14, 0, -1, 1, 3, 0, 1, -13], [-1, -2, 0, 1, -1, 1, -1, -2, 0, -1, -1, -14, 1, -1, 3, -1], [-12, 0, 12, 3, -1, 2, 0, 11, -1, 0, -11, -12, 12, 0, -1, -1], [-13, 5, 1, 2, 0, -2, -2, 0, -1, 1, 0, 0, -13, 1, -1, -3], [-5, 0, -5, 4, -12, 8, 0, -4, 12, 0, -4, 5, 5, 0, 12, -12], [4, -11, 9, -3, 4, -8, -4, 8, -15, 0, 4, -8, -4, -4, -4, 4], [-8, -3, 0, -6, -13, -3, 2, 1, 0, 6, 2, -1, -2, -1, 0, 2], [4, -5, 0, 3, 10, -2, 4, 0, 0, -8, 4, 0, -4, -4, 3, 4], [-18, 6, -15, 8, 11, 3, 3, 0, -5, 12, 0, -18, -18, -6, 8, -2], [3, 0, 5, 2, 5, -1, 0, 11, -1, 0, 0, -5, -3, 0, -1, 5], [0, -11, 9, 5, -4, -9, -9, 0, -4, 0, 0, 0, 0, 0, -5, -5], [-13, 7, -2, 5, 13, 14, 13, 0, 8, 2, -13, 0, 9, -13, 13, 3], [-10, 2, 0, 8, 4, 8, -2, 2, 0, 4, -2, -10, 2, 4, 6, -2], [0, -6, 0, 1, 0, -1, -1, 0, 2, 11, 0, -2, 0, -1, -3, 0], [11, 0, 2, 0, -9, -14, 0, 0, -12, 0, 15, -2, -11, 0, -12, -9], [0, -21, 7, 14, 14, 0, 0, 0, -21, -17, 0, 0, 0, -7, 21, -7], [4, 6, 0, -6, 4, 0, 4, 8, 0, 0, 4, 18, -4, 4, -6, 4], [-6, -8, 0, 6, 8, 8, 0, -5, 0, -10, 0, -7, 0, -5, 16, 0], [-3, 1, -1, -5, -3, 6, 3, -6, 4, 0, -3, 6, 3, 3, 3, -3], [0, 1, 6, -14, -3, 1, 0, -3, 2, 12, 0, 3, 6, 3, 0, -2], [-3, 0, -6, 20, -3, -9, 0, -6, 1, 0, -3, 6, 3, 0, 1, -3], [6, 14, 4, -17, -19, -2, -2, 0, 15, 28, 0, 6, 6, 4, -17, 13], [10, 3, 10, 8, -5, -23, -10, 5, -10, 0, 10, -5, 8, 5, -10, -8], [0, 9, -6, 1, 7, 6, 6, 0, 7, 0, 0, 0, 0, 0, -1, -1], [15, 1, 0, 4, -1, 4, -4, 4, 0, 2, -4, 15, 4, 8, 3, -4], [-10, 0, 3, -5, 3, 7, 0, 3, -3, 0, 6, -3, 10, 0, -3, 3], [7, -5, 0, -3, 6, 3, 14, 14, 0, 0, 14, -7, -14, 0, 8, 14], [2, 1, 7, -3, -4, -7, -2, -2, -4, 2, 2, 2, 9, 4, -2, -6], [-2, -8, -12, 0, 0, 0, 0, 0, -8, -8, 0, -4, -2, 8, 8, -8], [-11, 0, 11, 7, -6, 1, 0, -5, -6, 0, 5, -11, 11, 0, -6, -6], [6, 0, 6, 1, 12, -13, 0, 11, -12, 0, 11, -6, -6, 0, -12, 12], [0, 0, -40, -3, 0, 0, 0, 0, 0, 3, 0, 0, -20, 0, 0, 0], [-12, -6, 0, 6, -2, -6, -8, -4, 0, -6, -8, 4, 8, 4, 0, -8], [24, 6, 0, -1, 2, 5, 4, 0, 0, 7, 4, 10, -4, -4, -1, 4], [6, 6, 11, -9, -4, 5, 5, 0, 14, 12, 0, 6, 6, -10, -9, 19], [7, 0, -9, -10, -3, -11, 0, 5, -11, 0, 0, 9, -7, 0, -11, -3], [-4, -3, -4, -14, 2, 11, 4, -2, 4, 9, -4, 2, -14, -2, 4, 23], [2, -7, -3, -9, -2, 12, -2, 0, 7, 2, 2, 0, -8, 2, -2, 16], [0, -4, 3, 1, 0, -1, -1, 0, -7, -9, 0, 1, 0, -1, 6, 0], [15, 0, -15, 0, -3, 4, 0, 0, 6, 0, -15, 15, -15, 0, 6, -3], [-3, 8, -25, -5, 6, -4, 3, 3, 1, 16, -3, -3, -28, -6, 3, 4], [2, 11, 5, -5, -5, 0, 0, 0, 11, 10, 0, 4, 2, -1, -11, 6], [-2, 0, 2, -2, 21, 19, 0, 1, 21, 0, -1, -2, 2, 0, 21, 21], [-6, 12, 0, -4, -12, -12, 0, 1, 0, 20, 0, -13, 0, 1, -24, 0], [-4, -17, 3, -15, -21, -6, -6, 0, -3, 8, 0, 0, -4, 3, -3, 12], [-2, 0, -2, 4, 3, -7, 0, 5, -3, 0, 5, 2, 2, 0, -3, 3], [7, 0, -10, 6, 7, -7, 0, 14, -4, 0, 7, 10, -7, 0, -4, 7], [-21, -1, 0, 7, 21, 6, 7, 0, 0, -8, 7, -14, -7, -7, 7, 7], [-12, 2, -12, -8, 6, 22, 12, -6, 12, 4, -12, 6, 0, -6, 12, 12], [2, 12, 0, -2, -2, -14, -2, 0, 0, 14, 2, 0, -2, 2, -2, 2], [20, 0, 6, 13, -9, -32, 0, 6, -6, 0, 12, -6, -20, 0, -6, -9], [-13, 15, 0, -1, 10, 1, -4, -4, 0, 0, -4, 13, 4, 0, -14, -4], [5, 0, 5, 0, -5, -9, 0, 0, -10, 0, 15, -5, -5, 0, -10, -5], [-20, 9, -21, 5, 5, 0, 0, 0, 9, 25, 0, -40, -20, -19, -9, 14], [8, 0, -8, -5, -14, -19, 0, 0, -14, 0, 0, 8, -8, 0, -14, -14], [-9, -1, 0, 4, 1, 1, 0, -2, 0, 2, 0, -16, 0, -2, 2, 0], [-3, 0, -3, -20, 5, 15, 0, 5, -5, 0, 5, 3, 3, 0, -5, 5], [-4, -1, -2, 8, 0, -8, -8, 0, -8, -9, 0, -2, -4, 8, 0, -16], [18, -27, 0, 6, -17, -27, -2, -1, 0, -6, -2, 1, 2, 1, 0, -2], [-16, 0, -20, -4, -16, 14, 0, -32, 12, 0, -16, 20, 16, 0, 12, -16]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_225_p_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_225_2_p_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_225_2_p_b(:prec:=16)
    chi := MakeCharacter_225_p();
    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_225_2_p_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_225_2_p_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_225_p();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![1, 12, 72, 288, 502, -432, 144, -102, -93, 132, -72, 18, 34, -36, 18, -6, 1]>],Snew);
    return Vf;
end function;