
// Make newform 1859.4.a.o in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1859_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1859_4_a_o();".
// 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_1859_a();"
function MakeCharacter_1859_a()
    N := 1859;
    order := 1;
    char_gens := [508, 1354];
    v := [1, 1];
    // 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_1859_a_Hecke(Kf)
    return MakeCharacter_1859_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1859_4_a_o();".
// 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_1859_4_a_o( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1859_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![-91431516471296, -88923785019392, 4172426271754240, 6618498930894336, -19801875164434432, -33098105534121472, 35895565425104768, 65459584200543200, -35038070985309056, -71437011741332576, 21222250229812512, 49428196374256172, -8579711848903369, -23354424046750224, 2411433625662992, 7882704850912633, -481224273904152, -1956901678568496, 68520874595634, 364264338755287, -6862014114335, -51468129676989, 459171188888, 5556687964643, -17168426656, -459092123012, -23146836, 28913103950, 41608817, -1373688710, -2389752, 48297883, 69288, -1215940, -1070, 20695, 7, -213, 0, 1]>],Snew);
    return Vf;
end function;