
// Make newform 804.2.q.b in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_804_q();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_804_2_q_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_804_q();"
function MakeCharacter_804_q()
    N := 804;
    order := 11;
    char_gens := [403, 269, 337];
    v := [11, 11, 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_804_q_Hecke(Kf)
    return MakeCharacter_804_q();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_804_2_q_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_804_2_q_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_804_q();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![71255748281344, -527078897804800, 6023318927222784, -9681004576166528, 69611055327568832, 106926977121359296, 443081997078439136, 817898930988425176, 497035677491736900, -1226875501843745380, 943184538776940329, 1956621443278789083, -337511536147500174, -1786302658451031025, -245380355384356400, 1180920274094238203, 588129109004819532, -632876624999217902, -88401656170595883, -107711682252642817, 257266649820826402, -149650115667965245, 83136923283903442, -20833187511784800, 6113679868624788, -18873498007074357, 12735178826953182, -2942375833632457, 421779433735026, -497697822823765, 769017129478712, -534276522638549, 173229796395289, -28529092867908, 14390674983463, -18797607796532, 18105592775963, -10917996537556, 5024135592790, -1959902566837, 639653532262, -178097036142, 51681487503, -12011890229, 3704643622, -633254553, 294882346, -29671004, 23929770, -508609, 1971367, 80639, 163999, 10478, 11067, 683, 654, -1, 35, -2, 1]>],Snew);
    return Vf;
end function;