# Modular Abelian Varieties

Let $M$ be a space of weight $2$ cuspidal modular symbols with trivial character that corresponds to a Galois-conjugacy class of newforms, and let $A_M({\mathbb{C}})$ be the cokernel of the period map. G. Shimura proved that $A_M({\mathbb{C}})$ is the set of complex points of an abelian variety $A_M$ defined over ${\mathbb{Q}}$. Let $N$ be the level of $M$ and let $J_0(N)$ be the Jacobian of the modular curve $X_0(N)$. Shimura constructed $A_M$ as a quotient of $J_0(N)$ by an abelian subvariety. More precisely, if $I$ is the annihilator of $M$ in the Hecke algebra, then $A_M = J_0(N)/I J_0(N)$.

When $A_M$ has dimension $1$ it is an elliptic curve, and the theory of computing with $A_M$ is well developed, though many interesting problems remain. In the contrary case, when $A_M$ has dimension greater than $1$, the theory of computation with $A_M$ is still in its infancy. Fortunately, it is possible to compute a number of interesting quantities about $A_M$ using algorithms that rely on our extensive knowledge of $J_0(N)$.

Magma contains functions for computing the modular degree, congruence modulus, upper and lower bounds on the order of the torsion subgroup, and the order of the component group of the closed fiber of the Néron model of $A_M$ at primes that exactly divide the level of $M$.

## Modular Degree and Torsion

### `ModularDegree(M): ModSym -> RngIntElt`

The modular degree of the space of modular symbols $M$, which is defined as follows. Let $M$ be a space of modular symbols of weight $2$ and trivial character. The modular degree of $M$ is the square root of `#ModularKernel(M)`. When $M$ corresponds to an elliptic curve $E=A_M$, then the modular degree of $M$ is the degree of induced map $X_0(N) \rightarrow E$.

### `CongruenceModulus(M : parameters): ModSym -> RngIntElt`

```magma
Bound: RngIntElt                    Default: -1
```

The congruence number $r$ of the space of modular symbols $M$. This is the index in $S_k(\Gamma_0(N),{\mathbb{Z}})$ of the sum $L+W$ of the lattice $W$ of cusp forms $L$ corresponding to $M$ and the lattice of cusp forms corresponding to the complement of $L$ in $S$.

### `TorsionBound(M, maxp): ModSym, RngIntElt -> RngIntElt`

The following upper bound on the order of the torsion subgroup of the abelian variety $A$ attached to the space of modular symbols $M$:

$$
{\rm gcd}
             \{ \#A({\mathbb{F}}_p) : 3 \leq p \leq {\rm maxp},\,\,\, p \not|\, N\},
$$

where $N$ is the level of $M$. This bound is an isogeny invariant, so it is also a bound on the order of the torsion subgroup of the dual abelian variety $A^{\vee}$ of $A$.

To compute a lower bound, use `#SubgroupOfTorus(M,WindingElement(M))`.

### `Example: Modular Ab Var Arithmetic (ex-9fc9de)`

We compute the first example of an optimal elliptic curve over ${\mathbb{Q}}$ such that the congruence modulus does not equal the modular degree. (See [[Frey and Muller, 1999](../../references.md#cite-frey-muller)] for further discussion of this problem. We warn the reader that the divisibility $r \mid \deg(\phi) \mid rN^i$ cited there is incorrect, as our `54B` example shows.)

```magma
> E := ModularSymbols("54B");
> ModularDegree(E);
2
> CongruenceModulus(E);
6

```

We next verify directly that the congruence modulus is divisible by $3$.

```magma
> A := ModularSymbols("27A"); A;   // 27=54/2.
Modular symbols space of level 27, weight 2, and dimension 2
> A54 := ModularSymbols(A,54); A54;  // all images of A at level 54.
Modular symbols space of level 54, weight 2, and dimension 4
> qE := qIntegralBasis(E,17);
> qA54 := qIntegralBasis(A54,17);
> &+qA54 - &+qE;
-3*q^4 + 3*q^5 - 3*q^8 + 3*q^10 - 3*q^11 + 9*q^13 + 3*q^16 + O(q^17)
> IntersectionGroup(E,A54);   // however, the intersection is trivial.
Abelian Group of order 1

```

Ken Ribet proved that if $E$ is an optimal elliptic curve quotient of $J_0(N)$, with $N$ prime, and if $f_E$ is the corresponding newform, then the congruence modulus of $f_E$ equals the modular degree of $E$. The author is aware of no counterexamples to the following more general statement: “If $E$ is an optimal elliptic curve of square-free conductor, then the congruence modulus of the newform $f_E$ attached to $E$ equals the modular degree of $E$.” An analogous statement for abelian varieties is false, even at prime level. The first counterexample is `ModularSymbols("431F")`, which corresponds to an abelian variety of dimension $24$. In this case, the modular degree is $2^{11}\cdot 6947$, whereas the congruence modulus is $2^{10}\cdot 6947$.

The following code makes a table of congruence moduli and modular degrees for the elliptic curves of conductor near $54$. Notice the counterexample at level $54$.

```magma
> for N in [53..55] do
>    C := CuspidalSubspace(ModularSymbols(N,2));
>    newforms := NewSubspace(C);
>    D := EllipticFactors(newforms,19);
>    for E in D do
>       printf "%o:\\t%o,\\t%o\\n", N, ModularDegree(E), CongruenceModulus(E);
>    end for;
> end for;
53:     2,      2
54:     2,      6
54:     6,      6
55:     2,      2

```

`ModularKernel` makes sense even for spaces of modular symbols of weight greater than $2$. As in the case of weight $2$, this number gives information about congruences between modular forms. The following example illustrates how `ModularKernel` suggest a congruence between a form of level $10$ and weight $4$ with a form of level $5$.

```magma
> M := ModularSymbols(10,4);
> S := CuspidalSubspace(M);
> D := NewformDecomposition(S); D;
[
    Modular symbols space of level 10, weight 4, and dimension 2,
    Modular symbols space of level 10, weight 4, and dimension 4
]
> #ModularKernel(D[1]);
10
> f := qEigenform(D[1],8);
> g := qEigenform(D[2],8);
> g2 := Evaluate(g,Parent(g).1^2);
> f-(g+6*g2);   // a congruence modulo 10!
-10*q^3 + 20*q^4 + 10*q^5 - 20*q^6 - 10*q^7 + O(q^8)

```

## Tamagawa Numbers and Orders of Component Groups

We provide several functions for computing the orders of component groups of optimal quotients of $J_0(N)$ at primes $p$ that exactly divide $N$. Our algorithm involves Grothendieck’s monodromy pairing on the character group of the toric part of the closed fiber at $p$ of the Néron model of $J_0(N)$; the theory behind this algorithm is described in [[Stein, 2001](../../references.md#cite-stein-compgroup)] (or [[Stein, 2000](../../references.md#cite-stein-phd)]); see [[Kohel and Stein, 2000](../../references.md#cite-kohel-stein-ants4)] for a computationally-oriented introduction to the algorithm. When $N$ is prime, we use the Mestre and Oesterlé method to construct the character group of the torus, as described in [[Mestre, 1986](../../references.md#cite-mestre-graphs)]. In general, the ideal theory of quaternion algebras is used.

**Note:** In the appendix to [[Mazur, 1977](../../references.md#cite-mazur-eisenstein)], Mazur and Rapoport give an explicit formula for the order of the component group of $J_0(N)$ at primes $p\geq 5$ that exactly divide $N$. Their formula is not currently used by the `ComponentGroupOrder` function.

The `RealTamagawaNumber` function computes the order of the “component group at infinity”.

### `ComponentGroupOrder(M, p): ModSym, RngIntElt -> RngIntElt`

The order of the component group at $p$. This is the order of the group of $\overline{{\mathbb{F}}}_p$-points of the component group of the reduction modulo $p$ of the Néron model of the abelian variety attached to the space of modular symbols $M$. At present, it is necessary that $p$ exactly divides the level. If `Sign(M)` is not equal to $0$, then only the odd part of the order is returned.

### `TamagawaNumber(M, p): ModSym, RngIntElt -> RngIntElt`

The order of the group of ${\mathbb{F}}_p$-rational points of the component group of the space of modular symbols $M$. We require $M$ to be associated to a single Galois-conjugacy class of newforms.

### `RealTamagawaNumber(M): ModSym -> RngIntElt`

The number of connected components of $A_M({\mathbb{R}})$.

### `MinusTamagawaNumber(M): ModSym -> RngIntElt`

The number of connected components of the subgroup $A_M({\mathbb{C}})^{-}$ of $A_M({\mathbb{C}})$ on which complex conjugation acts as $-1$

### `Example: Modular Ab Var Comp Grp (ex-402be9)`

We compute the orders of the component groups of some abelian varieties.

```magma
> X11 := ModularSymbols("11A");     // corresponds to X_0(11).
> ComponentGroupOrder(X11,11);
5
> TamagawaNumber(X11,11);
5
> RealTamagawaNumber(X11);
1
> MinusTamagawaNumber(X11);
1
> J37 := ModularSymbols("37"); J37;
Modular symbols space of level 37, weight 2, and dimension 4
> ComponentGroupOrder(J37,37);
3
> A, B := Explode(NewformDecomposition(J37));
> ComponentGroupOrder(A,37);
3
> ComponentGroupOrder(B,37);
1

```

We can also compute component groups of optimal quotients whose dimension is greater than $1$. The abelian varieties `B` and `C` below correspond to the Jacobians labeled $65B$ and $65A$ in [[Flynn *et al.*, 2001](../../references.md#cite-empirical-evidence)], respectively.

```magma
> J65 := ModularSymbols("65");
> A,B,C := Explode(SortDecomposition(NewformDecomposition(J65)));
> B;
Modular symbols space of level 65, weight 2, and dimension 4
> C;
Modular symbols space of level 65, weight 2, and dimension 4
> ComponentGroupOrder(B,5);      // not the Tamagawa number
3
> ComponentGroupOrder(B,13);
3
> ComponentGroupOrder(C,5);
7
> ComponentGroupOrder(C,13);
1
> HeckeEigenvalueField(C);
Number Field with defining polynomial x^2 + 2*x - 1 over the
Rational Field
Mapping from: Univariate Quotient Polynomial Algebra in a over
Rational Field
with modulus a^2 + 2*a - 1 to Number Field with defining
polynomial x^2 + 2*x - 1 over the Rational Field given by a rule
[no inverse]
> ComponentGroupOrder(J65,5);
42

```

When the Atkin-Lehner involution $W_p$ acts as $+1$ on a modular abelian variety $A$, the order of the component group can be larger than the Tamagawa number $c_p=[A({\mathbb{Q}}_p):A_0({\mathbb{Q}}_p)]$ that appears in the conjecture of Birch and Swinnerton-Dyer.

```magma
> AtkinLehner(B,5);
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
> ComponentGroupOrder(B,5);
3
> TamagawaNumber(B,5);
1

```

The real and minus Tamagawa numbers are defined for spaces of modular symbols of any weight over the rationals.

```magma
> Del := ModularSymbols("1k12A");
> Del;
Modular symbols space of level 1, weight 12, and dimension 2

```

Next we see that the period lattice associated to $\Delta$ is rectangular.

```magma
> RealTamagawaNumber(Del);
2
> MinusTamagawaNumber(Del);
2
> Periods(Del,40);
[
    (-0.0004853381649299516049241304429*i),
    (0.001140737449583079336044545337)
]

```
