
// Make newform 864.2.y.d in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_864_y();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_864_2_y_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_864_y();"
function MakeCharacter_864_y()
    N := 864;
    order := 9;
    char_gens := [703, 325, 353];
    v := [9, 9, 2];
    // 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_864_y_Hecke(Kf)
    return MakeCharacter_864_y();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_864_2_y_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_864_2_y_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_864_y();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![341056, 3861408, 5313888, -44959672, 142231644, 19060056, 290361645, 84954231, -141687648, 233741913, 648979668, 182526282, -46378302, 6415488, 6453216, -64453833, 38454480, -5670288, 5454057, -36891, -110277, 32910, 12006, 270, 3456, -675, 63, -19, 6, 0, 1]>,<7,R![105665856469516652544, 0, -2946339846016726901760, 0, 702268816003058338845696, 0, 320252144158550496143232, 0, 194323612644299132283456, 0, 183363582154487896665936, 0, 25587942682483626677217, 0, -14112603550681256806272, 0, 7525600430759861469156, 0, 4645449475766190655218, 0, 168171436900233937395, 0, -81169025622683446728, 0, 21565600611249156741, 0, 2641688492668860483, 0, -325394889128996886, 0, 55252118608258734, 0, 9135389772541260, 0, -1106804855944800, 0, 66493664344269, 0, 20247963820056, 0, -1031987293470, 0, 4135988142, 0, 14409106767, 0, -665047908, 0, 36003726, 0, 3429648, 0, -122247, 0, 4647, 0, 405, 0, -21, 0, 1]>],Snew);
    return Vf;
end function;