
// Make newform 168.2.ba.c in Magma, downloaded from the LMFDB on 20 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_168_ba();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_168_2_ba_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_168_ba();"
function MakeCharacter_168_ba()
    N := 168;
    order := 6;
    char_gens := [127, 85, 113, 73];
    v := [6, 3, 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_168_ba_Hecke(Kf)
    return MakeCharacter_168_ba();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_168_2_ba_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_168_2_ba_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_168_ba();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![5184, 0, -55872, 0, 445432, 0, -1506760, 0, 3734769, 0, -2318580, 0, 963618, 0, -241512, 0, 44115, 0, -5472, 0, 498, 0, -28, 0, 1]>],Snew);
    return Vf;
end function;