
// Make newform 378.2.u.c in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_378_u();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_378_2_u_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_378_u();"
function MakeCharacter_378_u()
    N := 378;
    order := 9;
    char_gens := [29, 325];
    v := [2, 9];
    // 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_u_Hecke(Kf)
    return MakeCharacter_378_u();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_378_2_u_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_378_2_u_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_378_u();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![4096, 43008, 5657856, -14561344, 18656448, -17363820, 13267153, -3730806, -4479507, 3865682, 398190, -1262517, 709801, -250746, 105204, -6721, 3699, -3447, 2017, -408, 24, 53, -12, -3, 1]>],Snew);
    return Vf;
end function;