
// Make newform 702.2.w.d in Magma, downloaded from the LMFDB on 14 January 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_702_w();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_702_2_w_d();".
// 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_702_w();"
function MakeCharacter_702_w()
    N := 702;
    order := 9;
    char_gens := [677, 379];
    v := [5, 9];
    // 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_702_w_Hecke(Kf)
    return MakeCharacter_702_w();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_702_2_w_d();".
// 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_702_2_w_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_702_w();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![43808164416, -5066353181664, 167554089886464, -285706858087656, 15015563601787044, 1101648651941412, 436301711554662333, 272744707257727128, 3226342743373470921, -724023344048288328, 15146685723241506762, -51243691997196011916, 72322610887994081382, -147555586370188026369, 355257706940254375596, -631544981817653084583, 1218841695674224783938, -2417193137356720774560, 3480403664245857058584, -3182129875164003439149, 1570163574373613433486, 94140328038402230469, -711308785730660723943, 298226090133132361542, 196759247888849319495, -180343451952111628062, -18319405449436943508, 45271212842277662346, 4156288820576673021, -8139885970464621378, -1777255974782663208, 506824421605377084, 759807251272586421, 157612856366704911, -135667290907235001, -56817837890218929, 14818387924132483, 10251732180705261, 1294497157072461, -724536948777413, -435815759011383, -42744241075194, 60030551470974, 19597457181789, 1605244645899, -352327169901, -183407373801, -19577526372, 48480748641, 11348280954, 333640539, -298742829, -99271665, -32580936, 27113814, 3621150, -384174, -91008, 12483, -14535, 7779, -48, 114, -56, 6, -3, 1]>],Snew);
    return Vf;
end function;