
// Make newform 288.2.v.d in Magma, downloaded from the LMFDB on 18 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_288_v();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_288_2_v_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_288_v();"
function MakeCharacter_288_v()
    N := 288;
    order := 8;
    char_gens := [127, 37, 65];
    v := [8, 1, 8];
    // 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_288_v_Hecke(Kf)
    return MakeCharacter_288_v();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_288_2_v_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_288_2_v_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_288_v();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![4096, -458752, 88719360, 76087296, 541622272, 780451840, 1947770880, 1677721600, -2087501824, -3041779712, 1032611840, 1860100096, 506757120, -510982144, -406564864, 12976128, 122419328, 32920576, -4331776, -6861824, -298496, 692992, 1152, -29696, 34560, -1408, 160, -384, 0, 32, 0, 0, 1]>],Snew);
    return Vf;
end function;