
// Make newform 670.2.k.c in Magma, downloaded from the LMFDB on 20 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_670_k();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_670_2_k_c();".
// 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_670_k();"
function MakeCharacter_670_k()
    N := 670;
    order := 11;
    char_gens := [537, 471];
    v := [11, 4];
    // 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_670_k_Hecke(Kf)
    return MakeCharacter_670_k();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_670_2_k_c();".
// 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_670_2_k_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_670_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![64009, 3105828, 151164332, 1687304465, 8464534067, 23525999970, 42014735202, 49513171422, 56422657291, 111869697291, 302089329444, 623886827238, 927918378652, 973871826240, 734188632412, 338283557371, 24611394471, -122078481009, -91939822143, -6450032283, 81094905420, 116558487791, 120863454073, 94901952381, 68277029346, 42452898691, 24960815985, 12850512366, 6319742382, 2823148462, 1132285469, 435411245, 154702389, 49871488, 18998036, 5246231, 3016264, 1010439, 365443, 160002, 57698, 18588, 6839, 1978, 1204, 346, 96, 26, 10, 2, 1]>],Snew);
    return Vf;
end function;