
// Make newform 1200.3.c.l in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1200_c();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1200_c_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_1200_3_c_l();".
// 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_1200_3_c_l();".
// 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 := [39204, 0, -7740, 0, 14397, 0, 1270, 0, 75, 0, 18, 0, 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], [-291510, 0, -1125197, 0, -45816, 0, -5305, 0, -1068, 0, -39, 0], [453660, 0, -752612, 0, -45816, 0, -5305, 0, -1068, 0, -39, 0], [6304968, 0, -5294253, 0, -589316, 0, -19363, 0, -5462, 0, -339, 0], [-1354239, 0, 462551, 0, 101739, 0, 1724, 0, 1129, 0, 111, 0], [-9938619, 0, -24014925, 0, -2437674, 0, -161246, 0, -31165, 0, -1766, 0], [0, -12637134, 0, -11366133, 0, -852428, 0, -67131, 0, -12492, 0, -617], [0, -2193841134, 0, 121414299, 0, 19080948, 0, 330589, 0, 174956, 0, 13087], [0, 5815099890, 0, 1301198379, 0, 221022452, 0, 16375125, 0, 1982436, 0, 136583], [0, -1096750422, 0, 293274123, 0, 29751422, 0, 917817, 0, 495372, 0, 35393], [0, 540370386, 0, -442706289, 0, -45762506, 0, -1956771, 0, -585756, 0, -37019], [0, 11124243918, 0, -8809153131, 0, -730709380, 0, -44271093, 0, -11391684, 0, -616375]];
    Rf_basisdens := [1, 745170, 372585, 2235510, 372585, 3353265, 30008880, 590174640, 1770523920, 442630980, 442630980, 1770523920];
    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_1200_c();"
function MakeCharacter_1200_c()
    N := 1200;
    order := 2;
    char_gens := [751, 901, 401, 577];
    v := [2, 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_1200_c_Hecke();"
function MakeCharacter_1200_c_Hecke(Kf)
    N := 1200;
    order := 2;
    char_gens := [751, 901, 401, 577];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 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 := 3;
    raw_aps := [[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, -2, -1, 1, -1, 1, -1], [-1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -4, 1, -1, 1, -1, 1], [0, 0, 0, 0, 0, 0, -1, 1, 1, -2, 0, 1], [7, 2, -2, -2, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 2, -2, 2, 1, 3, 2], [2, -5, -1, -2, -2, 2, 0, 0, 0, 0, 0, 0], [20, 3, 3, 3, -3, -3, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 12, 2, -4, 2, -10, 4], [1, -6, -4, -1, -3, 3, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, -5, 3, -11, 5], [0, 0, 0, 0, 0, 0, 2, -2, -6, 2, 2, -6], [0, 0, 0, 0, 0, 0, 6, -6, 0, -3, 15, 0], [0, -12, -12, 0, 2, -2, 0, 0, 0, 0, 0, 0], [14, -13, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -71, 0, -1, 0, -4, 1], [-2, 17, 13, 2, 4, -4, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -17, -7, 3, -7, -9, -3], [-16, 26, 2, 2, -8, -8, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -3, 3, -2, 3, -9, -2], [7, -11, 3, -7, -1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -84, -5, -1, -5, -19, 1], [-8, 9, -7, 8, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 14, -8, 4, -8, -8, -4], [0, 0, 0, 0, 0, 0, 15, -15, 8, 10, 20, 8], [-14, 37, 5, 5, -13, -13, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1, 1, -3, -23, 21, -3], [0, 0, 0, 0, 0, 0, -58, -16, 10, -16, -8, -10], [-4, 31, 23, 4, -4, 4, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 19, -19, -3, -23, 61, -3], [39, 11, -17, -17, 10, 10, 0, 0, 0, 0, 0, 0], [2, -4, 0, -2, 8, -8, 0, 0, 0, 0, 0, 0], [-34, -19, -3, -3, 7, 7, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -152, -1, 7, -1, 25, -7], [0, 0, 0, 0, 0, 0, -3, -22, 21, -22, 18, -21], [0, 0, 0, 0, 0, 0, -18, 18, 4, -1, -35, 4], [0, 0, 0, 0, 0, 0, -16, 16, -2, -19, -13, -2], [-1, -9, -11, 1, -16, 16, 0, 0, 0, 0, 0, 0], [136, -39, 1, 1, 9, 9, 0, 0, 0, 0, 0, 0], [14, -3, 25, -14, -2, 2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1, -28, 18, -28, -12, -18], [0, 0, 0, 0, 0, 0, -10, 10, -18, 6, -26, -18], [-38, -25, -1, -1, 7, 7, 0, 0, 0, 0, 0, 0], [103, -20, -16, -16, 17, 17, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 86, 17, -15, 17, -9, 15], [0, 0, 0, 0, 0, 0, -16, 16, 8, 29, -61, 8], [198, 13, -11, -11, 5, 5, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 24, -24, 14, 1, 47, 14], [-6, -15, -27, 6, 0, 0, 0, 0, 0, 0, 0, 0], [3, 64, -8, -8, -10, -10, 0, 0, 0, 0, 0, 0], [-7, 25, 11, 7, -16, 16, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 4, -4, -4, -6, 14, -4], [0, 0, 0, 0, 0, 0, -6, 6, 6, 39, -51, 6], [0, 15, 15, 0, -2, 2, 0, 0, 0, 0, 0, 0], [50, 0, -8, -8, 6, 6, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -8, 43, -23, 43, 37, 23], [16, -53, -21, -16, -18, 18, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -117, 16, -9, 16, 12, 9], [0, 0, 0, 0, 0, 0, 4, -4, 14, 40, -32, 14], [0, 0, 0, 0, 0, 0, -103, -12, 25, -12, 64, -25], [4, -16, -8, -4, 2, -2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -40, 41, -43, 41, -49, 43], [0, 0, 0, 0, 0, 0, -16, 16, 16, -6, -26, 16], [281, 53, 17, 17, -26, -26, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -141, 10, -22, 10, -58, 22], [0, 0, 0, 0, 0, 0, 9, -9, -22, -15, 33, -22], [88, 14, 54, 54, -44, -44, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -8, 8, -14, -33, 17, -14], [-40, 99, 19, 40, 12, -12, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -358, 23, -13, 23, 17, 13], [0, 0, 0, 0, 0, 0, 12, 37, -3, 37, 99, 3], [211, -18, -6, -6, 9, 9, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -20, 20, 6, -52, 12, 6], [10, -75, -55, -10, -24, 24, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 14, 53, -31, 53, 35, 31], [33, -82, -16, -33, 7, -7, 0, 0, 0, 0, 0, 0], [127, -122, 6, 6, 26, 26, 0, 0, 0, 0, 0, 0], [-19, 48, 10, 19, 30, -30, 0, 0, 0, 0, 0, 0], [8, -122, 6, 6, 26, 26, 0, 0, 0, 0, 0, 0], [-44, 47, -41, 44, 8, -8, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 253, -70, 64, -70, 46, -64], [216, -27, 61, 61, -39, -39, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -19, 19, 4, 3, -41, 4], [11, 27, 49, -11, 27, -27, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -55, 35, -49, 35, -91, 49], [24, 61, 109, -24, 26, -26, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 188, -58, 58, -58, 58, -58], [0, 0, 0, 0, 0, 0, -36, 36, -32, -41, -31, -32], [-18, 104, 68, 18, -16, 16, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -420, 61, -45, 61, 3, 45], [20, -36, 4, -20, 30, -30, 0, 0, 0, 0, 0, 0], [204, -71, 49, 49, -19, -19, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -8, 8, -14, -77, 61, -14], [54, -44, 64, -54, 22, -22, 0, 0, 0, 0, 0, 0], [15, -6, 24, -15, -29, 29, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -127, 14, -19, 14, -34, 19], [46, -17, 71, 71, -49, -49, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 245, -11, 28, -11, 79, -28], [0, 0, 0, 0, 0, 0, 10, -10, 4, 68, -48, 4], [0, 0, 0, 0, 0, 0, 12, -12, -8, -29, 53, -8], [-21, -84, -126, 21, -5, 5, 0, 0, 0, 0, 0, 0], [356, -25, 31, 31, -17, -17, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -405, -14, 18, -14, 30, -18], [0, 0, 0, 0, 0, 0, -3, 3, 14, -68, 62, 14], [0, 0, 0, 0, 0, 0, 25, -25, -3, 2, 48, -3], [24, -44, 4, -24, -58, 58, 0, 0, 0, 0, 0, 0], [109, 50, -86, -86, 52, 52, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -160, -82, 46, -82, -62, -46], [0, 0, 0, 0, 0, 0, -138, 28, -20, 28, 4, 20], [0, 0, 0, 0, 0, 0, 20, -20, -50, 39, 1, -50], [-8, 117, -35, -35, -3, -3, 0, 0, 0, 0, 0, 0], [-200, 7, -9, -9, 5, 5, 0, 0, 0, 0, 0, 0], [4, 84, 92, -4, 36, -36, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1030, -12, 20, -12, 44, -20], [0, 0, 0, 0, 0, 0, -52, 52, 36, -50, -54, 36], [0, 0, 0, 0, 0, 0, 8, -8, 10, 50, -34, 10], [9, 134, 152, -9, 4, -4, 0, 0, 0, 0, 0, 0], [526, -48, 8, 8, 6, 6, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 214, 84, -92, 84, -116, 92], [0, 0, 0, 0, 0, 0, -60, 60, -66, -79, -41, -66], [0, 0, 0, 0, 0, 0, 27, -27, 26, -83, 137, 26], [-149, -49, -53, -53, 52, 52, 0, 0, 0, 0, 0, 0], [-90, 189, 9, 90, 26, -26, 0, 0, 0, 0, 0, 0], [-278, 105, -15, -15, -15, -15, 0, 0, 0, 0, 0, 0], [92, -297, -113, -92, -8, 8, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 392, 53, -55, 53, -61, 55], [0, 0, 0, 0, 0, 0, -470, -60, 58, -60, 52, -58], [250, -32, -32, -32, 32, 32, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 14, -14, -8, -12, 40, -8], [-138, -256, -80, -80, 124, 124, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -14, -23, 25, -23, 31, -25], [-9, -41, -59, 9, 53, -53, 0, 0, 0, 0, 0, 0], [-7, 92, 4, 4, -26, -26, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 6, -6, 42, 69, -57, 42], [0, 0, 0, 0, 0, 0, 576, 61, -79, 61, -133, 79], [0, 0, 0, 0, 0, 0, 30, -30, -22, 124, -64, -22], [40, -63, 17, -40, 6, -6, 0, 0, 0, 0, 0, 0], [-8, 3, 123, 123, -93, -93, 0, 0, 0, 0, 0, 0], [-58, 148, 32, 58, -42, 42, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 358, 113, -95, 113, -41, 95], [0, 0, 0, 0, 0, 0, 17, -17, -6, -14, 48, -6], [-202, 60, -108, -108, 66, 66, 0, 0, 0, 0, 0, 0], [-100, 317, 117, 100, 42, -42, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -120, -79, 21, -79, -153, -21], [0, 0, 0, 0, 0, 0, 25, -25, -5, -113, 163, -5], [65, 265, 5, 5, -70, -70, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 46, -46, 22, -56, 148, 22], [0, 0, 0, 0, 0, 0, 362, 33, -39, 33, -57, 39], [68, -110, 26, -68, -52, 52, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -251, -2, 43, -2, 166, -43], [0, 0, 0, 0, 0, 0, 8, -8, -44, -152, 168, -44], [0, 0, 0, 0, 0, 0, -154, -4, -20, -4, -92, 20], [-20, 150, 110, 20, 8, -8, 0, 0, 0, 0, 0, 0], [-760, -39, 57, 57, -33, -33, 0, 0, 0, 0, 0, 0], [-8, -135, -151, 8, 38, -38, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 597, 0, -50, 0, -200, 50], [102, -226, -22, -102, 8, -8, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 44, -44, 16, 199, -111, 16], [0, 0, 0, 0, 0, 0, -27, 27, -17, 47, -101, -17], [0, 0, 0, 0, 0, 0, 460, -46, 78, -46, 174, -78], [-13, 141, 115, 13, 58, -58, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -39, 39, 69, 43, -121, 69], [0, 0, 0, 0, 0, 0, -52, 52, -26, 156, -260, -26], [-1194, 53, 101, 101, -89, -89, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 792, -6, 6, -6, 6, -6], [-829, 62, 54, 54, -56, -56, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 46, -46, -28, -40, 132, -28], [49, 38, 136, -49, -6, 6, 0, 0, 0, 0, 0, 0], [-250, -45, -157, -157, 129, 129, 0, 0, 0, 0, 0, 0], [-8, 114, 98, 8, 94, -94, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -193, -36, 114, -36, 348, -114], [156, 401, 9, 9, -107, -107, 0, 0, 0, 0, 0, 0], [41, 59, 141, -41, 37, -37, 0, 0, 0, 0, 0, 0], [563, -132, 24, 24, 15, 15, 0, 0, 0, 0, 0, 0], [20, -157, -117, -20, 72, -72, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 906, 61, -19, 61, 107, 19], [-644, -117, 67, 67, -21, -21, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -194, -149, 75, -149, -147, -75], [-5, -97, -107, 5, 76, -76, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1162, 59, -67, 59, -91, 67], [0, 0, 0, 0, 0, 0, -181, 181, 11, 73, -435, 11], [0, 0, 0, 0, 0, 0, -18, 18, 66, -176, 140, 66], [-4, -114, -122, 4, -68, 68, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 18, 101, -161, 101, -341, 161], [0, 0, 0, 0, 0, 0, 11, 32, 51, 32, 300, -51], [357, -12, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0], [34, 23, 91, -34, -24, 24, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 43, -36, 44, -36, 68, -44], [0, 0, 0, 0, 0, 0, 23, -23, -18, 220, -174, -18], [-181, 40, -164, -164, 113, 113, 0, 0, 0, 0, 0, 0], [118, -337, -101, -118, -60, 60, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 67, -67, 22, 62, 72, 22], [0, 0, 0, 0, 0, 0, -36, 36, 60, -58, -14, 60], [1539, -23, 17, 17, -7, -7, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -194, -140, 116, -140, 44, -116], [0, 0, 0, 0, 0, 0, -13, 13, -19, -243, 217, -19], [0, 0, 0, 0, 0, 0, -68, 68, 76, 101, -237, 76], [-170, 445, 105, 170, 56, -56, 0, 0, 0, 0, 0, 0], [-808, 58, 74, 74, -70, -70, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 856, 34, -86, 34, -242, 86], [-335, -69, -109, -109, 99, 99, 0, 0, 0, 0, 0, 0], [-32, -96, -160, 32, 30, -30, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 74, -74, -40, 75, 73, -40], [-1380, -27, 85, 85, -57, -57, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -124, 124, 20, 37, -285, 20], [16, -138, -106, -16, -96, 96, 0, 0, 0, 0, 0, 0], [736, -205, -101, -101, 127, 127, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -152, -41, 135, -41, 417, -135], [16, -342, -310, -16, 2, -2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 184, 27, 27, 27, 189, -27], [0, 0, 0, 0, 0, 0, -49, 49, -2, 63, -161, -2], [-186, 294, -78, 186, -32, 32, 0, 0, 0, 0, 0, 0], [-385, 93, 181, 181, -159, -159, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 420, 149, -77, 149, 139, 77], [-169, 448, 110, 169, 25, -25, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 48, -48, 48, 123, -27, 48], [0, 0, 0, 0, 0, 0, -116, 116, 52, 191, -423, 52], [-956, 117, -179, -179, 105, 105, 0, 0, 0, 0, 0, 0], [552, -435, 133, 133, 9, 9, 0, 0, 0, 0, 0, 0], [-95, 301, 111, 95, 25, -25, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1516, 130, -88, 130, 38, 88], [0, 0, 0, 0, 0, 0, -195, 195, 38, -14, -376, 38], [350, -55, 73, 73, -41, -41, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -135, 135, -37, 54, -324, -37], [-86, 102, -70, 86, -118, 118, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 980, 89, -7, 89, 239, 7], [79, -186, -28, -79, -158, 158, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1510, -33, -23, -33, -191, 23], [809, -191, 189, 189, -94, -94, 0, 0, 0, 0, 0, 0], [490, 33, 33, 33, -33, -33, 0, 0, 0, 0, 0, 0], [-107, 239, 25, 107, 5, -5, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -854, -180, 208, -180, 292, -208], [0, 0, 0, 0, 0, 0, 36, -36, 54, 126, -54, 54], [1009, -25, -9, -9, 13, 13, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -118, 118, -58, -229, -7, -58], [155, -533, -223, -155, -12, 12, 0, 0, 0, 0, 0, 0], [-64, 151, 23, 64, -82, 82, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -189, 189, 66, 230, -608, 66], [-461, 108, 40, 40, -57, -57, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 296, 23, 41, 23, 233, -41], [502, 61, 165, 165, -139, -139, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 97, -97, 115, 195, -1, 115], [20, 306, 346, -20, 44, -44, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -682, -97, -51, -97, -495, 51], [-4, 63, 55, 4, 64, -64, 0, 0, 0, 0, 0, 0], [161, -120, -244, -244, 213, 213, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -82, 82, -130, -18, -146, -130], [0, 0, 0, 0, 0, 0, 240, 138, -78, 138, 102, 78], [-41, 24, -58, 41, 151, -151, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 16, -16, 90, 98, -66, 90], [-1239, -172, -100, -100, 118, 118, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -18, 18, 70, -257, 221, 70], [-95, 321, 131, 95, 6, -6, 0, 0, 0, 0, 0, 0], [-412, 297, 9, 9, -81, -81, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 127, 91, -76, 91, -31, 76], [0, 0, 0, 0, 0, 0, -4, 4, -160, 95, -103, -160], [0, 0, 0, 0, 0, 0, 345, -109, 143, -109, 245, -143], [0, 0, 0, 0, 0, 0, 1006, -35, -69, -35, -381, 69], [0, 0, 0, 0, 0, 0, -95, 95, -40, 260, -450, -40], [-506, 100, 268, 268, -226, -226, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1296, 141, -233, 141, -509, 233], [0, 0, 0, 0, 0, 0, -105, 105, 31, 363, -573, 31], [-461, -525, -81, -81, 192, 192, 0, 0, 0, 0, 0, 0], [138, -144, 132, -138, 2, -2, 0, 0, 0, 0, 0, 0], [76, 132, 284, -76, -12, 12, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1861, 119, -62, 119, 109, 62], [0, 0, 0, 0, 0, 0, 56, -56, -170, 100, 12, -170], [76, 305, 17, 17, -89, -89, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 415, 255, -138, 255, 213, 138], [0, 0, 0, 0, 0, 0, 1301, -73, -11, -73, -263, 11], [988, 217, -15, -15, -43, -43, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 592, 79, -65, 79, -23, 65], [0, 0, 0, 0, 0, 0, 2622, -23, 21, -23, 15, -21], [0, 0, 0, 0, 0, 0, 81, -81, -50, -375, 537, -50], [846, -51, -155, -155, 129, 129, 0, 0, 0, 0, 0, 0], [-340, 37, 77, 77, -67, -67, 0, 0, 0, 0, 0, 0], [261, -507, 15, -261, 72, -72, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 12, -12, -138, -177, 201, -138], [786, -184, -80, -80, 106, 106, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 36, -36, 62, -117, 189, 62], [-990, 179, -37, -37, -17, -17, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -173, -390, 273, -390, -78, -273], [-196, 328, -64, 196, -56, 56, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 680, -119, 217, -119, 511, -217], [0, 0, 0, 0, 0, 0, 10, -10, 102, 323, -303, 102], [-792, -138, 102, 102, -42, -42, 0, 0, 0, 0, 0, 0], [168, -289, 47, -168, -146, 146, 0, 0, 0, 0, 0, 0], [-124, 472, 224, 124, 30, -30, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -28, 28, -74, -156, 100, -74], [0, 0, 0, 0, 0, 0, -19, 19, -159, 109, -147, -159], [-85, 135, -35, 85, 192, -192, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 502, 79, -53, 79, 25, 53], [-42, 111, 27, 42, -192, 192, 0, 0, 0, 0, 0, 0], [-850, 77, -147, -147, 91, 91, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -142, 142, -30, -59, -225, -30], [84, -351, -183, -84, -56, 56, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1587, -119, 58, -119, -125, -58], [0, 0, 0, 0, 0, 0, -2551, 47, -77, 47, -167, 77], [0, 0, 0, 0, 0, 0, -52, 52, 102, 58, -162, 102], [-1462, 407, -257, -257, 91, 91, 0, 0, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1200_c_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1200_3_c_l();".
// 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_1200_3_c_l(:prec:=12)
    chi := MakeCharacter_1200_c();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 3));
    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_1200_3_c_l();".
// 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_1200_3_c_l( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1200_c();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<7,R![9216, 0, 5440, 0, 185, 0, 1]>,<11,R![161312, 0, 15129, 0, 246, 0, 1]>],Snew);
    return Vf;
end function;