
// Make newform 770.2.w.b in Magma, downloaded from the LMFDB on 20 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_770_w();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_770_2_w_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_770_w();"
function MakeCharacter_770_w()
    N := 770;
    order := 10;
    char_gens := [617, 661, 211];
    v := [5, 5, 7];
    // 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_770_w_Hecke(Kf)
    return MakeCharacter_770_w();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_770_2_w_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_770_2_w_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_770_w();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<37,R![882391947426630010073218093056, -1023054999645343710808010004480, -2182224312555218655872826479616, 7522168235504555336378908515840, -3514940848488604153482109622016, -14611315963219866060916080314880, 31834690859847145289670156340224, -33285728403249048468132576055680, 22831412027789625716230044037888, -12610932209795216932788228348800, 7111509189298118687071980988672, -4048835499170599918814834242560, 1752449635838985665536353257600, -383192900864917958957837181120, -55363414441862703298246292480, 62488700040802152643313972800, -13525492358427664650001953328, -1758325298725942501685775920, 1399165282821204227265319328, -183457680207811155118033840, -34018958431426870845940800, 10845404525365859842082720, 232992048726580236663624, -351016186744982881465840, 8070292727464928061736, 9836486275924432589160, -413859202610443185748, -306905704478040276880, 33594311770734383660, 4326656971432548560, -758046707610503368, -56813129410592720, 13930577790086902, 652511351887160, -224683658858534, -6402555335910, 3464522011699, -26915908175, -33649229469, 354526025, 344028691, -5554150, -2995717, 52030, 23337, -605, -86, 0, 1]>],Snew);
    return Vf;
end function;