
// Make newform 1008.2.v.e in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1008_v();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1008_2_v_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_1008_v();"
function MakeCharacter_1008_v()
    N := 1008;
    order := 4;
    char_gens := [127, 757, 785, 577];
    v := [2, 3, 2, 4];
    // 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_1008_v_Hecke(Kf)
    return MakeCharacter_1008_v();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1008_2_v_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_1008_2_v_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1008_v();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![65536, 0, 0, 0, 363667456, 0, 0, 0, 418162118912, 0, 0, 0, 746491278336, 0, 0, 0, 309073644288, 0, 0, 0, 39939500288, 0, 0, 0, 1705059168, 0, 0, 0, 29085120, 0, 0, 0, 224304, 0, 0, 0, 784, 0, 0, 0, 1]>,<11,R![426337261060096, 0, 0, 0, 2189103463530496, 0, 0, 0, 3396101795115264, 0, 0, 0, 1533931048213504, 0, 0, 0, 256269727085312, 0, 0, 0, 14249609883392, 0, 0, 0, 297547122016, 0, 0, 0, 2045565248, 0, 0, 0, 4437680, 0, 0, 0, 3664, 0, 0, 0, 1]>],Snew);
    return Vf;
end function;