
// Make newform 8002.2.a.f in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8002_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8002_2_a_f();".
// 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_8002_a();"
function MakeCharacter_8002_a()
    N := 8002;
    order := 1;
    char_gens := [3];
    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_8002_a_Hecke(Kf)
    return MakeCharacter_8002_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8002_2_a_f();".
// 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_8002_2_a_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8002_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![1997131777424, -14126259431032, -407625943849326, 310761504788451, 23972105726974176, 27549691143858111, -673877442258962150, -1477039948761003275, 10761267486264237168, 32697298187893682655, -104793113022879801168, -423289953840002016197, 626709398396350915003, 3608876018743367400399, -2037693175397595449357, -21659458175805931757128, 127465124189861311291, 95763098387983429599437, 35786994515539629239560, -322514942668807222655431, -212304257714015048997466, 848475747930312899927691, 758342810334512331185681, -1776801842191256504193153, -1971690536762315913289435, 3001840987652007759082965, 3991785427075337923634349, -4125752590634777317283911, -6517523581724106621149005, 4624503019352401053461714, 8772199666523108477722922, -4201885316500326173297676, -9881790694159405281838993, 3025394176182535776231902, 9421035287901572058187019, -1611928329983777321347155, -7665830359805797025691721, 473593769483540560534902, 5358299691861494782251525, 158502665789336517404146, -3233304440994966337196080, -350281050198255212989295, 1690469882724768884085361, 301606061789348020313389, -767719220114119440508100, -186514695730300877995918, 303281288138790503980416, 92402192404070249095841, -104243541203675643114671, -38188371354480130985470, 31142099422775943092750, 13424911551295987995287, -8063854784069764066157, -4057046587835157690003, 1800506566564657323144, 1060235007019397331806, -343563213251951953287, -240342964911337458419, 55137339420357287917, 47311718464157046521, -7213529898799986071, -8083054568190098046, 713921132875382059, 1196072451157704817, -40148005659138512, -152735802083457822, -2188387238365439, 16740741793532221, 960640663436567, -1562931083594253, -152246439417962, 122973105841669, 16762538595016, -8032343264088, -1417957457782, 425977356535, 94584298442, -17702664979, -4974969345, 539893996, 203020327, -10245914, -6218893, 35452, 134790, 4038, -1845, -109, 12, 1]>],Snew);
    return Vf;
end function;