
// Make newform 693.2.m.i in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_693_m();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_693_m_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_693_2_m_i();".
// 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_693_2_m_i();".
// 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, -200, 700, -925, 1850, -2300, 2135, -1175, 640, -245, 245, -145, 86, -32, 14, -3, 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], [88528161377575350, 120133073008741205, -434474896057227745, 546963632352958070, -560336279122558890, 100524107363786610, -160665000409949210, 30869277708222543, -65098048812157320, 25956864481307657, -20835947263746904, 4494612950061958, -3234633146529285, 154302737507927, -215936836813390, -33722118880975], [-1569079812936964435, 1164454349991851775, -4265354995237286060, 5505326380247646890, -5164313069616781590, 2313198962618101340, -1226946693965489055, 274072637813433960, -592228758909440833, 292393929070812298, -179218800902324756, 45808084826141647, -24553779304461089, 444742620384542, -1360333162376645, -686277383720070], [-928639412535219835, 368306587037923705, -1173049633586345730, 1021707328353270230, -2070346335621533450, 395306407846606840, -583922916320059255, -292096370375405502, -248365491806816213, 41469078152400808, -69609203132183412, -9687442744709873, -8597109141630243, -5527222230184928, -514706296938285, -874936745197272], [95214593589332550, -739274040704445675, 366777001484809055, -1979053855141622330, 2957115228664641670, -3159142418183242750, 1770758763681867190, -887685879699924177, 312652728515985000, -347621794857624183, 214474805906670840, -129795369286809034, 49577176484430299, -21672367495495401, 4832412997019746, -1565624412275039], [-189874590198959025, 1479871527393288525, -1476295694818421740, 3585858111334770990, -4085868252644216690, 3769863137668677300, -2030901870569891045, 1101433166283370416, -436889234085257675, 433123005758956374, -254981761232364844, 149577475159066613, -55793399026072099, 23996414540642882, -5194753922189191, 1676337845170790], [189874590198959025, -1025291051763134765, 1476295694818421740, -3585858111334770990, 4085868252644216690, -3769863137668677300, 2030901870569891045, -1101433166283370416, 436889234085257675, -433123005758956374, 254981761232364844, -149577475159066613, 55793399026072099, -23996414540642882, 5194753922189191, -1676337845170790], [828358364029344005, -2913263414629337545, 3822505603323246020, -7111420221063134790, 8245114954100718810, -7720969982054884100, 4191692862454263993, -2331418980078086280, 893532845981546087, -888411928763985334, 517957948939998988, -307771508285388489, 113470349300804375, -49791707208255586, 10589657246428067, -3541126455103014], [22442708010214725, -2299231619016502345, 1543886107663682020, -4088764696945967030, 5600600192035351850, -6360567528847132580, 3587400018998705673, -2124840867370928280, 585481222317834807, -718628211268788150, 422449273531319756, -277961025462873673, 100202312298850263, -48487759413006482, 9860126818444867, -3808583743573302], [-29045982804284875, 2975718288695695725, -1335895153189756830, 2767110524781279550, -3712550967753264370, 5535211606668989440, -3112048315103081495, 2150910817199786310, -381247122554708893, 623455379026927044, -349871456206210068, 262233539631762351, -88958591156351927, 48642002600512068, -9098179878471885, 4147870816217860], [-845040850217512955, 4454224626365266160, -5718121221686276935, 12987506946195918920, -16343113922700919960, 15544790585628961210, -8426965416523262079, 4630478387715251365, -1735699601854553351, 1775572940212630785, -1047203823403574964, 627185674080861763, -232311097915978782, 102438964384476967, -21838143406687493, 7327526319488073], [864066394282347650, -2965788298433688075, 3888216659798809835, -9161804501671007210, 12158198218393584390, -11480502622702818310, 6340299488823316290, -3395227103875767205, 1276995934654789444, -1307780222870847083, 782325573976058616, -466393479528723526, 174584775915853027, -76461534295292341, 16493950936678582, -5481281688546819], [59418569180970775, -5226852994856502950, 5270338292583504165, -15299497235328621900, 21003963276182506660, -21771993760224740470, 11856118418058363915, -6793193349504836855, 2179375478325730279, -2469198487594261567, 1456783386223745044, -918061503999498391, 335017774059801892, -155422622027191961, 32209452556198329, -11668286039317543], [1667167131638041055, -8819030598088243120, 11522918100224582795, -24876887445936951080, 32902654497697219800, -31784433905471092610, 17797250626139187779, -9848220683260194529, 3462410165728884427, -3646287371621077981, 2171662124721910708, -1324081568271118439, 490255203026234886, -220693813391828059, 46657645630438849, -16296167766296901], [-1025213227739747135, 7973236770827366535, -8417551544734639360, 20842243045981534410, -29120858031490839590, 30431971572347844100, -16816185325336642299, 9585093068819660548, -3032211154151816061, 3445236405584454006, -2038073676823909444, 1289205279920317419, -470575312000685073, 219284175557671186, -45453688208119129, 16576781827677814], [3492178872565443195, -18197077383887239845, 21980961042064417270, -48322167102593217550, 64110835668533354210, -62595008084751532400, 34610408690995495111, -19234203982822940782, 6742540241983255677, -7143632052250437628, 4236554416589668948, -2590293343054165503, 955931937354509231, -431347940936808556, 90930749048576029, -31742657223153564]];
    Rf_basisdens := [1, 454580475630153760, 454580475630153760, 454580475630153760, 454580475630153760, 454580475630153760, 454580475630153760, 454580475630153760, 454580475630153760, 454580475630153760, 454580475630153760, 227290237815076880, 454580475630153760, 454580475630153760, 454580475630153760, 454580475630153760];
    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_693_m();"
function MakeCharacter_693_m()
    N := 693;
    order := 5;
    char_gens := [155, 199, 442];
    v := [5, 5, 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_693_m_Hecke();"
function MakeCharacter_693_m_Hecke(Kf)
    N := 693;
    order := 5;
    char_gens := [155, 199, 442];
    char_values := [[1, 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, 0], [-1, 0, 0, 0, 0, 0, 0, 1, -1, 0, 1, 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, 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], [0, -1, 0, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, -1, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 1, -1, 0, 1, 0, 0, 0, 0, 0], [1, 0, 0, -1, 0, 1, 0, 0, 1, -1, -1, 0, 0, 1, 1, 0], [0, 1, 0, 1, -1, 0, 0, -2, 1, -1, -1, 0, 0, -1, 0, 1], [1, 0, 0, 1, 1, 1, 1, -2, 0, 0, 0, 0, 0, -1, 1, 1], [2, 0, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, -1, 0, 0, -1], [0, -2, 1, 2, 2, 0, -2, -1, 1, 0, 0, 1, -1, -1, -1, 0], [0, 0, -1, -1, -1, 0, 0, -1, 3, -2, -4, 1, 2, 0, 0, -1], [0, -3, 0, 2, 3, 1, 1, -1, 1, -1, 1, 0, 0, -2, 0, 2], [0, 0, 1, 1, -1, -1, 0, 1, -1, 1, 2, 0, -1, 0, -2, 1], [2, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, -1, -2, -1, 0, 0], [-2, 2, -2, 1, -2, 0, 2, -1, 1, 0, 0, -1, 1, 1, 1, 0], [2, -1, 2, 0, 0, 1, 2, 0, 0, 2, 4, -2, -2, 0, 0, 1], [0, 0, 0, 2, 0, 1, 1, -2, -5, 0, 0, 0, -3, -2, 0, 2], [-1, 0, 0, 1, 3, 0, 0, 1, 0, 1, 1, -1, -1, 0, -1, 1], [0, -2, -1, 0, 3, 3, 1, -2, 0, -1, -2, 1, 0, 0, -1, -1], [-4, 2, 0, 0, 1, 0, -1, 2, -2, 0, 0, 0, 0, -1, -1, 0], [3, -1, 3, -3, 1, 1, 0, 3, 0, 3, -3, 1, 0, 3, -3, -3], [-1, 0, -2, 2, 1, 0, 0, -1, 6, 0, -4, -2, 0, 0, -1, 2], [0, -1, 0, 4, 1, -2, -2, 1, -2, 1, 5, 0, -1, -4, 0, 4], [2, 0, 1, -2, 1, 1, 1, -4, 0, 1, 1, -2, 0, 2, 2, 2], [-3, 4, 3, 0, -1, 0, 1, 1, -1, 0, 0, 3, -3, -2, -2, 0], [0, -2, 0, -2, 2, 3, 3, 3, -2, -1, 4, 0, -1, -1, 3, 1], [0, -2, 0, -1, 2, -1, -1, -1, 2, -1, 1, 0, 2, -2, 3, 2], [5, 0, 4, 1, 4, -1, 0, -1, -3, 2, 4, 2, -2, 0, -2, 1], [-7, -1, -3, 0, 0, 1, 3, 0, -4, 0, 3, 0, 3, 0, 0, 0], [-8, 1, -4, 0, -2, 0, 2, 4, -4, 0, 0, -1, 1, 1, 1, 0], [-1, 0, 0, 0, 0, 0, 2, 0, -1, 0, 7, 0, 0, 2, 0, 0], [5, -1, 5, -3, 1, 1, 0, -2, 0, 5, 1, -1, 0, 3, 1, 1], [2, 0, -4, -3, 2, 0, -2, 2, -2, 0, 0, -3, 3, 3, 3, 0], [-2, 6, -1, -1, -4, -4, 2, 7, 0, -1, 1, -1, 0, 1, 0, 0], [-6, 0, -3, -1, -2, -3, 0, 3, -3, -3, 2, 0, 3, 0, 3, -1], [3, -5, 1, 0, 0, 0, -5, 3, 0, 1, -2, -1, 0, 0, 0, 0], [3, 3, 0, 0, 0, -3, 2, 0, 3, 1, -2, -1, 0, -3, 0, 5], [-8, -6, 1, 0, 0, 6, -1, 0, -9, 1, 3, -1, -1, -1, 0, 1], [0, -5, 0, 3, 5, -4, -4, 1, -3, 3, -2, 0, 0, 3, -6, -3], [0, 0, 0, -3, 0, -3, -3, -9, 4, 0, -12, 0, 4, 3, 0, -3], [-3, 2, 1, 0, 0, -2, 0, 0, -4, -4, 1, 4, -1, 1, 0, -3], [2, -4, -1, 0, 0, 4, -4, 0, 3, 1, -5, -1, 1, -2, 0, -1], [-1, 2, 3, -3, 2, 2, 4, 0, 0, 3, 4, -5, 0, 3, 0, 0], [1, 0, 6, -1, -1, 0, 0, 5, 1, 1, -2, 5, -1, 0, -3, -1], [0, -9, -2, 4, 1, 1, -8, -3, 0, -2, -7, 0, 0, -4, -5, -5], [4, -4, -1, 8, 1, 0, -1, -4, 4, 0, 0, -1, 1, -4, -4, 0], [-5, -3, -4, 1, 3, 0, -3, 8, -8, 0, 0, 0, 0, 1, 1, 0], [0, -3, 0, 3, 3, -3, -3, 2, -7, -2, 4, 0, -5, -2, -1, 2], [2, 2, -3, 0, 0, -2, 1, 0, 5, -4, -5, 4, 3, 0, 0, -1], [-8, 0, -5, 1, -1, 0, 0, 3, -8, 2, 9, -7, -2, 0, 2, 1], [0, 2, 0, -6, -2, 1, 1, 7, -6, 4, 3, 0, 5, 4, 2, -4], [0, -2, 0, 7, 2, 5, 5, -5, 2, 3, -3, 0, 0, -2, -5, 2], [-6, 3, 2, 0, 0, -3, -1, 0, -8, -2, 13, 2, -2, -3, 0, 1], [-2, 6, 4, 4, -2, 0, 2, -2, 2, 0, 0, 2, -2, -6, -6, 0], [0, 0, 0, -3, 0, 1, 1, 9, -4, 1, 9, 0, 4, 0, 3, 0], [13, 0, -2, -2, -4, -1, 0, -15, 15, -5, -17, 3, 5, 0, 0, -2], [1, -6, 5, 1, 2, 0, -2, 3, -3, 0, 0, 4, -4, -2, -2, 0], [-3, 5, 1, -2, -4, -4, 1, 1, 0, 1, 4, 3, 0, 2, 0, 0], [6, 0, 8, -6, -4, 0, 0, 2, 6, 2, -12, 6, -2, 0, -2, -6], [0, 3, 0, -6, -3, 2, 2, -1, 9, 0, -6, 0, 7, 5, 1, -5], [-6, -3, 1, -4, -2, -2, -5, 3, 0, 1, 5, -5, 0, 4, -2, -2], [-5, -4, -3, 0, 0, 4, 4, 0, -2, 2, 7, -2, 3, 7, 0, -1], [-2, 0, -5, 0, 5, -4, 0, -3, 0, -3, 0, -2, 3, 0, -6, 0], [9, -7, 10, 5, 3, 0, -3, 0, 0, 0, 0, 4, -4, -7, -7, 0], [10, -3, 5, 0, 0, 3, 1, 0, 5, -4, 1, 4, -5, 2, 0, 6], [-2, 6, 0, 2, -4, -4, 2, -4, 0, 0, 7, 1, 0, -2, 5, 5], [0, -3, 0, -5, 3, -1, -1, 2, -10, -4, 2, 0, -1, 0, 5, 0], [1, -3, 7, -4, 1, 0, -1, 9, -9, 0, 0, 4, -4, -3, -3, 0], [9, 0, -2, -1, 4, -4, 0, -11, 0, -3, -1, 1, 3, 0, 4, -1], [4, -3, 1, 2, 4, 4, 1, -7, 0, 1, -12, 0, 0, -2, -9, -9], [0, -4, 1, 0, 0, 4, 5, 0, -1, -1, 1, 1, -1, -3, 0, -1], [-19, 1, -2, 3, -1, 0, 1, -2, 2, 0, 0, -2, 2, -3, -3, 0], [11, 0, 6, -4, 6, 0, 0, -5, 8, 2, -12, 4, -2, 0, -2, -4], [8, 0, 6, -5, 3, 1, 0, -2, 7, 2, -12, 4, -2, 0, -1, -5], [2, -1, -5, 5, 2, 0, -2, 3, -3, 0, 0, -3, 3, 5, 5, 0], [10, -1, 6, -2, -1, -1, -2, 8, 0, 6, -11, 6, 0, 2, -7, -7], [0, -1, 0, 5, 1, -2, -2, 16, -7, 5, 17, 0, -2, -1, -4, 1], [0, 0, 0, -2, 2, 1, 0, 0, -1, -1, -1, 1, 1, 0, -2, -2], [5, 6, 1, -6, -1, 0, 1, -1, 1, 0, 0, 1, -1, 0, 0, 0], [5, -12, -8, 4, 10, 10, -2, 5, 0, -8, -6, 1, 0, -4, 7, 7], [0, -2, 0, -2, 2, 3, 3, -7, 16, 0, -7, 0, 1, 0, 2, 0], [-7, 1, -6, 4, -10, 0, 10, 3, -3, 0, 0, -5, 5, 1, 1, 0], [7, -5, 1, 0, 0, 5, 9, 0, 6, 1, -7, -1, -1, 3, 0, 2], [0, 9, 0, 2, -9, -2, -2, -11, 11, 5, -13, 0, 5, 2, -4, -2], [-10, 0, -10, -8, -2, 4, 0, 0, 0, -10, -8, 0, 10, 0, 2, -8], [-8, -1, -7, 7, 4, 0, -4, -9, 9, 0, 0, -1, 1, 3, 3, 0], [5, 3, 5, 0, 0, -3, 3, 0, 0, -2, 14, 2, -5, 2, 0, 2], [0, 0, 0, -6, 0, 5, 5, -4, -2, 3, -7, 0, 7, 3, 3, -3], [3, -4, 0, 6, 0, 0, -4, -3, 0, 0, -4, -5, 0, -6, -1, -1], [6, -6, 2, 5, 4, 0, -4, -8, 8, 0, 0, 1, -1, -7, -7, 0], [5, 9, 4, 3, -4, 0, 4, -12, 12, 0, 0, 0, 0, 4, 4, 0], [15, -6, 5, 1, 8, 8, 2, -10, 0, 5, -7, -2, 0, -1, 3, 3], [2, 8, 0, -2, -6, -6, 2, -12, 0, 0, 1, -1, 0, 2, 3, 3], [-2, -2, -6, 0, 0, 2, 3, 0, 4, -6, -5, 6, 6, -1, 0, -4], [12, 0, 1, -3, 0, -1, 0, -11, 13, -1, -16, 2, 1, 0, 3, -3], [10, 0, 3, 2, 10, -5, 0, -7, 10, 0, -8, 3, 0, 0, 3, 2], [1, 1, -5, 0, 0, -1, -12, 0, 6, -7, -13, 7, 5, -2, 0, -2], [1, 3, 8, 0, 0, -3, 3, 0, -7, -3, 6, 3, -8, -6, 0, 5], [12, 0, 6, 3, 6, -8, 0, -6, 0, 3, 3, 3, -3, 0, 4, 3], [3, 8, 0, 1, -3, -3, 5, 4, 0, 0, 3, 1, 0, -1, 6, 6], [0, -8, 0, 10, 8, 3, 3, 4, -2, -2, 12, 0, 3, -8, -2, 8], [-8, 5, -4, 0, 0, -5, -6, 0, -4, 0, 0, 0, 4, 8, 0, -3], [-16, 0, -14, -4, 4, 10, 0, 2, 1, -8, -5, -6, 8, 0, 10, -4], [0, -4, 0, 6, 4, 0, 0, -6, 16, -3, -5, 0, -6, -1, -5, 1], [2, -7, -2, 0, 0, 7, -2, 0, 4, 7, 2, -7, 2, -1, 0, -3], [12, -3, -6, -11, 4, 0, -4, -4, 4, 0, 0, -6, 6, 12, 12, 0], [-8, 0, -5, 12, -3, -3, -3, 2, 0, -5, 5, 10, 0, -12, 2, 2], [5, 0, -3, -3, 3, 7, 0, -8, 5, -5, -8, 2, 5, 0, -2, -3], [-4, 3, -9, -4, -6, 0, 6, -11, 11, 0, 0, -8, 8, 4, 4, 0], [-7, 4, -2, 2, -6, -6, -2, -1, 0, -2, 2, -1, 0, -2, -3, -3], [-8, 0, -11, 3, 0, -1, 0, -3, 3, -1, 0, -10, 1, 0, -5, 3], [0, 1, 0, -6, -1, 3, 3, -17, -5, 3, -21, 0, 0, 4, 2, -4], [1, -4, 6, 0, 0, 4, -6, 0, -5, -4, -7, 4, -6, -4, 0, -6], [-21, -1, -2, 2, 2, 0, -2, 10, -10, 0, 0, -7, 7, 3, 3, 0], [-8, 1, 2, 0, 0, -1, 0, 0, -10, 9, 20, -9, -2, -7, 0, 7], [17, 0, 8, 1, -3, 7, 0, -9, 7, 2, -6, 6, -2, 0, -3, 1], [-2, -4, -6, 0, 0, 4, 11, 0, 4, -3, -3, 3, 6, 2, 0, -2], [-14, -3, -2, -3, 8, 8, 5, 9, 0, -2, 9, 1, 0, 3, -3, -3], [0, 1, 0, -7, -1, 10, 10, 2, -3, 5, -1, 0, -4, 3, 4, -3], [3, 0, 6, 6, 0, -4, 0, 3, -16, 12, 22, -6, -12, 0, 2, 6], [-8, -1, -1, -9, -3, 0, 3, 10, -10, 0, 0, 5, -5, 4, 4, 0], [8, 0, 4, 3, 4, 0, -4, -14, 14, 0, 0, -3, 3, 1, 1, 0], [0, 10, 0, 1, -10, -8, -8, 11, -5, 1, 13, 0, -5, -2, 1, 2], [-3, -10, 6, -1, 5, 5, -5, 6, 0, 6, 9, 3, 0, 1, 0, 0], [4, 11, -2, -11, -3, 0, 3, 1, -1, 0, 0, -2, 2, 9, 9, 0], [0, -5, 0, 7, 5, -12, -12, 12, -13, -2, 14, 0, -6, -2, -5, 2], [0, -2, 5, 0, 0, 2, 2, 0, -5, -4, -5, 4, -5, -3, 0, -3], [10, 12, 8, -11, -7, -7, 5, -8, 0, 8, -7, -4, 0, 11, -5, -5], [-13, 0, -14, 4, 7, -2, 0, -1, 2, -8, 2, -6, 8, 0, 5, 4], [-18, 2, 0, 11, -2, 0, 2, 12, -12, 0, 0, 1, -1, -5, -5, 0], [-3, 0, 2, 6, 12, 5, 0, 5, 11, 3, -5, -1, -3, 0, -8, 6], [0, -1, 0, -12, 1, 12, 12, -1, 2, 4, -10, 0, 11, 9, 3, -9], [13, -11, 1, 5, -3, -3, -14, 5, 0, 1, -9, 5, 0, -5, 3, 3], [8, 4, 0, 0, 0, -4, -7, 0, 8, -7, 10, 7, 0, 4, 0, -4], [0, 3, 0, -6, -3, 5, 5, -4, -8, -5, -2, 0, -2, -2, 8, 2], [0, 0, 0, -3, 0, 5, 5, 1, 10, 1, -3, 0, -4, 4, -1, -4], [-10, -1, -11, -3, -5, 0, 5, -6, 6, 0, 0, -3, 3, 2, 2, 0], [-17, -5, -2, 0, 0, 5, -3, 0, -15, -5, 8, 5, 2, -14, 0, -3], [0, 24, -1, -8, -13, -13, 11, -18, 0, -1, 10, -9, 0, 8, 11, 11], [-19, -1, -8, 4, -1, -1, -2, 3, 0, -8, 12, -6, 0, -4, 1, 1], [4, 7, 8, -4, -9, -9, -2, 0, 0, 8, 9, -6, 0, 4, 5, 5], [17, 3, 2, 0, 0, -3, -7, 0, 15, -4, -14, 4, -2, -3, 0, -1], [21, 0, 9, -3, -8, 14, 0, -12, 8, 2, -11, 7, -2, 0, 3, -3], [0, 0, 0, 0, 0, 1, 1, -10, -3, -4, -8, 0, 3, -2, 2, 2], [0, 3, 0, 5, -3, -2, -2, 8, 1, -1, 11, 0, -2, -3, -2, 3], [4, 0, -12, 2, 6, -12, 0, -16, 6, -8, -4, -4, 8, 0, 2, 2], [-2, 7, -1, 0, 0, -7, 9, 0, -1, 8, 1, -8, 1, 8, 0, 10], [-13, 10, 2, 3, -11, -11, -1, -6, 0, 2, 20, -4, 0, -3, 5, 5], [-6, 18, 18, -9, -7, 0, 7, -9, 9, 0, 0, 5, -5, 2, 2, 0], [-18, -4, -8, 2, 2, 0, -2, -10, 10, 0, 0, -6, 6, 2, 2, 0], [6, 14, 7, -4, -7, -7, 7, 2, 0, 7, -2, 5, 0, 4, -3, -3], [-5, -1, -3, 0, 0, 1, -15, 0, -2, 4, 2, -4, 3, 0, 0, -4], [-8, 17, 1, -1, -15, 0, 15, 14, -14, 0, 0, 5, -5, 0, 0, 0], [10, -3, 2, 0, 0, 3, 2, 0, 8, 5, 8, -5, -2, -3, 0, 5], [-9, 0, -6, 12, 2, -5, 0, 3, -5, -7, 17, 1, 7, 0, 4, 12], [17, -7, 1, 11, 9, 9, 2, -15, 0, 1, -14, -8, 0, -11, 2, 2], [0, -2, 0, 20, 2, -6, -6, 6, 10, -1, 19, 0, -10, -13, -7, 13], [5, 10, 1, -4, -9, -9, 1, 4, 0, 1, -16, 18, 0, 4, -12, -12], [17, -8, -2, 7, 3, 3, -5, -4, 0, -2, -18, -2, 0, -7, 1, 1], [0, -3, 0, 9, 3, 10, 10, -12, 15, -15, 1, 0, 0, -13, 4, 13], [8, -13, -5, 1, 7, 7, -6, 5, 0, -5, -11, 0, 0, -1, 2, 2], [-17, 4, -1, -3, -8, 0, 8, 12, -12, 0, 0, 0, 0, 2, 2, 0], [0, 0, 7, -3, 4, -6, 0, 7, -26, 4, 23, 3, -4, 0, -7, -3], [-11, -25, -5, 12, 6, 0, -6, -2, 2, 0, 0, -4, 4, -6, -6, 0], [-12, 0, -9, 0, 0, 0, -9, 0, -3, 1, 7, -1, 9, 9, 0, -13], [0, 0, 0, -4, 0, 2, 2, -3, -32, -5, 0, 0, 0, -3, 7, 3], [5, 0, 0, -12, 0, 13, 0, -5, -1, -3, -11, 3, 3, 0, 8, -12], [17, 12, -3, 9, 2, 0, -2, -2, 2, 0, 0, 10, -10, 2, 2, 0], [-15, 0, 10, -12, 2, 7, 0, 25, -17, -3, 5, 13, 3, 0, 0, -12]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_693_m_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_693_2_m_i();".
// 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_693_2_m_i(:prec:=16)
    chi := MakeCharacter_693_m();
    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_693_2_m_i();".
// 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_693_2_m_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_693_m();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![25, -200, 700, -925, 1850, -2300, 2135, -1175, 640, -245, 245, -145, 86, -32, 14, -3, 1]>],Snew);
    return Vf;
end function;