
// Make newform 378.2.v.b in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_378_v();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_378_2_v_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_378_v();"
function MakeCharacter_378_v()
    N := 378;
    order := 9;
    char_gens := [29, 325];
    v := [4, 6];
    // 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_378_v_Hecke(Kf)
    return MakeCharacter_378_v();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_378_2_v_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_378_2_v_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_378_v();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![1868500722364663689, 6609195619994576349, 50169797917044942591, 62471912431530521313, -171730289677778725248, -395727475629131956494, -65484280268956311066, 592342883383696992810, 3294152992846268845461, -218339119162461893184, -3013271376445732826871, -5024069518134931813341, 10990196962677287148591, -5486180487521730743061, 4971968520534394780068, -5586134727077598084705, 7220134855909346259132, -12468833609291124027471, 12361380473614112197821, -3679109001387446019975, 2663403843262000390164, -292392160038065713311, -1704968316355059282690, 194590847871205097787, 462788024714640905058, 14906745777775980933, 348307523984541460887, -92748848927600278665, 3173884168110064812, 18995268316706593533, 9228536356235390199, 9329617112627489139, 4864471434612914184, -1478806906452196239, 234809796156450426, 232878233408586516, 158934871912785432, 148878581567989266, 53783671329467874, -12018861886728870, 3239235387231465, 4131237297460089, 2008336889738956, 1109507766999348, 249294252863079, -71658350816986, 30306589055244, 27577180014084, 5533800870708, 2296807167924, 1182475597032, -53789537577, 15744317805, 71469798156, 23282298336, 4068399051, 1823500746, 322650720, 48338505, 46857969, 15612168, 1479843, 684360, 77040, -18243, 9936, 5130, -57, 105, 41, -3, 0, 1]>],Snew);
    return Vf;
end function;