
// Make newform 738.2.ba.a in Magma, downloaded from the LMFDB on 02 October 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_738_ba();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_738_2_ba_a();".
// 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_738_ba();"
function MakeCharacter_738_ba()
    N := 738;
    order := 40;
    char_gens := [83, 703];
    v := [20, 33];
    // 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_738_ba_Hecke( : Kf := Kf)
    return MakeCharacter_738_ba();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_738_2_ba_a();".
// 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_738_2_ba_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_738_ba();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![57138481, -675230352, 8342507782, -84119009644, 522551708251, -2043829810172, 6367232187500, -17978782734364, 44195914568455, -87919986763308, 135661543750104, -151336545824336, 101989198642627, -8911395432980, -52848510279600, 20333162020040, 74009819564837, -122600532685252, 86157087438346, -9686096652084, -35118450439754, 16963480523080, 5878035452332, -2984378639980, -292289857583, -70275593600, -85375358532, 78694946120, 37389608746, 4500283592, -2226344536, -2444015616, -585982563, -31204080, 17062690, 21727820, 8089327, 1981748, 360556, -150964, -74550, -18468, -4210, 44, 106, 72, 28, 4, 1]>],Snew);
    return Vf;
end function;