
// Make newform 177.6.d.b in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_177_d();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_177_6_d_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_177_d();"
function MakeCharacter_177_d()
    N := 177;
    order := 2;
    char_gens := [119, 61];
    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_177_d_Hecke(Kf)
    return MakeCharacter_177_d();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_177_6_d_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_177_6_d_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_177_d();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<2,R![-21210491329850687920780704409976832, 0, 38435920472445722064241592887148544, 0, -28723217150273795601133743240118272, 0, 11994255475588228955238012121251840, 0, -3180119420046943646637143320166400, 0, 576025215852304804289349445484544, 0, -74858585668298567261185717370880, 0, 7229697342553982680813989789696, 0, -532584727539581742091083433984, 0, 30514795492071880013074198528, 0, -1379693841946313357139069568, 0, 49747491184294130301283072, 0, -1440722487728934306390360, 0, 33651444748571279879684, 0, -634707372577695337814, 0, 9649637842069917875, 0, -117640875055715061, 0, 1139311986806784, 0, -8635105551283, 0, 50049221944, 0, -213934715, 0, 634864, 0, -1167, 0, 1]>],Snew);
    return Vf;
end function;