Hecke algebras#

In Sage a “Hecke algebra” always refers to an algebra of endomorphisms of some explicit module, rather than the abstract Hecke algebra of double cosets attached to a subgroup of the modular group.

We distinguish between “anemic Hecke algebras”, which are algebras of Hecke operators whose indices do not divide some integer N (the level), and “full Hecke algebras”, which include Hecke operators coprime to the level. Morphisms in the category of Hecke modules are not required to commute with the action of the full Hecke algebra, only with the anemic algebra.

sage.modular.hecke.algebra.AnemicHeckeAlgebra[source]#

alias of HeckeAlgebra_anemic

sage.modular.hecke.algebra.HeckeAlgebra[source]#

alias of HeckeAlgebra_full

class sage.modular.hecke.algebra.HeckeAlgebra_anemic(M)[source]#

Bases: HeckeAlgebra_base

An anemic Hecke algebra, generated by Hecke operators with index coprime to the level.

gens()[source]#

Return a generator over all Hecke operator \(T_n\) for \(n = 1, 2, 3, \ldots\), with \(n\) coprime to the level. This is an infinite sequence.

EXAMPLES:

sage: T = ModularSymbols(12,2).anemic_hecke_algebra()
sage: g = T.gens()
sage: next(g)
Hecke operator T_1 on Modular Symbols space of dimension 5 for Gamma_0(12) of weight 2 with sign 0 over Rational Field
sage: next(g)
Hecke operator T_5 on Modular Symbols space of dimension 5 for Gamma_0(12) of weight 2 with sign 0 over Rational Field
>>> from sage.all import *
>>> T = ModularSymbols(Integer(12),Integer(2)).anemic_hecke_algebra()
>>> g = T.gens()
>>> next(g)
Hecke operator T_1 on Modular Symbols space of dimension 5 for Gamma_0(12) of weight 2 with sign 0 over Rational Field
>>> next(g)
Hecke operator T_5 on Modular Symbols space of dimension 5 for Gamma_0(12) of weight 2 with sign 0 over Rational Field
hecke_operator(n)[source]#

Return the \(n\)-th Hecke operator, for \(n\) any positive integer coprime to the level.

EXAMPLES:

sage: T = ModularSymbols(Gamma1(5),3).anemic_hecke_algebra()
sage: T.hecke_operator(2)
Hecke operator T_2 on Modular Symbols space of dimension 4 for Gamma_1(5) of weight 3 with sign 0 over Rational Field
sage: T.hecke_operator(5)
Traceback (most recent call last):
...
IndexError: Hecke operator T_5 not defined in the anemic Hecke algebra
>>> from sage.all import *
>>> T = ModularSymbols(Gamma1(Integer(5)),Integer(3)).anemic_hecke_algebra()
>>> T.hecke_operator(Integer(2))
Hecke operator T_2 on Modular Symbols space of dimension 4 for Gamma_1(5) of weight 3 with sign 0 over Rational Field
>>> T.hecke_operator(Integer(5))
Traceback (most recent call last):
...
IndexError: Hecke operator T_5 not defined in the anemic Hecke algebra
is_anemic()[source]#

Return True, since this is the anemic Hecke algebra.

EXAMPLES:

sage: H = CuspForms(3, 12).anemic_hecke_algebra()
sage: H.is_anemic()
True
>>> from sage.all import *
>>> H = CuspForms(Integer(3), Integer(12)).anemic_hecke_algebra()
>>> H.is_anemic()
True
class sage.modular.hecke.algebra.HeckeAlgebra_base(M)[source]#

Bases: CachedRepresentation, CommutativeRing

Base class for algebras of Hecke operators on a fixed Hecke module.

INPUT:

  • M – a Hecke module

EXAMPLES:

sage: CuspForms(1, 12).hecke_algebra() # indirect doctest
Full Hecke algebra acting on Cuspidal subspace of dimension 1 of Modular Forms space of dimension 2 for Modular Group SL(2,Z) of weight 12 over Rational Field
>>> from sage.all import *
>>> CuspForms(Integer(1), Integer(12)).hecke_algebra() # indirect doctest
Full Hecke algebra acting on Cuspidal subspace of dimension 1 of Modular Forms space of dimension 2 for Modular Group SL(2,Z) of weight 12 over Rational Field
basis()[source]#

Return a basis for this Hecke algebra as a free module over its base ring.

EXAMPLES:

sage: ModularSymbols(Gamma1(3), 3).hecke_algebra().basis()
(Hecke operator on Modular Symbols space of dimension 2 for Gamma_1(3) of weight 3 with sign 0 over Rational Field defined by:
[1 0]
[0 1],
Hecke operator on Modular Symbols space of dimension 2 for Gamma_1(3) of weight 3 with sign 0 over Rational Field defined by:
[0 0]
[0 2])

sage: M = ModularSymbols(Gamma0(22), sign=1)
sage: H = M.hecke_algebra()
sage: B = H.basis()
sage: len(B)
5
sage: all(b in H for b in B)
True
sage: [B[0, 0] for B in M.anemic_hecke_algebra().basis()]
Traceback (most recent call last):
...
NotImplementedError: basis not implemented for anemic Hecke algebra
>>> from sage.all import *
>>> ModularSymbols(Gamma1(Integer(3)), Integer(3)).hecke_algebra().basis()
(Hecke operator on Modular Symbols space of dimension 2 for Gamma_1(3) of weight 3 with sign 0 over Rational Field defined by:
[1 0]
[0 1],
Hecke operator on Modular Symbols space of dimension 2 for Gamma_1(3) of weight 3 with sign 0 over Rational Field defined by:
[0 0]
[0 2])

>>> M = ModularSymbols(Gamma0(Integer(22)), sign=Integer(1))
>>> H = M.hecke_algebra()
>>> B = H.basis()
>>> len(B)
5
>>> all(b in H for b in B)
True
>>> [B[Integer(0), Integer(0)] for B in M.anemic_hecke_algebra().basis()]
Traceback (most recent call last):
...
NotImplementedError: basis not implemented for anemic Hecke algebra
diamond_bracket_matrix(d)[source]#

Return the matrix of the diamond bracket operator \(\langle d \rangle\).

EXAMPLES:

sage: T = ModularSymbols(Gamma1(7), 4).hecke_algebra()
sage: d3 = T.diamond_bracket_matrix(3)
sage: x = d3.charpoly().variables()[0]
sage: d3.charpoly() == (x^3-1)^4
True
>>> from sage.all import *
>>> T = ModularSymbols(Gamma1(Integer(7)), Integer(4)).hecke_algebra()
>>> d3 = T.diamond_bracket_matrix(Integer(3))
>>> x = d3.charpoly().variables()[Integer(0)]
>>> d3.charpoly() == (x**Integer(3)-Integer(1))**Integer(4)
True
diamond_bracket_operator(d)[source]#

Return the diamond bracket operator \(\langle d \rangle\).

EXAMPLES:

sage: T = ModularSymbols(Gamma1(7), 4).hecke_algebra()
sage: T.diamond_bracket_operator(3)
Diamond bracket operator <3> on Modular Symbols space of dimension 12 for Gamma_1(7) of weight 4 with sign 0 over Rational Field
>>> from sage.all import *
>>> T = ModularSymbols(Gamma1(Integer(7)), Integer(4)).hecke_algebra()
>>> T.diamond_bracket_operator(Integer(3))
Diamond bracket operator <3> on Modular Symbols space of dimension 12 for Gamma_1(7) of weight 4 with sign 0 over Rational Field
discriminant()[source]#

Return the discriminant of this Hecke algebra.

This is the determinant of the matrix \({\rm Tr}(x_i x_j)\) where \(x_1, \dots,x_d\) is a basis for self, and \({\rm Tr}(x)\) signifies the trace (in the sense of linear algebra) of left multiplication by \(x\) on the algebra (not the trace of the operator \(x\) acting on the underlying Hecke module!). For further discussion and conjectures see Calegari + Stein, Conjectures about discriminants of Hecke algebras of prime level, Springer LNCS 3076.

EXAMPLES:

sage: BrandtModule(3, 4).hecke_algebra().discriminant()
1
sage: ModularSymbols(65, sign=1).cuspidal_submodule().hecke_algebra().discriminant()
6144
sage: ModularSymbols(1,4,sign=1).cuspidal_submodule().hecke_algebra().discriminant()
1
sage: H = CuspForms(1, 24).hecke_algebra()
sage: H.discriminant()
83041344
>>> from sage.all import *
>>> BrandtModule(Integer(3), Integer(4)).hecke_algebra().discriminant()
1
>>> ModularSymbols(Integer(65), sign=Integer(1)).cuspidal_submodule().hecke_algebra().discriminant()
6144
>>> ModularSymbols(Integer(1),Integer(4),sign=Integer(1)).cuspidal_submodule().hecke_algebra().discriminant()
1
>>> H = CuspForms(Integer(1), Integer(24)).hecke_algebra()
>>> H.discriminant()
83041344
gen(n)[source]#

Return the \(n\)-th Hecke operator.

EXAMPLES:

sage: T = ModularSymbols(11).hecke_algebra()
sage: T.gen(2)
Hecke operator T_2 on Modular Symbols space of dimension 3 for Gamma_0(11) of weight 2 with sign 0 over Rational Field
>>> from sage.all import *
>>> T = ModularSymbols(Integer(11)).hecke_algebra()
>>> T.gen(Integer(2))
Hecke operator T_2 on Modular Symbols space of dimension 3 for Gamma_0(11) of weight 2 with sign 0 over Rational Field
gens()[source]#

Return a generator over all Hecke operator \(T_n\) for \(n = 1, 2, 3, \ldots\). This is infinite.

EXAMPLES:

sage: T = ModularSymbols(1,12).hecke_algebra()
sage: g = T.gens()
sage: next(g)
Hecke operator T_1 on Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
sage: next(g)
Hecke operator T_2 on Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
>>> from sage.all import *
>>> T = ModularSymbols(Integer(1),Integer(12)).hecke_algebra()
>>> g = T.gens()
>>> next(g)
Hecke operator T_1 on Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
>>> next(g)
Hecke operator T_2 on Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
hecke_matrix(n, *args, **kwds)[source]#

Return the matrix of the n-th Hecke operator \(T_n\).

EXAMPLES:

sage: T = ModularSymbols(1,12).hecke_algebra()
sage: T.hecke_matrix(2)
[ -24    0    0]
[   0  -24    0]
[4860    0 2049]
>>> from sage.all import *
>>> T = ModularSymbols(Integer(1),Integer(12)).hecke_algebra()
>>> T.hecke_matrix(Integer(2))
[ -24    0    0]
[   0  -24    0]
[4860    0 2049]
hecke_operator(n)[source]#

Return the \(n\)-th Hecke operator \(T_n\).

EXAMPLES:

sage: T = ModularSymbols(1,12).hecke_algebra()
sage: T.hecke_operator(2)
Hecke operator T_2 on Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
>>> from sage.all import *
>>> T = ModularSymbols(Integer(1),Integer(12)).hecke_algebra()
>>> T.hecke_operator(Integer(2))
Hecke operator T_2 on Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
is_noetherian()[source]#

Return True if this Hecke algebra is Noetherian as a ring.

This is true if and only if the base ring is Noetherian.

EXAMPLES:

sage: CuspForms(1, 12).anemic_hecke_algebra().is_noetherian()
True
>>> from sage.all import *
>>> CuspForms(Integer(1), Integer(12)).anemic_hecke_algebra().is_noetherian()
True
level()[source]#

Return the level of this Hecke algebra, which is (by definition) the level of the Hecke module on which it acts.

EXAMPLES:

sage: ModularSymbols(37).hecke_algebra().level()
37
>>> from sage.all import *
>>> ModularSymbols(Integer(37)).hecke_algebra().level()
37
matrix_space()[source]#

Return the underlying matrix space of this module.

EXAMPLES:

sage: CuspForms(3, 24, base_ring=Qp(5)).anemic_hecke_algebra().matrix_space()
Full MatrixSpace of 7 by 7 dense matrices over 5-adic Field with capped relative precision 20
>>> from sage.all import *
>>> CuspForms(Integer(3), Integer(24), base_ring=Qp(Integer(5))).anemic_hecke_algebra().matrix_space()
Full MatrixSpace of 7 by 7 dense matrices over 5-adic Field with capped relative precision 20
module()[source]#

The Hecke module on which this algebra is acting.

EXAMPLES:

sage: T = ModularSymbols(1,12).hecke_algebra()
sage: T.module()
Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
>>> from sage.all import *
>>> T = ModularSymbols(Integer(1),Integer(12)).hecke_algebra()
>>> T.module()
Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
ngens()[source]#

The size of the set of generators returned by gens(), which is clearly infinity.

(This is not necessarily a minimal set of generators.)

EXAMPLES:

sage: CuspForms(1, 12).anemic_hecke_algebra().ngens()
+Infinity
>>> from sage.all import *
>>> CuspForms(Integer(1), Integer(12)).anemic_hecke_algebra().ngens()
+Infinity
one()[source]#

Return the unit of the Hecke algebra.

EXAMPLES:

sage: M = ModularSymbols(11,2,1)
sage: H = M.hecke_algebra()
sage: H.one()
Hecke operator on Modular Symbols space of dimension 2 for Gamma_0(11) of weight 2 with sign 1 over Rational Field defined by:
[1 0]
[0 1]
>>> from sage.all import *
>>> M = ModularSymbols(Integer(11),Integer(2),Integer(1))
>>> H = M.hecke_algebra()
>>> H.one()
Hecke operator on Modular Symbols space of dimension 2 for Gamma_0(11) of weight 2 with sign 1 over Rational Field defined by:
[1 0]
[0 1]
rank()[source]#

The rank of this Hecke algebra as a module over its base ring. Not implemented at present.

EXAMPLES:

sage: ModularSymbols(Gamma1(3), 3).hecke_algebra().rank()
Traceback (most recent call last):
...
NotImplementedError
>>> from sage.all import *
>>> ModularSymbols(Gamma1(Integer(3)), Integer(3)).hecke_algebra().rank()
Traceback (most recent call last):
...
NotImplementedError
class sage.modular.hecke.algebra.HeckeAlgebra_full(M)[source]#

Bases: HeckeAlgebra_base

A full Hecke algebra (including the operators \(T_n\) where \(n\) is not assumed to be coprime to the level).

anemic_subalgebra()[source]#

The subalgebra of self generated by the Hecke operators of index coprime to the level.

EXAMPLES:

sage: H = CuspForms(3, 12).hecke_algebra()
sage: H.anemic_subalgebra()
Anemic Hecke algebra acting on Cuspidal subspace of dimension 3 of Modular Forms space of dimension 5 for Congruence Subgroup Gamma0(3) of weight 12 over Rational Field
>>> from sage.all import *
>>> H = CuspForms(Integer(3), Integer(12)).hecke_algebra()
>>> H.anemic_subalgebra()
Anemic Hecke algebra acting on Cuspidal subspace of dimension 3 of Modular Forms space of dimension 5 for Congruence Subgroup Gamma0(3) of weight 12 over Rational Field
is_anemic()[source]#

Return False, since this the full Hecke algebra.

EXAMPLES:

sage: H = CuspForms(3, 12).hecke_algebra()
sage: H.is_anemic()
False
>>> from sage.all import *
>>> H = CuspForms(Integer(3), Integer(12)).hecke_algebra()
>>> H.is_anemic()
False
sage.modular.hecke.algebra.is_HeckeAlgebra(x)[source]#

Return True if x is of type HeckeAlgebra.

EXAMPLES:

sage: from sage.modular.hecke.algebra import is_HeckeAlgebra
sage: is_HeckeAlgebra(CuspForms(1, 12).anemic_hecke_algebra())
doctest:warning...
DeprecationWarning: the function is_HeckeAlgebra is deprecated;
use 'isinstance(..., HeckeAlgebra_base)' instead
See https://github.com/sagemath/sage/issues/37895 for details.
True
sage: is_HeckeAlgebra(ZZ)
False
>>> from sage.all import *
>>> from sage.modular.hecke.algebra import is_HeckeAlgebra
>>> is_HeckeAlgebra(CuspForms(Integer(1), Integer(12)).anemic_hecke_algebra())
doctest:warning...
DeprecationWarning: the function is_HeckeAlgebra is deprecated;
use 'isinstance(..., HeckeAlgebra_base)' instead
See https://github.com/sagemath/sage/issues/37895 for details.
True
>>> is_HeckeAlgebra(ZZ)
False