
// Make newform 637.2.bd.b in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_637_bd();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_637_2_bd_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_637_bd();"
function MakeCharacter_637_bd()
    N := 637;
    order := 12;
    char_gens := [248, 197];
    v := [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_637_bd_Hecke(Kf)
    return MakeCharacter_637_bd();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_637_2_bd_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_637_2_bd_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_637_bd();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![9, 36, 117, 144, -845, -1132, -496, -3506, 41984, -82384, 149588, -136770, 53409, -14534, -12471, 26088, -11391, 2302, 2728, -3530, 972, 0, -102, 134, -43, 0, 5, -4, 1]>,<3,R![1, 78, 1736, -22776, 71619, 138408, -306636, -468006, 826968, 1518642, -290344, -1579110, -94141, 1105290, 231271, -511386, -125505, 176952, 41579, -45780, -7718, 8688, 886, -1212, -12, 108, -6, -6, 1]>],Snew);
    return Vf;
end function;