# Hecke operators¶

class sage.modular.hecke.hecke_operator.DiamondBracketOperator(parent, d)

The diamond bracket operator $$\langle d \rangle$$ for some $$d \in \ZZ / N\ZZ$$ (which need not be a unit, although if it is not, the operator will be zero).

class sage.modular.hecke.hecke_operator.HeckeAlgebraElement(parent)

Base class for elements of Hecke algebras.

apply_sparse(x)

Apply this Hecke operator to x, where we avoid computing the matrix of x if possible.

EXAMPLES:

sage: M = ModularSymbols(11)
sage: T = M.hecke_operator(23)
sage: T.apply_sparse(M.gen(0))
24*(1,0) - 5*(1,9)

charpoly(var='x')

Return the characteristic polynomial of this Hecke operator.

INPUT:

• var - string (default: ‘x’)

OUTPUT: a monic polynomial in the given variable.

EXAMPLES:

sage: M = ModularSymbols(Gamma1(6),4)
sage: M.hecke_operator(2).charpoly('x')
x^6 - 14*x^5 + 29*x^4 + 172*x^3 - 124*x^2 - 320*x + 256

codomain()

The codomain of this operator. This is the Hecke module associated to the parent Hecke algebra.

EXAMPLE:

sage: R = ModularForms(Gamma0(7), 4).hecke_algebra()
sage: sage.modular.hecke.hecke_operator.HeckeAlgebraElement(R).codomain()
Modular Forms space of dimension 3 for Congruence Subgroup Gamma0(7) of weight 4 over Rational Field

decomposition()

Decompose the Hecke module under the action of this Hecke operator.

EXAMPLES:

sage: M = ModularSymbols(11)
sage: t2 = M.hecke_operator(2)
sage: t2.decomposition()
[
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 3 for Gamma_0(11) 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(11) of weight 2 with sign 0 over Rational Field
]

sage: M = ModularSymbols(33, sign=1).new_submodule()
sage: T = M.hecke_operator(2)
sage: T.decomposition()
[
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 6 for Gamma_0(33) of weight 2 with sign 1 over Rational Field,
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 6 for Gamma_0(33) of weight 2 with sign 1 over Rational Field
]

det()

Return the determinant of this Hecke operator.

EXAMPLES:

sage: M = ModularSymbols(23)
sage: T = M.hecke_operator(3)
sage: T.det()
100

domain()

The domain of this operator. This is the Hecke module associated to the parent Hecke algebra.

EXAMPLE:

sage: R = ModularForms(Gamma0(7), 4).hecke_algebra()
sage: sage.modular.hecke.hecke_operator.HeckeAlgebraElement(R).domain()
Modular Forms space of dimension 3 for Congruence Subgroup Gamma0(7) of weight 4 over Rational Field

fcp(var='x')

Return the factorization of the characteristic polynomial of this Hecke operator.

EXAMPLES:

sage: M = ModularSymbols(23)
sage: T = M.hecke_operator(3)
sage: T.fcp('x')
(x - 4) * (x^2 - 5)^2

hecke_module_morphism()

Return the endomorphism of Hecke modules defined by the matrix attached to this Hecke operator.

EXAMPLES:

sage: M = ModularSymbols(Gamma1(13))
sage: t = M.hecke_operator(2)
sage: t
Hecke operator T_2 on Modular Symbols space of dimension 15 for Gamma_1(13) of weight 2 with sign 0 and over Rational Field
sage: t.hecke_module_morphism()
Hecke module morphism T_2 defined by the matrix
[ 2  1  0  0  0  0  0  0  0  0  0  0  0  0 -1]
[ 0  2  0  1  0  0  0 -1  0  0  0  0  0  0  0]
[ 0  0  2  0  0  1 -1  1  0 -1  0  1 -1  0  0]
[ 0  0  0  2  1  0  1  0  0  0  1 -1  0  0  0]
[ 0  0  1  0  2  0  0  0  0  1 -1  0  0  0  1]
[ 1  0  0  0  0  2  0  0  0  0  0  0  1  0  0]
[ 0  0  0  0  0  0  0  1 -1  1 -1  0 -1  1  1]
[ 0  0  0  0  0  0  0 -1  1  1  0  0 -1  1  0]
[ 0  0  0  0  0  0 -1 -1  0  1 -1 -1  1  0 -1]
[ 0  0  0  0  0  0 -2  0  2 -2  0  2 -2  1 -1]
[ 0  0  0  0  0  0  0  0  2 -1  1  0  0  1 -1]
[ 0  0  0  0  0  0 -1  1  2 -1  1  0 -2  2  0]
[ 0  0  0  0  0  0  0  0  1  1  0 -1  0  0  0]
[ 0  0  0  0  0  0 -1  1  1  0  1  1 -1  0  0]
[ 0  0  0  0  0  0  2  0  0  0  2 -1  0  1 -1]
Domain: Modular Symbols space of dimension 15 for Gamma_1(13) of weight ...
Codomain: Modular Symbols space of dimension 15 for Gamma_1(13) of weight ...

image()

Return the image of this Hecke operator.

EXAMPLES:

sage: M = ModularSymbols(23)
sage: T = M.hecke_operator(3)
sage: T.fcp('x')
(x - 4) * (x^2 - 5)^2
sage: T.image()
Modular Symbols subspace of dimension 5 of Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Rational Field
sage: (T-4).image()
Modular Symbols subspace of dimension 4 of Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Rational Field
sage: (T**2-5).image()
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Rational Field

kernel()

Return the kernel of this Hecke operator.

EXAMPLES:

sage: M = ModularSymbols(23)
sage: T = M.hecke_operator(3)
sage: T.fcp('x')
(x - 4) * (x^2 - 5)^2
sage: T.kernel()
Modular Symbols subspace of dimension 0 of Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Rational Field
sage: (T-4).kernel()
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Rational Field
sage: (T**2-5).kernel()
Modular Symbols subspace of dimension 4 of Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Rational Field

trace()

Return the trace of this Hecke operator.

sage: M = ModularSymbols(1,12)
sage: T = M.hecke_operator(2)
sage: T.trace()
2001

class sage.modular.hecke.hecke_operator.HeckeAlgebraElement_matrix(parent, A)

An element of the Hecke algebra represented by a matrix.

matrix()

Return the matrix that defines this Hecke algebra element.

EXAMPLES:

sage: M = ModularSymbols(1,12)
sage: T = M.hecke_operator(2).matrix_form()
sage: T.matrix()
[ -24    0    0]
[   0  -24    0]
[4860    0 2049]

class sage.modular.hecke.hecke_operator.HeckeOperator(parent, n)

The Hecke operator $$T_n$$ for some $$n$$ (which need not be coprime to the level). The matrix is not computed until it is needed.

index()

Return the index of this Hecke operator, i.e., if this Hecke operator is $$T_n$$, return the int $$n$$.

EXAMPLES:

sage: T = ModularSymbols(11).hecke_operator(17)
sage: T.index()
17

matrix(*args, **kwds)

Return the matrix underlying this Hecke operator.

EXAMPLES:

sage: T = ModularSymbols(11).hecke_operator(17)
sage: T.matrix()
[18  0 -4]
[ 0 -2  0]
[ 0  0 -2]

matrix_form()

Return the matrix form of this element of a Hecke algebra.

sage: T = ModularSymbols(11).hecke_operator(17)
sage: T.matrix_form()
Hecke operator on Modular Symbols space of dimension 3 for Gamma_0(11) of weight 2 with sign 0 over Rational Field defined by:
[18  0 -4]
[ 0 -2  0]
[ 0  0 -2]

sage.modular.hecke.hecke_operator.is_HeckeAlgebraElement(x)

Return True if x is of type HeckeAlgebraElement.

EXAMPLES:

sage: from sage.modular.hecke.hecke_operator import is_HeckeAlgebraElement
sage: M = ModularSymbols(Gamma0(7), 4)
sage: is_HeckeAlgebraElement(M.T(3))
True
sage: is_HeckeAlgebraElement(M.T(3) + M.T(5))
True

sage.modular.hecke.hecke_operator.is_HeckeOperator(x)

Return True if x is of type HeckeOperator.

EXAMPLES:

sage: from sage.modular.hecke.hecke_operator import is_HeckeOperator
sage: M = ModularSymbols(Gamma0(7), 4)
sage: is_HeckeOperator(M.T(3))
True
sage: is_HeckeOperator(M.T(3) + M.T(5))
False


Hecke algebras