
// Make newform 1100.4.b.j in Magma, downloaded from the LMFDB on 02 January 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_1100_b();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1100_b_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_1100_4_b_j();".
// 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_1100_4_b_j();".
// 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 := [7371225, 0, 3893659, 0, 358849, 0, 12537, 0, 187, 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], [34976596, 0, 3654376, 0, 156878, 0, 2478, 0, 11, 0], [-51966928, 0, 6790343, 0, 470634, 0, 7434, 0, 33, 0], [0, -7507274977, 0, 5412728, 0, 8341704, 0, 194909, 0, 1202], [276192954, 0, 430998241, 0, 33765948, 0, 780408, 0, 5485, 0], [-12682445409, 0, -3085545094, 0, -155997792, 0, -2883987, 0, -17854, 0], [0, -2975630467, 0, 5412728, 0, 8341704, 0, 194909, 0, 1202], [0, 419575647051, 0, 82260737921, 0, 3817507563, 0, 66177288, 0, 388739], [0, -3547368286641, 0, -100065977821, 0, 7581043422, 0, 288175797, 0, 2432051], [0, -904160923353, 0, -133301992558, 0, -6806205234, 0, -132334119, 0, -847102]];
    Rf_basisdens := [1, 834557, 1669114, 4531644510, 15022026, 45066078, 906328902, 20392400295, 40784800590, 13594933530];
    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_1100_b();"
function MakeCharacter_1100_b()
    N := 1100;
    order := 2;
    char_gens := [551, 177, 101];
    v := [2, 1, 2];
    // 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_1100_b_Hecke();"
function MakeCharacter_1100_b_Hecke(Kf)
    N := 1100;
    order := 2;
    char_gens := [551, 177, 101];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 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]];
    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 := 4;
    raw_aps := [[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, 2, -1, 0, 0], [11, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, -2, 0, 0, -1, -1, 0, 1], [0, 0, 0, -7, 0, 0, 4, 1, 0, 1], [0, -2, 2, 0, -1, 0, 0, 0, 0, 0], [0, 0, 0, -5, 0, 0, -1, -2, 1, -1], [-31, 3, 4, 0, 0, 1, 0, 0, 0, 0], [12, -4, -2, 0, 2, -1, 0, 0, 0, 0], [0, 0, 0, -18, 0, 0, 2, 0, 2, -1], [14, 0, 1, 0, -6, 1, 0, 0, 0, 0], [0, 0, 0, -16, 0, 0, 11, 2, -2, -3], [0, 0, 0, -6, 0, 0, 20, -6, -1, -2], [0, 0, 0, 1, 0, 0, -14, -3, -3, -1], [-139, 8, 5, 0, 3, -3, 0, 0, 0, 0], [-200, 1, -6, 0, 3, 2, 0, 0, 0, 0], [0, 0, 0, -84, 0, 0, 42, 24, 2, 0], [-329, 6, 7, 0, -7, 6, 0, 0, 0, 0], [0, 0, 0, -21, 0, 0, -40, 14, -2, 1], [-267, 7, 11, 0, -16, -3, 0, 0, 0, 0], [0, 0, 0, 27, 0, 0, -37, -18, -7, -2], [-242, -17, -4, 0, 20, -2, 0, 0, 0, 0], [0, 0, 0, -15, 0, 0, 99, 31, 1, -12], [-379, 7, -15, 0, 8, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, -55, -24, 8, -11], [0, 0, 0, -4, 0, 0, 209, -9, -3, 10], [-865, 9, -6, 0, 8, 9, 0, 0, 0, 0], [0, 0, 0, 58, 0, 0, -92, -10, 10, 5], [0, 0, 0, -11, 0, 0, 128, 4, 13, -3], [-403, 55, 17, 0, -3, -13, 0, 0, 0, 0], [0, 0, 0, 17, 0, 0, 157, 29, -1, -5], [-574, 2, -40, 0, -7, 8, 0, 0, 0, 0], [-878, 16, -42, 0, -24, -6, 0, 0, 0, 0], [119, 20, 47, 0, 2, -12, 0, 0, 0, 0], [0, 0, 0, 128, 0, 0, 142, 24, -10, 30], [0, 0, 0, -79, 0, 0, -278, 4, 17, -4], [0, 0, 0, -108, 0, 0, 190, -37, 7, 19], [0, 0, 0, 244, 0, 0, -29, -43, 6, 13], [111, -89, -60, 0, -19, -19, 0, 0, 0, 0], [-1735, -21, -32, 0, 20, 10, 0, 0, 0, 0], [219, -19, 42, 0, 17, -18, 0, 0, 0, 0], [0, 0, 0, 48, 0, 0, -152, 126, -4, 14], [0, 0, 0, 69, 0, 0, 207, -52, 32, -14], [-465, -13, -68, 0, 15, 6, 0, 0, 0, 0], [-685, 20, 47, 0, -16, 18, 0, 0, 0, 0], [0, 0, 0, -286, 0, 0, -460, 164, -13, 34], [0, 0, 0, -407, 0, 0, 161, 148, 1, -10], [-619, -53, 7, 0, 37, -4, 0, 0, 0, 0], [0, 0, 0, -227, 0, 0, 122, -2, 18, -35], [874, -113, -84, 0, -18, 15, 0, 0, 0, 0], [700, -9, -21, 0, -39, -29, 0, 0, 0, 0], [276, 35, 57, 0, -16, 30, 0, 0, 0, 0], [0, 0, 0, -80, 0, 0, 439, -140, 6, 15], [0, 0, 0, 30, 0, 0, 306, -163, -17, -9], [-403, 177, 191, 0, -37, -16, 0, 0, 0, 0], [1583, 58, 49, 0, 22, -30, 0, 0, 0, 0], [0, 0, 0, -252, 0, 0, -270, -79, -8, -50], [-2238, -92, 23, 0, -18, 7, 0, 0, 0, 0], [0, 0, 0, -55, 0, 0, -472, -90, 17, -1], [0, 0, 0, 0, 0, 0, 610, -2, 0, 14], [0, 0, 0, -589, 0, 0, 112, -64, -31, 59], [1742, 62, 92, 0, 34, -1, 0, 0, 0, 0], [0, 0, 0, -706, 0, 0, 110, -72, -20, 52], [0, 0, 0, -75, 0, 0, -322, -161, -11, 16], [-231, 46, 25, 0, 59, 19, 0, 0, 0, 0], [0, 0, 0, 88, 0, 0, -582, -94, 30, 64], [0, 0, 0, -427, 0, 0, -126, 173, 14, -48], [495, 0, -186, 0, -11, 21, 0, 0, 0, 0], [0, 0, 0, 228, 0, 0, 411, -92, -8, -4], [1384, 28, -130, 0, -90, 24, 0, 0, 0, 0], [0, 0, 0, -441, 0, 0, 847, -78, -5, 33], [0, 0, 0, 62, 0, 0, 578, -175, -16, -14], [323, 350, 311, 0, 29, -25, 0, 0, 0, 0], [0, 0, 0, 132, 0, 0, 595, -202, -40, 23], [-2192, -164, 48, 0, 170, -26, 0, 0, 0, 0], [0, 0, 0, -625, 0, 0, -696, 257, 23, -8], [-2555, 76, -55, 0, 125, 64, 0, 0, 0, 0], [4770, -50, 229, 0, 76, 37, 0, 0, 0, 0], [2631, 110, -99, 0, 49, -47, 0, 0, 0, 0], [23, 169, 240, 0, -100, 20, 0, 0, 0, 0], [3557, 158, 31, 0, -196, -2, 0, 0, 0, 0], [0, 0, 0, -748, 0, 0, -65, -144, 90, -64], [8115, 3, -75, 0, -154, 23, 0, 0, 0, 0], [0, 0, 0, 470, 0, 0, -280, 214, 52, -162], [984, -125, -23, 0, -183, 16, 0, 0, 0, 0], [0, 0, 0, 1213, 0, 0, -100, -238, 64, -77], [1924, 14, 153, 0, 64, 33, 0, 0, 0, 0], [0, 0, 0, 658, 0, 0, -803, -270, -17, 125], [0, 0, 0, 170, 0, 0, -438, -374, -123, -18], [3615, -280, -489, 0, 116, 24, 0, 0, 0, 0], [0, 0, 0, 1874, 0, 0, -579, -38, 19, 17], [5060, 114, 120, 0, 133, 66, 0, 0, 0, 0], [5765, 163, 230, 0, -127, -65, 0, 0, 0, 0], [0, 0, 0, 2306, 0, 0, 94, -114, -10, 116], [1165, -279, -490, 0, 46, 34, 0, 0, 0, 0], [-3897, -334, 265, 0, -167, -32, 0, 0, 0, 0], [0, 0, 0, 1168, 0, 0, -1687, -276, -58, -95], [10517, -147, -17, 0, 176, -26, 0, 0, 0, 0], [0, 0, 0, 183, 0, 0, -71, 191, 4, 185], [0, 0, 0, 1302, 0, 0, -1917, -347, -14, -37], [0, 0, 0, -1167, 0, 0, 298, -385, 26, 56], [-3542, -607, -588, 0, -33, 16, 0, 0, 0, 0], [7041, 141, 95, 0, -207, 143, 0, 0, 0, 0], [0, 0, 0, -2307, 0, 0, 760, -431, 35, 8], [0, 0, 0, -81, 0, 0, 1170, 42, 22, -200], [0, 0, 0, -304, 0, 0, 546, 83, 108, 28], [-5106, 415, 395, 0, 128, 50, 0, 0, 0, 0], [24, 337, 238, 0, 99, -72, 0, 0, 0, 0], [0, 0, 0, 220, 0, 0, -198, -664, 0, -80], [0, 0, 0, 1383, 0, 0, 1406, -145, 58, -173], [0, 0, 0, 98, 0, 0, 665, -78, 42, 37], [11043, -172, 57, 0, -221, -37, 0, 0, 0, 0], [-5415, -275, -204, 0, 437, 61, 0, 0, 0, 0], [-8001, 560, 60, 0, 114, -136, 0, 0, 0, 0], [0, 0, 0, -1960, 0, 0, -1128, 50, -66, 30], [0, 0, 0, -420, 0, 0, -1116, -138, 79, 124], [0, 0, 0, -1159, 0, 0, -420, 535, -119, 118], [9886, -113, 376, 0, 81, 39, 0, 0, 0, 0], [5718, -2, 197, 0, -23, -34, 0, 0, 0, 0], [0, 0, 0, -3044, 0, 0, 224, -83, 32, 14], [0, 0, 0, -234, 0, 0, 1485, -122, -52, 183], [0, 0, 0, -1442, 0, 0, -184, -536, 99, 100], [8151, -373, -450, 0, 31, 93, 0, 0, 0, 0], [-8213, 412, 645, 0, -87, 132, 0, 0, 0, 0], [6534, 100, 652, 0, 52, -86, 0, 0, 0, 0], [-6189, -226, 369, 0, -173, -107, 0, 0, 0, 0], [0, 0, 0, -1599, 0, 0, 3523, 284, -20, -91], [0, 0, 0, -148, 0, 0, 511, -761, 116, -85], [9406, 967, 824, 0, -66, -179, 0, 0, 0, 0], [0, 0, 0, -449, 0, 0, -2028, 571, 50, 250], [10503, -343, 130, 0, -23, 102, 0, 0, 0, 0], [0, 0, 0, 544, 0, 0, -1018, -572, -72, -439], [2594, -88, -208, 0, -264, 78, 0, 0, 0, 0], [4508, 80, -185, 0, 474, -245, 0, 0, 0, 0], [0, 0, 0, -2055, 0, 0, 872, 3, 63, 251], [0, 0, 0, 360, 0, 0, 4470, -105, 11, 153], [0, 0, 0, -2863, 0, 0, 2114, -179, -163, -188], [-19812, -4, 170, 0, -346, 66, 0, 0, 0, 0], [-2275, 372, -401, 0, 204, 48, 0, 0, 0, 0], [1311, -684, 263, 0, -63, 96, 0, 0, 0, 0], [0, 0, 0, -764, 0, 0, -2596, 726, 168, -214], [0, 0, 0, -4142, 0, 0, -1715, -130, -134, 197], [-7199, 199, 327, 0, -123, 88, 0, 0, 0, 0], [-10421, 403, -478, 0, 127, 137, 0, 0, 0, 0], [0, 0, 0, 4067, 0, 0, -1450, -1179, 106, -71], [0, 0, 0, 178, 0, 0, 284, 371, 212, -296], [2500, 82, 326, 0, 148, 78, 0, 0, 0, 0], [0, 0, 0, 2132, 0, 0, 191, -758, 67, -351], [0, 0, 0, -1872, 0, 0, 31, 90, 212, -71], [-23914, 241, 25, 0, 217, -74, 0, 0, 0, 0], [0, 0, 0, -224, 0, 0, -1852, -714, -281, 186], [0, 0, 0, 2162, 0, 0, -1168, 1059, -67, -171], [0, 0, 0, -2612, 0, 0, 3954, 364, 206, 224], [8640, -416, 42, 0, -644, -66, 0, 0, 0, 0], [-10710, -1044, -484, 0, 96, -14, 0, 0, 0, 0], [-4771, -422, -352, 0, 456, -310, 0, 0, 0, 0], [0, 0, 0, 1996, 0, 0, -1134, -86, 158, 2], [-24306, 288, -121, 0, 198, -39, 0, 0, 0, 0], [0, 0, 0, -206, 0, 0, 5754, -1426, -79, 32], [0, 0, 0, 2316, 0, 0, 3282, 162, 132, 42], [0, 0, 0, -323, 0, 0, -1514, 782, -47, 177], [12803, -395, -158, 0, 203, -135, 0, 0, 0, 0], [0, 0, 0, -1138, 0, 0, -156, 176, -274, 369], [0, 0, 0, -936, 0, 0, -1651, -554, 60, 267], [-7786, -223, 497, 0, -292, 6, 0, 0, 0, 0], [0, 0, 0, 391, 0, 0, -1138, -691, -8, 121], [11162, -318, -315, 0, -426, 173, 0, 0, 0, 0], [0, 0, 0, 3618, 0, 0, 1290, -250, -6, 254], [-6853, -227, 343, 0, -165, 137, 0, 0, 0, 0], [28567, 197, 684, 0, 240, -54, 0, 0, 0, 0], [-10137, -687, 83, 0, -146, 233, 0, 0, 0, 0], [0, 0, 0, 2189, 0, 0, -1244, 418, -112, 401], [3978, -174, 194, 0, -428, 447, 0, 0, 0, 0], [-33471, -1332, -315, 0, 93, -72, 0, 0, 0, 0], [-8145, 352, 367, 0, -259, 28, 0, 0, 0, 0], [-4952, 84, -529, 0, 273, 278, 0, 0, 0, 0], [0, 0, 0, -1066, 0, 0, -5198, 1192, -76, 116], [22021, -148, -19, 0, -429, 152, 0, 0, 0, 0], [0, 0, 0, 2502, 0, 0, -1147, 1286, -12, 491], [-4636, 951, 42, 0, 274, -339, 0, 0, 0, 0], [0, 0, 0, 1154, 0, 0, -5738, 1106, -118, 231], [0, 0, 0, -520, 0, 0, 1326, 172, 164, 44], [0, 0, 0, 2910, 0, 0, 612, 968, -67, 34], [14076, 252, -1131, 0, 607, -136, 0, 0, 0, 0], [0, 0, 0, 3974, 0, 0, 4563, 428, 172, 21], [0, 0, 0, -3067, 0, 0, -5714, -402, 29, -284], [21218, -236, -153, 0, 272, -29, 0, 0, 0, 0], [5986, -76, -96, 0, 852, -62, 0, 0, 0, 0], [0, 0, 0, 1645, 0, 0, -6515, 443, 119, 173], [0, 0, 0, 1892, 0, 0, 1169, -1356, 156, -575], [6751, -916, 209, 0, -645, 99, 0, 0, 0, 0], [-19927, -659, -451, 0, -397, -204, 0, 0, 0, 0], [0, 0, 0, 3337, 0, 0, -2657, -1169, -38, -401], [0, 0, 0, 1538, 0, 0, -457, 1074, 54, -110], [35556, -242, -658, 0, -534, 78, 0, 0, 0, 0], [0, 0, 0, -842, 0, 0, -2880, 1176, 70, -107], [0, 0, 0, 4403, 0, 0, -980, -1586, 26, -597], [0, 0, 0, -3469, 0, 0, 7212, 1348, -141, 15], [-369, -353, 855, 0, 16, 90, 0, 0, 0, 0], [14732, 1441, 748, 0, 54, -35, 0, 0, 0, 0], [0, 0, 0, 6697, 0, 0, -1072, -673, -69, 516], [-26516, 793, 57, 0, 841, -171, 0, 0, 0, 0], [-4426, 520, -24, 0, -870, -298, 0, 0, 0, 0], [0, 0, 0, -1687, 0, 0, -1024, -473, -397, 505], [36886, 316, 1004, 0, 230, 116, 0, 0, 0, 0], [0, 0, 0, -7466, 0, 0, 4039, 729, 181, -174], [8146, -372, -422, 0, 1000, 364, 0, 0, 0, 0], [-12267, -1251, 256, 0, 371, -393, 0, 0, 0, 0], [0, 0, 0, 978, 0, 0, -1676, -1317, 160, 564], [-292, 574, -369, 0, -199, 258, 0, 0, 0, 0], [0, 0, 0, 2615, 0, 0, -5466, 1244, 285, -18], [0, 0, 0, 3694, 0, 0, -5642, -2506, 70, 182], [5097, -946, 139, 0, -688, -480, 0, 0, 0, 0], [11815, -442, -1615, 0, 221, -74, 0, 0, 0, 0], [0, 0, 0, -1556, 0, 0, -7158, -648, -100, -38], [19632, -223, 679, 0, -609, -259, 0, 0, 0, 0], [0, 0, 0, -985, 0, 0, -7627, 220, -153, 173], [0, 0, 0, -4973, 0, 0, 3016, -1235, 71, 179], [5810, -993, -1899, 0, -169, 25, 0, 0, 0, 0], [40721, 44, -1177, 0, 866, -130, 0, 0, 0, 0], [4615, 204, 41, 0, 767, -558, 0, 0, 0, 0], [0, 0, 0, -173, 0, 0, -2378, -1354, -140, 406], [0, 0, 0, -4780, 0, 0, -1714, -743, 243, -493], [42219, 2370, 524, 0, -107, 249, 0, 0, 0, 0], [0, 0, 0, -2553, 0, 0, -2414, 937, 287, -839], [36711, -46, 863, 0, 323, -390, 0, 0, 0, 0], [0, 0, 0, -2876, 0, 0, 7696, 314, -178, -848], [44430, -353, 48, 0, -5, -537, 0, 0, 0, 0], [0, 0, 0, 2703, 0, 0, -7372, 1999, -133, 277], [33498, 596, 1028, 0, 119, 112, 0, 0, 0, 0], [35163, -80, -1765, 0, 386, 118, 0, 0, 0, 0], [948, -1890, -1645, 0, 712, 239, 0, 0, 0, 0], [0, 0, 0, 437, 0, 0, 944, -298, -198, -502], [0, 0, 0, 7170, 0, 0, -14306, -1345, -241, -295], [2241, -1302, 265, 0, -1083, 244, 0, 0, 0, 0], [0, 0, 0, -6423, 0, 0, 6449, 1052, 176, 504], [-13764, 1417, 977, 0, -38, 60, 0, 0, 0, 0], [-26337, 703, 1038, 0, -1113, -203, 0, 0, 0, 0], [0, 0, 0, 5816, 0, 0, 8192, 72, -17, 596], [31136, -1026, 716, 0, 100, 218, 0, 0, 0, 0], [0, 0, 0, -1734, 0, 0, -755, -132, 290, -787], [33036, 1552, -1063, 0, -129, 266, 0, 0, 0, 0], [0, 0, 0, 1502, 0, 0, -4048, 2590, 240, 1064], [-1662, 2067, 2384, 0, -86, 47, 0, 0, 0, 0], [0, 0, 0, 2819, 0, 0, -5241, 3630, -131, -11], [-11469, 479, -876, 0, -477, 347, 0, 0, 0, 0], [6706, -417, 1596, 0, -801, -267, 0, 0, 0, 0], [0, 0, 0, -5402, 0, 0, 7358, -848, -50, 500], [0, 0, 0, 9134, 0, 0, -12537, -1414, -422, -597], [-28500, -1812, -1163, 0, 262, 491, 0, 0, 0, 0], [0, 0, 0, -5150, 0, 0, -413, 2002, -22, 701], [47787, 236, 988, 0, -762, -204, 0, 0, 0, 0], [0, 0, 0, -2263, 0, 0, 9983, 400, -228, -352], [-15069, 178, -1539, 0, -377, 420, 0, 0, 0, 0], [8882, 650, -1447, 0, 1241, 390, 0, 0, 0, 0], [0, 0, 0, 838, 0, 0, -4546, -2087, 31, -1305], [0, 0, 0, 3213, 0, 0, -11668, -2085, 267, 281], [0, 0, 0, 404, 0, 0, -2678, 1524, -660, 688], [0, 0, 0, 6876, 0, 0, 2740, -434, 390, -8], [0, 0, 0, -9506, 0, 0, 2241, 4050, -164, 629], [30781, -44, 202, 0, 771, -557, 0, 0, 0, 0], [0, 0, 0, 5817, 0, 0, -1923, -553, 0, -254], [0, 0, 0, -6318, 0, 0, -1757, 26, 124, -542], [-3726, -1966, -1676, 0, 78, -102, 0, 0, 0, 0], [-11074, 1596, -2333, 0, 443, 326, 0, 0, 0, 0], [5414, -875, 1695, 0, 59, -114, 0, 0, 0, 0], [0, 0, 0, -4948, 0, 0, -1683, -55, 99, 486], [0, 0, 0, 2378, 0, 0, -3258, 1801, 284, 578], [21514, 1874, 458, 0, 962, 736, 0, 0, 0, 0], [0, 0, 0, 13296, 0, 0, -5938, -862, -301, -26], [0, 0, 0, 9742, 0, 0, -11433, -906, 62, -241], [28091, -10, 403, 0, -900, 520, 0, 0, 0, 0], [0, 0, 0, -4063, 0, 0, 14790, -1011, 62, 449], [0, 0, 0, -7846, 0, 0, -5901, 2110, 505, -867], [0, 0, 0, 12480, 0, 0, -4460, 980, 380, 788], [62314, 1173, 147, 0, 489, -9, 0, 0, 0, 0], [10188, 923, -254, 0, -629, -258, 0, 0, 0, 0], [40261, 1576, -1315, 0, 1078, -124, 0, 0, 0, 0], [0, 0, 0, -5479, 0, 0, 534, 1082, 301, 239], [-26689, -2368, -2531, 0, -219, -592, 0, 0, 0, 0], [0, 0, 0, 1439, 0, 0, -1952, -2001, -750, -450], [102199, 638, 172, 0, -189, 93, 0, 0, 0, 0], [0, 0, 0, 4909, 0, 0, 4315, 113, 20, -347], [-34261, -436, -733, 0, 367, -646, 0, 0, 0, 0], [0, 0, 0, -3487, 0, 0, 2779, -4259, -241, 1433], [0, 0, 0, -3047, 0, 0, -7307, -306, -504, -502], [-6126, 421, 1167, 0, 376, 361, 0, 0, 0, 0], [-36724, 1217, -649, 0, 481, 47, 0, 0, 0, 0], [46040, 2808, 1531, 0, 97, -516, 0, 0, 0, 0], [0, 0, 0, -430, 0, 0, 8974, 424, 363, -128], [0, 0, 0, 6084, 0, 0, -3648, -234, 582, 636], [-52298, -1145, 632, 0, -873, 135, 0, 0, 0, 0], [0, 0, 0, -6170, 0, 0, -3391, -1587, -138, -973], [20355, -1379, -367, 0, -1618, 908, 0, 0, 0, 0], [1470, -1564, -58, 0, -1478, 57, 0, 0, 0, 0], [0, 0, 0, 4942, 0, 0, -4334, -4178, -378, -291], [36199, 2484, -693, 0, 1505, 462, 0, 0, 0, 0], [0, 0, 0, -1718, 0, 0, 5, -1071, 161, 420], [0, 0, 0, 8840, 0, 0, -12216, -1551, -2, 950], [0, 0, 0, 584, 0, 0, 9535, -2064, 88, -839], [-38248, 3253, 4500, 0, -888, -135, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1100_b_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1100_4_b_j();".
// 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_1100_4_b_j(:prec:=10)
    chi := MakeCharacter_1100_b();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 4));
    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_1100_4_b_j();".
// 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_1100_4_b_j( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1100_b();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<3,R![19589476, 0, 5091089, 0, 395506, 0, 13171, 0, 194, 0, 1]>,<7,R![373443210000, 0, 25405989841, 0, 433936018, 0, 1655199, 0, 2242, 0, 1]>],Snew);
    return Vf;
end function;