
// Make newform 819.2.gh.d in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_819_gh();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_819_2_gh_d();".
// 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_819_gh();"
function MakeCharacter_819_gh()
    N := 819;
    order := 12;
    char_gens := [92, 703, 379];
    v := [12, 10, 5];
    // 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_819_gh_Hecke(Kf)
    return MakeCharacter_819_gh();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_819_2_gh_d();".
// 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_819_2_gh_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_819_gh();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![59049, 669222, 3431403, 12767706, 42396534, 110052756, 213666417, 335221200, 413244909, 363610728, 215000559, -67425876, -278200827, -254348400, -110683869, 68119278, 128623885, 63337166, 14109926, -19606728, -21200612, -5615076, -1927139, 2023862, 2830564, 355194, 56586, -109820, -141264, -8230, -1657, 2828, 5191, 208, 0, -34, -84, 0, 0, 0, 1]>],Snew);
    return Vf;
end function;