
// Make newform 1899.4.a.d in Magma, downloaded from the LMFDB on 17 June 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1899_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1899_4_a_d();".
// 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_1899_a();"
function MakeCharacter_1899_a()
    N := 1899;
    order := 1;
    char_gens := [1478, 424];
    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_1899_a_Hecke(Kf)
    return MakeCharacter_1899_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1899_4_a_d();".
// 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_1899_4_a_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1899_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![21685862400, 96736428032, -21706903552, -382288993280, -15442097408, 539914900928, 29035703664, -373838536992, -23702429928, 147980912786, 11864434365, -36258163673, -3583633292, 5740772342, 665724240, -599951915, -78156508, 41567636, 5888362, -1882655, -283364, 53438, 8408, -861, -140, 6, 1]>],Snew);
    return Vf;
end function;