
// Make newform 784.2.x.l in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_784_x();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_784_2_x_l();".
// 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_784_x();"
function MakeCharacter_784_x()
    N := 784;
    order := 12;
    char_gens := [687, 197, 689];
    v := [12, 3, 8];
    // 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_784_x_Hecke(Kf)
    return MakeCharacter_784_x();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_784_2_x_l();".
// 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_784_2_x_l( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_784_x();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![4096, 12288, 18432, 36864, 44800, 2560, -28032, -68544, -80496, -288, 51872, 122368, 182160, 101520, 41248, 20848, 3052, -1720, -640, -288, -28, 24, 8, 4, 1]>,<5,R![5308416, -10616832, 10616832, -35389440, 31177728, 28035072, -460800, 14186496, -2129648, -6569248, -442336, -2631680, 1242704, 809680, 115392, 84656, 5772, -7160, -1056, -712, -28, 56, 8, 4, 1]>],Snew);
    return Vf;
end function;