# Operators

Each space $\bf M$ of modular symbols comes equipped with a commuting family $T_1, T_2, T_3, \ldots$ of linear operators acting on it called the Hecke operators.

The Hecke operators are defined recursively, as follows. First, $T_1=1$. When $n=p$ is prime,

$$
T_p(x) = \left[ \begin{pmatrix}p&0\\ 0&1\end{pmatrix} + \sum_{r {\rm\, mod\,} p}
                    \begin{pmatrix}1&r\\ 0&p\end{pmatrix}  \right] x,
$$

where the first matrix is omitted if $p$ divides the level $N$ of $M$. If $m$ and $n$ are coprime, then $T_{mn} = T_mT_n$. If $p$ is a prime, $r\geq 2$ is an integer, $\varepsilon$ is the Dirichlet character associated to $M$, and $k$ is the weight of $M$, then

$$
T_{p^r} = T_p  T_{p^{r-1}} - \varepsilon(p) p^{k-1} T_{p^{r-2}}.
$$

## `Example: Hecke Operators (ex-223884)`

In Magma, Hecke operators are represented as $n\times n$-matrices, acting from the right, with respect to the basis `Basis(M)`. For example

```magma
> M := ModularSymbols(12);
> T2 := HeckeOperator(M,2);
> M.1;
{oo, 0}
> T2;
[ 2  0 -1  0  0]
[ 2  0 -1  0  0]
[ 0  0  1 -2 -2]
[ 0 -1  1 -1 -2]
[ 0  1 -1  1  2]
> M.1*T2;
2*{oo, 0} + -1*{-1/10, 0}

```

## `HeckeOperator(M, n): ModSym, RngIntElt -> AlgMatElt`

Compute a matrix representing the $n$th Hecke operator $T_n$ with respect to `Basis(M)` where $M$ is a space of modular symbols.

## `HeckePolynomial(M, n): ModSym, RngIntElt -> RngUPolResElt`

Compute the characteristic polynomial of the Hecke operator $T_n$ with respect to the space of modular symbols $M$. When $n$ is prime, the Deligne bound on the sizes of Hecke eigenvalues is used, so `HeckePolynomial` is frequently much faster than `CharacteristicPolynomial(HeckeOperator(M,n))`.

## `IntegralHeckeOperator(M, n): ModSym, RngIntElt -> AlgMatElt`

A matrix representing the $n$th Hecke operator with respect to `Basis(Lattice(M))` where $M$ is a space of modular symbols.

## `DualHeckeOperator(M, n): ModSym, RngIntElt -> AlgMatElt`

Compute a matrix representing the Hecke operator $T_n$ on the dual vector space representation of the space of modular symbols $M$. This function is much more efficient than `HeckeOperator(M,n)` when the dimension of $M$ is small relative to the dimension of the `AmbientSpace(M)`. Note that `DualHeckeOperator(M,n)` is not guaranteed to be the transpose of `HeckeOperator(M,n)` because `DualHeckeOperator(M,n)` is computed with respect to `Basis(DualVectorSpace(M))`.

## `AtkinLehner(M, q): ModSym, RngIntElt -> AlgMatElt`

A matrix representing the $q$th Atkin-Lehner involution $W_q$ on the space of modular symbols $M$, when it is defined. The involution $W_q$ is defined when $M$ has trivial character and even weight. When possible, the Atkin-Lehner map is normalized so that it is an involution; such normalization may not be possible when $k>2$ and the characteristic of the base field of $M$ divides $q$.

To each divisor $q$ of $N$ such that ${\rm gcd}(q,N/q)=1$ there is an *Atkin-Lehner involution* $W_q$ on $M$, which is defined as follows. Using the Euclidean algorithm, choose integers $x,y,z,w$ such that $qxw - (N/q)yz = 1$; let $g=\begin{pmatrix}dx & y\\ Nz& qw\end{pmatrix}$ and define

$$
W_q(x) =  g(x) / q^{k-2 \over 2}.
$$

For example, when $q=N$ we have $g=\begin{pmatrix}0&-1\\ N&  0\end{pmatrix}$.

## `DualAtkinLehner(M, q): ModSym, RngIntElt -> AlgMatElt`

The action of the Atkin-Lehner involution on the dual representation of the space of modular symbols $M$, when it is defined.

## `StarInvolution(M): ModSym -> AlgMatElt`

The conjugation involution $*$ on the space of modular symbols $M$ that sends the modular symbol $X^iY^j\{u,v\}$ to $(-1)^jX^iY^j \{-u,-v\}$.

## `DualStarInvolution(M): ModSym -> AlgMatElt`

The conjugation involution $*$ on the dual representation of the space of modular symbols $M$ (see the documentation for `StarInvolution`.)

## `ThetaOperator(M1, M2): ModSym, ModSym -> Map`

Multiplication by $X^{p}Y - XY^{p}$, which is a possible analogue of the $\theta$-operator. (On mod $p$ modular forms, the $\theta$-operator is the map given by $f \mapsto q {df\over dq}$.) Both $M_1$ and $M_2$ must be spaces of modular symbols over a field of positive characteristic $p$; they must have the same level and character, and the weight of $M_2$ must equal the weight of $M_1$ plus $p+1$.

## `Example: Operators (ex-e83c93)`

```magma
> M := ModularSymbols(11,4,+1); M;
Full modular symbols space for Gamma_0(11) of weight 4 and dimension 4
over Rational Field
> HeckeOperator(M,2);
[   9    0  2/5 -2/5]
[   0    5  9/5 11/5]
[   0    5  7/5 13/5]
[   0    0 22/5 23/5]

```

The entries of $T_2$ are not guaranteed to be integers because `Basis(M)` is just a basis of a ${\mathbb{Q}}$-vector space. The entries will be integers if we compute $T_2$ with respect to an integral basis.

```magma
> IntegralHeckeOperator(M,2);
[ 0  2  0  0]
[ 1  2  0  0]
[-5  6  9  0]
[ 2  0  0  9]

```

The matrix for the Hecke operator on the dual of $M$ is the transpose of $T_2$. However, the chosen basis for the cuspidal subspace of the dual of $M$ need not satisfy any compatibility with `CuspidalSubspace(M)`.

```magma
> DualHeckeOperator(M,2);
[   9    0    0    0]
[   0    5    5    0]
[ 2/5  9/5  7/5 22/5]
[-2/5 11/5 13/5 23/5]
> S := CuspidalSubspace(M);
> HeckeOperator(S, 2);
[    5 -13/5]
[    5    -3]
> DualHeckeOperator(S, 2);
[-3/4  1/8]
[-1/2 11/4]
> // NOT the transpose!

```

We can also compute the Atkin-Lehner and the $*$-involution. The $*$-involution is the identity because we are working in the $+1$-quotient, which is the largest quotient of `ModularSymbols(11,4)` where $*$ acts as $+1$.

```magma
> AtkinLehner(S, 11);
[1 0]
[0 1]
> StarInvolution(S);
[1 0]
[0 1]

```

On the $-1$ quotient the Atkin-Lehner involution is the same, but $*$ acts as $-1$:

```magma
> M := ModularSymbols(11,4,-1); M;
Full modular symbols space for Gamma_0(11) of weight 4 and dimension 2
over Rational Field
> S := CuspidalSubspace(M);
> AtkinLehner(S, 11);
[1 0]
[0 1]
> StarInvolution(S);
[-1  0]
[ 0 -1]

```

## `Example: Theta Operator (ex-2cde37)`

We compute an example of our analogue of the $\theta$-operator on modular symbols.

```magma
> N := 11; p := 3;
> k1 := 2; k2 := k1 + (p+1);
> M1 := ModularSymbols(11,k1,GF(p));
> M2 := ModularSymbols(11,k2,GF(p));
> theta  := ThetaOperator(M1,M2); theta;
Mapping from: ModSym: M1 to ModSym: M2 given by a rule [no inverse]

```

Now that we have computed `theta`, we can apply it to one of the modular symbols corresponding to the newform in $S_2(\Gamma_0(11))$.

```magma
> D := Decomposition(M1,2);
> f := qEigenform(D[2],10); f;
q + q^2 + 2*q^3 + 2*q^4 + q^5 + 2*q^6 + q^7 + q^9 + O(q^10)
> x := D[2].1;
> y := theta(x); y;
(X^4 + X*Y^3)*{-1/7, 0} + (X^4 + X^3*Y + X*Y^3 + Y^4)*{-1/7, 0} + (X^4
+ 2*X^3*Y + 2*X*Y^3 + Y^4)*{-1/5, 0} + Y^4*{oo, 0}

```

Finally, we verify for $n<10$ that the $n$th Hecke eigenvalue of $y=\theta(x)$ equals $n\cdot a_n(f)$, where $f$ is as above.

```magma
> [y*HeckeOperator(M2,n) - n*Coefficient(f,n)*y : n in [1..9]];
[
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0
]

```
