
// Make newform 77.4.f.b in Magma, downloaded from the LMFDB on 02 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_77_f();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_77_4_f_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_77_f();"
function MakeCharacter_77_f()
    N := 77;
    order := 5;
    char_gens := [45, 57];
    v := [5, 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_77_f_Hecke(Kf)
    return MakeCharacter_77_f();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_77_4_f_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_77_4_f_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_77_f();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![11674937346789376, 68544819463983104, 312470889806236672, 658130899624136192, 705517650205291776, -501338856058985088, 1137713558811315264, -549206621795889216, 695798970585028720, -195939848278514912, 256773994132658744, -35921643282267534, 66228542546176731, -8056183275165587, 14769565627445158, -2084872209807145, 2588012966755316, -346768272194436, 383915778775906, -50720723807831, 48825558734626, -7504692742666, 5257570936411, -959579201551, 431521304641, -76627088370, 30780400965, -5380657939, 1864077473, -339936760, 101230673, -16689407, 4019990, -558741, 130789, -17852, 3827, -480, 89, -8, 1]>],Snew);
    return Vf;
end function;