
// Make newform 4024.2.a.f in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_4024_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_4024_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_4024_a();"
function MakeCharacter_4024_a()
    N := 4024;
    order := 1;
    char_gens := [1007, 2013, 2017];
    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_4024_a_Hecke(Kf)
    return MakeCharacter_4024_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_4024_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_4024_2_a_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_4024_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![-704, 49456, -91360, -2481260, 3962140, 41884197, -45295724, -276905505, 188288759, 814596658, -427752491, -1294285684, 579191855, 1255604355, -494173660, -802037365, 278022826, 353821716, -106707609, -110972637, 28549008, 25115555, -5372464, -4112698, 707865, 482451, -63890, -39496, 3761, 2141, -130, -69, 2, 1]>,<5,R![-11206656, -1317740544, 4187750400, 19292809216, -40342584320, -113709012992, 88965600000, 264340971264, -89865079296, -327778820736, 52542759648, 252012963400, -22302952176, -130519764776, 9138512523, 47673731478, -3827686044, -12560656409, 1334802237, 2400583435, -338001551, -329782396, 59653862, 31714156, -7225666, -2018584, 587234, 74388, -30526, -878, 915, -34, -12, 1]>,<7,R![56757896, 377241493, -98854640827, 314340758450, 70007447742, -1094404766336, 498738400223, 1620312046235, -1200407421654, -1328659923221, 1290589171695, 652269148931, -827076816888, -187930602038, 347242692644, 24445432156, -99756704040, 2763346714, 20040289959, -1863983802, -2841562995, 393176338, 284274233, -48589661, -19845985, 3870255, 942026, -201018, -28866, 6578, 513, -123, -4, 1]>],Snew);
    return Vf;
end function;