
// Make newform 4003.2.a.b in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_4003_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_4003_2_a_b();".
// 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_4003_a();"
function MakeCharacter_4003_a()
    N := 4003;
    order := 1;
    char_gens := [2];
    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_4003_a_Hecke(Kf)
    return MakeCharacter_4003_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_4003_2_a_b();".
// 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_4003_2_a_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_4003_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![-67141, 25070181, -700074204, -181189477579, 3565430972352, 74182692228277, -1328687248138609, -14102898529466637, 206753922225676261, 1579209216547403558, -17767375748616074344, -112114944801971880437, 966968655667477505724, 5344798515868959367061, -36127881469941669966491, -179945464294220413846796, 976106605557619715300410, 4462620208120624271904675, -19776599296275909134412722, -84391479009851744024720698, 308821241203280080369396285, 1251849726999921542695278624, -3799137485439568420604626748, -14907016504291702868683466435, 37490822927228637714832164281, 145222872170528188412286894360, -301219213550457872566018925772, -1175602183760966847158573028678, 1994039771752796209213389739870, 8011420019528265752173601476429, -10973707543096062451466243763425, -46466467697480292143206881508756, 50482139938981484225567961599721, 231531272176172890554435882246658, -194323346697419888708760155805768, -999119680813124401519993108390464, 622018179322322570091277660890391, 3760113029610417171400793663953595, -1621365751385548628560370382451821, -12416820970192859096467033518796206, 3238376051440677786582760212091256, 36171223529052578212950680804597885, -3888464999598160671327229081806832, -93386025552027105494513429238902559, -3004548317470103907444909193407300, 214546885755735061520465437234755617, 34622601313819905650583922621502214, -440139790803228075698450004053418019, -124591225460770715694937951508708225, 808634885857607345775137516911257413, 323600558434504403350760948104852145, -1333611600954714951665324208558863760, -687809374879302207728871544929886792, 1977803115434394524145267235629072743, 1252331208882602729526935909803999395, -2640460918426392801809904244277888389, -1997949126200976723205412365169711874, 3174121831526357946130841976007604395, 2830249420913181985636070087412514361, -3432711761983641788082749565223410207, -3590907453087674674600841160359214900, 3331532508233841630667496185537727836, 4105480095515053529510617991081186321, -2886999652552949463600200759537638322, -4248584257445756695093616805090868536, 2212306717472370348704077045984864150, 3993083799314346860520395298416105763, -1470703956288842885846313911261447875, -3417185455598896386099511341977738173, 812595851986853807216193943413098622, 2667824714768909891045303723307191761, -328864447102586687616411338434420398, -1902686604119508513835987010882889952, 38544237431618562077959931444191678, 1240701549946180794055178630998374732, 92883564207795485435922921131039537, -739944982144698591227401559932642052, -122291122486669838047950283858154402, 403510231998555336084002544739379749, 102509577972120667276000200308607811, -201011565176366914646838278278603718, -69259075439767623832915800371642932, 91304032452042247670571444504336188, 40262394515132623551654321444515342, -37695088241261436759137085455526930, -20700761066720428407634351527898304, 14071616720671514694335830932495317, 9546344391981271324702793333329280, -4708530268818045687796034710889940, -3980080193691731041366477739823496, 1390536796131932825119566879177496, 1507182680593957028539306997417342, -351399160583689640787631997614567, -519760077469444508011357336628990, 70387820470893891464059274429564, 163433048030270543193213682725727, -8197616122278085717971473395441, -46862977716224111367680196793737, -1266301564659048308979890762023, 12242736996893963632818487348481, 1220251406656463051162856107942, -2908104172111862467651509872873, -497667734087290215829717511929, 625965959828698915334068152093, 153448054779579229515699627002, -121445810100226082860457411582, -39678228073165937869823701982, 21059015759973944935744789669, 8927052431452048781876081446, -3218110186028909664803319271, -1776261536490134198890238836, 422235592941768983369615345, 314941395619711814955748616, -44887510562891437075242975, -49903572761777497062879406, 3205509437941347511704336, 7065361433115652209028251, 26578514303037349233531, -891371943621848104735284, -59013171410677405095207, 99671899752675632579267, 12688380039202135450829, -9791112346751070761754, -1879227359132532856002, 832881925943062110773, 222919632175106962346, -59830422484415216824, -22126715145423863081, 3448467522683545836, 1864353337255747578, -138184087170472709, -133533781846388543, 1199716306044726, 8071886038985793, 384842805900084, -405274544509635, -41435576309478, 16417164378504, 2671747557270, -507066240764, -125079143245, 10342502763, 4379836354, -55907926, -112086616, -4595767, 1945411, 177403, -18712, -3036, 21, 22, 1]>],Snew);
    return Vf;
end function;