
// Make newform 8014.2.a.d in Magma, downloaded from the LMFDB on 20 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8014_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8014_2_a_d();".
// 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_8014_a();"
function MakeCharacter_8014_a()
    N := 8014;
    order := 1;
    char_gens := [5];
    v := [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_8014_a_Hecke(Kf)
    return MakeCharacter_8014_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8014_2_a_d();".
// 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_8014_2_a_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8014_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![442433536, 8346140672, -715765202944, -20943822729216, -56113253582848, 2586641841665536, 15478755168687744, -121604944759271936, -938588911251869424, 2716741302625790136, 26497529282185546588, -31825108280872247348, -416942433196268281676, 241201740061592334580, 4160115039777006174986, -1533011651031119422843, -28493783459075021673720, 9535509042763962607414, 141036366570377367209376, -53318700789517413877997, -522888013684388953826041, 237893757632736754195648, 1490851230157158482769390, -814937177532080561089739, -3334861313685907874451430, 2155748150937784829565224, 5941618858504985765657772, -4481787094913494422965229, -8524830711315169678251090, 7456750802474586973609656, 9917815736483446274016031, -10086155133324350139018919, -9375031039567247809920791, 11236121860381437910666914, 7162523926297809818710607, -10417680614711713978120070, -4338220739447539531661364, 8105673072239472240240523, 1969967782876790090126798, -5326315824571209727931770, -542997038840427503697564, 2969292424986991432135021, -52025609818657354771632, -1408124075585483082416409, 173855049274669742650004, 568430320450872386307636, -126689590209007032629825, -194951889608756788348037, 62978456250566775471864, 56483895875319378026436, -24494497064694270932201, -13658823306089226305713, 7802866735314015837237, 2687747095041224018970, -2076587082912653585578, -405068456627462850763, 465757833521990131263, 37917188912275527399, -88254188058666456410, 1025278265650065692, 14092282142237259742, -1322483772097999309, -1881450274817793674, 326660232070700213, 206772205190326424, -54030853602312349, -18143816557151356, 6832357433707405, 1186081411593149, -684647982782393, -45616715822426, 54679986053496, -766069335324, -3439297260025, 285995077788, 165062331800, -25302999290, -5632580011, 1391525662, 110953539, -51763953, 203935, 1256816, -83278, -17007, 2244, 56, -22, 1]>],Snew);
    return Vf;
end function;