# Operators

Each space $M$ of modular forms comes equipped with a commuting family $T_1, T_2, T_3, \ldots$ of linear operators acting on it called the *Hecke operators*. Unfortunately, at present, the computation of Hecke and other operators on spaces of modular forms with nontrivial character has not yet been implemented, though computation of characteristic polynomials of Hecke operators is supported.

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

The matrix representing the $n$th Hecke operator $T_n$ with respect to `Basis(M)`. (Currently $M$ must be a space of modular forms with trivial character and integral weight $\geq 2$.)

## `HeckeOperator(n, f): RngIntElt, ModFrmElt -> ModFrmElt`

The image under the Hecke operator $T_n$ of the given modular form.

## `HeckePolynomial(M, n : parameters): ModFrm, RngIntElt -> RngUPolElt`

```magma
Proof: BoolElt                    Default: true
```

The characteristic polynomial of the $n$th Hecke operator $T_n$. In some situations this is more efficient than `CharacteristicPolynomial(HeckeOperator(M,n))` or any of its variants. Note that $M$ can be an arbitrary space of modular forms.

## `AtkinLehnerOperator(M, q): ModFrm, RngIntElt -> AlgMatElt`

The matrix representing the $q$th Atkin-Lehner involution $W_q$ on $M$ with respect to `Basis(M)`. (Currently $M$ must be a cuspidal space of modular forms with trivial character and integral weight $\geq 2$.)

## `AtkinLehnerOperator(q, f): RngIntElt, ModFrmElt -> ModFrmElt`

The image under the involution $w_q$ of the given modular form.

## `Example: Hecke Polynomials (ex-f79385)`

First we compute a characteristic polynomial on $S_2(\Gamma_1(13))$ over both ${\mathbb{Z}}$ and the finite field ${\mathbb{F}}_2$.

```magma
> R<x> := PolynomialRing(Integers());
> S := CuspForms(Gamma1(13),2);
> HeckePolynomial(S, 2);
x^2 + 3*x + 3
> S2 := BaseExtend(S, GF(2));
> R<y> := PolynomialRing(GF(2));
> Factorization(HeckePolynomial(S2,2));
[
    <y^2 + y + 1, 1>
]

```

Next we compute a Hecke operator on $M_4(\Gamma_0(14))$.

```magma
> M := ModularForms(Gamma0(14),4);
> T := HeckeOperator(M,2);
> T;
[  1   0   0   0   0   0   0 240]
[  0   0   0   0  18  12  50 100]
[  0   1   0   0  -2  18  12 -11]
[  0   0   0   0   1  22  25  46]
[  0   0   1   0  -1 -16 -20 -82]
[  0   0   0   0  -1  -6  -9 -38]
[  0   0   0   1   3   9  15  39]
[  0   0   0   0   0   0   0   8]
> Parent(T);
Full Matrix Algebra of degree 8 over Integer Ring
> Factorization(CharacteristicPolynomial(T));
[
    <x - 8, 2>,
    <x - 2, 1>,
    <x - 1, 2>,
    <x + 2, 1>,
    <x^2 + x + 8, 1>
]
> f := M.1;
> f*T;
1 + 240*q^7 + O(q^8)
> M.1 + 240*M.8;
1 + 240*q^7 + O(q^8)

```

This example demonstrates the Atkin-Lehner involution $W_3$ on $S_2(\Gamma_0(33))$.

```magma
> M := ModularForms(33,2);
> S := CuspidalSubspace(M);
> W3 := AtkinLehnerOperator(S, 3);
> W3;
[   1    0    0]
[ 1/3  1/3 -4/3]
[ 1/3 -2/3 -1/3]
> Factorization(CharacteristicPolynomial(W3));
[
    <x - 1, 2>,
    <x + 1, 1>
]
> f := S.2;
> f*W3;
1/3*q + 1/3*q^2 - 4/3*q^3 - 1/3*q^4 - 2/3*q^5 + 5/3*q^6
     + 4/3*q^7 + O(q^8)

```

The Atkin-Lehner and Hecke operators need not commute:

```magma
> T3 := HeckeOperator(S, 3);
> T3;
[ 0 -2 -1]
[ 0 -1  1]
[ 1 -2 -1]
> T3*W3 - W3*T3 eq 0;
false

```
