# Hecke and Atkin-Lehner Operators

## Creation

These commands compute endomorphisms induced by the Atkin-Lehner and Hecke operators on modular abelian varieties. The Atkin-Lehner involution $W_q$ is defined for each positive integer $q$ that exactly divides the level (and is divisible by the conductor of any relevant character).

### `AtkinLehnerOperator(A, q): ModAbVar, RngIntElt -> MapModAbVar, RngIntElt`

The Atkin-Lehner operator $W_q$ of index $q$ induced on the abelian variety $A$ by virtue of $A$ being modular. In general $W_q$ need not be a morphism except in the category of abelian varieties up to isogeny so this intrinsic also returns an integer $d$ such that $d*W_q$ is an endomorphism of $A$, and when $W_q$ doesn’t leave $A$ invariant, returns $d=0$. If the ambient modular symbols space of $A$ contains a space with character of conductor $r$, then currently an error occurs unless $r$ divides $q$.

### `AtkinLehnerOperator(A): ModAbVar -> MapModAbVar`

The morphism (or morphism tensor Q) on (or from) the abelian variety $A$ induced by the Atkin-Lehner operator.

### `HeckeOperator(A, n): ModAbVar, RngIntElt -> MapModAbVar`

The Hecke operator $T_n$ of index $n$ induced on the abelian variety $A$ by virtue of its morphism to a modular symbols abelian variety. In general $T_n$ need not be a morphism. Also, if $A$ is contained in e.g., $J_0(N)$, then the $T_n$ on $J_0(N)$ need not even leave $A$ invariant. In that case this command composes $T_n$ with a map back to $A$ to obtain an endomorphism of $A$. For the exact Hecke operators induced by their action on $J_0(N)$, say, use the `RestrictEndomorphism` command.

### `Example: Operators Creation (ex-6db02a)`

We compute the main Atkin-Lehner operator and the Hecke operator $T_2$ on $J_0(23)$.

```magma
> A := JZero(23);
> AtkinLehnerOperator(A,23);
Homomorphism W23 from JZero(23) to JZero(23) given on integral homology by:
[-1  0  0  0]
[ 0 -1  0  0]
[ 0  0 -1  0]
[ 0  0  0 -1]
> HeckeOperator(A,2);
Homomorphism T2 from JZero(23) to JZero(23) given on integral homology by:
[ 0  1 -1  0]
[ 0  1 -1  1]
[-1  2 -2  1]
[-1  1  0 -1]

```

Next we compute $w_4$ and $w_{25}$ on $J_{100}$, and note that their product equals $w_{100}$.

```magma
> A := JZero(100); A;
Modular abelian variety JZero(100) of dimension 7 and
level 2^2*5^2 over Q
> w4 := AtkinLehnerOperator(A,4);
> Factorization(CharacteristicPolynomial(w4));
[
    <x - 1, 4>,
    <x + 1, 10>
]
> w25 := AtkinLehnerOperator(A,25);
> Factorization(CharacteristicPolynomial(w25));
[
    <x - 1, 8>,
    <x + 1, 6>
]
> w4*w25 eq AtkinLehnerOperator(A);
true

```

Next we compute $W_{25}$ acting on $J_1(25)$.

```magma
> A := Js(17);
> B := BaseExtend(A,CyclotomicField(17));
> w := AtkinLehnerOperator(B);
> Factorization(CharacteristicPolynomial(w));
[
    <x - 1, 4>,
    <x + 1, 6>
]

```

Finally we compute Hecke operators on the quotient of a simple factor of $J_0(65)$ by a finite subgroup.

```magma
> A := Decomposition(JZero(65))[2]; A;
Modular abelian variety 65B of dimension 2, level 5*13 and conductor
5^2*13^2 over Q
> G := nTorsionSubgroup(A,2); G;
Finitely generated subgroup of abelian variety with invariants
[ 2, 2, 2, 2 ]
> H := Subgroup([G.1]); H;
Finitely generated subgroup of abelian variety with invariants [ 2 ]
> B := A/H; B;
Modular abelian variety of dimension 2 and level 5*13 over Qbar
> T2 := HeckeOperator(B,2); T2;
Homomorphism from modular abelian variety of dimension 2 to
modular abelian variety of dimension 2 (up to isogeny) on
integral homology by:
[ -2 1/2   0   0]
[ -2   2   0   0]
[ -2   1  -2   1]
[ -6   1  -1   2]
> FactoredCharacteristicPolynomial(T2);
[
    <x^2 - 3, 2>
]

```

## Invariants

Intrinsics are provided which compute characteristic polynomials, factored characteristic polynomials and minimal polynomials of Hecke operators.

### `HeckePolynomial(A, n): ModAbVar, RngIntElt -> RngUPolElt`

The characteristic polynomial of the Hecke operator $T_n$ acting on the abelian variety $A$.

### `FactoredHeckePolynomial(A, n): ModAbVar, RngIntElt -> RngUPolElt`

The factored characteristic polynomial of the Hecke operator $T_n$ acting on the abelian variety $A$. This can be faster than first computing $T_n$, then computing the characteristic polynomial, and factoring, because we can take into account information about the decomposition of $A$, in order to avoid factoring.

### `MinimalHeckePolynomial(A, n): ModAbVar, RngIntElt -> RngUPolElt`

The minimal polynomial of the Hecke operator $T_n$ acting on the abelian variety $A$.

### `Example: Operators Invariants (ex-605974)`

```magma
> FactoredHeckePolynomial(JZero(65),2);
[
    <x + 1, 2>,
    <x^2 - 3, 2>,
    <x^2 + 2*x - 1, 2>
]
> HeckePolynomial(JZero(65),2);
x^10 + 6*x^9 + 5*x^8 - 32*x^7 - 62*x^6 + 28*x^5 + 130*x^4 +
    48*x^3 - 51*x^2 - 18*x + 9
> MinimalHeckePolynomial(JZero(65),2);
x^5 + 3*x^4 - 2*x^3 - 10*x^2 - 3*x + 3

```
