Bases: sage.modular.hecke.module.HeckeModule_generic
A Hecke module modeled on a free module over a commutative ring.
Returns the Hecke operator . This function is a synonym for hecke_operator().
EXAMPLE:
sage: M = ModularSymbols(11,2)
sage: M.T(3)
Hecke operator T_3 on Modular Symbols ...
Synonym for ambient_hecke_module. Return the ambient module associated to this module.
EXAMPLE:
sage: CuspForms(1, 12).ambient()
Modular Forms space of dimension 2 for Modular Group SL(2,Z) of weight 12 over Rational Field
Return the ambient module associated to this module. As this is an abstract base class, return NotImplementedError.
EXAMPLE:
sage: sage.modular.hecke.module.HeckeModule_free_module(QQ, 10, 3).ambient_hecke_module()
...
NotImplementedError
Synonym for ambient_hecke_module. Return the ambient module associated to this module.
EXAMPLE:
sage: CuspForms(1, 12).ambient_module()
Modular Forms space of dimension 2 for Modular Group SL(2,Z) of weight 12 over Rational Field
sage: sage.modular.hecke.module.HeckeModule_free_module(QQ, 10, 3).ambient_module()
...
NotImplementedError
Return the Atkin-Lehner operator on this space, if defined, where is a divisor of the level such that and are coprime.
EXAMPLES:
sage: M = ModularSymbols(11)
sage: w = M.atkin_lehner_operator()
sage: w
Hecke module morphism Atkin-Lehner operator W_11 defined by the matrix
[-1 0 0]
[ 0 -1 0]
[ 0 0 -1]
Domain: Modular Symbols space of dimension 3 for Gamma_0(11) of weight ...
Codomain: Modular Symbols space of dimension 3 for Gamma_0(11) of weight ...
sage: M = ModularSymbols(Gamma1(13))
sage: w = M.atkin_lehner_operator()
sage: w.fcp('x')
(x - 1)^7 * (x + 1)^8
sage: M = ModularSymbols(33)
sage: S = M.cuspidal_submodule()
sage: S.atkin_lehner_operator()
Hecke module morphism Atkin-Lehner operator W_33 defined by the matrix
[ 0 -1 0 1 -1 0]
[ 0 -1 0 0 0 0]
[ 0 -1 0 0 -1 1]
[ 1 -1 0 0 -1 0]
[ 0 0 0 0 -1 0]
[ 0 -1 1 0 -1 0]
Domain: Modular Symbols subspace of dimension 6 of Modular Symbols space ...
Codomain: Modular Symbols subspace of dimension 6 of Modular Symbols space ...
sage: S.atkin_lehner_operator(3)
Hecke module morphism Atkin-Lehner operator W_3 defined by the matrix
[ 0 1 0 -1 1 0]
[ 0 1 0 0 0 0]
[ 0 1 0 0 1 -1]
[-1 1 0 0 1 0]
[ 0 0 0 0 1 0]
[ 0 1 -1 0 1 0]
Domain: Modular Symbols subspace of dimension 6 of Modular Symbols space ...
Codomain: Modular Symbols subspace of dimension 6 of Modular Symbols space ...
sage: N = M.new_submodule()
sage: N.atkin_lehner_operator()
Hecke module morphism Atkin-Lehner operator W_33 defined by the matrix
[ 1 2/5 4/5]
[ 0 -1 0]
[ 0 0 -1]
Domain: Modular Symbols subspace of dimension 3 of Modular Symbols space ...
Codomain: Modular Symbols subspace of dimension 3 of Modular Symbols space ...
Returns a basis for self.
EXAMPLES:
sage: m = ModularSymbols(43)
sage: m.basis()
((1,0), (1,31), (1,32), (1,38), (1,39), (1,40), (1,41))
Return the matrix of the basis vectors of self (as vectors in some ambient module)
EXAMPLE:
sage: CuspForms(1, 12).basis_matrix()
[1 0]
Write x as a vector with respect to the basis given by self.basis().
EXAMPLES:
sage: S = ModularSymbols(11,2).cuspidal_submodule()
sage: S.0
(1,8)
sage: S.basis()
((1,8), (1,9))
sage: S.coordinate_vector(S.0)
(1, 0)
Returns the maximal decomposition of this Hecke module under the action of Hecke operators of index coprime to the level. This is the finest decomposition of self that we can obtain using factors obtained by taking kernels of Hecke operators.
Each factor in the decomposition is a Hecke submodule obtained as the kernel of acting on self, where n is coprime to the level and . If anemic is False, instead choose so that exactly divides the characteristic polynomial.
INPUT:
OUTPUT:
EXAMPLES:
sage: ModularSymbols(17,2).decomposition()
[
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 3 for Gamma_0(17) of weight 2 with sign 0 over Rational Field,
Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 3 for Gamma_0(17) of weight 2 with sign 0 over Rational Field
]
sage: ModularSymbols(Gamma1(10),4).decomposition()
[
Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 18 for Gamma_1(10) of weight 4 with sign 0 and over Rational Field,
Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 18 for Gamma_1(10) of weight 4 with sign 0 and over Rational Field,
Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 18 for Gamma_1(10) of weight 4 with sign 0 and over Rational Field,
Modular Symbols subspace of dimension 4 of Modular Symbols space of dimension 18 for Gamma_1(10) of weight 4 with sign 0 and over Rational Field,
Modular Symbols subspace of dimension 4 of Modular Symbols space of dimension 18 for Gamma_1(10) of weight 4 with sign 0 and over Rational Field,
Modular Symbols subspace of dimension 4 of Modular Symbols space of dimension 18 for Gamma_1(10) of weight 4 with sign 0 and over Rational Field
]
sage: ModularSymbols(GammaH(12, [11])).decomposition()
[
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 9 for Congruence Subgroup Gamma_H(12) with H generated by [11] of weight 2 with sign 0 and over Rational Field,
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 9 for Congruence Subgroup Gamma_H(12) with H generated by [11] of weight 2 with sign 0 and over Rational Field,
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 9 for Congruence Subgroup Gamma_H(12) with H generated by [11] of weight 2 with sign 0 and over Rational Field,
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 9 for Congruence Subgroup Gamma_H(12) with H generated by [11] of weight 2 with sign 0 and over Rational Field,
Modular Symbols subspace of dimension 5 of Modular Symbols space of dimension 9 for Congruence Subgroup Gamma_H(12) with H generated by [11] of weight 2 with sign 0 and over Rational Field
]
The degree of this Hecke module (i.e. the rank of the ambient free module)
EXAMPLE:
sage: CuspForms(1, 12).degree()
2
Return an eigenvector for the Hecke operators acting on the linear dual of this space. This eigenvector will have entries in an extension of the base ring of degree equal to the dimension of this space.
INPUT:
OUTPUT: A vector with entries possibly in an extension of the base ring. This vector is an eigenvector for all Hecke operators acting via their transpose.
If lift = False, instead return an eigenvector in the subspace for the Hecke operators on the dual space. I.e., this is an eigenvector for the restrictions of Hecke operators to the dual space.
Note
EXAMPLE:
sage: ModularSymbols(14).cuspidal_subspace().simple_factors()[1].dual_eigenvector()
(0, 1, 0, 0, 0)
The matrix of the Hecke operator acting on the dual embedded representation of self.
EXAMPLE:
sage: CuspForms(1, 24).dual_hecke_matrix(5)
[ 44656110 -15040]
[-307849789440 28412910]
Assuming that self is a simple space, return the eigenvalue of the Hecke operator on self.
INPUT:
EXAMPLES:
sage: A = ModularSymbols(125,sign=1).new_subspace()[0]
sage: A.eigenvalue(7)
-3
sage: A.eigenvalue(3)
-alpha - 2
sage: A.eigenvalue(3,'w')
-w - 2
sage: A.eigenvalue(3,'z').charpoly('x')
x^2 + 3*x + 1
sage: A.hecke_polynomial(3)
x^2 + 3*x + 1
sage: M = ModularSymbols(Gamma1(17)).decomposition()[8].plus_submodule()
sage: M.eigenvalue(2,'a')
a
sage: M.eigenvalue(4,'a')
4/3*a^3 + 17/3*a^2 + 28/3*a + 8/3
Note
If this Hecke module was computed via a decomposition of another Hecke module, this is the corresponding number. Otherwise return -1.
EXAMPLES:
sage: ModularSymbols(23)[0].factor_number()
0
sage: ModularSymbols(23).factor_number()
-1
Return the nth basis vector of the space.
EXAMPLE:
sage: ModularSymbols(23).gen(1)
(1,17)
The matrix of the Hecke operator acting on given basis.
EXAMPLE:
sage: C = CuspForms(1, 16)
sage: C.hecke_matrix(3)
[-3348]
Returns the -th Hecke operator .
INPUT:
EXAMPLES:
sage: M = ModularSymbols(11,2)
sage: T = M.hecke_operator(3) ; T
Hecke operator T_3 on Modular Symbols space of dimension 3 for Gamma_0(11) of weight 2 with sign 0 over Rational Field
sage: T.matrix()
[ 4 0 -1]
[ 0 -1 0]
[ 0 0 -1]
sage: T(M.0)
4*(1,0) - (1,9)
sage: S = M.cuspidal_submodule()
sage: T = S.hecke_operator(3) ; T
Hecke operator T_3 on Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 3 for Gamma_0(11) of weight 2 with sign 0 over Rational Field
sage: T.matrix()
[-1 0]
[ 0 -1]
sage: T(S.0)
-(1,8)
Return the characteristic polynomial of the Hecke operator acting on this space.
INPUT:
OUTPUT: a polynomial
EXAMPLE:
sage: ModularSymbols(11,2).hecke_polynomial(3)
x^3 - 2*x^2 - 7*x - 4
Return True if this space is simple as a module for the corresponding Hecke algebra. Raises NotImplementedError, as this is an abstract base class.
EXAMPLE:
sage: sage.modular.hecke.module.HeckeModule_free_module(QQ, 10, 3).is_simple()
...
NotImplementedError
Returns True if and only if only it is possible to split off a nontrivial generalized eigenspace of self as the kernel of some Hecke operator (not necessarily prime to the level). Note that the direct sum of several copies of the same simple module is not splittable in this sense.
EXAMPLE:
sage: M = ModularSymbols(Gamma0(64)).cuspidal_subspace()
sage: M.is_splittable()
True
sage: M.simple_factors()[0].is_splittable()
False
Returns true if and only if only it is possible to split off a nontrivial generalized eigenspace of self as the kernel of some Hecke operator of index coprime to the level. Note that the direct sum of several copies of the same simple module is not splittable in this sense.
EXAMPLE:
sage: M = ModularSymbols(Gamma0(64)).cuspidal_subspace() sage: M.is_splittable_anemic() True sage: M.simple_factors()[0].is_splittable_anemic() False
Return True if self is a submodule of other.
EXAMPLES:
sage: M = ModularSymbols(Gamma0(64))
sage: M[0].is_submodule(M)
True
sage: CuspForms(1, 24).is_submodule(ModularForms(1, 24))
True
sage: CuspForms(1, 12).is_submodule(CuspForms(3, 12))
False
Number of generators of self (equal to the rank).
EXAMPLE:
sage: ModularForms(1, 12).ngens()
2
Return the projection map from the ambient space to self.
ALGORITHM: Let be the matrix whose columns are obtained by concatenating together a basis for the factors of the ambient space. Then the projection matrix onto self is the submatrix of obtained from the rows corresponding to self, i.e., if the basis vectors for self appear as columns through of , then the projection matrix is got from rows through of . This is because projection with respect to the B basis is just given by an row slice of a diagonal matrix D with 1’s in the through positions, so projection with respect to the standard basis is given by , which is just rows through of .
EXAMPLES:
sage: e = EllipticCurve('34a')
sage: m = ModularSymbols(34); s = m.cuspidal_submodule()
sage: d = s.decomposition(7)
sage: d
[
Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 9 for Gamma_0(34) of weight 2 with sign 0 over Rational Field,
Modular Symbols subspace of dimension 4 of Modular Symbols space of dimension 9 for Gamma_0(34) of weight 2 with sign 0 over Rational Field
]
sage: a = d[0]; a
Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 9 for Gamma_0(34) of weight 2 with sign 0 over Rational Field
sage: pi = a.projection()
sage: pi(m([0,oo]))
-1/6*(2,7) + 1/6*(2,13) - 1/6*(2,31) + 1/6*(2,33)
sage: M = ModularSymbols(53,sign=1)
sage: S = M.cuspidal_subspace()[1] ; S
Modular Symbols subspace of dimension 3 of Modular Symbols space of dimension 5 for Gamma_0(53) of weight 2 with sign 1 over Rational Field
sage: p = S.projection()
sage: S.basis()
((1,33) - (1,37), (1,35), (1,49))
sage: [ p(x) for x in S.basis() ]
[(1,33) - (1,37), (1,35), (1,49)]
Assuming that self is a simple space of modular symbols, return the eigenvalues of the Hecke operators on self. See self.eigenvalue(n) for more details.
INPUT:
EXAMPLES: These computations use pseudo-random numbers, so we set the seed for reproducible testing.
sage: set_random_seed(0)
The computations also use cached results from other computations, so we clear the caches for reproducible testing.
sage: ModularSymbols_clear_cache()
We compute eigenvalues for newforms of level 62.
sage: M = ModularSymbols(62,2,sign=-1)
sage: S = M.cuspidal_submodule().new_submodule()
sage: [A.system_of_eigenvalues(3) for A in S.decomposition()]
[[1, 1, 0], [1, -1, -alpha - 1]]
Next we define a function that does the above:
sage: def b(N,k=2):
... t=cputime()
... S = ModularSymbols(N,k,sign=-1).cuspidal_submodule().new_submodule()
... for A in S.decomposition():
... print N, A.system_of_eigenvalues(5)
sage: b(63)
63 [1, 1, 0, -1, 2]
63 [1, alpha, 0, 1, -2*alpha]
This example illustrates finding field over which the eigenvalues are defined:
sage: M = ModularSymbols(23,2,sign=1).cuspidal_submodule().new_submodule()
sage: v = M.system_of_eigenvalues(10); v
[1, alpha, -2*alpha - 1, -alpha - 1, 2*alpha, alpha - 2, 2*alpha + 2, -2*alpha - 1, 2, -2*alpha + 2]
sage: v[0].parent()
Number Field in alpha with defining polynomial x^2 + x - 1
This example illustrates setting the print name of the eigenvalue field.
sage: A = ModularSymbols(125,sign=1).new_subspace()[0]
sage: A.system_of_eigenvalues(10)
[1, alpha, -alpha - 2, -alpha - 1, 0, -alpha - 1, -3, -2*alpha - 1, 3*alpha + 2, 0]
sage: A.system_of_eigenvalues(10,'x')
[1, x, -x - 2, -x - 1, 0, -x - 1, -3, -2*x - 1, 3*x + 2, 0]
Returns the weight of this Hecke module.
INPUT:
OUTPUT:
EXAMPLES:
sage: m = ModularSymbols(20, weight=2)
sage: m.weight()
2
Return the zero submodule of self.
EXAMPLES:
sage: ModularSymbols(11,4).zero_submodule()
Modular Symbols subspace of dimension 0 of Modular Symbols space of dimension 6 for Gamma_0(11) of weight 4 with sign 0 over Rational Field
sage: CuspForms(11,4).zero_submodule()
Modular Forms subspace of dimension 0 of Modular Forms space of dimension 4 for Congruence Subgroup Gamma0(11) of weight 4 over Rational Field
Bases: sage.modules.module.Module
A very general base class for Hecke modules.
We define a Hecke module of weight to be a module over a commutative ring equipped with an action of operators for all positive integers coprime to some integer for coprime, and for powers of a prime , , where is some endomorphism of the module which commutes with the .
We distinguish between full Hecke modules, which also have an action of operators for not assumed to be coprime to the level, and anemic Hecke modules, for which this does not hold.
Return the Hecke algebra associated to this Hecke module.
EXAMPLES:
sage: T = ModularSymbols(1,12).hecke_algebra()
sage: A = ModularSymbols(1,12).anemic_hecke_algebra()
sage: T == A
False
sage: A
Anemic Hecke algebra acting on Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
sage: A.is_anemic()
True
The character of this space. As this is an abstract base class, return None.
EXAMPLE:
sage: sage.modular.hecke.module.HeckeModule_generic(QQ, 10).character() is None
True
Synonym for rank.
EXAMPLE:
sage: M = sage.modular.hecke.module.HeckeModule_generic(QQ, 10).dimension()
...
NotImplementedError: Derived subclasses must implement rank
Return the Hecke algebra associated to this Hecke module.
EXAMPLES:
sage: T = ModularSymbols(Gamma1(5),3).hecke_algebra()
sage: T
Full Hecke algebra acting on Modular Symbols space of dimension 4 for Gamma_1(5) of weight 3 with sign 0 and over Rational Field
sage: T.is_anemic()
False
sage: M = ModularSymbols(37,sign=1)
sage: E, A, B = M.decomposition()
sage: A.hecke_algebra() == B.hecke_algebra()
False
Return True if this space is invariant under all Hecke operators.
Since self is guaranteed to be an anemic Hecke module, the significance of this function is that it also ensures invariance under Hecke operators of index that divide the level.
EXAMPLES:
sage: M = ModularSymbols(22); M.is_full_hecke_module()
True
sage: M.submodule(M.free_module().span([M.0.list()]), check=False).is_full_hecke_module()
False
Return True if self is invariant under the Hecke operator .
Since self is guaranteed to be an anemic Hecke module it is only interesting to call this function when is not coprime to the level.
EXAMPLES:
sage: M = ModularSymbols(22).cuspidal_subspace()
sage: M.is_hecke_invariant(2)
True
We use check=False to create a nasty “module” that is not invariant under :
sage: S = M.submodule(M.free_module().span([M.0.list()]), check=False); S
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 7 for Gamma_0(22) of weight 2 with sign 0 over Rational Field
sage: S.is_hecke_invariant(2)
False
sage: [n for n in range(1,12) if S.is_hecke_invariant(n)]
[1, 3, 5, 7, 9, 11]
Return True if this Hecke module has dimension 0.
EXAMPLES:
sage: ModularSymbols(11).is_zero()
False
sage: ModularSymbols(11).old_submodule().is_zero()
True
sage: CuspForms(10).is_zero()
True
sage: CuspForms(1,12).is_zero()
False
Returns the level of this modular symbols space.
INPUT:
OUTPUT:
EXAMPLES:
sage: m = ModularSymbols(20)
sage: m.level()
20
Return the rank of this module over its base ring. Returns NotImplementedError, since this is an abstract base class.
EXAMPLES:
sage: sage.modular.hecke.module.HeckeModule_generic(QQ, 10).rank()
...
NotImplementedError: Derived subclasses must implement rank
Return the submodule of self corresponding to X. As this is an abstract base class, this raises a NotImplementedError.
EXAMPLES:
sage: sage.modular.hecke.module.HeckeModule_generic(QQ, 10).submodule(0)
...
NotImplementedError: Derived subclasses should implement submodule
Return True if x is a Hecke module.
EXAMPLES:
sage: from sage.modular.hecke.module import is_HeckeModule
sage: is_HeckeModule(ModularForms(Gamma0(7), 4))
True
sage: is_HeckeModule(QQ^3)
False
sage: is_HeckeModule(J0(37).homology())
True