
// Make newform 637.2.r.g in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_637_r();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_637_2_r_g();".
// 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_637_r();"
function MakeCharacter_637_r()
    N := 637;
    order := 6;
    char_gens := [248, 197];
    v := [4, 3];
    // 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_637_r_Hecke(Kf)
    return MakeCharacter_637_r();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_637_2_r_g();".
// 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_637_2_r_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_637_r();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![484, 0, -1496, 0, 3524, 0, -2828, 0, 1594, 0, -514, 0, 119, 0, -13, 0, 1]>,<3,R![256, 0, 1312, 0, 5572, 0, 5392, 0, 3856, 0, 988, 0, 184, 0, 16, 0, 1]>],Snew);
    return Vf;
end function;