
// Make newform 2005.2.a.g in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_2005_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_2005_2_a_g();".
// 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_2005_a();"
function MakeCharacter_2005_a()
    N := 2005;
    order := 1;
    char_gens := [402, 1206];
    v := [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_2005_a_Hecke(Kf)
    return MakeCharacter_2005_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_2005_2_a_g();".
// 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_2005_2_a_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_2005_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![4513, -109670, 724676, -831612, -7287701, 20364125, 22711445, -123727562, 1701809, 383363223, -192655199, -706380307, 587961049, 811097812, -946211005, -566303318, 963780844, 194709056, -659851944, 28715603, 310309438, -69097784, -99893733, 38232747, 21191049, -12232569, -2588491, 2522330, 62961, -336862, 33805, 27413, -5679, -1108, 398, 2, -11, 1]>,<11,R![178550607872, 4125141446656, -24506665994240, -141688803909632, 238321766059776, 778139916642048, -1385310360421888, -1019789766955520, 2841138362213808, 29435227064208, -2814556128134312, 970193929248784, 1509042828441645, -967833862336115, -412229740305941, 474894122583715, 17452663242162, -135547230092609, 25898086467290, 22196395128753, -9088922384793, -1577406198285, 1485094317423, -94643899206, -126155896098, 29198567347, 4060490228, -2363859265, 150956697, 76812878, -15566489, -169926, 371910, -38656, -1076, 501, -38, 1]>],Snew);
    return Vf;
end function;