
// Make newform 4029.2.a.l in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_4029_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_4029_2_a_l();".
// 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_4029_a();"
function MakeCharacter_4029_a()
    N := 4029;
    order := 1;
    char_gens := [2687, 3556, 3163];
    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_4029_a_Hecke(Kf)
    return MakeCharacter_4029_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_4029_2_a_l();".
// 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_4029_2_a_l( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_4029_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![-544, -15080, -99208, 219496, 1974260, -1741182, -12932354, 7640252, 40399258, -19102572, -73030045, 29196812, 84892392, -29036300, -67462222, 19635271, 38002893, -9284894, -15485906, 3116614, 4603765, -745215, -996692, 125835, 155108, -14639, -16869, 1115, 1215, -50, -52, 1, 1]>,<5,R![-143498044, 1013494712, 520018669, -15782378809, 18163434886, 67135235620, -115846299389, -90821970281, 218292494372, 54658720253, -211106950095, -12382406010, 125346491272, -3148092864, -49737703145, 3084918394, 13806977909, -1035541699, -2748562884, 205650634, 396613301, -26727161, -41448915, 2332460, 3097256, -135446, -160846, 5015, 5499, -107, -111, 1, 1]>],Snew);
    return Vf;
end function;