
// Make newform 370.2.q.f in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_370_q();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_370_2_q_f();".
// 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_370_q();"
function MakeCharacter_370_q()
    N := 370;
    order := 12;
    char_gens := [297, 261];
    v := [3, 5];
    // 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_370_q_Hecke(Kf)
    return MakeCharacter_370_q();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_370_2_q_f();".
// 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_370_2_q_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_370_q();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![1024, 3584, 67712, -209728, -1692144, 3553648, 4572088, -20037320, 193815044, 30259672, 86617040, 21587852, -36591138, -29192080, -29082192, -2114826, 12509137, 9004920, 4710528, 576908, -528156, -263728, -102568, -7334, 12071, 4456, 1600, 16, -192, -40, -4, 2, 1]>],Snew);
    return Vf;
end function;