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


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_819_2_fm_e();".
// 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_fm_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_819_fm();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![576, 3168, 32904, 82116, 339705, 117684, -262089, 675594, -636960, -1509804, 2020173, -893238, -166394, 1218628, -673543, -100398, 90003, -203540, 182806, 3296, -40469, 26164, -8633, -4794, 3019, -404, 112, 96, -67, 8, -1, -2, 1]>,<5,R![404653456, 170342288, 35853512, -287548748, 2231770265, 656854246, 180933570, -1344092074, 2717123851, -261716656, 139424820, -569289060, 998281059, -239230874, 38932842, -57438110, 126926891, -36616704, 4119060, 987992, 4494824, -1087128, 115940, 85244, 71882, -9260, 992, 916, 501, -18, 2, 2, 1]>,<19,R![1202692412180736, -12617100639877248, 40830983024397984, -34547116066394832, 20532489003921348, 2003589444453876, -10637197814602422, 6846905615238702, -1771641757239771, -1224430845891708, 1417644312783858, -696787202410746, 277488498908053, -80469944504440, 17510272686236, -3357201166716, 152400753778, 81393591940, -18110759382, 7961172190, -743809471, -149554624, 16914440, -12478412, 1914778, 79068, 18222, 8838, -1607, -116, -10, -2, 1]>],Snew);
    return Vf;
end function;