
// Make newform 345.2.m.c in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_345_m();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_345_2_m_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_345_m();"
function MakeCharacter_345_m()
    N := 345;
    order := 11;
    char_gens := [116, 277, 166];
    v := [11, 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_345_m_Hecke(Kf)
    return MakeCharacter_345_m();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_345_2_m_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_345_2_m_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_345_m();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![64009, 364573, -3519043, -4510638, 195662687, 407118195, 3410662739, 5325232440, 18975880176, 14587767755, 24077164541, 12194697482, 17453480113, 7913620671, 11886234862, 1148011128, -51011979, 1395634790, 3480642009, -992560217, 5788881293, 3228638721, 3231483635, 1986208576, 2555488806, 142822944, 1062176923, -79502203, 362496123, -56587982, 97254873, -9336745, 23461614, -2819806, 3254260, -578567, 686053, -25168, 86116, -20548, 14050, 3201, 2314, 77, 325, 11, 54, 0, 7, 0, 1]>],Snew);
    return Vf;
end function;