
// Make newform 170.2.r.b in Magma, downloaded from the LMFDB on 17 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_170_r();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_170_2_r_b();".
// 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_170_r();"
function MakeCharacter_170_r()
    N := 170;
    order := 16;
    char_gens := [137, 71];
    v := [12, 15];
    // 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_170_r_Hecke(Kf)
    return MakeCharacter_170_r();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_170_2_r_b();".
// 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_170_2_r_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_170_r();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![524288, -524288, 58392576, 208797696, 364873728, 1898371072, 8336092160, 16664130816, 15253938436, 7378390560, 9963824816, 14547516288, 3641604504, -7369546048, -4646611440, -233391952, 1254127368, 810165984, 8733960, -41929760, -137009124, -13847248, 64413440, 14804088, 29183189, 987720, 980536, 349384, 281660, 108808, 25032, 11944, 1856, -408, -72, -88, -48, -8, 0, 0, 1]>],Snew);
    return Vf;
end function;