
// Make newform 363.3.b.n in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_363_b();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_363_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_363_3_b_n();".
// 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_363_3_b_n();".
// 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 := [48312, -23952, -32528, 6920, 6124, 5424, 3656, 580, 290, -12, 10, -4, 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], [6692372878650359808, -1071774178392867524, -3625740947249225360, -1938775534922449992, -1276036664666480508, -93463398566058652, -92142433681723612, 13577919523074024, -3024676745468031, 1310082049276159, -417791761524872, 26448881484039], [-2020820004543909752, 78960387780624720, 258071482856074256, -11957094161013092, -78652747314959200, -35937786948450608, -17613565372016056, -3829018100161522, -372094129814679, 150881956031212, 5134113130431, -11927197578380], [670893485451951566856, 575633285070152337904, -381555055669710098800, -257375018632556899976, -82437644860272245874, -11819129858771009236, -6807677848883533112, 2611326289453704128, 300866100101886591, 31447134194477824, -57882282931575184, 8822693138623285], [-7036509238495228040384, -534982761765271818720, -1427027257539369392052, 161815700072224958888, 128969872433151188586, -106267167179216788776, 13924240122380881806, -14915674233345665226, 2287828660717298340, -1277766703331862934, 363007005409259499, -48975271419376623], [64861604038464242056476, -33103757365332729475324, -33370340310114586174464, -14044419534094934229728, -14161350320107014514722, -1800541346662496588552, -1187454388064646162504, 28179863062791853082, -47806983107408448309, 14858367510231974573, -2804781998624474028, -177706076056576919], [-787224451537901179308, -875528847962700872848, 432306287007330727032, -27297923529737395292, -33229403435334680076, 41372736583160355424, -830326065821126658, 4608352588862406692, -475655019654191499, 394160792924366246, -125391624092071578, 18668369032428349], [-7580546103022258396140, -893844699712890328176, -1022199286691062364728, 498555667778332357296, 642682255961817256390, 312148172520011476812, 81553012761474194692, 20760523931491058260, 852465132936363965, 30121810996129108, -175490175978103846, 77507244184705304], [2731580660469197743316, 4210442663611165231104, -2999855282911066338732, -3593966389810815693144, -1012830454341432561618, -702548115947121672664, -56432339444806846210, -37809316858156274082, 5790920913626171749, -1786541204802508138, 310074343020662741, -91632993383928363], [54834547813980, 249716816535836, 13607393606556, -16222688639972, -29712476995860, -19125164847332, -3837116959578, -1677987011788, 48997956888, -36561278785, 18803987505, -5455461050], [-11717995658357891256420, -30935079782997690260860, 2565892016752213042656, 1750895972907903512656, 2446358227335643520352, 1954735263081844532488, 260488675954912819632, 163024020650920302524, -9789663250409380644, 7007217062402978777, -2543415786466377987, 565648472884900591], [6651844396592211954236, 7761927936870282685008, -7148135067883614154012, -6962035354557271757960, -2894814306606005203966, -2234385565980594203824, -236939516904455160008, -170446860857946380528, 12333664360019392218, -7042172449860218080, 2294504838275490491, -535775362755005232]];
    Rf_basisdens := [1, 3323537421696563124, 1107845807232187708, 800972518628871712884, 2936899234972529613908, 8810697704917588841724, 800972518628871712884, 2936899234972529613908, 2936899234972529613908, 171019613016516, 8810697704917588841724, 2936899234972529613908];
    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_363_b();"
function MakeCharacter_363_b()
    N := 363;
    order := 2;
    char_gens := [122, 244];
    v := [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_363_b_Hecke();"
function MakeCharacter_363_b_Hecke(Kf)
    N := 363;
    order := 2;
    char_gens := [122, 244];
    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]];
    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, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], [-1, 0, -1, 0, -1, 0, 0, 1, -1, 0, 0, -1], [0, 0, 0, 0, 0, 0, 1, 0, 0, -2, -2, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 6, -1, 0], [0, 3, 0, -2, 0, -4, 1, 0, 0, 2, 2, 0], [0, 0, 0, 0, 0, 0, 3, 0, 0, 0, -4, 0], [2, 0, 2, 0, -1, 0, 0, 1, -2, 0, 0, 6], [0, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, -5, 0, 2, 0, 0, 2, 0, 0, 0, 0], [-18, 0, 3, 0, 2, 0, 0, 2, 0, 0, 0, 0], [0, -7, 0, 4, 0, 6, -1, 0, 0, -3, -3, 0], [0, 0, 0, 0, 0, 0, 12, 0, 0, -9, 1, 0], [-1, 0, -1, 0, -4, 0, 0, 4, -10, 0, 0, 8], [-3, 0, -3, 0, 9, 0, 0, -9, -3, 0, 0, -3], [-3, 0, -3, 0, 9, 0, 0, -9, 0, 0, 0, -6], [0, 0, 0, 0, 0, 0, 4, 0, 0, 24, -2, 0], [-25, 0, -15, 0, -14, 0, 0, -14, 0, 0, 0, 0], [19, 0, 19, 0, 13, 0, 0, -13, 30, 0, 0, 8], [0, 0, 0, 0, 0, 0, -12, 0, 0, -7, -23, 0], [0, 0, 0, 0, 0, 0, -7, 0, 0, -13, -17, 0], [0, 2, 0, 14, 0, -8, 11, 0, 0, 4, 4, 0], [4, 0, 4, 0, 25, 0, 0, -25, -3, 0, 0, 11], [-16, 0, -19, 0, 5, 0, 0, 5, 0, 0, 0, 0], [0, 26, 0, 0, 0, 4, -2, 0, 0, -2, -2, 0], [-3, 0, 3, 0, -5, 0, 0, -5, 0, 0, 0, 0], [0, -8, 0, -36, 0, -22, -7, 0, 0, 11, 11, 0], [0, 0, 0, 0, 0, 0, 9, 0, 0, 57, 12, 0], [-3, 0, -3, 0, 0, 0, 0, 0, 19, 0, 0, -25], [0, 0, 0, 0, 0, 0, -8, 0, 0, -8, -22, 0], [0, 8, 0, -14, 0, 18, -16, 0, 0, -9, -9, 0], [-17, 0, -17, 0, -5, 0, 0, 5, 6, 0, 0, -40], [0, 0, 0, 0, 0, 0, 9, 0, 0, 15, 21, 0], [0, -31, 0, -38, 0, -2, -18, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 0, 18, 0, 0, -58, 12, 0], [75, 0, -25, 0, -5, 0, 0, -5, 0, 0, 0, 0], [-141, 0, 11, 0, -36, 0, 0, -36, 0, 0, 0, 0], [0, -18, 0, -2, 0, 22, -12, 0, 0, -11, -11, 0], [0, -34, 0, 8, 0, 32, -12, 0, 0, -16, -16, 0], [8, 0, 8, 0, 20, 0, 0, -20, 34, 0, 0, -18], [131, 0, 12, 0, 33, 0, 0, 33, 0, 0, 0, 0], [-12, 0, -12, 0, -6, 0, 0, 6, -62, 0, 0, 38], [0, 0, 0, 0, 0, 0, -36, 0, 0, 2, -13, 0], [0, 31, 0, 8, 0, 32, -12, 0, 0, -16, -16, 0], [-79, 0, -35, 0, -25, 0, 0, -25, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -30, 0, 0, 13, -31, 0], [74, 0, 76, 0, 4, 0, 0, 4, 0, 0, 0, 0], [0, 44, 0, -54, 0, 6, -30, 0, 0, -3, -3, 0], [91, 0, 10, 0, -29, 0, 0, -29, 0, 0, 0, 0], [0, -11, 0, -24, 0, -34, 5, 0, 0, 17, 17, 0], [0, -94, 0, 52, 0, 6, 23, 0, 0, -3, -3, 0], [0, 0, 0, 0, 0, 0, -52, 0, 0, 13, 45, 0], [9, 0, 9, 0, -42, 0, 0, 42, 20, 0, 0, -2], [20, 0, 20, 0, 17, 0, 0, -17, 15, 0, 0, 25], [0, 24, 0, -88, 0, -38, -25, 0, 0, 19, 19, 0], [-16, 0, -16, 0, -16, 0, 0, 16, -29, 0, 0, -3], [0, 0, 0, 0, 0, 0, -14, 0, 0, -7, 65, 0], [0, 0, 0, 0, 0, 0, -5, 0, 0, -83, 74, 0], [0, -56, 0, -18, 0, 18, -18, 0, 0, -9, -9, 0], [0, 0, 0, 0, 0, 0, -30, 0, 0, -57, -129, 0], [0, -81, 0, 14, 0, -46, 30, 0, 0, 23, 23, 0], [0, 0, 0, 0, 0, 0, -27, 0, 0, 175, -49, 0], [-54, 0, -54, 0, 42, 0, 0, -42, -40, 0, 0, -68], [-48, 0, -87, 0, 41, 0, 0, 41, 0, 0, 0, 0], [-18, 0, -18, 0, 36, 0, 0, -36, 50, 0, 0, -86], [-12, 0, -32, 0, 2, 0, 0, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 48, 0, 0, -50, -109, 0], [0, 54, 0, 40, 0, -20, 30, 0, 0, 10, 10, 0], [0, 0, 0, 0, 0, 0, -37, 0, 0, -113, -32, 0], [55, 0, 55, 0, -38, 0, 0, 38, -1, 0, 0, 111], [0, -112, 0, -22, 0, 20, -21, 0, 0, -10, -10, 0], [212, 0, 68, 0, -37, 0, 0, -37, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 2, 0, 0, -64, -164, 0], [129, 0, 145, 0, -19, 0, 0, -19, 0, 0, 0, 0], [-75, 0, -75, 0, -63, 0, 0, 63, -122, 0, 0, -28], [-14, 0, -14, 0, -44, 0, 0, 44, 29, 0, 0, -57], [183, 0, -68, 0, -49, 0, 0, -49, 0, 0, 0, 0], [57, 0, 57, 0, -30, 0, 0, 30, 51, 0, 0, 63], [0, 0, 0, 0, 0, 0, 94, 0, 0, -61, 8, 0], [-41, 0, -41, 0, -38, 0, 0, 38, 4, 0, 0, -86], [-38, 0, -143, 0, 40, 0, 0, 40, 0, 0, 0, 0], [0, -120, 0, 110, 0, 50, 30, 0, 0, -25, -25, 0], [-158, 0, -117, 0, 65, 0, 0, 65, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 39, 0, 0, 359, 33, 0], [69, 0, 69, 0, 51, 0, 0, -51, 4, 0, 0, 134], [72, 0, 72, 0, -27, 0, 0, 27, 29, 0, 0, 115], [0, 0, 0, 0, 0, 0, 100, 0, 0, 26, 167, 0], [0, -5, 0, 148, 0, 28, 60, 0, 0, -14, -14, 0], [97, 0, 23, 0, 133, 0, 0, 133, 0, 0, 0, 0], [37, 0, 37, 0, 67, 0, 0, -67, -4, 0, 0, 78], [0, -166, 0, 82, 0, -2, 42, 0, 0, 1, 1, 0], [114, 0, -104, 0, -75, 0, 0, -75, 0, 0, 0, 0], [0, -22, 0, -166, 0, -64, -51, 0, 0, 32, 32, 0], [-209, 0, 17, 0, -163, 0, 0, -163, 0, 0, 0, 0], [0, 130, 0, 130, 0, 64, 33, 0, 0, -32, -32, 0], [54, 0, 54, 0, 42, 0, 0, -42, 74, 0, 0, 34], [93, 0, 93, 0, -75, 0, 0, 75, 64, 0, 0, 122], [0, 0, 0, 0, 0, 0, 2, 0, 0, -84, -64, 0], [0, 0, 0, 0, 0, 0, -58, 0, 0, 101, -119, 0], [0, 0, 0, 0, 0, 0, 56, 0, 0, -18, -194, 0], [0, 156, 0, -48, 0, -108, 30, 0, 0, 54, 54, 0], [0, 50, 0, 84, 0, -86, 85, 0, 0, 43, 43, 0], [0, -102, 0, 2, 0, 14, -6, 0, 0, -7, -7, 0], [0, 0, 0, 0, 0, 0, 87, 0, 0, 65, 171, 0], [64, 0, -79, 0, 83, 0, 0, 83, 0, 0, 0, 0], [154, 0, 154, 0, 55, 0, 0, -55, 210, 0, 0, 98], [0, 217, 0, -138, 0, -120, -9, 0, 0, 60, 60, 0], [27, 0, 27, 0, 12, 0, 0, -12, -72, 0, 0, 126], [0, 0, 0, 0, 0, 0, -34, 0, 0, 127, -74, 0], [0, 0, 0, 0, 0, 0, -131, 0, 0, 45, -77, 0], [0, 0, 0, 0, 0, 0, 35, 0, 0, -265, -160, 0], [-2, 0, -2, 0, -65, 0, 0, 65, 123, 0, 0, -127], [-361, 0, -111, 0, -90, 0, 0, -90, 0, 0, 0, 0], [-420, 0, 36, 0, 95, 0, 0, 95, 0, 0, 0, 0], [-39, 0, -39, 0, -132, 0, 0, 132, -129, 0, 0, 51], [-50, 0, -10, 0, 61, 0, 0, 61, 0, 0, 0, 0], [60, 0, 60, 0, 144, 0, 0, -144, 96, 0, 0, 24], [-65, 0, -65, 0, -173, 0, 0, 173, -84, 0, 0, -46], [0, -10, 0, 10, 0, 100, -45, 0, 0, -50, -50, 0], [-114, 0, -133, 0, -176, 0, 0, -176, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 30, 0, 0, -361, -97, 0], [0, 19, 0, -172, 0, -76, -48, 0, 0, 38, 38, 0], [11, 0, 11, 0, 38, 0, 0, -38, -98, 0, 0, 120], [-1055, 0, -51, 0, -61, 0, 0, -61, 0, 0, 0, 0], [0, 285, 0, -20, 0, 20, -20, 0, 0, -10, -10, 0], [-610, 0, -6, 0, -116, 0, 0, -116, 0, 0, 0, 0], [-96, 0, -96, 0, 117, 0, 0, -117, -96, 0, 0, -96], [-656, 0, 196, 0, -41, 0, 0, -41, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 5, 0, 0, 150, 225, 0], [0, 0, 0, 0, 0, 0, -11, 0, 0, 214, 228, 0], [0, 60, 0, -78, 0, 48, -63, 0, 0, -24, -24, 0], [231, 0, 195, 0, 41, 0, 0, 41, 0, 0, 0, 0], [734, 0, 161, 0, -72, 0, 0, -72, 0, 0, 0, 0], [0, -237, 0, 40, 0, 142, -51, 0, 0, -71, -71, 0], [0, 0, 0, 0, 0, 0, 96, 0, 0, -106, -127, 0], [-64, 0, -64, 0, -70, 0, 0, 70, 116, 0, 0, -244], [0, 0, 0, 0, 0, 0, -250, 0, 0, 124, 88, 0], [-102, 0, -102, 0, 78, 0, 0, -78, -144, 0, 0, -60], [0, 82, 0, 214, 0, 82, 66, 0, 0, -41, -41, 0], [0, 0, 0, 0, 0, 0, -68, 0, 0, 20, 256, 0], [0, -156, 0, 152, 0, 148, 2, 0, 0, -74, -74, 0], [-519, 0, 339, 0, 49, 0, 0, 49, 0, 0, 0, 0], [0, 168, 0, -112, 0, -190, 39, 0, 0, 95, 95, 0], [14, 0, -253, 0, 140, 0, 0, 140, 0, 0, 0, 0], [115, 0, 115, 0, 112, 0, 0, -112, -78, 0, 0, 308], [0, 0, 0, 0, 0, 0, -83, 0, 0, 95, 184, 0], [0, -378, 0, 24, 0, 36, -6, 0, 0, -18, -18, 0], [153, 0, -105, 0, -11, 0, 0, -11, 0, 0, 0, 0], [-80, 0, -80, 0, -119, 0, 0, 119, -168, 0, 0, 8], [0, 0, 0, 0, 0, 0, 183, 0, 0, -7, -128, 0], [84, 0, 84, 0, -75, 0, 0, 75, -73, 0, 0, 241], [-432, 0, -248, 0, 12, 0, 0, 12, 0, 0, 0, 0], [0, 114, 0, -42, 0, -156, 57, 0, 0, 78, 78, 0], [-191, 0, -219, 0, 107, 0, 0, 107, 0, 0, 0, 0], [75, 0, 75, 0, 75, 0, 0, -75, -60, 0, 0, 210], [0, 0, 0, 0, 0, 0, -60, 0, 0, -411, 173, 0], [-54, 0, -54, 0, -33, 0, 0, 33, 15, 0, 0, -123], [0, 0, 0, 0, 0, 0, 116, 0, 0, 142, 271, 0], [0, -357, 0, 122, 0, 154, -16, 0, 0, -77, -77, 0], [151, 0, 151, 0, 70, 0, 0, -70, 240, 0, 0, 62], [0, -71, 0, 142, 0, -112, 127, 0, 0, 56, 56, 0], [0, 0, 0, 0, 0, 0, -29, 0, 0, 70, 302, 0], [183, 0, 183, 0, 132, 0, 0, -132, 296, 0, 0, 70], [-87, 0, -87, 0, -132, 0, 0, 132, -81, 0, 0, -93], [192, 0, 192, 0, 294, 0, 0, -294, 162, 0, 0, 222], [-194, 0, -22, 0, -130, 0, 0, -130, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 103, 0, 0, 12, -205, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_363_b_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_363_3_b_n();".
// 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_363_3_b_n(:prec:=12)
    chi := MakeCharacter_363_b();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 3));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 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_363_3_b_n();".
// 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_363_3_b_n( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_363_b();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<2,R![249, 0, 139, 0, 23, 0, 1]>,<5,R![747, 0, 1975, 0, 97, 0, 1]>,<7,R![-7500, 0, 2644, 0, -172, 0, 1]>],Snew);
    return Vf;
end function;