# The Associated Complex Torus

Let $M$ be a space of cuspidal modular symbols, which is the kernel of an ideal in the Hecke algebra. When $M$ has weight $2$ there is an abelian variety $A_M$ attached to $M$; more generally, there is a complex torus $A_M({\mathbb{C}})$ attached to $M$. The associated complex torus $A_M({\mathbb{C}})$ is constructed as follows. Let $S$ be the space of modular forms corresponding to $M$. The integration pairing gives rise to a natural map $M\rightarrow {\operatorname{Hom}}(S,{\mathbb{C}})$, and the cokernel of this map is $A_M({\mathbb{C}})$.

## `SubgroupOfTorus(M, x): ModSym, ModSymElt -> RngIntElt`

The cyclic subgroup of the complex torus attached to the space of modular symbols $M$ that is generated by the image under the period map of the modular symbol $x$.

## `SubgroupOfTorus(M, s): ModSym, SeqEnum -> GrpAb`

An abelian group that is isomorphic to the finite group generated by the sequence of images $\pi(s[i])$ in the complex torus attached to $M$, where $\pi$ is `PeriodMapping(M)`.

## `Example: Cuspidal Subgroup (ex-7942de)`

The cuspidal subgroup of $J_0(N)$ is the subgroup generated by the degree $0$ divisors on $X_0(N)$ of the form $(\alpha)-(\beta)$, where $\alpha$ and $\beta$ are cusps. The following examples illustrate how to use the above functions to compute the cuspidal subgroup, as an abstract abelian group.

The modular symbols approach has the advantage that it is essentially no more complicated for $N$ highly composite than for $N$ prime. However, it is only applicable when the corresponding space of modular symbols can be computed in a reasonable amount of time, which at present means that $N$ should have less than $5$ decimal digits. There are other methods which may be much more efficient in special cases. For example, when $p$ is prime Andrew Ogg showed that the cuspidal subgroup of $J_0(p)$ is cyclic of order equal to the numerator of $(p-1)/12$. More generally, he gave a simple formula for the order of the cuspidal subgroup when $N=pq$ is the product of two primes. See also papers of Ligozat.

```magma
> M := ModularSymbols(20); M;
Full Modular symbols space of level 20, weight 2, and dimension 7
> e := M ! <1, [Cusps()|0,Infinity()] >;   // the path from 0 to infinity
> e;
-1*{oo, 0}
> J0of20 := CuspidalSubspace(M);
> A := SubgroupOfTorus(J0of20, e); A;
Abelian Group isomorphic to Z/6
Defined on 1 generator
Relations:
    6*A.1 = 0
> // Next, the subgroup generated by all cusps
> A := SubgroupOfTorus(J0of20, IntegralBasis(M));  A;
Abelian Group isomorphic to Z/6
Defined on 1 generator
Relations:
    6*A.1 = 0
> // Let's do another example.
> M := ModularSymbols(100);
> J0of100 := CuspidalSubspace(M);
> A := SubgroupOfTorus(J0of100, IntegralBasis(M));  A;
Abelian Group isomorphic to Z/6 + Z/30 + Z/30 + Z/30 + Z/30
Defined on 5 generators
Relations:
    6*A.1 = 0
    30*A.2 = 0
    30*A.3 = 0
    30*A.4 = 0
    30*A.5 = 0
> M := ModularSymbols(77);
> J0of77 := CuspidalSubspace(M);
> A := SubgroupOfTorus(J0of77, IntegralBasis(M)); A;
Abelian Group isomorphic to Z/10 + Z/60
Defined on 2 generators
Relations:
    10*A.1 = 0
    60*A.2 = 0

> M := ModularSymbols(97);
> A := SubgroupOfTorus(CuspidalSubspace(M), IntegralBasis(M)); A;
Abelian Group isomorphic to Z/8
Defined on 1 generator
Relations:
    8*A.1 = 0
> Numerator((97-1)/12);
8

```

## `Example: Cuspidal Subgroup Table (ex-cbaa0c)`

The following code creates a file that contains a table which lists, for each integer $N$ in some range, the abstract group structure of the subgroup of $J_0(N) = {\rm Jac}(X_0(N))$ generated by the cusps $(\alpha)-(\infty)$, with $\alpha\in {\mathbb{Q}}\cup\{\infty\}$.

```magma
> function CuspidalSubgroup(N)
>    M := ModularSymbols(N);
>    J := CuspidalSubspace(M);
>    G := SubgroupOfTorus(J,IntegralBasis(M));
>    return G;
> end function;
> // Test the function
> CuspidalSubgroup(65);
Abelian Group isomorphic to Z/2 + Z/84
Defined on 2 generators
Relations:
    2*$.1 = 0
    84*$.2 = 0
> procedure CuspidalTable(start, stop)
>    fname := Sprintf("cuspidal_subgroup_%o-%o.m", start, stop);
>    file  := Open(fname,"w");
>       for N in [start..stop] do
>       G := Invariants(CuspidalSubgroup(N));
>       fprintf file, "C[%o] := \\t%o;\\n\\n", N, G;
>       printf "C[%o] := \\t%o;\\n\\n", N, G;
>       Flush(file);
>    end for;
> end procedure;

```

## `ModularKernel(M): ModSym -> GrpAb`

The kernel of the modular isogeny. Let $T$ be the complex torus attached to the space of modular symbols $M$. Then the modular isogeny is the natural map from the dual of $T$ into $T$ induced by autoduality of `CuspidalSubspace(AmbientSpace(M))`.

## `CongruenceGroup(M : parameters): ModSym -> GrpAb`

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

The congruence group of the space of cusp forms corresponding to the space of cuspidal modular symbols $M$. Let $S=S_k(\Gamma_0(N),{\mathbb{Z}})$, let $V$ be the sub ${\mathbb{Z}}$-module corresponding to $M$, and $W$ be its orthogonal complement. Then the congruence group is $S/(V+W)$. This group encodes information about congruences between forms in $V$ and forms in the complement of $V$.

The optional parameter `Bound` is a positive integer $b$ such that the $q$-expansions of cusp forms are computed to absolute precision $b$. If the bound is too small, then `CongruenceGroup` will give only an upper bound on the correct answer. The default is `HeckeBound(M) + 1`, which gives a provably correct answer.

## `IntersectionGroup(M1, M2): ModSym, ModSym -> GrpAb`

An abelian group $G$ that encodes information about the intersection of the complex tori corresponding to the spaces of modular symbols $M_1$ and $M_2$. We require that $M_1$ and $M_2$ lie in a common ambient space. When the `IntersectionGroup(M1,M2)` is finite, it is isomorphic to $A_{M_1}({\mathbb{C}}) \cap A_{M_2}({\mathbb{C}})$.

## `IntersectionGroup(S): SeqEnum -> GrpAb`

An abelian group $G$ that encodes information about the intersection of the collection of complex tori corresponding to the sequence $S$ of spaces of modular symbols.

## `Example: BSD (ex-a9314d)`

In this example, we investigate a $2$-dimensional abelian variety $B$, which is a quotient of $J_0(43)$. The purpose of this example is to show how numerical computation with modular symbols suggests interesting arithmetic questions about familiar abelian varieties. In the following example, we find that the conjecture of Birch and Swinnerton-Dyer (plus the Manin $c=1$ conjecture) implies that the first nontrivial Shafarevich-Tate group of an (optimal) modular abelian variety has order *two*. Thus the surprising existence of an abelian varieties with non-square order could have been (but was not) hinted at long ago by somebody playing around with a modular symbols package (in fact, it was discovered by B. Poonen and M. Stoll [[Poonen and Stoll, 1999](../../references.md#cite-poonen-stoll)] while they were designing and implementing algorithms for computing with Jacobians of genus-two curves).

```magma
> M43 := ModularSymbols(43,2);     // Level 43, weight 2.
> H1  := CuspidalSubspace(M43);    // H_1(X_0(43),Q)
> D   := NewformDecomposition(H1); // factors corresponding to newforms
> A,B := Explode(D);
> A;     // The homology of the elliptic curve "43A"
Modular symbols space of level 43, weight 2, and dimension 2
> B;     // The homology of the 2-dimensional abelian variety "43B"
Modular symbols space of level 43, weight 2, and dimension 4
> LRatio(B,1);        // L(B,1)/Omega_B
2/7

```

The Birch and Swinnerton-Dyer conjecture predicts that the Shafarevich-Tate group of $B$ has order as given by the formula for `ShaAn` in the code below. To compute this value, it remains to compute $\#B({\mathbb{Q}})$ and the Tamagawa number $c_{43}$.

```magma
> T := TorsionBound(B,11);  T; // #B(Q) divides this number
7
> // Compute the subgroup of B(Q) generated by (0)-(oo).
> C := SubgroupOfTorus(B,WindingElement(M43));  C;
Abelian Group isomorphic to Z/7
Defined on 1 generator
Relations:
    7*C.1 = 0
> TamagawaNumber(B,43);
7
> ShaAn := LRatio(B,1)*TorsionBound(B,11)^2/TamagawaNumber(B,43);

```

`ShaAn` is the Birch and Swinnerton-Dyer conjectural order of the Shafarevich-Tate group of $B$, under the assumption that the Manin constant of $B$ is $1$.

```magma
> ShaAn;
2

```

One of the Galois conjugate newforms associated to $B$ is given below.

```magma
> qEigenform(B,12);
q + a*q^2 - a*q^3 + (-a + 2)*q^5 - 2*q^6 + (a - 2)*q^7 - 2*a*q^8 - q^9
    + (2*a - 2)*q^10 + (2*a - 1)*q^11 + O(q^12)
> BaseRing(Parent(qEigenform(B,12)));
Univariate Quotient Polynomial Algebra in a over Rational Field
with modulus a^2 - 2
> qIntegralBasis(B,12);
[
    q + 2*q^5 - 2*q^6 - 2*q^7 - q^9 - 2*q^10 - q^11 + O(q^12),
    q^2 - q^3 - q^5 + q^7 - 2*q^8 + 2*q^10 + 2*q^11 + O(q^12)
]

```

By integrating homology against the differentials corresponding to the two modular forms above, we obtain a lattice that defines the complex torus $A_B({\mathbb{C}})$:

```magma
> Periods(B,97);
[
    (-0.2259499583067642118739519224 -
        1.766644676299599532273333140*i
        0.5250281159132219433729491648 +
        0.8066018577029307230283142371*i),
    (0.5981563162241222986475767220 -
        1.920085638612119493276485632*i
        0.8241062742261960348649172082 -
        0.1534409622571770568748354995*i),
    (-0.8241062745308865105215286445 -
        0.1534409623125199610031524920*i
        -0.2990781583129740914919680434 -
        0.9600428199601077799031497367*i),
    (-0.5981563162241222986475767220 -
        1.920085638612119493276485632*i
        -0.8241062742261960348649172083 -
        0.1534409622571770568748354995*i)
]

```

Finally, it is tempting to ask whether or not the (conjectural) two-torsion element of the Shafarevich-Tate group of $B$ suggested above is “visible” in the sense that it is “explained by a jump in the rank of the Mordell–Weil group of $A$” (see [[Cremona and Mazur, 2000](../../references.md#cite-cremona-mazur)]). The following computation suggests, but does not prove, that this is the case.

```magma
> G := MordellWeilGroup(EllipticCurve(A)); G;
Abelian Group isomorphic to Z
Defined on 1 generator (free)
> IntersectionGroup(A,B);
Abelian Group isomorphic to Z/2 + Z/2
Defined on 2 generators
Relations:
    2*$.1 = 0
    2*$.2 = 0

```

## The Period Map

Let $M$ be a space of modular symbols the corresponds to a Galois-conjugacy class of newforms. The *period map* attached to $M$ is a linear map

$$
{\rm AmbientSpace(M)} \rightarrow {\mathbb{C}}^d,
$$

where $d$ is the dimension of the space of modular forms associated to $M$. The cokernel of the period map is a complex torus $A_M({\mathbb{C}})$. The terminology “period mapping” comes from the fact that there are (often?) mereomorphic functions on ${\mathbb{C}}^d$ whose periods are the image of the integral cuspidal modular symbols under the period mapping.

In the functions below, $M$ must not be a $+1$ or $-1$ quotient and must be cuspidal.

### `PeriodMapping(M, n): ModSym, RngIntElt -> Map`

The period mapping attached to the space of modular symbols $M$, computed using *n* terms of the $q$-expansions of modular forms associated to $M$.

### `PeriodMapping(M): ModSym -> Map`

```magma
Prec: RngIntElt                    Default: 
```

The period mapping attached to the space of modular symbols $M$, computed to precision `Prec`. If no precision is given, uses default precision.

### `Periods(M, prec): ModSym, RngIntElt -> SeqEnum`

The complex period lattice associated to the space of modular symbols $M$, computed using *prec* terms of the $q$-expansions of modular forms associated to $M$.

### `Periods(M): ModSym -> SeqEnum`

```magma
Prec: RngIntElt                    Default: 
```

The period mapping attached to the space of modular symbols $M$, computed to precision `Prec`. If no precision is given, uses default precision.

### `ClassicalPeriod(M, j, prec): ModSym, RngIntElt, RngIntElt -> FldPrElt`

The value

$$
r_j(f) = \int_{0}^{i\infty} f(z) z^j dz.
$$

## Projection Mappings

Let $M$ be a space of modular symbols over a field $K$. For many purposes it is useful to have a surjective map

$$
\pi: {\rm AmbientSpace(M)} \rightarrow V,
$$

where $V$ is a vector space over $K$ and $\ker(\pi)$ is the same as the kernel of the period mapping.

### `RationalMapping(M): ModSym -> Map`

A surjective linear map from the ambient space of the space of modular symbols $M$ to a vector space, such that the kernel of this map is the same as the kernel of the period mapping.

### `IntegralMapping(M): ModSym -> Map`

A surjective linear map from the ambient space of the space of modular symbols $M$ to a vector space, such that the kernel of this map is the same as the kernel of the period mapping. This map is chosen in such a way that the image of

`IntegralBasis(CuspidalSubspace(AmbientSpace(M)))`

is the standard ${\mathbb{Z}}$-lattice. (Note that $M$ must be defined over ${\mathbb{Q}}$.)

### `Example: Modular Ab Var Rational (ex-a62806)`

```magma
> M := ModularSymbols(33); M;
Full Modular symbols space of level 33, weight 2, and dimension 9
> S := CuspidalSubspace(M);
> N := NewSubspace(S);
> phi := RationalMapping(N);
> [phi(x) : x in IntegralBasis(S)];
[
    ( -2 4/3),
    ( -4 2/3),
    ( -2 2/3),
    (-2  0),
    (  -2 -2/3),
    (-4  0)
]

```

Notice that the image of the basis `IntegralBasis(S)` for $H_1(X_0(33),{\mathbb{Z}})$ is not ${\mathbb{Z}}\times {\mathbb{Z}}$. However, `IntegralMapping(N)` is normalized so that the image is ${\mathbb{Z}}\times{\mathbb{Z}}$:

```magma
> int := IntegralMapping(N);
> [int(S.i) : i in [1..Dimension(S)]];
[
    ( 2 -1),
    ( 1 -2),
    ( 1 -1),
    ( 0 -2),
    ( 0 -1),
    (-1 -1)
]

```

Consider a quotient $A_f$ of $J_0(N)$ attached to a newform $f\in S_2(\Gamma_0(N))$. Using `IntegralMapping` and the Abel-Jacobi theorem, we can see the image in $A_f({\mathbb{Q}})$ of the point $(0)-(\infty) \in J_0(N)({\mathbb{Q}})$. In the level $97$ example below, this image has order $8$, which is the numerator of $(97-1)/12$.

```magma
> Af := ModularSymbols("97B"); Af;
Modular symbols space of level 97, weight 2, and dimension 8
> int := IntegralMapping(Af);
> // Let x be the modular symbol {0,oo}
> x := AmbientSpace(Af)!<1,[Cusps()|0,Infinity()]>;
> int(x);
(-5/8  1/4 -1/4    0    0  1/4  3/8  1/4)
> Numerator((97-1)/12);
8

```
