
// Make newform 966.2.q.f in Magma, downloaded from the LMFDB on 25 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_f();".
// 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_f();".
// 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_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_966_q();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![123904, 1239040, 8084736, 36691072, 138764736, 378107840, 660075680, 806892240, 846533776, 658555656, 465779865, 243816616, 111288562, 49650591, 15787166, 5298502, 2395790, 470183, 628892, 386123, 3783, -47046, 11924, 10889, 859, -836, -34, 122, 55, 10, 1]>],Snew);
    return Vf;
end function;