
// Make newform 432.2.be.a in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_432_be();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_432_2_be_a();".
// 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_432_be();"
function MakeCharacter_432_be()
    N := 432;
    order := 18;
    char_gens := [271, 325, 353];
    v := [9, 18, 7];
    // 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_432_be_Hecke(Kf)
    return MakeCharacter_432_be();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_432_2_be_a();".
// 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_432_2_be_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_432_be();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![27, 1782, 71928, -147609, 153252, -258849, 299916, -155169, 51948, -10413, -54, -2790, 126, 459, 117, 24, 0, 3, 1]>,<7,R![531441, 0, 4782969, 0, -316738836, 0, -12217297149, 0, 319868314902, 0, 754075334268, 0, 804654640953, 0, 101831949117, 0, 114961730463, 0, -22827141279, 0, 2742799806, 0, -410825034, 0, 38537127, 0, -1908765, 0, 125226, 0, -6318, 0, -81, 0, 0, 0, 1]>],Snew);
    return Vf;
end function;