
// Make newform 112.2.w.c in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_112_w();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_112_2_w_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_112_w();"
function MakeCharacter_112_w()
    N := 112;
    order := 12;
    char_gens := [15, 85, 17];
    v := [12, 3, 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_112_w_Hecke(Kf)
    return MakeCharacter_112_w();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_112_2_w_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_112_2_w_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_112_w();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![194481, 4482324, 51653448, 1424310720, 16283664742, -37059622236, 36558066720, -63048361336, 35520287189, 48101100980, -57072227344, 112640447672, -81276505406, -76994795064, 99662977088, -190766251144, 234349610834, -65972795356, 23368692216, 7236391992, -64702303250, 24249331460, -2773815616, -1984752360, 11537897125, -2600062796, 355069616, -64119872, -810174874, 170262984, -11629504, 1452176, 39410418, -4993772, 285960, -80664, -1004406, 103652, -3456, 864, 18293, -1116, 32, -24, -162, 8, 0, 0, 1]>],Snew);
    return Vf;
end function;