
// Make newform 1110.2.e.d in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1110_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1110_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_1110_2_e_d();".
// 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_1110_2_e_d();".
// 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 := [64, -1184, 10952, -18840, 16372, -1584, 658, -3018, 4241, 744, 196, -220, 138, 8, 2, -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, 0], [-1913670067113595968, 32004315856384857120, 57688770756908863728, 37944345263941329576, -6917313879099567612, 39504937564477019472, 74659043196870143072, 34385434998275232414, 3679942840789531641, -974073933365141220, 1963789626693085265, 700061195842025382, 39468243127992567, -14569191096743604, 12442080899330691, 3598583486206356], [23585035147057026960, -5254999736306159424, 48290456870435422360, -78239049472925927388, 51547587830387511516, 7074323891414175984, 2402052437683258296, -25695585297125062851, -2097418788500457013, -629714596255782179, 714784098392565685, -739353168840258249, -27789629224556003, -7397401618349153, 7302267297319127, -5019160714525244], [-3846979372012104640, 64382242804295173056, 20812138400247811624, 82276993584777983684, -10785012944336174024, 56448524114568934548, 60306332089804664822, 53127278044494191983, 7563565552882221785, 1338037921924729557, 369699396297893537, 1460496131630607439, 80748754982251899, 7897444240156323, -2762615888851235, 9567165448408746], [38099452666799307040, -350212003392840468312, 568979970447300755648, -290703731837693963136, -39842557895772371100, -16498400553027426082, 163792457990670368680, -23166341077983495856, -7026367954906604219, -5776516973434541039, 6372699016733347429, -1234651710034151587, -69436016039014749, -59292368394327099, 49507716150097919, -10747369620592049], [39218675595124970912, -1536500573724590784, 174184766214316358360, -263375550046521833464, 104967433823144605564, 68517725209056647836, 4858276358302257694, -109211225452771384886, -20557827614532110923, 183920614188561673, 2928984459775409985, -3371744582497375019, -227788358439582645, -5668307481205641, 30447616523487557, -23656976378661003], [41557711249901783200, -40789217922827096384, 212479679502370074056, -328339387849681228408, 111309066839156150716, 67175719164418371636, 7307757322320005194, -126253736340414947654, -23400222459835818047, -265227763229672233, 3464120130945415681, -3888009054007888081, -258385448345775489, -10266165292669687, 35845002295782009, -27270263108412109], [-10786298850005666000, 180986281567814143544, -311794891535882361168, 296006462710790874136, -28274563205543913964, 10799364680828176918, -46628819603962745844, 78920027203186704448, 13820218932099338377, 3314080510791990968, -3762085295892389589, 2537071360259347170, 148488657329282791, 33848739219740466, -34740788741012139, 18273716052943846], [3543341730699935552, -21765048210218762368, 200025933426027654000, -324346718373826828408, 127950227372178531508, 28298939092911453964, 9942740781114420512, -105151622543957426978, -13421212405044163915, -2060018014627625601, 2986426268519524431, -3105505244059654869, -155365536772579389, -24808754347643015, 30517922200804757, -21379513563644685], [-5271315577848317504, 22172893866218873632, -203241633505665399864, 321463007301980811984, -95486908052697491976, -47181359656513821644, -8456590044398138202, 113783901684109617420, 19727658351803595975, 946193107947504485, -3190075392666935965, 3466704866406129737, 218066683956470309, 15191250088530019, -32826769491708205, 24216523190739559], [-13297933955641522072, -12379865386235900624, 113728649431467197100, -183727634589725420008, 28357264878402748114, 17389998241110704844, 5472559110178869761, -59671526276950665476, -10968243851454832160, -682650127547049224, 1731816050083731475, -1827553739206846274, -118516004781748970, -9114568564984668, 17727172949013492, -12817278110967634], [-46015836365558307488, 789420777992913348560, -1224969327699563325368, 1228622370375316235368, -120684227016313567036, 120150201939706955400, -116570414566402812598, 370192197216499213802, 63102508808192934739, 15464887800268384161, -14685343779497331501, 11703383233180742765, 677067493024494429, 150156848474466771, -142854828745674593, 83459165975960877], [48354872020335119776, -793567184470530233616, 1263264240987617041064, -1293586208178475630312, 127025860032325112188, -121492207984345231600, 119019895530420560098, -387234708104142776570, -65944903653496641863, -15914036177686618067, 15220479450667337197, -12219647704691255827, -707664582930687273, -154754706285930817, 148252214517969045, -87072452705711983], [-28477425678718074000, 477800959874748124440, -805058818164724298664, 777438211441026403136, -75392677385581876676, 39676510248119000838, -94977690341340840884, 214738955638592641550, 36768398939132960325, 8071383029047362522, -8963801050572878679, 6753590184184493108, 395068305903552419, 81011792960581768, -84633788878151129, 48118279587099894], [35816544221695449712, -601092945511793476232, 1203959456301324504768, -999232944627119782372, 93341958315418191324, 1175795409551302370, 216915316012027345288, -244375119257663357073, -44060072494787372566, -10956815022075974549, 13879856120878845218, -8038705530926452605, -473747488729663366, -115989458543362729, 123266479279552438, -58599146537079738], [6396540916876267712, -396696295674212250488, 995490369264377828984, -971789885387320911184, 154569987779827399044, 67554990970372022286, 182824512099824497730, -255837304581511347840, -45494715681625362075, -8373350468913758013, 12958762198920303113, -8288330089041619629, -495669233213731053, -95951644204439093, 117113881990875321, -59923129802572879]];
    Rf_basisdens := [1, 8776577717871405136, 8776577717871405136, 8776577717871405136, 8776577717871405136, 17553155435742810272, 17553155435742810272, 8776577717871405136, 8776577717871405136, 8776577717871405136, 4388288858935702568, 17553155435742810272, 17553155435742810272, 8776577717871405136, 8776577717871405136, 8776577717871405136];
    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_1110_e();"
function MakeCharacter_1110_e()
    N := 1110;
    order := 2;
    char_gens := [371, 667, 631];
    v := [2, 1, 1];
    // 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_1110_e_Hecke();"
function MakeCharacter_1110_e_Hecke(Kf)
    N := 1110;
    order := 2;
    char_gens := [371, 667, 631];
    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, 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 := 2;
    raw_aps := [[1, 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, 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, 0, 0, 0, -1, 0], [0, 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, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, -1, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0], [0, -1, 0, 0, 1, -1, 1, 0, 0, 0, 0, 0, 0, 0, -1, 1], [0, -1, 0, 0, 1, -1, 1, 2, 0, 0, 0, -1, 1, 0, -1, 1], [1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, -1, -1, 1, 0, -1], [0, 0, 0, 0, 0, 0, 0, 0, 1, -2, -1, -1, -1, 0, 0, 0], [0, 0, 0, 0, 0, -1, -1, 0, -1, -2, 1, 1, 1, 0, 0, 0], [0, 2, 0, 0, -1, 0, 0, 0, 0, 0, 0, 1, -1, -1, 1, -1], [0, 2, 0, -1, -1, 0, 0, -3, 0, 0, 0, 2, -2, 0, 2, -1], [0, -2, 0, -2, 0, 2, -2, 0, 0, 0, 0, 1, -1, 0, 0, 0], [0, 1, 0, 0, -1, 0, 0, 2, 0, 0, 0, 0, 0, -1, 2, -1], [0, 0, 0, 0, 1, -2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1], [-2, 0, 2, 0, 1, 1, 1, 0, 0, 2, 0, 2, 2, 0, 0, -1], [0, -3, 0, 2, 0, 1, -1, 0, 0, 0, 0, -2, 2, 2, -2, 0], [0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 2, 1], [0, 1, 0, -3, -1, 0, 0, -1, 0, 0, 0, 1, -1, 0, -1, -1], [0, -1, 0, 4, 1, -1, 1, 0, 0, 0, 0, -1, 1, -2, 0, 1], [-2, 0, 1, 0, 3, 1, 1, 0, 3, 2, 2, 2, 2, 0, 0, -3], [2, 0, 1, 0, 0, 1, 1, 0, -2, 0, -3, 1, 1, 0, 0, 0], [2, 0, 1, 0, 0, -2, -2, 0, -2, 0, -1, 1, 1, 0, 0, 0], [0, -1, 0, -1, -1, 0, 0, 1, 0, 0, 0, -1, 1, 2, -1, -1], [0, 0, 0, -1, 0, 2, -2, -1, 0, 0, 0, -1, 1, -1, 1, 0], [2, 0, -2, 0, 1, 1, 1, 0, 3, 0, -1, -1, -1, 0, 0, -1], [0, 1, 0, -2, -1, -1, 1, 2, 0, 0, 0, 1, -1, 0, 2, -1], [0, 0, 0, -4, -2, 0, 0, -2, 0, 0, 0, 3, -3, 0, 0, -2], [0, 0, 0, -2, -1, -2, 2, -4, 0, 0, 0, 1, -1, -1, 1, -1], [-4, 0, -2, 0, 1, 3, 3, 0, 1, 0, 3, 1, 1, 0, 0, -1], [-2, 0, -1, 0, -2, 1, 1, 0, -2, 0, -3, -1, -1, 0, 0, 2], [-1, 0, 2, 0, 2, 0, 0, 0, 1, 1, 1, -1, -1, 0, 0, -2], [0, -1, 0, -4, -2, -1, 1, -2, 0, 0, 0, 1, -1, 0, 1, -2], [-2, 0, 0, 0, -2, -2, -2, 0, -2, 0, -1, -1, -1, 0, 0, 2], [3, 0, 2, 0, 0, 0, 0, 0, -3, -1, -1, 2, 2, 0, 0, 0], [0, -2, 0, 5, 1, 0, 0, -5, 0, 0, 0, -2, 2, -2, 0, 1], [0, -2, 0, 2, 1, 2, -2, -4, 0, 0, 0, 0, 0, 2, 0, 1], [-4, 0, 0, 0, 1, 2, 2, 0, -2, 4, 0, 1, 1, 0, 0, -1], [0, 2, 0, 0, -2, -2, 2, 2, 0, 0, 0, 1, -1, 0, 3, -2], [-2, 0, -3, 0, -1, -1, -1, 0, 2, -2, -1, -1, -1, 0, 0, 1], [0, -1, 0, 1, 0, -3, 3, 3, 0, 0, 0, -3, 3, 0, 1, 0], [0, -2, 0, 4, 2, 0, 0, -6, 0, 0, 0, -2, 2, 2, -4, 2], [2, 0, 2, 0, 2, -3, -3, 0, 1, 0, 1, 2, 2, 0, 0, -2], [0, -1, 0, 0, 1, 3, -3, 2, 0, 0, 0, -3, 3, 2, 3, 1], [6, 0, 2, 0, 0, 1, 1, 0, 3, -2, -1, -1, -1, 0, 0, 0], [-4, 0, 0, 0, 1, 4, 4, 0, 4, 4, 0, -1, -1, 0, 0, -1], [0, 4, 0, 0, 2, -3, 3, -4, 0, 0, 0, -1, 1, -1, 1, 2], [0, 1, 0, 0, -2, 1, -1, -4, 0, 0, 0, 1, -1, 4, -1, -2], [0, 0, 0, -4, -1, 1, -1, -6, 0, 0, 0, 2, -2, 0, 4, -1], [0, 2, 0, 0, -1, -2, 2, -6, 0, 0, 0, 4, -4, -2, 2, -1], [1, 0, 2, 0, 1, 2, 2, 0, 1, 1, -3, 3, 3, 0, 0, -1], [0, -3, 0, -2, 2, 1, -1, -2, 0, 0, 0, 4, -4, -1, 2, 2], [-2, 0, -1, 0, 2, 4, 4, 0, -1, 0, -1, 1, 1, 0, 0, -2], [-2, 0, -2, 0, 3, 0, 0, 0, 4, 2, 4, 0, 0, 0, 0, -3], [4, 0, 0, 0, 2, 2, 2, 0, -1, 0, 4, -2, -2, 0, 0, -2], [0, 1, 0, 2, -2, 3, -3, -2, 0, 0, 0, 1, -1, 2, 0, -2], [0, 0, -2, 0, -1, -1, -1, 0, -3, -2, -2, 2, 2, 0, 0, 1], [0, -6, 0, 1, 1, 4, -4, -1, 0, 0, 0, -2, 2, -2, 0, 1], [0, -2, 0, 4, 2, -4, 4, 12, 0, 0, 0, -5, 5, -4, 0, 2], [0, -1, 0, -2, 1, -3, 3, 6, 0, 0, 0, 1, -1, 2, -3, 1], [-12, 0, 1, 0, 0, 2, 2, 0, -2, 4, 1, 1, 1, 0, 0, 0], [0, -3, 0, 0, 1, -3, 3, -2, 0, 0, 0, 1, -1, 2, -3, 1], [0, 4, 0, 0, 2, -1, 1, -4, 0, 0, 0, -1, 1, -1, -1, 2], [0, -1, 0, 2, 2, -1, 1, 8, 0, 0, 0, -2, 2, -4, -2, 2], [-4, 0, 2, 0, 0, 0, 0, 0, 2, -2, 2, 1, 1, 0, 0, 0], [-2, 0, 2, 0, 1, 0, 0, 0, -4, 2, 2, 3, 3, 0, 0, -1], [4, 0, 2, 0, -1, 1, 1, 0, -5, 2, -1, -1, -1, 0, 0, 1], [4, 0, 0, 0, -1, -5, -5, 0, 0, 0, 0, 2, 2, 0, 0, 1], [0, 4, 0, 0, -2, 2, -2, 8, 0, 0, 0, -2, 2, 2, 1, -2], [0, 2, 0, -2, -1, 4, -4, 0, 0, 0, 0, 1, -1, 4, 2, -1], [-12, 0, 0, 0, 1, 0, 0, 0, 2, 2, 2, 3, 3, 0, 0, -1], [5, 0, 0, 0, 0, -4, -4, 0, 1, 1, -3, 0, 0, 0, 0, 0], [0, 3, 0, -4, -2, -1, 1, 4, 0, 0, 0, 3, -3, -2, 1, -2], [0, -2, 0, -4, 2, 0, 0, -14, 0, 0, 0, 0, 0, 0, 0, 2], [0, 3, 0, 2, 0, 3, -3, 6, 0, 0, 0, -1, 1, -2, 0, 0], [0, -6, 0, 2, 1, 1, -1, 8, 0, 0, 0, 2, -2, 2, -2, 1], [-2, 0, -1, 0, -3, -5, -5, 0, 1, -2, -1, -1, -1, 0, 0, 3], [0, 0, 0, 4, 4, 1, -1, 10, 0, 0, 0, -3, 3, -3, 1, 4], [0, 0, 0, -2, -1, 0, 0, 4, 0, 0, 0, -1, 1, 2, -1, -1], [0, 3, 0, 2, -2, -3, 3, 12, 0, 0, 0, -2, 2, 0, 2, -2], [0, -3, 0, 2, -2, 6, -6, 6, 0, 0, 0, -1, 1, 6, -1, -2], [0, -6, 0, 2, 2, 0, 0, -6, 0, 0, 0, 2, -2, 0, -6, 2], [0, 0, 0, 2, 2, 2, -2, 8, 0, 0, 0, -4, 4, 2, -4, 2], [-2, 0, 1, 0, 0, -4, -4, 0, 3, 2, 6, -2, -2, 0, 0, 0], [0, 1, 0, 0, -2, 3, -3, 8, 0, 0, 0, 1, -1, 0, 5, -2], [0, 0, -1, 0, -4, -4, -4, 0, -4, -2, -1, -1, -1, 0, 0, 4], [0, 0, -4, 0, -3, -3, -3, 0, 3, -6, -1, -2, -2, 0, 0, 3], [0, -1, 0, 6, 3, 1, -1, 0, 0, 0, 0, -2, 2, -6, 0, 3], [6, 0, -1, 0, -1, -5, -5, 0, -2, 0, 1, 1, 1, 0, 0, 1], [6, 0, 3, 0, 1, 3, 3, 0, -1, 6, 3, 1, 1, 0, 0, -1], [0, 3, 0, -1, 0, 0, 0, 3, 0, 0, 0, 4, -4, -1, 2, 0], [2, 0, 2, 0, 0, -2, -2, 0, -4, -2, -2, -2, -2, 0, 0, 0], [-6, 0, 1, 0, 0, 2, 2, 0, -1, 0, -5, 1, 1, 0, 0, 0], [-14, 0, 0, 0, -2, 6, 6, 0, -1, 4, 3, 1, 1, 0, 0, 2], [-2, 0, 0, 0, -1, 0, 0, 0, 4, -4, 0, 2, 2, 0, 0, 1], [0, 1, 0, 1, 3, -1, 1, 1, 0, 0, 0, -4, 4, -3, -6, 3], [-2, 0, 2, 0, 2, -2, -2, 0, 2, 0, -5, 1, 1, 0, 0, -2], [-8, 0, 2, 0, 1, 2, 2, 0, -2, 4, 8, 3, 3, 0, 0, -1], [-6, 0, 4, 0, 2, -1, -1, 0, 3, 4, 3, 2, 2, 0, 0, -2], [0, 3, 0, 2, 2, 1, -1, -10, 0, 0, 0, -1, 1, -2, 2, 2], [4, 0, 0, 0, 2, -1, -1, 0, 3, -2, -7, -2, -2, 0, 0, -2], [6, 0, -3, 0, 3, 5, 5, 0, 2, 2, -1, -1, -1, 0, 0, -3], [-12, 0, 2, 0, 1, 7, 7, 0, 3, 0, -1, 1, 1, 0, 0, -1], [0, 2, 0, -2, 0, 1, -1, -2, 0, 0, 0, -3, 3, -1, -1, 0], [8, 0, -4, 0, -1, -1, -1, 0, -2, -8, 2, 0, 0, 0, 0, 1], [7, 0, -8, 0, 0, -3, -3, 0, 2, 1, 4, -3, -3, 0, 0, 0], [6, 0, -1, 0, -3, -5, -5, 0, 0, -4, -5, -1, -1, 0, 0, 3], [0, -1, 0, -4, -1, -3, 3, -6, 0, 0, 0, 5, -5, -2, 7, -1], [0, 2, 0, 2, -1, 6, -6, 4, 0, 0, 0, -1, 1, 1, -1, -1], [-10, 0, -4, 0, -2, 5, 5, 0, 5, 4, 1, 0, 0, 0, 0, 2], [0, -3, 0, -2, 1, 1, -1, -4, 0, 0, 0, 7, -7, -2, -5, 1], [8, 0, 0, 0, -3, -9, -9, 0, 1, -6, 1, 1, 1, 0, 0, 3], [10, 0, 0, 0, 0, 0, 0, 0, 0, 4, -5, -1, -1, 0, 0, 0], [1, 0, 2, 0, -2, -2, -2, 0, -5, 1, 5, 6, 6, 0, 0, 2], [-4, 0, 4, 0, 6, 2, 2, 0, 6, 2, 4, 2, 2, 0, 0, -6], [6, 0, -5, 0, 2, -1, -1, 0, 6, 6, 9, -1, -1, 0, 0, -2], [0, -6, 0, -1, 2, 2, -2, -9, 0, 0, 0, 3, -3, -5, -1, 2], [0, -7, 0, 2, 2, 1, -1, 12, 0, 0, 0, 2, -2, 2, -4, 2], [0, 1, 0, 3, 0, 1, -1, 5, 0, 0, 0, -5, 5, 2, -3, 0], [-10, 0, 0, 0, 2, -3, -3, 0, 1, -4, 3, 0, 0, 0, 0, -2], [0, 0, 2, 0, 0, 3, 3, 0, -1, -2, 5, -2, -2, 0, 0, 0], [0, 0, 0, -2, 1, 6, -6, -10, 0, 0, 0, 0, 0, 2, 4, 1], [0, 4, 0, 7, 0, -6, 6, 15, 0, 0, 0, -5, 5, -5, 5, 0], [0, 0, -4, 0, -3, -1, -1, 0, 0, -4, 6, -8, -8, 0, 0, 3], [-6, 0, 3, 0, -4, -2, -2, 0, -8, 0, 1, -1, -1, 0, 0, 4], [0, -3, 0, -2, -3, -5, 5, 4, 0, 0, 0, 5, -5, 2, 1, -3], [6, 0, 2, 0, -1, -1, -1, 0, 5, -2, -3, 1, 1, 0, 0, 1], [0, -1, 0, 6, 6, 1, -1, 2, 0, 0, 0, -6, 6, -1, -10, 6], [-2, 0, 6, 0, 1, 0, 0, 0, -4, 6, 0, 2, 2, 0, 0, -1], [12, 0, 0, 0, 4, 0, 0, 0, 5, 0, -2, 0, 0, 0, 0, -4], [6, 0, 4, 0, -1, -9, -9, 0, -7, -4, -3, 3, 3, 0, 0, 1], [0, 0, 0, 4, -1, -1, 1, -10, 0, 0, 0, 0, 0, 6, -4, -1], [0, 6, 0, -7, -5, 8, -8, -9, 0, 0, 0, 4, -4, 2, 12, -5], [0, -8, 0, -4, 1, 2, -2, -8, 0, 0, 0, 2, -2, 4, -2, 1], [-12, 0, -6, 0, 1, 6, 6, 0, 4, -4, 4, 1, 1, 0, 0, -1], [0, 7, 0, -4, -1, 3, -3, 0, 0, 0, 0, 3, -3, 6, 4, -1], [12, 0, -2, 0, 0, -2, -2, 0, -2, 0, -2, -4, -4, 0, 0, 0], [-18, 0, -7, 0, -4, 4, 4, 0, 1, 0, 1, 1, 1, 0, 0, 4], [0, 3, 0, 6, 1, -5, 5, 2, 0, 0, 0, -5, 5, -6, 0, 1], [-4, 0, 4, 0, -1, -3, -3, 0, -5, 2, 9, 2, 2, 0, 0, 1], [0, -4, 0, 1, 0, 0, 0, -15, 0, 0, 0, -3, 3, -3, 3, 0], [12, 0, 0, 0, 3, 9, 9, 0, 2, 12, 4, 2, 2, 0, 0, -3], [-4, 0, 4, 0, -2, -2, -2, 0, -5, 0, -6, -6, -6, 0, 0, 2], [-11, 0, -2, 0, -2, -5, -5, 0, -4, -7, -2, 0, 0, 0, 0, 2], [0, -5, 0, -5, 0, -2, 2, -1, 0, 0, 0, 4, -4, -3, -4, 0], [0, 1, 0, 0, 2, -5, 5, -4, 0, 0, 0, 0, 0, -1, 4, 2], [0, 5, 0, 0, -2, -5, 5, -22, 0, 0, 0, 0, 0, 2, 1, -2], [-18, 0, 0, 0, 3, -3, -3, 0, 5, -4, 9, 3, 3, 0, 0, -3], [2, 0, 4, 0, -2, 2, 2, 0, -6, 0, 1, 3, 3, 0, 0, 2], [0, -1, 0, -2, 3, -2, 2, -12, 0, 0, 0, 6, -6, -1, 4, 3], [0, 0, -8, 0, -3, 1, 1, 0, 1, -6, -4, 0, 0, 0, 0, 3], [0, 2, 0, -6, -3, -2, 2, 2, 0, 0, 0, 2, -2, 2, 2, -3], [0, -2, 0, -2, -1, 9, -9, 2, 0, 0, 0, 0, 0, 6, 2, -1], [4, 0, -2, 0, 1, 5, 5, 0, 3, 6, -3, -11, -11, 0, 0, -1], [0, -8, 0, 8, 8, -8, 8, 0, 0, 0, 0, -6, 6, -6, -10, 8], [-2, 0, -5, 0, -4, 1, 1, 0, 2, -4, 1, -9, -9, 0, 0, 4], [-6, 0, 4, 0, 0, 3, 3, 0, 7, 0, 1, 2, 2, 0, 0, 0], [0, 0, 0, -4, 1, 0, 0, 6, 0, 0, 0, -1, 1, -1, 3, 1], [-2, 0, -5, 0, -8, 0, 0, 0, -8, -4, -1, 1, 1, 0, 0, 8], [-8, 0, 3, 0, 1, 0, 0, 0, -3, 4, 4, 8, 8, 0, 0, -1], [-15, 0, 2, 0, -2, 5, 5, 0, 0, 9, -6, -2, -2, 0, 0, 2], [0, -5, 0, 6, 1, -4, 4, 0, 0, 0, 0, -4, 4, -7, -2, 1], [0, -3, 0, 4, 5, -11, 11, -6, 0, 0, 0, -5, 5, -6, -1, 5], [-28, 0, 2, 0, 4, 12, 12, 0, 3, 8, -4, 0, 0, 0, 0, -4], [8, 0, -2, 0, -4, -1, -1, 0, 5, 2, -1, -5, -5, 0, 0, 4], [-4, 0, -2, 0, -3, -4, -4, 0, -6, -10, -4, 2, 2, 0, 0, 3], [0, -6, 0, 0, 0, 6, -6, -22, 0, 0, 0, -3, 3, -4, 2, 0], [0, -3, 0, -2, 1, 8, -8, -20, 0, 0, 0, -2, 2, 1, 4, 1], [0, -3, 0, -6, -1, 3, -3, -2, 0, 0, 0, -5, 5, 2, 1, -1], [0, -5, 0, -6, 4, -5, 5, 0, 0, 0, 0, -2, 2, -2, -4, 4], [1, 0, 2, 0, 2, 8, 8, 0, 1, -1, -3, 3, 3, 0, 0, -2], [0, -2, 0, 4, 1, -6, 6, -6, 0, 0, 0, 2, -2, -2, -2, 1], [0, -4, 0, 2, -2, 3, -3, 22, 0, 0, 0, -1, 1, -1, -1, -2], [-14, 0, 1, 0, 4, 8, 8, 0, 1, 0, 1, 5, 5, 0, 0, -4], [0, -11, 0, 0, 3, 7, -7, 6, 0, 0, 0, -9, 9, 2, -1, 3], [0, 0, 0, 0, -1, 8, 8, 0, 0, 0, 2, 1, 1, 0, 0, 1], [-14, 0, -3, 0, 5, 3, 3, 0, 2, 4, 11, 3, 3, 0, 0, -5], [0, -8, 0, -2, -2, 2, -2, 0, 0, 0, 0, -3, 3, 6, -2, -2], [12, 0, -2, 0, 0, 10, 10, 0, 5, 8, 2, 0, 0, 0, 0, 0], [0, 0, -8, 0, -3, -1, -1, 0, 3, -2, 9, -1, -1, 0, 0, 3], [0, 1, 0, -4, -4, -5, 5, 8, 0, 0, 0, -4, 4, 3, -2, -4], [-6, 0, -1, 0, 0, 2, 2, 0, -7, 0, -7, -7, -7, 0, 0, 0], [0, 1, 0, 8, 3, 5, -5, -26, 0, 0, 0, 2, -2, -4, 3, 3], [14, 0, -4, 0, 0, -6, -6, 0, 0, -8, -3, -7, -7, 0, 0, 0], [0, -4, 0, 0, 1, -1, 1, 14, 0, 0, 0, -2, 2, -4, -6, 1], [-16, 0, 2, 0, 2, 10, 10, 0, 0, 0, 0, -8, -8, 0, 0, -2], [12, 0, 7, 0, 1, -7, -7, 0, -4, -4, -5, 7, 7, 0, 0, -1], [0, 8, 0, -4, -6, 2, -2, -16, 0, 0, 0, 8, -8, 6, 6, -6], [0, -9, 0, 3, 4, -2, 2, -5, 0, 0, 0, 0, 0, -1, 6, 4], [-14, 0, 3, 0, -4, 2, 2, 0, -5, 4, -7, 3, 3, 0, 0, 4], [0, -8, 0, 4, 4, 10, -10, 4, 0, 0, 0, -8, 8, 0, 4, 4], [0, -2, 0, 4, 2, -7, 7, -16, 0, 0, 0, -3, 3, -3, 3, 2], [0, 2, 0, -6, 2, -4, 4, 2, 0, 0, 0, 6, -6, -4, -8, 2], [-6, 0, -2, 0, 3, -6, -6, 0, 2, -2, 0, 2, 2, 0, 0, -3], [0, 4, 0, 2, 1, 8, -8, -4, 0, 0, 0, 1, -1, -5, 5, 1], [11, 0, 0, 0, 2, 8, 8, 0, 5, 3, 1, 4, 4, 0, 0, -2], [0, 8, 0, -4, -5, -4, 4, 8, 0, 0, 0, 0, 0, -6, 10, -5], [-7, 0, 0, 0, 7, 2, 2, 0, 5, 3, 9, 1, 1, 0, 0, -7], [0, -3, 0, -2, -1, 3, -3, 0, 0, 0, 0, -3, 3, -2, -1, -1], [8, 0, -6, 0, -4, -5, -5, 0, -9, -6, -7, -1, -1, 0, 0, 4], [-20, 0, 1, 0, 5, 6, 6, 0, 9, -4, 4, 8, 8, 0, 0, -5], [8, 0, 0, 0, 0, -4, -4, 0, 8, -6, 6, -4, -4, 0, 0, 0], [-11, 0, 0, 0, -1, -6, -6, 0, -1, -9, 3, -5, -5, 0, 0, 1], [0, -3, 0, -11, -1, 8, -8, -9, 0, 0, 0, -1, 1, 6, 1, -1], [0, 3, 0, -4, 3, -3, 3, 8, 0, 0, 0, 7, -7, -2, -2, 3], [-6, 0, -2, 0, 2, 9, 9, 0, -3, 0, -11, 0, 0, 0, 0, -2], [-6, 0, -3, 0, 0, 2, 2, 0, -1, 2, 4, -8, -8, 0, 0, 0], [0, -1, 0, 6, 4, -7, 7, -18, 0, 0, 0, 3, -3, -6, 3, 4], [-8, 0, 3, 0, 1, -1, -1, 0, -6, 6, 9, -1, -1, 0, 0, -1], [0, 3, 0, -1, -3, -2, 2, -23, 0, 0, 0, 1, -1, 4, 1, -3], [0, 0, 0, 6, 3, 2, -2, -16, 0, 0, 0, -5, 5, 2, -5, 3], [-1, 0, 0, 0, -4, -9, -9, 0, 4, -3, 2, -5, -5, 0, 0, 4], [4, 0, -5, 0, -3, 1, 1, 0, -2, 2, -13, 1, 1, 0, 0, 3], [0, -8, 0, 0, -1, -2, 2, 6, 0, 0, 0, -4, 4, 6, -6, -1], [1, 0, -10, 0, -4, -2, -2, 0, 1, -7, -5, -4, -4, 0, 0, 4], [0, -2, 0, -1, 1, 4, -4, -15, 0, 0, 0, 8, -8, 2, -4, 1], [-6, 0, 0, 0, -6, -6, -6, 0, -2, 0, -2, -6, -6, 0, 0, 6], [-15, 0, 0, 0, -1, -4, -4, 0, 9, -1, 1, -5, -5, 0, 0, 1], [6, 0, 2, 0, -5, 5, 5, 0, -1, -4, -3, 3, 3, 0, 0, 5], [-22, 0, -7, 0, 3, -1, -1, 0, 16, 0, 13, -3, -3, 0, 0, -3], [0, 0, 0, 4, 2, -2, 2, 0, 0, 0, 0, -6, 6, 2, 2, 2], [0, 3, 0, -9, -3, 3, -3, 19, 0, 0, 0, 0, 0, 3, 2, -3], [0, 6, 0, -4, -3, 4, -4, 22, 0, 0, 0, 5, -5, -3, -7, -3], [-6, 0, 0, 0, -10, 2, 2, 0, -10, -2, -2, -6, -6, 0, 0, 10], [0, 1, 0, -4, -1, 7, -7, 22, 0, 0, 0, -1, 1, 6, -3, -1], [0, 10, 0, -14, -5, -4, 4, -4, 0, 0, 0, 6, -6, 0, 0, -5], [0, 1, 0, -2, -5, -1, 1, 4, 0, 0, 0, 7, -7, -6, -3, -5], [-2, 0, 0, 0, -3, -4, -4, 0, -6, 4, 4, 3, 3, 0, 0, 3], [-3, 0, 4, 0, 1, 6, 6, 0, 1, -5, 1, -5, -5, 0, 0, -1], [14, 0, 4, 0, 1, 1, 1, 0, -4, 4, 8, 4, 4, 0, 0, -1], [0, -6, 0, -2, 3, 4, -4, -10, 0, 0, 0, 1, -1, 4, 0, 3], [0, 5, 0, 4, -1, 0, 0, -30, 0, 0, 0, 0, 0, -5, 0, -1], [5, 0, 6, 0, -1, -6, -6, 0, 3, -1, -3, 0, 0, 0, 0, 1], [14, 0, -4, 0, 2, 0, 0, 0, 2, 10, 6, 1, 1, 0, 0, -2], [0, -8, 0, 10, 7, 0, 0, 24, 0, 0, 0, -4, 4, -2, 2, 7], [0, -2, 0, -8, -2, 2, -2, -8, 0, 0, 0, 10, -10, -4, -4, -2], [4, 0, 2, 0, 1, -3, -3, 0, 9, 0, 3, 5, 5, 0, 0, -1], [0, 5, 0, -13, -6, -2, 2, 35, 0, 0, 0, 6, -6, 1, 6, -6], [0, 1, 0, -2, 1, -3, 3, 10, 0, 0, 0, -1, 1, -6, 0, 1], [0, 2, 0, 5, 6, -10, 10, 17, 0, 0, 0, -1, 1, -7, -7, 6], [0, 4, 0, -2, 1, -10, 10, 4, 0, 0, 0, 7, -7, -5, -5, 1], [0, 0, 0, 10, 1, 0, 0, 4, 0, 0, 0, 1, -1, -2, -1, 1], [-20, 0, -9, 0, 1, -3, -3, 0, 0, 2, 5, -9, -9, 0, 0, -1], [0, -6, 0, 2, 5, -10, 10, 24, 0, 0, 0, -2, 2, -2, -6, 5], [12, 0, 0, 0, 1, 11, 11, 0, 1, 0, 3, -3, -3, 0, 0, -1], [9, 0, 6, 0, -2, -12, -12, 0, -5, -7, -7, 4, 4, 0, 0, 2], [12, 0, 0, 0, 2, -6, -6, 0, 11, 0, 2, 4, 4, 0, 0, -2], [10, 0, -2, 0, 5, -1, -1, 0, 6, 0, 2, 6, 6, 0, 0, -5], [0, 5, 0, 0, -1, -6, 6, 10, 0, 0, 0, 8, -8, -5, -2, -1], [0, 8, 0, 0, -3, 5, -5, 6, 0, 0, 0, 10, -10, 0, -4, -3], [-4, 0, -6, 0, -5, 4, 4, 0, -4, -4, -2, -7, -7, 0, 0, 5], [-16, 0, 3, 0, -5, 4, 4, 0, -7, 0, -8, 4, 4, 0, 0, 5], [6, 0, -8, 0, 2, -4, -4, 0, 0, 0, 6, 6, 6, 0, 0, -2], [0, -4, 0, 16, 5, -4, 4, 0, 0, 0, 0, -15, 15, 0, -8, 5], [0, -2, 0, 1, -1, -4, 4, 27, 0, 0, 0, -2, 2, -4, 10, -1], [2, 0, 3, 0, 1, 5, 5, 0, 1, 14, 0, 0, 0, 0, 0, -1], [28, 0, 1, 0, 0, -4, -4, 0, -8, 6, 1, -7, -7, 0, 0, 0], [-4, 0, 0, 0, -3, 2, 2, 0, -2, 0, 10, 2, 2, 0, 0, 3], [-4, 0, 2, 0, -2, 4, 4, 0, 0, -6, -12, 4, 4, 0, 0, 2], [0, 5, 0, 4, 2, 3, -3, 18, 0, 0, 0, -2, 2, -2, 1, 2], [7, 0, 8, 0, -3, -6, -6, 0, -5, -1, -15, 3, 3, 0, 0, 3], [8, 0, -2, 0, 5, 3, 3, 0, 5, 4, 15, -1, -1, 0, 0, -5], [2, 0, 9, 0, -4, -2, -2, 0, -3, -8, -5, 9, 9, 0, 0, 4], [0, -10, 0, -8, 3, 0, 0, -18, 0, 0, 0, 10, -10, 10, -8, 3], [0, -2, 0, 6, 1, -4, 4, -2, 0, 0, 0, -1, 1, 0, -4, 1], [26, 0, 6, 0, 5, 0, 0, 0, -4, 4, -6, 2, 2, 0, 0, -5], [0, -3, 0, 5, -1, 5, -5, -3, 0, 0, 0, 6, -6, 3, -8, -1], [-6, 0, 6, 0, 2, -2, -2, 0, 4, 0, -5, -7, -7, 0, 0, -2], [-2, 0, 7, 0, 8, 8, 8, 0, 6, 6, 5, 5, 5, 0, 0, -8], [0, -13, 0, 16, 9, -7, 7, -14, 0, 0, 0, -13, 13, -2, -9, 9], [0, -5, 0, -2, 0, 3, -3, 44, 0, 0, 0, 4, -4, 0, 6, 0], [0, 8, 0, -8, -2, -2, 2, 4, 0, 0, 0, 6, -6, 2, -3, -2], [0, 5, 0, -7, -5, -4, 4, -5, 0, 0, 0, 9, -9, 4, -1, -5], [0, 10, 0, -6, -10, -3, 3, 0, 0, 0, 0, 7, -7, 3, 13, -10], [-11, 0, 0, 0, -4, 7, 7, 0, -2, 7, -8, -1, -1, 0, 0, 4], [0, 2, 0, 0, 0, -8, 8, -10, 0, 0, 0, 5, -5, -2, 6, 0], [0, -4, 0, 4, -2, 1, -1, 6, 0, 0, 0, -7, 7, 5, -1, -2], [0, 3, 0, -16, -2, -4, 4, -24, 0, 0, 0, 13, -13, 0, -7, -2], [0, 1, 0, -20, -3, -4, 4, 2, 0, 0, 0, 8, -8, -5, 4, -3], [12, 0, -8, 0, -4, -14, -14, 0, 4, -18, -2, -8, -8, 0, 0, 4], [10, 0, -6, 0, -7, -4, -4, 0, 0, -4, -2, -2, -2, 0, 0, 7], [2, 0, -2, 0, -3, -9, -9, 0, 2, -2, -6, 0, 0, 0, 0, 3], [12, 0, 3, 0, -3, 7, 7, 0, -7, -4, -8, 4, 4, 0, 0, 3], [0, 5, 0, 0, -5, 5, -5, -14, 0, 0, 0, 9, -9, -4, 7, -5], [0, 6, 0, -8, 1, -5, 5, -8, 0, 0, 0, -2, 2, -6, 8, 1], [0, 1, 0, 4, -3, -7, 7, 28, 0, 0, 0, -5, 5, 6, -6, -3], [0, 15, 0, -2, -5, 5, -5, 18, 0, 0, 0, 6, -6, -4, 5, -5], [-10, 0, -2, 0, -3, -4, -4, 0, 0, 8, 2, 5, 5, 0, 0, 3], [0, 4, 0, 2, -5, 4, -4, 4, 0, 0, 0, 11, -11, -7, 3, -5], [-20, 0, 5, 0, 0, 8, 8, 0, 2, 8, -6, 4, 4, 0, 0, 0], [0, 13, 0, -8, -5, -7, 7, -22, 0, 0, 0, 14, -14, -4, -1, -5], [14, 0, 5, 0, 2, 7, 7, 0, 4, 4, 5, 7, 7, 0, 0, -2], [1, 0, 0, 0, -3, 2, 2, 0, -5, -9, 3, 5, 5, 0, 0, 3], [0, 7, 0, 5, 0, -5, 5, 23, 0, 0, 0, -13, 13, 2, 7, 0], [0, -6, 0, 0, -1, 2, -2, 34, 0, 0, 0, -8, 8, 6, -10, -1], [0, -8, 0, -2, 2, -6, 6, -18, 0, 0, 0, -2, 2, -4, 4, 2], [4, 0, -1, 0, -2, -2, -2, 0, 7, -4, -2, -6, -6, 0, 0, 2], [0, -4, 0, 4, -6, -2, 2, 2, 0, 0, 0, 2, -2, 10, -2, -6], [0, 0, -2, 0, -1, 4, 4, 0, -4, 8, -4, -8, -8, 0, 0, 1]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1110_e_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1110_2_e_d();".
// 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_1110_2_e_d(:prec:=16)
    chi := MakeCharacter_1110_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(1999) - 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_1110_2_e_d();".
// 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_1110_2_e_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1110_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![3136, 0, 525424, 0, 791452, 0, 448469, 0, 126197, 0, 19194, 0, 1582, 0, 65, 0, 1]>,<13,R![64, -80, -600, -16, 285, 0, -34, 0, 1]>],Snew);
    return Vf;
end function;