
// Make newform 1050.3.l.b in Magma, downloaded from the LMFDB on 16 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1050_l();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1050_l_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_1050_3_l_b();".
// 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_1050_3_l_b();".
// 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, 0, 0, 0, 23, 0, 0, 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, 19, 0, 0, 0, 1, 0, 0], [0, 29, 0, 0, 0, 1, 0, 0], [0, 0, 24, 0, 0, 0, 1, 0], [23, 0, 0, 0, 2, 0, 0, 0], [0, 0, -22, 0, 0, 0, -1, 0], [0, 0, 0, -91, 0, 0, 0, -4], [0, 0, 0, 139, 0, 0, 0, 6]];
    Rf_basisdens := [1, 5, 5, 5, 5, 1, 5, 5];
    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_1050_l();"
function MakeCharacter_1050_l()
    N := 1050;
    order := 4;
    char_gens := [701, 127, 451];
    v := [4, 3, 4];
    // 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_1050_l_Hecke();"
function MakeCharacter_1050_l_Hecke(Kf)
    N := 1050;
    order := 4;
    char_gens := [701, 127, 451];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0], [1, 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 := [[-1, 0, 0, -1, 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], [-1, 5, 1, 0, 1, 0, 5, -1], [-1, 0, 0, 1, -1, -1, -2, 0], [4, -3, 1, 4, 0, 0, 0, 0], [0, -1, -4, 0, 0, -2, 1, -4], [5, 0, 0, -5, 2, 2, 0, -2], [0, -2, 2, 8, 0, -2, 2, 2], [18, 2, -3, 0, 4, 0, 2, 3], [-20, 8, -12, -20, -1, 1, 0, 0], [-40, -15, -6, 0, 4, 0, -15, 6], [4, 0, 0, -4, -2, -2, -6, -14], [18, 10, -2, 18, -4, 4, 0, 0], [25, 0, 0, -25, -1, -1, 12, -2], [0, -12, 6, 8, 0, -16, 12, 6], [36, -4, 2, 0, 14, 0, -4, -2], [-10, 12, 4, -10, 12, -12, 0, 0], [-35, 1, -1, 0, 5, 0, 1, 1], [-39, 0, 0, 39, 5, 5, 22, -20], [0, -6, -20, -24, 0, -16, 6, -20], [40, 0, 0, -40, -2, -2, -38, 10], [0, 10, 15, 4, 0, -16, -10, 15], [3, 6, -8, 3, 17, -17, 0, 0], [40, -18, 9, 0, 20, 0, -18, -9], [-42, 0, 0, 42, 0, 0, 12, -2], [-23, -20, 38, -23, -2, 2, 0, 0], [0, 20, -4, -32, 0, 8, -20, -4], [-5, 0, 0, 5, 7, 7, 40, 30], [22, -82, 10, 22, 10, -10, 0, 0], [-30, 46, 4, 0, 14, 0, 46, -4], [-27, 6, -12, -27, 17, -17, 0, 0], [0, -6, -23, 66, 0, 12, 6, -23], [0, 58, 30, -34, 0, -16, -58, 30], [2, 54, 4, 0, 18, 0, 54, -4], [-35, -28, 50, -35, -19, 19, 0, 0], [-50, 0, 0, 50, 6, 6, -70, -6], [62, -44, 24, 62, 18, -18, 0, 0], [-6, 0, 0, 6, 18, 18, -13, -3], [0, -19, 3, -115, 0, 27, 19, 3], [-162, -8, 34, 0, 4, 0, -8, -34], [145, 27, -49, 0, 23, 0, 27, 49], [130, 0, 0, -130, -13, -13, 44, -60], [75, -24, 18, 75, 27, -27, 0, 0], [0, 3, -28, -88, 0, -18, -3, -28], [86, -68, -24, 0, -10, 0, -68, 24], [16, 0, 0, -16, -30, -30, -30, -8], [-118, 14, -82, -118, 6, -6, 0, 0], [0, -4, -24, 176, 0, 6, 4, -24], [-133, 0, 0, 133, 9, 9, 102, -48], [0, -11, 37, 115, 0, -29, 11, 37], [-56, -54, -22, 0, 38, 0, -54, 22], [32, -42, -44, 0, -12, 0, -42, 44], [34, 163, -19, 34, 6, -6, 0, 0], [-62, 0, 0, 62, -41, -41, 46, 28], [0, -98, 51, -92, 0, 36, 98, 51], [-130, 14, 5, 0, -64, 0, 14, -5], [72, 56, 4, 72, 3, -3, 0, 0], [52, -78, 6, 0, -26, 0, -78, -6], [-20, 0, 0, 20, -26, -26, 14, -64], [22, 0, 0, -22, -38, -38, -89, -33], [240, 92, 84, 240, -28, 28, 0, 0], [-170, -68, 62, 0, -62, 0, -68, -62], [-25, 0, 0, 25, 3, 3, -32, -54], [-117, -64, 102, -117, -11, 11, 0, 0], [26, 120, 28, 0, -50, 0, 120, -28], [-127, -244, 52, -127, -20, 20, 0, 0], [42, 50, 24, 42, -37, 37, 0, 0], [0, -58, -48, 160, 0, 18, 58, -48], [64, 0, 0, -64, -24, -24, -99, 33], [0, 67, -85, 269, 0, -11, -67, -85], [12, -86, 48, 12, 50, -50, 0, 0], [73, 0, 0, -73, -16, -16, -124, 68], [0, -138, -32, -390, 0, -22, 138, -32], [142, 0, 0, -142, -52, -52, -68, 96], [0, 70, 8, 202, 0, -16, -70, 8], [119, 28, 38, 119, -19, 19, 0, 0], [-338, 78, -72, 0, -60, 0, 78, 72], [0, 68, -66, 154, 0, 48, -68, -66], [0, 24, 32, -196, 0, -8, -24, 32], [24, -140, -4, 0, -2, 0, -140, 4], [-83, 21, 99, 0, -19, 0, 21, -99], [13, 0, 0, -13, 37, 37, -56, -6], [0, 143, -56, -204, 0, -22, -143, -56], [186, 0, 0, -186, -27, -27, 206, -144], [0, -54, -26, -366, 0, 0, 54, -26], [-221, 128, -92, -221, -14, 14, 0, 0], [-20, 155, 6, 0, 40, 0, 155, -6], [-12, 0, 0, 12, -4, -4, 230, 2], [96, 254, -22, 96, -12, 12, 0, 0], [0, -4, 2, 514, 0, 38, 4, 2], [298, -130, -78, 298, -32, 32, 0, 0], [297, -187, 59, 0, 57, 0, -187, -59], [0, -68, 102, 134, 0, 14, 68, 102], [52, 0, 0, -52, 30, 30, 116, -116], [0, 45, -6, -188, 0, 100, -45, -6], [56, -78, 99, 0, 48, 0, -78, -99], [-202, 0, 0, 202, 12, 12, -36, -82], [-496, 192, 20, 0, 16, 0, 192, -20], [-12, -128, -56, -12, -78, 78, 0, 0], [-167, 4, 2, -167, 15, -15, 0, 0], [124, 0, 0, -124, 34, 34, -64, -36], [0, -102, 24, 190, 0, 88, 102, 24], [284, -52, -12, 0, -4, 0, -52, 12], [91, -100, 102, 91, 43, -43, 0, 0], [-122, 388, -16, -122, -24, 24, 0, 0], [92, 0, 0, -92, 28, 28, -339, -41], [0, 5, -47, -125, 0, -109, -5, -47], [232, 42, -136, 0, -14, 0, 42, 136], [-376, 74, -104, -376, -30, 30, 0, 0], [293, 0, 0, -293, 82, 82, -92, -112], [31, -378, 108, 31, 41, -41, 0, 0], [0, -14, -25, -70, 0, 80, 14, -25], [376, -172, 62, 0, 68, 0, -172, -62], [-240, -16, -36, 0, 122, 0, -16, 36], [-180, 0, 0, 180, -28, -28, -148, 84], [-36, -196, -52, -36, 40, -40, 0, 0], [-495, 0, 0, 495, 75, 75, -94, 80], [0, -215, -25, -183, 0, -41, 215, -25], [-464, -92, -82, 0, 118, 0, -92, 82], [204, 0, 0, -204, 35, 35, 76, 328], [250, 193, -79, 250, 50, -50, 0, 0], [-386, 0, 0, 386, 3, 3, 94, -204], [-498, 62, -183, 0, -40, 0, 62, 183], [-4, -52, -80, 0, -78, 0, -52, 80], [0, -192, -148, -280, 0, -16, 192, -148], [0, 144, 26, -500, 0, 44, -144, 26], [24, -168, 20, 24, -24, 24, 0, 0], [49, 0, 0, -49, 45, 45, -198, -8], [0, -80, 168, -108, 0, -24, 80, 168], [-70, 0, 0, 70, -97, -97, 170, -96], [154, 158, 30, 0, 18, 0, 158, -30], [191, -168, -32, 191, 72, -72, 0, 0], [888, -137, -2, 0, 52, 0, -137, 2], [0, -142, -68, 572, 0, 34, 142, -68], [-366, 0, 0, 366, 54, 54, 111, -169], [-486, 208, 30, -486, -56, 56, 0, 0], [-394, 99, 187, -394, -2, 2, 0, 0], [0, 88, 118, -16, 0, 58, -88, 118], [426, 22, -33, 0, -16, 0, 22, 33], [424, 96, 14, 0, 134, 0, 96, -14], [118, 0, 0, -118, -30, -30, -422, 138], [63, -344, -26, 63, 10, -10, 0, 0], [0, 50, 36, -758, 0, -152, -50, 36], [0, 2, -38, -414, 0, -118, -2, -38], [125, 0, 0, -125, 123, 123, 272, 38], [38, 37, -13, 38, -150, 150, 0, 0], [0, -165, 48, -196, 0, 90, 165, 48], [-289, 0, 0, 289, -86, -86, -52, 30], [113, -156, -192, 113, -10, 10, 0, 0], [-292, -14, -89, 0, -116, 0, -14, 89], [272, 0, 0, -272, -36, -36, 188, 152], [-108, 126, 210, -108, -10, 10, 0, 0], [210, -136, -136, 210, -110, 110, 0, 0], [-1089, -143, -31, 0, 25, 0, -143, 31], [0, -136, 160, -378, 0, 6, 136, 160], [0, 115, -66, -408, 0, -140, -115, -66], [-85, 396, 126, -85, 25, -25, 0, 0], [536, -77, -30, 0, 136, 0, -77, 30], [114, -134, -296, 114, -109, 109, 0, 0], [321, 0, 0, -321, 121, 121, 368, 26], [212, -248, 104, 212, 82, -82, 0, 0], [330, 0, 48, 0, -90, 0, 0, -48], [-243, -50, 320, -243, 91, -91, 0, 0], [92, 0, 0, -92, -36, -36, 58, -238], [902, -92, 92, 0, 150, 0, -92, -92], [-181, -36, -170, -181, -179, 179, 0, 0], [0, 112, 12, 924, 0, 172, -112, 12], [246, 0, 0, -246, -102, -102, 109, 181], [0, 33, -163, 335, 0, 119, -33, -163], [210, 232, 52, 0, -72, 0, 232, -52], [-93, 195, 285, 0, -37, 0, 195, -285], [146, 0, 0, -146, -19, -19, 56, 384], [0, 267, 8, 20, 0, -174, -267, 8], [0, -141, 338, 360, 0, 16, 141, 338], [372, -90, -76, 0, -132, 0, -90, 76], [-522, -282, 28, 0, -132, 0, -282, -28], [244, 0, 0, -244, -108, -108, 76, 112], [0, 406, -122, -506, 0, 64, -406, -122], [-254, -688, 4, -254, 52, -52, 0, 0], [-894, 376, -36, 0, -74, 0, 376, 36], [302, 0, 0, -302, -33, -33, 420, -156], [904, -23, 139, 904, -76, 76, 0, 0], [-290, 0, 0, 290, 51, 51, -2, 180], [0, 251, 18, 588, 0, -96, -251, 18], [-17, -300, -368, -17, 94, -94, 0, 0], [-182, 0, 0, 182, 48, 48, -172, 278], [0, 28, 16, -712, 0, 90, -28, 16], [932, 150, -120, 0, -52, 0, 150, 120], [-665, 0, 0, 665, -7, -7, -698, -64], [99, 0, 0, -99, -142, -142, -48, -6], [-602, 334, -300, 0, -186, 0, 334, 300], [-240, -258, -317, 0, 132, 0, -258, 317], [-270, -330, 180, -270, -37, 37, 0, 0], [-204, 0, 0, 204, -84, -84, 271, 189], [268, 28, 16, 0, -228, 0, 28, -16], [134, 0, 0, -134, 13, 13, -252, 292], [-234, -379, -125, -234, 10, -10, 0, 0], [402, 0, 0, -402, -66, -66, 76, -376], [0, -34, -120, -20, 0, 62, 34, -120], [200, 299, -396, 0, 50, 0, 299, 396], [601, -50, -472, 601, 19, -19, 0, 0], [0, -8, 20, -1864, 0, 98, 8, 20], [0, -200, -240, -658, 0, 34, 200, -240], [-138, 427, -197, -138, 78, -78, 0, 0], [0, -173, 280, 568, 0, -26, 173, 280], [-93, 0, 0, 93, -18, -18, -808, 266], [0, 114, 12, 424, 0, -94, -114, 12], [-576, -455, 148, 0, -90, 0, -455, -148], [-369, -400, 20, -369, -82, 82, 0, 0], [108, -201, 214, 0, -36, 0, -201, -214], [-38, 0, 0, 38, -122, -122, -32, -164], [154, -130, 14, 154, -68, 68, 0, 0], [0, 342, 42, 598, 0, 150, -342, 42], [40, -644, -66, 0, -10, 0, -644, 66], [806, 426, -270, 806, 148, -148, 0, 0], [172, 73, -370, 0, 76, 0, 73, 370], [-110, 374, -72, -110, 237, -237, 0, 0], [-79, 0, 0, 79, -17, -17, -18, -20], [-672, -680, 84, 0, -64, 0, -680, -84], [0, 130, -123, -494, 0, -20, -130, -123], [0, -362, 408, -60, 0, 86, 362, 408], [408, 0, 0, -408, 32, 32, 548, -320], [-240, -108, -424, -240, 0, 0, 0, 0], [0, 164, 164, 108, 0, -142, -164, 164], [-238, 0, 0, 238, 94, 94, 579, -117], [0, -203, 3, 13, 0, -77, 203, 3], [-22, 1184, 38, -22, 44, -44, 0, 0], [503, 167, 193, 0, -193, 0, 167, -193], [125, 0, 0, -125, 236, 236, -184, -360], [0, -17, -156, -260, 0, 202, 17, -156], [-714, 168, -306, 0, 82, 0, 168, 306], [-468, -90, -196, 0, 150, 0, -90, 196], [-188, 0, 0, 188, 16, 16, -312, -72], [-84, -230, -130, -84, 248, -248, 0, 0], [0, -604, -134, -90, 0, -36, 604, -134], [-397, 0, 0, 397, -65, -65, 588, 54], [0, -7, -101, -1775, 0, 71, 7, -101], [356, -196, 10, 0, 200, 0, -196, -10], [-705, 0, 0, 705, -126, -126, -264, -206], [-1718, 74, 313, 0, 60, 0, 74, -313], [464, 0, 0, -464, -84, -84, -564, -124], [0, -348, 84, -52, 0, -112, 348, 84], [-74, 0, 0, 74, 82, 82, -399, 561], [0, 442, -238, -402, 0, 114, -442, -238], [-264, -160, 284, -264, 80, -80, 0, 0], [368, -188, 16, 0, -212, 0, -188, -16], [0, 526, 224, -532, 0, -224, -526, 224], [-1021, 0, 0, 1021, 166, 166, -376, 298], [757, -276, -88, 757, -82, 82, 0, 0], [404, 15, -294, 0, -84, 0, 15, 294], [83, 188, 234, 83, -14, 14, 0, 0], [0, 42, 40, -6, 0, -80, -42, 40], [530, 0, 0, -530, -170, -170, -301, 275], [0, -377, -337, -31, 0, 81, 377, -337], [592, 268, -184, 0, 166, 0, 268, 184], [-560, -158, -272, -560, 206, -206, 0, 0], [134, -445, 133, 134, 34, -34, 0, 0], [-593, -700, 274, -593, -65, 65, 0, 0], [216, 0, 0, -216, -32, -32, -2, 674], [-322, 130, -720, -322, -21, 21, 0, 0], [0, 444, 16, -1488, 0, -6, -444, 16], [917, 0, 0, -917, -67, -67, 508, 210], [-156, -203, 681, -156, -52, 52, 0, 0], [0, 322, -145, 1250, 0, -224, -322, -145], [0, 36, 122, 560, 0, -62, -36, 122], [-824, -186, -279, 0, 8, 0, -186, 279], [558, 0, 0, -558, 192, 192, -164, -216], [-1, 0, 0, 1, 49, 49, 486, -32], [-2118, 152, -40, 0, 16, 0, 152, 40], [-142, -522, 146, -142, -300, 300, 0, 0], [149, 0, 0, -149, -17, -17, 14, -888], [0, -108, -196, -402, 0, -194, 108, -196], [283, -86, 384, 283, 173, -173, 0, 0], [420, 0, 0, -420, 140, 140, 440, -12], [971, -480, -210, 971, -46, 46, 0, 0], [0, -208, -636, -280, 0, -110, 208, -636], [-192, 40, 572, 0, 78, 0, 40, -572], [68, -2, -332, 0, -84, 0, -2, 332], [1326, 0, 0, -1326, -18, -18, -98, -178], [1272, -390, 156, 0, 240, 0, -390, -156], [-554, 158, -582, -554, -6, 6, 0, 0], [430, -12, 144, 0, 120, 0, -12, -144], [2, -520, 2, 2, 60, -60, 0, 0], [801, -73, -93, 0, 103, 0, -73, 93], [-149, 0, 0, 149, -206, -206, -240, -556], [-175, 472, 266, -175, 23, -23, 0, 0], [0, -286, 403, 90, 0, -32, 286, 403], [0, 149, -42, -1016, 0, -36, -149, -42], [-424, 572, -46, 0, -106, 0, 572, 46], [156, 470, -842, 156, -10, 10, 0, 0], [1213, 0, 0, -1213, -141, -141, -454, 300], [-2520, 172, 192, 0, 172, 0, 172, -192], [121, 0, 0, -121, 200, 200, -700, -252], [0, 597, 50, 348, 0, 32, -597, 50], [-132, -1035, 100, 0, -22, 0, -1035, -100], [-72, 0, 0, 72, -88, -88, 463, -347], [0, 394, 24, 1276, 0, -64, -394, 24], [718, -1100, -346, 718, 8, -8, 0, 0], [-1047, 0, 0, 1047, 175, 175, 524, -550], [-267, -510, 188, -267, -413, 413, 0, 0], [0, 424, 336, 688, 0, 172, -424, 336]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1050_l_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1050_3_l_b();".
// 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_1050_3_l_b(:prec:=8)
    chi := MakeCharacter_1050_l();
    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_1050_3_l_b();".
// 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_1050_3_l_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1050_l();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<11,R![10000, -2416, -364, 4, 1]>,<13,R![473344, -286208, 86528, 34432, 7840, -352, 32, 8, 1]>],Snew);
    return Vf;
end function;