
// Make newform 8007.2.a.c in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8007_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8007_2_a_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_8007_a();"
function MakeCharacter_8007_a()
    N := 8007;
    order := 1;
    char_gens := [5339, 1414, 7855];
    v := [1, 1, 1];
    // 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_8007_a_Hecke(Kf)
    return MakeCharacter_8007_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8007_2_a_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_8007_2_a_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8007_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![81, 900, -18723, -118850, 414190, 2431717, -2512232, -19919786, 3343775, 87408789, 23290501, -233545589, -124656096, 407178764, 296891071, -482669774, -434732987, 398097765, 431803314, -229832591, -305118703, 91058414, 157513354, -22724509, -60256849, 2221040, 17163803, 705990, -3625031, -361102, 559386, 80891, -61231, -11019, 4500, 937, -199, -46, 4, 1]>],Snew);
    return Vf;
end function;