
// Make newform 804.2.j.b in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_804_j();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_804_2_j_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_j();"
function MakeCharacter_804_j()
    N := 804;
    order := 6;
    char_gens := [403, 269, 337];
    v := [3, 6, 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_j_Hecke(Kf)
    return MakeCharacter_804_j();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_804_2_j_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_j_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_804_j();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![3324932076626176, 35063698164351744, 840095239017499504, -3191853437907596624, 69261398857717317297, -493466949835417440, 975049413214583813378, 1721238020103285943296, 11612154517651450452404, 22991487225968562191108, 79841987597408806400852, 148847585555206782054656, 373005810689250439074481, 594480376368028682214840, 1094491909827587101913650, 1366867234832814823113916, 1963005758812621425662308, 1959635289992499471617632, 2408457820478784421608240, 1983971019988197072306824, 2208351192778615973432516, 1500935495413404539846496, 1583755749117106872022556, 883853463650617006356584, 920116809462640061604722, 414705679755610926137924, 440434162482275656614964, 158597633167524666854572, 175817802585148836271169, 50304918732236558877316, 58823305410180883600916, 13535011383301795319340, 16570611315436971698514, 3137044838989162510620, 3951082362302713576000, 634263275349472577668, 801719067787692320308, 112452651367687937028, 139150279472646680404, 17526658825074856884, 20746233295906129368, 2397998231600300648, 2665702910524841268, 287524834805791088, 295807893446600778, 30113459614364444, 28375179074118782, 2746901088747156, 2351919697818210, 217274911509860, 168136916667010, 14832723895840, 10329637848559, 867549865056, 542196515788, 43090904640, 24100213604, 1792272608, 895286638, 61296040, 27251104, 1670680, 659024, 34684, 12028, 496, 150, 4, 1]>],Snew);
    return Vf;
end function;