
// Make newform 966.2.q.h in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_966_q();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_966_2_q_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_966_q();"
function MakeCharacter_966_q()
    N := 966;
    order := 11;
    char_gens := [323, 829, 925];
    v := [11, 11, 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_966_q_Hecke(Kf)
    return MakeCharacter_966_q();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_966_2_q_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_966_2_q_h( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_966_q();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![1024, -26624, 397056, -843136, 2071488, -8108416, 19704672, -40803248, 92418128, -148806020, 144798985, -112765290, 106076504, -68504235, 37737218, -16194776, 12260632, -11118249, 7569994, -3539041, 1122551, -203764, -11484, 23193, -7621, 990, 334, -204, 59, -10, 1]>],Snew);
    return Vf;
end function;