
// Make newform 8015.2.a.h in Magma, downloaded from the LMFDB on 19 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_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_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_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_8015_2_a_h( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8015_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![3, 18, -777, -4918, 39622, 172856, -685433, -1840036, 5354684, 9776297, -23004289, -31198561, 60708025, 65905716, -105391259, -97846568, 125946137, 105924729, -106701600, -85402528, 65169825, 51824844, -28838671, -23741175, 9164586, 8183740, -2027555, -2101823, 287074, 394768, -18734, -52504, -1265, 4672, 382, -249, -32, 6, 1]>,<3,R![-80, -18688, -292236, -1586722, -1997911, 12339985, 44973338, 2864151, -209177102, -239795225, 414536149, 885276298, -303978596, -1630842148, -259173413, 1831843812, 821829585, -1341671288, -914395435, 648842692, 614959613, -197083547, -278442543, 28470478, 87946464, 3625546, -19484262, -2891931, 2973542, 718390, -296696, -102219, 16838, 8797, -266, -427, -23, 9, 1]>],Snew);
    return Vf;
end function;