
// Make newform 1078.2.i.c in Magma, downloaded from the LMFDB on 17 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1078_i();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1078_i_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_1078_2_i_c();".
// 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_1078_2_i_c();".
// 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], [33432180594, 394928996361, -97367215891956, 9515651467064, 17087672692002, -8831452106135, 24987667997140, -9000312527194, -3349022853273, 6402779061545, -6827412737484, 1720995499366, 848040618120, -820783926284, 385788744870, -80029143512], [-1622048373702, -13202743167632, 111746321740448, -157011910468036, 85339924434804, -23813610618566, -21576071160793, 43949161545424, -30002334611460, 7289551050986, 8714136666371, -12911491993004, 8285369121684, -3342656190846, 886173093256, -115452774644], [7097366139528, 5189891590886, 33344856580986, 142750731668897, -110456015651282, 38997521702488, -16716169888734, -30103090682590, 35017964444230, -17299825871464, 1831974981075, 10037306027966, -9349199101054, 4481995762636, -1434169055319, 229876192869], [-5702240414038, 5235429778548, 33621690891801, 143867520986011, -108439817187702, 37448827738712, -17068584063939, -29494836526278, 34568461621396, -17224931483234, 1827352370160, 10205971274842, -9516224014418, 4568245377402, -1463062841541, 234407101203], [-2750714974023, -22206981366431, 39533236474234, -256920959600440, 172779950825427, -54144940005777, 2104319424462, 61179136551334, -56754662154696, 22846579328323, 4000851706865, -19351307844336, 15520046894136, -7021940502570, 2126436132890, -323659513794], [-1505816495286, -11832162962962, -224470101825857, -124089191799984, 144140956476978, -55357249671040, 67008107672279, 11544594088212, -41574777060864, 30089262246160, -15500105696193, -6728239255060, 11192177985162, -6199106801734, 2231811901383, -394538957168], [6420259797322, 8958074916496, 57553292205336, 246377240843999, -191025350183983, 66949942975780, -29293132185474, -52069085549277, 61133313639343, -30296941112790, 3227680818897, 17544133384043, -16353473148736, 7838812215514, -2507531613006, 401980321088], [4012225523467, -9033094079978, -58021984313211, -248327455373448, 187112766068823, -65993485499734, 29466424871154, 51795261997335, -60331564786329, 30146969929770, -3186799527882, -17668207398569, 16440266855031, -7885517844470, 2521501247748, -403027374657], [2653688275785, 21061506068817, 234407277756901, 229349441750990, -222201806649708, 80010681773455, -75102453822786, -34746646803794, 66454318847001, -41579756460341, 15947399137709, 14300654206114, -17969597678127, 9404820278882, -3247720931080, 556158552240], [-1370541375, -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], [3660982645558, 54537167624894, 350334214614267, 1499508109685491, -1146623846023684, 401666792306712, -177707059051737, -314133045516125, 366427539327546, -182513504406276, 19314445911990, 106574496442407, -99202432432724, 47566230428388, -15210362430228, 2432602484212], [-5233663502032, -59744172756124, -383777392568439, -1642628604419603, 1256589457116658, -439361137765482, 194739830729736, 343678264658725, -401304270681864, 199797208529346, -21159726133215, -116744726696199, 108698529181646, -52123769377554, 16670596841871, -2667083154356], [16350688060416, 130791312035158, 686420342024835, 1465363584459148, -1212268368579630, 416079703454118, -260583517395552, -282140218575116, 376503294081456, -201266372887674, 42467570312879, 100494628369536, -102286748592894, 50529646182960, -16635640723011, 2737320095452], [-17956801097484, -143808261987203, -622496304087051, -1617999730660324, 1305146306980602, -444942596806753, 252628621076411, 320685750244910, -408031002582501, 212147297949199, -37485437796620, -112385854122694, 110934804723696, -54266401205842, 17710086389784, -2891771622084]];
    Rf_basisdens := [1, 3707507912227, 3707507912227, 3707507912227, 3707507912227, 3707507912227, 3707507912227, 3707507912227, 3707507912227, 3707507912227, 1973128213, 3810388399, 3707507912227, 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_1078_i();"
function MakeCharacter_1078_i()
    N := 1078;
    order := 6;
    char_gens := [199, 981];
    v := [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_1078_i_Hecke();"
function MakeCharacter_1078_i_Hecke(Kf)
    N := 1078;
    order := 6;
    char_gens := [199, 981];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 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 := [[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, -1, 1, 1, 0, -1, 0, 0, 0, 0, -1, 0, 1, 1, 0], [0, 3, -1, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 1, 1], [0, 2, 1, 0, 0, 1, -1, 0, 0, 0, 0, 2, 0, 0, 2, 3], [0, 0, 0, 0, 0, 2, 1, 0, 0, -2, 0, 2, 0, 0, 1, -1], [0, 0, 0, -1, -1, 0, 0, -2, 1, 0, 1, 0, 1, 1, 0, 0], [0, -1, -1, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 1, -1], [-1, 0, 0, -1, 1, 0, 0, -3, 0, 0, 2, 0, 2, 3, 0, 0], [-3, 0, 0, 0, -1, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0], [0, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, -1, 2], [0, -1, -2, 0, 0, 2, 3, 0, 0, -1, 0, 6, 0, 0, 3, -2], [0, 0, 0, -2, -2, 0, 0, 0, 0, 0, 0, 0, -2, -2, 0, 0], [1, 0, 0, 2, 2, 0, 0, 1, -2, 0, -7, 0, 0, 2, 0, 0], [-4, 0, 0, 3, -3, 0, 0, 0, 0, 0, 2, 0, -1, -4, 0, 0], [0, -2, 1, 0, 0, -3, 2, 0, 0, 3, 0, -2, 0, 0, 1, -1], [0, 0, 0, -3, -3, 0, 0, 0, 0, 0, 4, 0, -1, -2, 0, 0], [3, 0, 0, -2, 1, 0, 0, -2, -2, 0, 0, 0, -1, -1, 0, 0], [0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 5, 0, 0, 2, 2], [0, -4, 1, 0, 0, -3, 1, 0, 0, -3, 0, 0, 0, 0, -2, -2], [0, -3, -2, 0, 0, 0, 1, 0, 0, -1, 0, -2, 0, 0, -1, 2], [-5, 0, 0, 1, 4, 0, 0, 0, 1, 0, -4, 0, 4, 1, 0, 0], [3, 0, 0, -2, -4, 0, 0, 2, -2, 0, -6, 0, 2, -2, 0, 0], [0, -4, 0, 0, 0, -2, 0, 0, 0, 0, 0, 1, 0, 0, -1, -1], [3, 0, 0, -3, -2, 0, 0, 0, 0, 0, 3, 0, -2, -3, 0, 0], [0, 0, -4, 0, 0, 2, 3, 0, 0, 2, 0, 0, 0, 0, 1, 1], [0, -5, -1, 0, 0, 1, -1, 0, 0, -2, 0, -2, 0, 0, 3, -2], [-3, 0, 0, 2, -4, 0, 0, 0, 0, 0, 0, 0, -2, -2, 0, 0], [0, 4, 5, 0, 0, -2, -3, 0, 0, 1, 0, 0, 0, 0, -3, 5], [0, -1, -5, 0, 0, 1, -5, 0, 0, -1, 0, -2, 0, 0, 0, 0], [-1, 0, 0, -5, -5, 0, 0, -1, 2, 0, 5, 0, -3, -2, 0, 0], [0, 4, 2, 0, 0, 0, -2, 0, 0, -2, 0, 4, 0, 0, 2, -2], [0, -1, -4, 0, 0, -1, 5, 0, 0, -1, 0, 0, 0, 0, -1, -1], [0, -5, 4, 0, 0, 3, 4, 0, 0, -6, 0, -4, 0, 0, -6, 2], [-5, 0, 0, 1, -1, 0, 0, -3, 0, 0, 4, 0, 2, 1, 0, 0], [4, 0, 0, 1, -2, 0, 0, -4, 2, 0, -2, 0, 2, -1, 0, 0], [0, 12, 3, 0, 0, 0, 5, 0, 0, 3, 0, 6, 0, 0, -5, -3], [0, -4, -3, 0, 0, -1, -4, 0, 0, 1, 0, -10, 0, 0, -1, 1], [-2, 0, 0, -3, -3, 0, 0, -2, 4, 0, 14, 0, -4, 1, 0, 0], [-4, 0, 0, -9, -6, 0, 0, -3, 3, 0, 8, 0, -3, 3, 0, 0], [-6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0], [0, -4, -8, 0, 0, -1, -8, 0, 0, 2, 0, -7, 0, 0, 6, 2], [0, -11, -8, 0, 0, -6, 1, 0, 0, 3, 0, -1, 0, 0, 1, -8], [0, 0, 0, -1, 1, 0, 0, 2, 0, 0, -1, 0, 1, 2, 0, 0], [0, -2, -1, 0, 0, -2, -1, 0, 0, 1, 0, -9, 0, 0, -1, -1], [-1, 0, 0, 1, 1, 0, 0, 5, -5, 0, 2, 0, 0, 0, 0, 0], [0, -8, -2, 0, 0, -8, 2, 0, 0, 0, 0, -2, 0, 0, 0, -2], [-6, 0, 0, 6, 2, 0, 0, 0, 2, 0, -4, 0, 2, 6, 0, 0], [0, -2, -5, 0, 0, 4, -4, 0, 0, 4, 0, 0, 0, 0, 9, 9], [0, 7, 4, 0, 0, 6, -6, 0, 0, -3, 0, 6, 0, 0, -6, 4], [0, 0, 1, 0, 0, 6, -1, 0, 0, 0, 0, 5, 0, 0, -2, -1], [2, 0, 0, 4, 6, 0, 0, -4, 4, 0, -4, 0, -2, 2, 0, 0], [-2, 0, 0, 7, 10, 0, 0, 0, -5, 0, -7, 0, 10, 7, 0, 0], [0, -1, 6, 0, 0, 3, 6, 0, 0, -6, 0, 6, 0, 0, -2, -4], [-4, 0, 0, 4, -4, 0, 0, -8, 0, 0, 6, 0, 4, 0, 0, 0], [0, 14, 6, 0, 0, 1, 4, 0, 0, -1, 0, 24, 0, 0, -2, 2], [0, 17, -1, 0, 0, -1, -1, 0, 0, 2, 0, 17, 0, 0, 2, -1], [0, 5, 4, 0, 0, 2, -4, 0, 0, -1, 0, 5, 0, 0, -4, 4], [0, 7, 2, 0, 0, -1, -2, 0, 0, 0, 0, -9, 0, 0, -3, -1], [0, 16, -3, 0, 0, 0, -6, 0, 0, 1, 0, 6, 0, 0, 6, 3], [0, -13, 7, 0, 0, 0, 6, 0, 0, 0, 0, -3, 0, 0, -6, -7], [12, 0, 0, -1, 1, 0, 0, 2, 0, 0, -7, 0, -5, -4, 0, 0], [11, 0, 0, -4, 0, 0, 0, 0, 4, 0, 15, 0, 0, -4, 0, 0], [-1, 0, 0, 12, -5, 0, 0, -2, 1, 0, 2, 0, 5, -12, 0, 0], [0, 0, 0, -3, 4, 0, 0, -8, 4, 0, 4, 0, -4, 3, 0, 0], [0, 3, 4, 0, 0, -2, 0, 0, 0, 1, 0, 9, 0, 0, 0, 4], [0, 3, 11, 0, 0, 0, 11, 0, 0, 0, 0, 9, 0, 0, -5, -6], [0, -30, -3, 0, 0, 0, -4, 0, 0, -1, 0, -16, 0, 0, 4, 3], [18, 0, 0, 4, -4, 0, 0, -2, 0, 0, -8, 0, -2, -6, 0, 0], [0, 2, -5, 0, 0, -3, -3, 0, 0, -3, 0, 0, 0, 0, 8, 8], [-9, 0, 0, -4, 4, 0, 0, -1, 0, 0, 5, 0, -9, -5, 0, 0], [0, -7, -1, 0, 0, 2, -3, 0, 0, 2, 0, 0, 0, 0, 4, 4], [8, 0, 0, 1, 0, 0, 0, 4, 4, 0, 0, 0, 1, 1, 0, 0], [-4, 0, 0, 1, -1, 0, 0, 0, 1, 0, -3, 0, -1, 1, 0, 0], [-1, 0, 0, -2, -2, 0, 0, -1, 2, 0, 5, 0, -4, 2, 0, 0], [-3, 0, 0, 4, 3, 0, 0, 0, -5, 0, -8, 0, 3, 4, 0, 0], [5, 0, 0, 6, 8, 0, 0, 0, 0, 0, -5, 0, -8, -6, 0, 0], [0, -24, -6, 0, 0, -5, 6, 0, 0, 0, 0, 7, 0, 0, -6, -12], [-8, 0, 0, 2, 0, 0, 0, -8, 8, 0, 16, 0, 2, -2, 0, 0], [0, 0, 0, 7, -10, 0, 0, -1, -1, 0, 0, 0, -3, -3, 0, 0], [0, 19, -6, 0, 0, -1, -6, 0, 0, 2, 0, 14, 0, 0, 2, 4], [-14, 0, 0, 0, -9, 0, 0, -7, 7, 0, 28, 0, 9, -9, 0, 0], [0, -14, -2, 0, 0, -3, 4, 0, 0, 3, 0, -16, 0, 0, 6, -6], [14, 0, 0, 7, -1, 0, 0, 4, -2, 0, -16, 0, 1, -7, 0, 0], [12, 0, 0, 4, 3, 0, 0, -3, -3, 0, 0, 0, 7, 7, 0, 0], [0, -1, -1, 0, 0, 5, 4, 0, 0, 5, 0, 0, 0, 0, -3, -3], [0, 1, -4, 0, 0, 0, 5, 0, 0, 3, 0, -3, 0, 0, -5, 4], [20, 0, 0, -6, -4, 0, 0, 4, 4, 0, 0, 0, -10, -10, 0, 0], [4, 0, 0, 1, 9, 0, 0, 0, -4, 0, 0, 0, 9, 1, 0, 0], [0, 4, -2, 0, 0, 11, 2, 0, 0, 0, 0, 12, 0, 0, 7, 5], [3, 0, 0, -5, -5, 0, 0, 3, -6, 0, -6, 0, -4, -1, 0, 0], [0, 6, 4, 0, 0, 4, 4, 0, 0, -2, 0, -6, 0, 0, 4, 4], [2, 0, 0, -8, 6, 0, 0, 8, -4, 0, -6, 0, -6, 8, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, -11, 0, 6, 0, 0, 0, 0], [3, 0, 0, 4, -1, 0, 0, 0, 5, 0, 8, 0, -1, 4, 0, 0], [-1, 0, 0, -3, 3, 0, 0, 9, 0, 0, -4, 0, -7, -4, 0, 0], [0, -13, -5, 0, 0, 3, 1, 0, 0, -3, 0, -14, 0, 0, 6, -6], [0, -4, 7, 0, 0, 1, -2, 0, 0, 1, 0, 0, 0, 0, -5, -5], [0, -15, -13, 0, 0, -4, 8, 0, 0, 2, 0, 5, 0, 0, 8, -13], [0, 17, 11, 0, 0, 1, 11, 0, 0, -2, 0, 24, 0, 0, -5, -6], [0, -17, -6, 0, 0, -11, 6, 0, 0, 0, 0, 1, 0, 0, 1, -5], [0, 19, 3, 0, 0, -1, -6, 0, 0, -1, 0, 0, 0, 0, 3, 3], [0, -11, -16, 0, 0, -5, -16, 0, 0, 10, 0, -23, 0, 0, 9, 7], [19, 0, 0, 1, -1, 0, 0, -1, 0, 0, -9, 0, -9, -10, 0, 0], [10, 0, 0, 6, 9, 0, 0, 12, -12, 0, -20, 0, -3, 3, 0, 0], [0, 16, 5, 0, 0, 16, 6, 0, 0, -16, 0, 34, 0, 0, 1, -1], [-1, 0, 0, -3, -3, 0, 0, -1, 2, 0, -4, 0, -2, -1, 0, 0], [0, -3, -14, 0, 0, 0, -11, 0, 0, 7, 0, -12, 0, 0, 11, 14], [0, 14, 13, 0, 0, 10, 9, 0, 0, -10, 0, 20, 0, 0, -4, 4], [0, -6, 6, 0, 0, 4, 6, 0, 0, -8, 0, 2, 0, 0, -2, -4], [-15, 0, 0, 6, 1, 0, 0, -1, -1, 0, 0, 0, 7, 7, 0, 0], [-2, 0, 0, -4, 4, 0, 0, 6, 0, 0, -2, 0, -4, 0, 0, 0], [-27, 0, 0, 5, 1, 0, 0, -3, -3, 0, 0, 0, 6, 6, 0, 0], [5, 0, 0, 1, 1, 0, 0, 5, -10, 0, -17, 0, -3, 4, 0, 0], [8, 0, 0, 1, 4, 0, 0, -8, 8, 0, -16, 0, -3, 3, 0, 0], [14, 0, 0, 7, -7, 0, 0, 4, 0, 0, -9, 0, -5, -12, 0, 0], [16, 0, 0, 12, 0, 0, 0, -2, 1, 0, -15, 0, 0, -12, 0, 0], [0, -8, 0, 0, 0, -16, -8, 0, 0, 8, 0, -38, 0, 0, -8, 0], [-9, 0, 0, -3, 3, 0, 0, 5, 0, 0, 2, 0, 8, 11, 0, 0], [0, 1, 0, 0, 0, 2, -2, 0, 0, -1, 0, -5, 0, 0, -2, 0], [0, -9, -8, 0, 0, -11, -5, 0, 0, 11, 0, -12, 0, 0, 3, -3], [4, 0, 0, 9, 9, 0, 0, 4, -8, 0, -12, 0, 9, 0, 0, 0], [10, 0, 0, 6, 13, 0, 0, 0, -10, 0, 0, 0, 13, 6, 0, 0], [0, -9, -10, 0, 0, 2, 7, 0, 0, -1, 0, 5, 0, 0, 7, -10], [-13, 0, 0, -14, -3, 0, 0, -8, 4, 0, 17, 0, 3, 14, 0, 0], [-19, 0, 0, 2, 5, 0, 0, 0, 9, 0, -10, 0, 5, 2, 0, 0], [10, 0, 0, 13, 8, 0, 0, 9, -9, 0, -20, 0, 5, -5, 0, 0], [0, 1, -13, 0, 0, -4, -9, 0, 0, 4, 0, 10, 0, 0, 4, -4], [0, 14, 17, 0, 0, -1, 17, 0, 0, 2, 0, 16, 0, 0, -14, -3], [0, -11, -13, 0, 0, 4, 9, 0, 0, -2, 0, 10, 0, 0, 9, -13], [-5, 0, 0, 2, -1, 0, 0, 2, -1, 0, 4, 0, 1, -2, 0, 0], [4, 0, 0, -9, 8, 0, 0, 3, 3, 0, 0, 0, -1, -1, 0, 0], [0, 21, 9, 0, 0, -7, 0, 0, 0, 7, 0, 24, 0, 0, -9, 9], [0, 0, 2, 0, 0, 0, 10, 0, 0, -18, 0, 10, 0, 0, -10, -2], [-16, 0, 0, 14, -14, 0, 0, -4, 0, 0, 10, 0, 10, -4, 0, 0], [0, 5, -3, 0, 0, 4, 3, 0, 0, 0, 0, -7, 0, 0, -3, -6], [6, 0, 0, 7, 10, 0, 0, 5, -5, 0, -12, 0, -3, 3, 0, 0], [0, -2, -8, 0, 0, -4, -8, 0, 0, 8, 0, -2, 0, 0, 12, -4], [0, -14, 10, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, -10], [0, -10, -5, 0, 0, -3, 4, 0, 0, -3, 0, 0, 0, 0, 1, 1], [3, 0, 0, -1, -1, 0, 0, 3, -6, 0, 6, 0, -4, 3, 0, 0], [0, 11, 7, 0, 0, 8, -4, 0, 0, -4, 0, 13, 0, 0, -4, 7], [30, 0, 0, 3, -3, 0, 0, 0, 0, 0, -15, 0, -2, -5, 0, 0], [-22, 0, 0, -7, -8, 0, 0, -5, 5, 0, 44, 0, 1, -1, 0, 0], [0, 24, 10, 0, 0, 0, 0, 0, 0, -6, 0, 20, 0, 0, 0, -10], [0, 10, -1, 0, 0, -3, 1, 0, 0, 0, 0, -4, 0, 0, 10, 9], [-2, 0, 0, 11, 10, 0, 0, 0, -12, 0, -14, 0, 10, 11, 0, 0], [-10, 0, 0, -11, -7, 0, 0, -2, 1, 0, 11, 0, 7, 11, 0, 0], [0, 9, 7, 0, 0, -2, -15, 0, 0, -2, 0, 0, 0, 0, 8, 8], [-1, 0, 0, 0, 2, 0, 0, 10, -10, 0, 2, 0, -2, 2, 0, 0], [-14, 0, 0, -5, 2, 0, 0, 2, 2, 0, 0, 0, -3, -3, 0, 0], [0, -10, -8, 0, 0, -1, -4, 0, 0, 1, 0, -12, 0, 0, 4, -4], [-6, 0, 0, -22, -22, 0, 0, -6, 12, 0, 0, 0, -21, -1, 0, 0], [6, 0, 0, 5, -2, 0, 0, 7, 7, 0, 0, 0, 3, 3, 0, 0], [0, 10, -2, 0, 0, -10, 4, 0, 0, -10, 0, 0, 0, 0, -2, -2], [0, 0, 0, 9, 10, 0, 0, 0, -3, 0, -3, 0, 10, 9, 0, 0], [0, -5, 12, 0, 0, 0, 4, 0, 0, 1, 0, 3, 0, 0, -4, -12], [0, -22, 0, 0, 0, -8, 0, 0, 0, 0, 0, -3, 0, 0, -17, -17], [-8, 0, 0, 14, -14, 0, 0, -8, 4, 0, 12, 0, 14, -14, 0, 0], [0, 3, 0, 0, 0, 6, -2, 0, 0, -3, 0, -5, 0, 0, -2, 0], [0, -4, -6, 0, 0, 4, -10, 0, 0, -2, 0, 2, 0, 0, -10, -6], [4, 0, 0, 1, 10, 0, 0, 0, 0, 0, 4, 0, 10, 1, 0, 0], [-3, 0, 0, 7, 7, 0, 0, -3, 6, 0, -32, 0, 7, 0, 0, 0], [-20, 0, 0, 4, -4, 0, 0, -8, 0, 0, 14, 0, 20, 16, 0, 0], [-3, 0, 0, 0, 0, 0, 0, -3, 6, 0, -3, 0, 11, -11, 0, 0], [0, 5, 5, 0, 0, -1, -5, 0, 0, 0, 0, 2, 0, 0, 3, 8], [0, 0, -2, 0, 0, 4, -6, 0, 0, -2, 0, 30, 0, 0, -6, -2], [12, 0, 0, -2, -6, 0, 0, 0, 10, 0, 22, 0, -6, -2, 0, 0], [0, -2, 9, 0, 0, 11, 9, 0, 0, -22, 0, 12, 0, 0, -6, -3], [5, 0, 0, 11, 0, 0, 0, 4, -4, 0, -10, 0, 11, -11, 0, 0], [0, 12, 8, 0, 0, 9, -14, 0, 0, 9, 0, 0, 0, 0, 6, 6], [0, -12, 3, 0, 0, -1, 3, 0, 0, 2, 0, -6, 0, 0, 4, -7], [4, 0, 0, -5, 5, 0, 0, -2, 0, 0, -1, 0, -5, 0, 0, 0], [-1, 0, 0, -6, -8, 0, 0, 2, -2, 0, 2, 0, 2, -2, 0, 0], [0, -17, -9, 0, 0, -16, 0, 0, 0, 8, 0, -37, 0, 0, 0, -9], [0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 2, 8, 0, 0], [0, -26, 10, 0, 0, 0, 8, 0, 0, 0, 0, -8, 0, 0, -8, -10], [0, -12, 4, 0, 0, -6, -4, 0, 0, 6, 0, -40, 0, 0, -8, 8], [1, 0, 0, -5, 10, 0, 0, -4, 2, 0, 1, 0, -10, 5, 0, 0], [0, -3, -8, 0, 0, 0, -19, 0, 0, 5, 0, -8, 0, 0, 19, 8], [-10, 0, 0, -10, 10, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0], [0, -11, -7, 0, 0, 7, -6, 0, 0, -7, 0, -20, 0, 0, 1, -1], [1, 0, 0, 10, 10, 0, 0, 1, -2, 0, 27, 0, 13, -3, 0, 0], [-44, 0, 0, 7, -7, 0, 0, -6, 0, 0, 25, 0, 4, -3, 0, 0], [0, -28, 4, 0, 0, -4, 4, 0, 0, 8, 0, -21, 0, 0, 7, -11], [-36, 0, 0, 1, -1, 0, 0, -4, 0, 0, 20, 0, 6, 5, 0, 0], [0, 4, 1, 0, 0, -4, 10, 0, 0, -4, 0, 0, 0, 0, -11, -11], [0, -4, 8, 0, 0, -17, -8, 0, 0, 0, 0, -18, 0, 0, -13, -5], [1, 0, 0, -11, -6, 0, 0, 0, -1, 0, 0, 0, -6, -11, 0, 0], [0, -6, -1, 0, 0, -10, -7, 0, 0, 5, 0, -33, 0, 0, -7, -1], [12, 0, 0, 11, 2, 0, 0, -4, 2, 0, -10, 0, -2, -11, 0, 0], [-22, 0, 0, -4, -14, 0, 0, 0, 7, 0, -15, 0, -14, -4, 0, 0], [0, 16, 2, 0, 0, 10, 2, 0, 0, -20, 0, 26, 0, 0, -2, 0], [18, 0, 0, -12, 12, 0, 0, 0, 0, 0, -9, 0, -10, 2, 0, 0], [0, -8, -18, 0, 0, -4, -18, 0, 0, 8, 0, -24, 0, 0, 6, 12], [33, 0, 0, 8, 1, 0, 0, 12, -6, 0, -39, 0, -1, -8, 0, 0], [0, 4, 6, 0, 0, 0, 1, 0, 0, -4, 0, 7, 0, 0, -1, -6], [0, -10, 0, 0, 0, -5, -4, 0, 0, 5, 0, -28, 0, 0, -4, 4], [0, -24, 10, 0, 0, -8, 10, 0, 0, 16, 0, -21, 0, 0, 1, -11], [0, -24, -15, 0, 0, 0, -17, 0, 0, 17, 0, -28, 0, 0, 17, 15], [9, 0, 0, -10, -9, 0, 0, 0, -14, 0, -5, 0, -9, -10, 0, 0], [0, 6, -4, 0, 0, 3, 4, 0, 0, 0, 0, 5, 0, 0, 12, 8], [6, 0, 0, -14, -15, 0, 0, -6, 6, 0, -12, 0, 1, -1, 0, 0], [18, 0, 0, -4, 4, 0, 0, -10, 0, 0, -4, 0, 8, 12, 0, 0], [10, 0, 0, 4, 0, 0, 0, 0, 2, 0, 12, 0, 0, 4, 0, 0], [0, 4, -4, 0, 0, 2, -5, 0, 0, 2, 0, 0, 0, 0, 9, 9], [0, 18, 12, 0, 0, 12, 13, 0, 0, -6, 0, 39, 0, 0, 13, 12], [-2, 0, 0, -9, 9, 0, 0, 2, 0, 0, 0, 0, -9, 0, 0, 0], [0, -13, -4, 0, 0, 3, -2, 0, 0, 3, 0, 0, 0, 0, 6, 6], [-2, 0, 0, -5, 14, 0, 0, -3, 3, 0, 4, 0, -19, 19, 0, 0], [-18, 0, 0, 14, 6, 0, 0, -6, -6, 0, 0, 0, 20, 20, 0, 0], [16, 0, 0, -2, -2, 0, 0, 0, -10, 0, 6, 0, -2, -2, 0, 0], [0, 6, 8, 0, 0, -13, -8, 0, 0, 0, 0, -12, 0, 0, -1, 7], [-1, 0, 0, -6, 8, 0, 0, 0, 4, 0, 3, 0, 8, -6, 0, 0], [0, -13, -2, 0, 0, 1, -2, 0, 0, -2, 0, -4, 0, 0, 10, -8], [0, 2, 7, 0, 0, 10, -7, 0, 0, 0, 0, 9, 0, 0, -6, 1], [-37, 0, 0, -2, -5, 0, 0, -18, 9, 0, 46, 0, 5, 2, 0, 0], [18, 0, 0, -8, 2, 0, 0, 0, 0, 0, 0, 0, -6, -6, 0, 0], [0, -19, -9, 0, 0, -4, 11, 0, 0, -4, 0, 0, 0, 0, -2, -2], [0, 6, -13, 0, 0, 0, -19, 0, 0, 9, 0, -8, 0, 0, 19, 13], [9, 0, 0, 22, 0, 0, 0, 16, -8, 0, -17, 0, 0, -22, 0, 0], [26, 0, 0, 3, 13, 0, 0, 6, -3, 0, -29, 0, -13, -3, 0, 0], [0, 11, -4, 0, 0, 0, 1, 0, 0, -1, 0, 4, 0, 0, -1, 4], [0, 15, 14, 0, 0, 2, 17, 0, 0, -1, 0, 11, 0, 0, 17, 14], [4, 0, 0, -5, -12, 0, 0, 0, -9, 0, -5, 0, -12, -5, 0, 0], [8, 0, 0, -9, -9, 0, 0, 8, -16, 0, -23, 0, -1, -8, 0, 0], [0, -8, -11, 0, 0, 1, 1, 0, 0, -1, 0, 8, 0, 0, 12, -12], [0, -40, 6, 0, 0, -2, 2, 0, 0, -2, 0, 0, 0, 0, -8, -8], [-6, 0, 0, 10, 10, 0, 0, -6, 12, 0, -10, 0, 0, 10, 0, 0], [0, 10, -7, 0, 0, -1, 7, 0, 0, 0, 0, -6, 0, 0, 12, 5], [0, 21, 20, 0, 0, 2, 6, 0, 0, -1, 0, 8, 0, 0, 6, 20], [0, 2, -20, 0, 0, 0, -20, 0, 0, 0, 0, -10, 0, 0, 8, 12], [4, 0, 0, 10, 15, 0, 0, 8, -8, 0, -8, 0, -5, 5, 0, 0], [0, 26, 14, 0, 0, 7, -14, 0, 0, 0, 0, -2, 0, 0, 3, 17], [-9, 0, 0, -9, -4, 0, 0, 0, 9, 0, 0, 0, -4, -9, 0, 0], [0, -31, 11, 0, 0, -2, 11, 0, 0, -2, 0, 0, 0, 0, -22, -22], [-10, 0, 0, 5, 16, 0, 0, -6, -6, 0, 0, 0, 21, 21, 0, 0], [1, 0, 0, 13, 5, 0, 0, -19, 19, 0, -2, 0, 8, -8, 0, 0], [6, 0, 0, 4, 4, 0, 0, 6, -12, 0, -30, 0, -8, 12, 0, 0], [0, 11, 17, 0, 0, 1, 4, 0, 0, -1, 0, -4, 0, 0, -13, 13], [-23, 0, 0, -7, 7, 0, 0, 7, 0, 0, 8, 0, 6, 13, 0, 0], [-9, 0, 0, 12, -9, 0, 0, 8, -4, 0, 5, 0, 9, -12, 0, 0], [0, -13, 4, 0, 0, 0, 10, 0, 0, 13, 0, -11, 0, 0, -10, -4], [0, 16, 11, 0, 0, 20, 17, 0, 0, -20, 0, 44, 0, 0, 6, -6], [-11, 0, 0, -30, -19, 0, 0, -14, 14, 0, 22, 0, -11, 11, 0, 0], [-52, 0, 0, 7, -7, 0, 0, -8, 0, 0, 30, 0, 14, 7, 0, 0], [0, 39, -4, 0, 0, 7, -4, 0, 0, -14, 0, 41, 0, 0, -1, 5], [0, 1, 0, 0, 0, 2, 16, 0, 0, -1, 0, 20, 0, 0, 16, 0], [0, -7, 4, 0, 0, -22, -13, 0, 0, 11, 0, -57, 0, 0, -13, 4], [0, -24, -8, 0, 0, -2, 10, 0, 0, 2, 0, -12, 0, 0, 18, -18], [-1, 0, 0, -2, -2, 0, 0, -1, 2, 0, 11, 0, -9, 7, 0, 0], [20, 0, 0, -8, -1, 0, 0, 3, -3, 0, -40, 0, -7, 7, 0, 0], [0, -3, -5, 0, 0, -3, 5, 0, 0, 0, 0, -3, 0, 0, 2, -3], [0, -1, 5, 0, 0, -1, -2, 0, 0, -1, 0, 0, 0, 0, -3, -3], [9, 0, 0, -7, -7, 0, 0, 9, -18, 0, -4, 0, -24, 17, 0, 0], [0, -16, -15, 0, 0, 1, 15, 0, 0, 0, 0, 2, 0, 0, 0, -15], [23, 0, 0, 24, 26, 0, 0, 5, -5, 0, -46, 0, -2, 2, 0, 0], [0, -12, -21, 0, 0, -4, 0, 0, 0, 4, 0, 18, 0, 0, 21, -21], [0, -2, 4, 0, 0, 4, 4, 0, 0, -8, 0, -10, 0, 0, -16, 12], [0, 15, 8, 0, 0, 14, 3, 0, 0, -7, 0, 24, 0, 0, 3, 8], [0, -1, 17, 0, 0, -11, -17, 0, 0, 0, 0, 10, 0, 0, 3, 20], [0, -11, -3, 0, 0, 0, -13, 0, 0, 20, 0, -17, 0, 0, 13, 3], [33, 0, 0, -13, 13, 0, 0, 17, 0, 0, -25, 0, -25, -12, 0, 0], [6, 0, 0, 5, -10, 0, 0, 0, -2, 0, 4, 0, -10, 5, 0, 0], [-20, 0, 0, -9, 18, 0, 0, -3, -3, 0, 0, 0, 9, 9, 0, 0], [3, 0, 0, 4, -5, 0, 0, 5, -5, 0, -6, 0, 9, -9, 0, 0], [0, 0, 1, 0, 0, -2, 7, 0, 0, 1, 0, 55, 0, 0, 7, 1], [0, -5, 1, 0, 0, 15, 1, 0, 0, -30, 0, 12, 0, 0, 1, -2], [-8, 0, 0, 0, 10, 0, 0, 0, 6, 0, -2, 0, 10, 0, 0, 0], [0, 0, 0, -14, -14, 0, 0, 0, 0, 0, 60, 0, -10, -4, 0, 0], [-8, 0, 0, -16, 16, 0, 0, -14, 0, 0, 11, 0, 8, 24, 0, 0], [0, 14, 4, 0, 0, 2, 8, 0, 0, 2, 0, 0, 0, 0, -12, -12], [0, 34, -20, 0, 0, 0, -17, 0, 0, 4, 0, 5, 0, 0, 17, 20], [18, 0, 0, 5, -9, 0, 0, 0, 1, 0, 19, 0, -9, 5, 0, 0], [-36, 0, 0, 2, 7, 0, 0, 4, -2, 0, 34, 0, -7, -2, 0, 0], [0, -35, -7, 0, 0, -3, -7, 0, 0, 6, 0, -45, 0, 0, 0, 7], [0, 6, -19, 0, 0, 8, -18, 0, 0, 8, 0, 0, 0, 0, 37, 37], [0, -35, -9, 0, 0, -1, 1, 0, 0, 1, 0, -50, 0, 0, 10, -10], [0, 4, 12, 0, 0, -3, -12, 0, 0, 0, 0, 4, 0, 0, -1, 11], [-8, 0, 0, -8, -8, 0, 0, -8, 16, 0, -20, 0, -6, -2, 0, 0], [0, 13, -2, 0, 0, 0, -26, 0, 0, 3, 0, 4, 0, 0, 26, 2], [0, 25, -12, 0, 0, 0, -5, 0, 0, -13, 0, 13, 0, 0, 5, 12], [0, 31, 15, 0, 0, -1, -4, 0, 0, 1, 0, 24, 0, 0, -19, 19], [14, 0, 0, 0, 8, 0, 0, 4, -2, 0, -16, 0, -8, 0, 0, 0], [-14, 0, 0, -24, -24, 0, 0, -14, 28, 0, 15, 0, -26, 2, 0, 0], [0, -2, -6, 0, 0, 8, 0, 0, 0, -4, 0, -30, 0, 0, 0, -6], [50, 0, 0, 5, -5, 0, 0, -12, 0, 0, -19, 0, -1, -6, 0, 0], [0, 1, 0, 0, 0, 0, 9, 0, 0, 17, 0, -8, 0, 0, -9, 0], [-6, 0, 0, 20, 20, 0, 0, -6, 12, 0, -26, 0, 26, -6, 0, 0], [-2, 0, 0, -9, 9, 0, 0, 10, 0, 0, -4, 0, -10, -1, 0, 0], [0, 8, 19, 0, 0, -10, 14, 0, 0, -10, 0, 0, 0, 0, -33, -33], [0, -29, 18, 0, 0, 0, 27, 0, 0, -19, 0, 4, 0, 0, -27, -18], [0, 19, 23, 0, 0, -8, -15, 0, 0, 4, 0, 9, 0, 0, -15, 23], [0, -19, -15, 0, 0, 3, 15, 0, 0, 0, 0, -1, 0, 0, -8, -23], [-15, 0, 0, 17, 0, 0, 0, 0, -8, 0, -23, 0, 0, 17, 0, 0], [2, 0, 0, 3, -4, 0, 0, 9, -9, 0, -4, 0, 7, -7, 0, 0], [0, 5, -9, 0, 0, -1, -2, 0, 0, 1, 0, 24, 0, 0, 7, -7], [0, -45, 1, 0, 0, 0, -2, 0, 0, -18, 0, -13, 0, 0, 2, -1], [0, -13, -14, 0, 0, 15, -10, 0, 0, -15, 0, -18, 0, 0, 4, -4], [0, 6, -15, 0, 0, -1, 8, 0, 0, -1, 0, 0, 0, 0, 7, 7], [0, -5, 6, 0, 0, 1, 6, 0, 0, -2, 0, 10, 0, 0, 8, -14]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1078_i_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1078_2_i_c();".
// 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_1078_2_i_c(:prec:=16)
    chi := MakeCharacter_1078_i();
    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_1078_2_i_c();".
// 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_1078_2_i_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1078_i();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![169, -78, -118, 60, 87, 0, -10, 0, 1]>],Snew);
    return Vf;
end function;