
// Make newform 360.6.k.d in Magma, downloaded from the LMFDB on 05 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_360_k();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_360_6_k_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_360_k();"
function MakeCharacter_360_k()
    N := 360;
    order := 2;
    char_gens := [271, 181, 281, 217];
    v := [2, 1, 2, 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_360_k_Hecke(Kf)
    return MakeCharacter_360_k();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_360_6_k_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_360_6_k_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_360_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<7,R![25489740601323520000, 3569761978991616000, 88287077168332800, -1089797538728960, -33407006768768, 169333543968, 2894868560, -7891024, -94896, 98, 1]>],Snew);
    return Vf;
end function;