
// Make newform 8001.2.a.ba in Magma, downloaded from the LMFDB on 16 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8001_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8001_2_a_ba();".
// 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_8001_a();"
function MakeCharacter_8001_a()
    N := 8001;
    order := 1;
    char_gens := [3557, 1144, 7750];
    v := [1, 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_8001_a_Hecke(Kf)
    return MakeCharacter_8001_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8001_2_a_ba();".
// 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_8001_2_a_ba( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8001_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![1024, 0, -538564, 0, 16623392, 0, -198291344, 0, 1161667735, 0, -3828389798, 0, 7946973735, 0, -11199889677, 0, 11252772529, 0, -8324328950, 0, 4631870932, 0, -1965116795, 0, 640472505, 0, -160686890, 0, 30923256, 0, -4518569, 0, 491854, 0, -38594, 0, 2061, 0, -67, 0, 1]>,<5,R![1283525853184, 0, -14523922010112, 0, 68968084968448, 0, -183737812020992, 0, 311435862421440, 0, -360264156020720, 0, 297109444561712, 0, -179817937793424, 0, 81477419674596, 0, -28026476839904, 0, 7387769136660, 0, -1500835365060, 0, 235485001640, 0, -28492106123, 0, 2642567744, 0, -185682906, 0, 9688313, 0, -363032, 0, 9221, 0, -142, 0, 1]>],Snew);
    return Vf;
end function;