
// Make newform 2100.2.f.i in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_2100_f();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_2100_f_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_2100_2_f_i();".
// 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_2100_2_f_i();".
// 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 := [3204, -16848, 37232, -44288, 30032, -11608, 4136, -4872, 5642, -3800, 1324, -84, -80, -4, 22, -8, 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], [-119141715042936, 554801595445380, -1040225507966284, 991542180607608, -485834790073352, 119964804746976, -76905276790596, 133263830063988, -125830353287956, 61257088041072, -9913427677824, -3358106117202, 835306036507, 701222131854, -373367002804, 57403374489], [457970972564304, -1800272872764336, 2826929145871240, -2212235837321132, 871443150537926, -210575615232028, 240749551047996, -359667781317426, 281466093593488, -108330014842670, 8131441630236, 7127194982154, -183401535319, -1652501840140, 626674939546, -77323022525], [-230259470125842, 1054657479570048, -1963073630872930, 1846487578162146, -883679203029908, 213655203154554, -145697330406498, 251496180131028, -234153879206074, 111469384632840, -16874919289398, -6334737350562, 1382862362872, 1324628699625, -672606326953, 100088104905], [789943381126797366, -2931975072018951048, 4324738922526229916, -3160229026930206008, 1152719245145689066, -287670523503487168, 388411383997627392, -549347824171115100, 402819089391960698, -141700307198985008, 5885969225100684, 9760817625912960, 471516558604255, -2380725481593076, 809758733801354, -91435174149446], [5340554258850, -24837347608704, 46937768878016, -44955950967560, 22006940984932, -5402044811956, 3448029446688, -6015190713816, 5701391057396, -2776835535788, 446964096000, 153099296514, -37727839379, -31860826666, 16889035175, -2586850136], [-767042048246670, 3820930691534844, -7395523643242350, 7093771930177982, -3431662430278170, 820013525317330, -531807903614832, 947538852220986, -899428368512850, 434039817972950, -67341552918828, -24504385330236, 5644186621575, 5071372130419, -2620048717602, 394067700008], [2123885484981, -11723129533632, 24461932213372, -24827023794558, 12564085078403, -3002949942144, 1657608931605, -3140506689666, 3145831094029, -1594178988846, 271718024049, 87076046064, -24143769229, -17541138297, 9702247024, -1508144322], [-93251629981978, 397058058543384, -687096422851968, 603346777013884, -271315744323048, 65812112235744, -54064370422086, 87791944855140, -76610594463144, 34058987846944, -4393011662922, -2022060235560, 314345478065, 438648529038, -203158500162, 28786349208], [193580214201, -802838700408, 1345105698096, -1141261635848, 497098132356, -121388663668, 108735949992, -171605433420, 145032796893, -62214651188, 7314904494, 3760534290, -469586340, -833049106, 369355329, -51174056], [-814057061299264242, 3508792753291626816, -6074511014886719072, 5271595374806164556, -2318111849938045072, 551512082253892276, -477188249024734434, 775475237234401080, -669246871731066416, 291242148865846016, -34730436558706908, -17768161105979250, 2342293690718270, 3865712879810812, -1721592748555913, 237146115290732], [-55853497044, 241278803772, -424709811584, 380852817012, -175894423504, 43220019252, -33010227468, 54292687260, -48356828852, 22097309352, -3100677486, -1271868450, 235989785, 273792114, -132952136, 19477599], [-23187055339044, 106776542011392, -195752741941804, 179619253365752, -83617995398834, 19983226662772, -14684014240788, 25037732878050, -22788180451882, 10543806408542, -1488031599246, -613884121680, 116532552115, 129797340514, -63157440526, 9185255669], [149299677075222, -695902825241166, 1289895423572662, -1197020496070456, 564422972324267, -135665741954696, 96026202241044, -165055373950875, 151867933915471, -71211400087861, 10424199014343, 4087346785905, -835204536085, -860507807102, 428243944168, -63212058907], [-35442084892574268, 146881976453299224, -245724234499198928, 208123080439317424, -90471698713299898, 22088591186773124, -19889688242778996, 31348735924618530, -26448505828879424, 11320914231054334, -1322694341328882, -685081077669150, 84256855192265, 151948666431908, -67182473206802, 9295948386523], [-54161940862170, 244963342068600, -443744604971880, 403945266260300, -187118268731580, 44948659757680, -33632622506310, 56744878249860, -51256745585490, 23573948869640, -3293595733470, -1373424702120, 254773590075, 291889704550, -141223574670, 20502731780]];
    Rf_basisdens := [1, 663475361490, 663475361490, 663475361490, 477038784911310, 11245345110, 1617080626818, 5622672555, 94146197930, 137138355, 477038784911310, 36431730, 16182325890, 98602477245, 8085403134090, 17625670974];
    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_2100_f();"
function MakeCharacter_2100_f()
    N := 2100;
    order := 2;
    char_gens := [1051, 701, 1177, 1501];
    v := [2, 1, 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_2100_f_Hecke();"
function MakeCharacter_2100_f_Hecke(Kf)
    N := 2100;
    order := 2;
    char_gens := [1051, 701, 1177, 1501];
    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, 0, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0], [0, 0, 0, 0, 4, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, -3], [2, 0, 0, 0, 0, 0, 0, 0, 0, -25, 0, 0, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_2100_f_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_2100_2_f_i();".
// 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_2100_2_f_i(:prec:=16)
    chi := MakeCharacter_2100_f();
    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_2100_2_f_i();".
// 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_2100_2_f_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_2100_f();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<11,R![19, 0, 16, 0, 1]>,<13,R![4, 0, -36, 0, 1]>,<23,R![475, 0, -80, 0, 1]>,<41,R![1900, 0, -90, 0, 1]>],Snew);
    return Vf;
end function;