
// Make newform 315.2.bl.i in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_315_bl();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_315_2_bl_i();".
// 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_315_bl();"
function MakeCharacter_315_bl()
    N := 315;
    order := 6;
    char_gens := [281, 127, 136];
    v := [5, 6, 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_315_bl_Hecke(Kf)
    return MakeCharacter_315_bl();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_315_2_bl_i();".
// 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_315_2_bl_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_315_bl();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![14161, -9282, -87222, 58500, 454773, -824220, 129512, 741480, -368694, -491526, 447660, 102306, -212214, 2220, 73005, -17316, -12663, 4926, 1571, -954, -48, 90, -3, -6, 1]>,<11,R![207475216, 211738800, -960909648, -1054166400, 3797330688, 5755051920, -1616309461, -5300149647, 1505908677, 2363483196, -259095834, -554793846, 43136436, 86105724, -1781127, -8179155, 207045, 512760, -12367, -21777, 1074, 567, -36, -9, 1]>,<13,R![10732176, -224314272, 1575365112, -262521648, -7234157088, 1434460590, 30220750701, 19421971317, -3048382854, -5111276499, 27268956, 868173147, 84721995, -89450100, -12947877, 6773913, 1283901, -335124, -74838, 11916, 3150, -216, -69, 3, 1]>,<17,R![410004, 1394604, 1223748, 47979, -367251, -114396, 27672, 15678, 174, -681, -57, 9, 1]>],Snew);
    return Vf;
end function;