
// Make newform 1183.2.e.l in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1183_e();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1183_2_e_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_1183_e();"
function MakeCharacter_1183_e()
    N := 1183;
    order := 3;
    char_gens := [339, 1016];
    v := [1, 3];
    // 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_1183_e_Hecke(Kf)
    return MakeCharacter_1183_e();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1183_2_e_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_1183_2_e_l( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1183_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![1, 409, 172905, -2341432, 23201747, -115146543, 460013699, -1117654469, 2674229836, -4340674208, 8389502964, -10587246410, 18187182197, -18000910641, 28974567039, -23004178701, 35867842038, -22870877696, 35274496336, -18217427312, 28167291869, -11816033318, 18445450356, -6341979220, 10008413532, -2842327653, 4519907017, -1073774747, 1707005233, -342740897, 539578858, -92649281, 142824395, -21098051, 31544454, -4027379, 5784748, -635067, 870994, -81539, 106087, -8243, 10151, -632, 732, -33, 36, -1, 1]>,<3,R![810483961, 3978485812, 20032294513, 46857186096, 138029745763, 238793889789, 561525929980, 790250544491, 1550393131196, 1805907682167, 3103562854573, 3054624770578, 4684342042750, 3870961606576, 5423102564747, 3789915207554, 4958186844061, 2926411244206, 3632221493931, 1816468407179, 2166761284917, 917156320984, 1060445105592, 380148112164, 429283628038, 129928923099, 144137621881, 36705670001, 40297420793, 8561820000, 9380286332, 1644030309, 1820021470, 258463976, 293341345, 32936152, 39137350, 3352995, 4276082, 265248, 377639, 15656, 26183, 625, 1371, 14, 49, 0, 1]>],Snew);
    return Vf;
end function;