
// Make newform 819.2.bm.h in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_819_bm();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_819_2_bm_h();".
// 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_bm();"
function MakeCharacter_819_bm()
    N := 819;
    order := 6;
    char_gens := [92, 703, 379];
    v := [6, 2, 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_bm_Hecke(Kf)
    return MakeCharacter_819_bm();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_819_2_bm_h();".
// 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_bm_h( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_819_bm();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![33, 0, 1420, 0, 9997, 0, 18917, 0, 16545, 0, 7900, 0, 2179, 0, 345, 0, 29, 0, 1]>,<5,R![16091429904, 0, -80988532548, 0, 265474131817, 0, -477547973046, 0, 604037481943, 0, -530447809408, 0, 347552538905, 0, -165775943580, 0, 60289069783, 0, -16659182478, 0, 3593398927, 0, -602139158, 0, 79661477, 0, -8230012, 0, 665931, 0, -40814, 0, 1859, 0, -56, 0, 1]>],Snew);
    return Vf;
end function;