
// Make newform 1573.4.a.o in Magma, downloaded from the LMFDB on 17 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1573_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1573_4_a_o();".
// 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_1573_a();"
function MakeCharacter_1573_a()
    N := 1573;
    order := 1;
    char_gens := [365, 1211];
    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_1573_a_Hecke(Kf)
    return MakeCharacter_1573_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1573_4_a_o();".
// 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_1573_4_a_o( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1573_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![165041029120, -5965293783040, 21989125323520, 20841111712000, -139130117863424, 5944860520128, 300969089992240, -66170006837208, -333445658174244, 84627675741684, 220802215501665, -55204522926375, -95102140852390, 22323188791237, 28095755763500, -6049319782076, -5895132703748, 1143333396241, 898534169979, -153977194104, -100787785136, 14914855972, 8357294608, -1038170538, -510076556, 51302448, 22574795, -1751009, -703042, 39135, 14572, -514, -180, 3, 1]>],Snew);
    return Vf;
end function;