
// Make newform 966.2.l.d in Magma, downloaded from the LMFDB on 18 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_966_l();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_966_2_l_d();".
// 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_l();"
function MakeCharacter_966_l()
    N := 966;
    order := 6;
    char_gens := [323, 829, 925];
    v := [3, 5, 6];
    // 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_l_Hecke(Kf)
    return MakeCharacter_966_l();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_966_2_l_d();".
// 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_l_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_966_l();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![546946904514816, 0, 5860218613182336, 0, 42384136567417776, 0, 147439356941949432, 0, 343169854199971153, 0, 565681860720948334, 0, 707451587613135587, 0, 689649600638789430, 0, 538970380634812317, 0, 343334399619826018, 0, 181116098961351992, 0, 80016762184908538, 0, 29916304669823472, 0, 9541391085292006, 0, 2613630790786563, 0, 617900873135702, 0, 126524203473713, 0, 22478798955894, 0, 3466275436715, 0, 463182861110, 0, 53453771616, 0, 5295879770, 0, 446491864, 0, 31604246, 0, 1842285, 0, 85738, 0, 3035, 0, 74, 0, 1]>],Snew);
    return Vf;
end function;