
// Make newform 1785.2.g.f in Magma, downloaded from the LMFDB on 16 November 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1785_g();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1785_2_g_f();".
// 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".
// To make the character of type GrpDrchElt, type "MakeCharacter_1785_g();"
function MakeCharacter_1785_g()
    N := 1785;
    order := 2;
    char_gens := [596, 1072, 766, 1261];
    v := [2, 1, 2, 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;

function MakeCharacter_1785_g_Hecke(Kf)
    return MakeCharacter_1785_g();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1785_2_g_f();".
// 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_1785_2_g_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1785_g();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![64, 0, 8016, 0, 155872, 0, 1099852, 0, 3393832, 0, 5523757, 0, 5346609, 0, 3320812, 0, 1384360, 0, 396062, 0, 78014, 0, 10400, 0, 896, 0, 45, 0, 1]>],Snew);
    return Vf;
end function;