
// Make newform 731.2.f.d in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_731_f();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_731_2_f_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_731_f();"
function MakeCharacter_731_f()
    N := 731;
    order := 4;
    char_gens := [173, 562];
    v := [3, 4];
    // 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_731_f_Hecke(Kf)
    return MakeCharacter_731_f();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_731_2_f_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_731_2_f_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_731_f();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![82944, 0, 17547264, 0, 1201742848, 0, 39514983936, 0, 743150564736, 0, 8838495767616, 0, 70935802502976, 0, 402311206696720, 0, 1670463963102868, 0, 5225522485698308, 0, 12611547001952581, 0, 23955674530640238, 0, 36418015549223537, 0, 44934736513701590, 0, 45529266031816026, 0, 38252442781880952, 0, 26862726596918643, 0, 15869305471910530, 0, 7926378994959872, 0, 3359974450517128, 0, 1211841233307228, 0, 372378897614112, 0, 97498675433559, 0, 21724958167708, 0, 4108657370290, 0, 656617113580, 0, 88100687958, 0, 9833880918, 0, 901598591, 0, 66694494, 0, 3879979, 0, 170816, 0, 5347, 0, 106, 0, 1]>,<3,R![1150566400, 49642598400, 1070945395200, 13427297661440, 107674425597184, 548992525074048, 1813147348297088, 3680560193943936, 4837658315377232, 6337289377846688, 17822476565197024, 35786569564183664, 40619863930886396, 21385115542800608, 44128885719256616, 88538404659688020, 98557870299650141, 33582922072063176, 48613513726287864, 97249203457453092, 108703363735685207, 28674726933199786, 27815918184690824, 55213601511536494, 62899091903559781, 14154287368543398, 8665148848308802, 16971571021062712, 20174570995581354, 4088888277697052, 1483450768450536, 2860522268497456, 3719093883665318, 677557518156082, 147825467773864, 279868101871320, 419423521141336, 66714599566110, 8941614268472, 16547891995350, 30349147026091, 4031461507462, 334801197044, 601726792512, 1448436567688, 151861639250, 7781287176, 13459503066, 46034221524, 3569149794, 110950840, 182514028, 967457818, 51683828, 936024, 1441748, 13130712, 444532, 4258, 6008, 109664, 2070, 8, 10, 509, 4, 0, 0, 1]>],Snew);
    return Vf;
end function;