
// Make newform 2736.2.bm.t in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_2736_bm();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_2736_bm_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_2736_2_bm_t();".
// 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_2736_2_bm_t();".
// 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 := [6561, 0, 52164, 0, 395134, 0, 151312, 0, 40451, 0, 5488, 0, 542, 0, 28, 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, 0, 0, 0, 0], [4905120953, 0, -61069302, 0, -462486696, 0, -266357336, 0, -41215272, 0, -4754946, 0, -255509, 0, -10164, 0], [-194108471710191, 0, -1470348324238444, 0, -555207640209094, 0, -150969971356232, 0, -20543041875661, 0, -2044580895560, 0, -105837336802, 0, -3806323948, 0], [-11417555800756728, 0, -44301633706386407, 0, -16618957602281825, 0, -4226571858284230, 0, -561812335230251, 0, -53992628470114, 0, -2754784164545, 0, -96213205709, 0], [-15031274091976611, 0, -44446863176182604, 0, -17718801475523981, 0, -4778910298762015, 0, -659826753342743, 0, -65300409366145, 0, -3391806056156, 0, -120384307763, 0], [5260837691851245, 0, -44517976947595100, 0, -18257356397613389, 0, -5110667882932927, 0, -707820971971799, 0, -70837432581553, 0, -3686953004252, 0, -132220047635, 0], [4114868769414801, 0, 31169326351674140, 0, 12113792985422063, 0, 3182021455043788, 0, 430495021839779, 0, 42180465284398, 0, 2176005166862, 0, 77189178416, 0], [1702751241319065, 0, -24301148913260783, 0, -9102313901174438, 0, -2523799016893609, 0, -343729127623994, 0, -34720999750351, 0, -1804014851009, 0, -65958342944, 0], [0, 831702838632193, 0, -5949364130685, 0, -45055398866380, 0, -25480512543977, 0, -4015186891660, 0, -463226273255, 0, -25195594535, 0, -990175670], [0, -281697264791856, 0, -1093376918915915, 0, -414448034891111, 0, -111711718597870, 0, -15250342530713, 0, -1518941639794, 0, -78805865495, 0, -2834183765], [0, -41317391409520995, 0, 346669798424140396, 0, 131904960593157655, 0, 36022974087467963, 0, 4881138908066497, 0, 486901477983041, 0, 25176125585668, 0, 909972638167], [0, 77578071609638889, 0, -655064719310154740, 0, -263761122113038781, 0, -73463991194917621, 0, -10090741797306707, 0, -1009971126798727, 0, -52424270976620, 0, -1890306552809], [0, -90623477496149271, 0, -1307808756467713693, 0, -509947381143146086, 0, -136919912259057455, 0, -18615270407097682, 0, -1839250515565853, 0, -95065139318341, 0, -3394373004184], [0, 114034611732426, 0, 17340653478163769, 0, 6763265898390281, 0, 1839041801676268, 0, 250804054500443, 0, 24906077016940, 0, 1289258286323, 0, 46212447101], [0, -8402395795060824, 0, -32608540003616059, 0, -12307020335183269, 0, -3236508022255694, 0, -437082575176471, 0, -42911401938458, 0, -2212467122437, 0, -78658668889], [0, -120301723739013183, 0, 1013107101355984660, 0, 398499357853747327, 0, 110062989712353245, 0, 15062914749592717, 0, 1504847016559811, 0, 78035033220436, 0, 2811623585401]];
    Rf_basisdens := [1, 1856785928, 184747182558867, 2955954920941872, 2955954920941872, 2955954920941872, 1477977460470936, 985318306980624, 109479811886736, 83923010373744, 26603594288476848, 26603594288476848, 26603594288476848, 286060153639536, 286060153639536, 8867864762825616];
    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_2736_bm();"
function MakeCharacter_2736_bm()
    N := 2736;
    order := 6;
    char_gens := [1711, 2053, 1217, 1009];
    v := [3, 6, 6, 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_2736_bm_Hecke();"
function MakeCharacter_2736_bm_Hecke(Kf)
    N := 2736;
    order := 6;
    char_gens := [1711, 2053, 1217, 1009];
    char_values := [[-1, 0, 0, 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], [1, 0, 0, 0, 0, 0, 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]];
    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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [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, 1, -1, 0, 0, 0], [0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, -1, -1, 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, 0, 0, 0, 0, -1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0], [0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 2, 0, 0, 0, 0, 0, 0,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9, 0, -1, 0], [0, 0, 0, -2, 16, -8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, -10, 0, 4, -2], [0, 0, 0, 4, -10, 7, 0, -10, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, -3], [1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, -1, 0, -3, 0], [13, 5, -13, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -14, 9, 9, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, -2], [-18, -19, -18, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 11, -14, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -12, -4, 4, 0, 0, -24, 0, 0], [-26, 1, -26, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, -7, 0, -18, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, -4, 0, -3, -3], [0, 0, -18, 0, 0, 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-26, -12, -13, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 14, -10, 5, 0, 0, 14, 0, 0], [0, 0, 0, -5, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -2, -13, 0, 0, 0, -1, 0, 0], [0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, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 10, -11, 0, 0, 0, 5, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 7, -14, 0, 0, -5, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 2, 0, -3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 1, -2], [38, -4, 19, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 6, 0, 0, -22, 0, 0], [0, 0, 0, 6, 0, 8, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, -10, -10, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -10, 5, 0, 4, 4], [0, 0, 0, 11, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -31, 0, 0, 0, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 14, -12, 12, 0, 0, 28, 0, 0], [0, 0, 0, 7, 8, -4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_2736_bm_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_2736_2_bm_t();".
// 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_2736_2_bm_t(:prec:=16)
    chi := MakeCharacter_2736_bm();
    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_2736_2_bm_t();".
// 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_2736_2_bm_t( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_2736_bm();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![324, 0, 180, 0, 82, 0, 10, 0, 1]>,<7,R![57, 0, 16, 0, 1]>,<11,R![114, 0, 34, 0, 1]>,<23,R![1052676, 0, -96444, 0, 7810, 0, -94, 0, 1]>,<31,R![57, 0, -40, 0, 1]>],Snew);
    return Vf;
end function;