
// Make newform 8015.2.a.i in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8015_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8015_2_a_i();".
// 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_8015_a();"
function MakeCharacter_8015_a()
    N := 8015;
    order := 1;
    char_gens := [3207, 4581, 4586];
    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_8015_a_Hecke(Kf)
    return MakeCharacter_8015_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8015_2_a_i();".
// 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_8015_2_a_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8015_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![-583, -6990, 37552, 398148, -269772, -6311882, -1213941, 50950486, 24916248, -253446519, -152238862, 850513382, 540461503, -2026787574, -1289995697, 3543161166, 2210594798, -4646647978, -2822178583, 4645576487, 2745880153, -3582123511, -2065474527, 2147483300, 1211733556, -1005711815, -556988227, 368468912, 200798914, -105376462, -56618455, 23366897, 12397490, -3967623, -2081057, 505167, 262173, -46601, -23946, 2937, 1495, -113, -57, 2, 1]>,<3,R![2560, -187392, 2253512, 22003772, -1770424, -330243031, -365412604, 2146608113, 3538947877, -7759849090, -15946015419, 17735731625, 43383510940, -27779910939, -79312047043, 31483999789, 103368490174, -26788186793, -99692127345, 17531091604, 72945836198, -8954771318, -41187703109, 3596293431, 18145590400, -1137239711, -6276928614, 282169432, 1708310328, -54467479, -364949294, 8062886, 60765010, -894892, -7782367, 71861, 750238, -3933, -52563, 131, 2522, -2, -74, 0, 1]>],Snew);
    return Vf;
end function;