
// Make newform 720.2.bm.h in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_720_bm();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_720_2_bm_h();".
// 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_720_bm();"
function MakeCharacter_720_bm()
    N := 720;
    order := 4;
    char_gens := [271, 181, 641, 577];
    v := [4, 3, 4, 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_720_bm_Hecke(Kf)
    return MakeCharacter_720_bm();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_720_2_bm_h();".
// 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_720_2_bm_h( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_720_bm();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![115605504, 0, -589266944, 0, 1167380480, 0, -1208670208, 0, 737605888, 0, -282693120, 0, 70472192, 0, -11615360, 0, 1265760, 0, -89504, 0, 3920, 0, -96, 0, 1]>,<11,R![1849688064, -7883194368, 16798711808, -14541914112, 6182731776, -706543616, 4023123968, -2842886144, 1012240384, -93888512, 244645888, -164290560, 56228864, -5127168, 3964928, -2620416, 919488, -79872, 4608, -2944, 1744, -96, 0, 0, 1]>,<13,R![4294967296, 0, 0, 0, 1166385342316544, 0, 0, 0, 1750941450406723584, 0, 0, 0, 16161148863149768704, 0, 0, 0, 15334903448544018432, 0, 0, 0, 2358344545513504768, 0, 0, 0, 60670318798159872, 0, 0, 0, 618814265262080, 0, 0, 0, 3017663342080, 0, 0, 0, 7352414208, 0, 0, 0, 8830400, 0, 0, 0, 4928, 0, 0, 0, 1]>],Snew);
    return Vf;
end function;