# Extended Example

We give an example that combines functionality for small modular curves with Magma’s machinery for curve quotients and elliptic curves to compute the $j$-invariant of a special class of elliptic curves over **Q** up to quadratic twist. This class of curves arose in Wiles’ original paper on Fermat’s Last Theorem and the Shimura-Tanayama-Weil (STW) conjecture.

## `Example: Big Ex (ex-c9e559)`

In the Breuil-Conrad-Diamond-Taylor-Wiles proof of the STW conjecture, a couple of special cases arise that lead to a finite number of classes of elliptic curves up to $\bar{\bf Q}$-isomorphism that have to be determined and then checked directly for modularity. If $E[p]$ is the $p$-torsion subgroup of $E$ considered as a $\rm{Gal}(\bar{\bf Q}/{\bf Q})$-module, these are cases where $E[3]$ and $E[5]$ are both reducible, $E[3]$ is reducible and $E[5]$ is irreducible but absolutely reducible as a $\rm{Gal}(\bar{\bf Q}/{\bf Q}(\sqrt{5}))$-module, or $E[5]$ is reducible and $E[3]$ is irreducible but absolutely reducible as a $\rm{Gal}(\bar{\bf Q}/{\bf Q}(\sqrt{-3}))$-module. The first case corresponds to non-cuspidal rational points on $X_0(15)$ and leads, up to isogeny, to one class of twists with $j=-25/2$ as may easily be verified using the intrinsics here. The second case corresponds to non-cuspidal rational points on a quotient of $X_0(75)$ and leads to curves with $j=0$. We consider the third case in this example, showing that, up to isogeny, there is one class (up to quadratic twist) with $j$-invariant $(11/2)^3$.

The curves we want are precisely those that have a cyclic subgroup of order 5 rational over **Q** and for which the image of $\rm{Gal}(\bar{\bf Q}/{\bf Q})$ in $GL_2({\bf F}_3)$, giving the action on $E[3]$, is the normaliser of a split Cartan subgroup.

Curves just satisfying the $E[3]$ condition are classified by non-cuspidal rational points on $X_0(9)/w_9$ that are not the image of a rational point of $X_0(9)$. Such a point $p$ lifts to a point $p_1$ on $X_0(9)$ defined over some quadratic field $K$ such that $p_1^{\sigma} = w_9(p_1)$ where $\sigma$ is the nontrivial automorphism of $K$ over **Q**. If $(E,C)$ is an elliptic curve/$K$ with cyclic subgroup $C=\langle P\rangle$ rational over $K$ that is represented by the moduli point $p_1$, then $E_1=E/\langle 3P\rangle$ can be defined over **Q** so that the order 3 subgroups $C/\langle 3P\rangle$ and $(C/\langle 3P\rangle)^\sigma$ generate $E_1[3]$, are rational over $K$ and are swapped by $\sigma$.

In the same way, adding the extra condition that there is a rational subgroup of order 5 leads to curves classified by non-cuspidal rational points of $X_0(45)/w_9$. These do not lift to rational points because $X_0(45)$ has no non-cuspidal rational points. $X_0(45)/w_9$ is **Q**-isogenous to the rank 0 elliptic curve $X_0(15)$ so only has finitely many rational points. If $p_1$ is a lift, the image of $p_1$ under the 3-projection map $X_0(45)\rightarrow X_0(5)$ ($z\mapsto 3z$ on complex points) is a rational point that corresponds to the desired curve $E_1$ (with its cyclic 5-subgroup). We could apply the 3-projection all the way down to $X_0(1)$ of course, but it is slightly more efficient to just project to level 5 and remove duplicate images before computing $j$-invariants.

```magma
> X45<x,y,z> := SmallModularCurve(45);
> w9 := AtkinLehnerInvolution(X45,45,9);
> G := AutomorphismGroup(X45,[w9]);
> C,prjC := CurveQuotient(G);
> c_inf := Cusp(X45,45,45);
> ptE := prjC(c_inf);
> E1,mp1 := EllipticCurve(C,ptE);
> E,mp2 := MinimalModel(E1);
> prjE := Expand(prjC*mp1*mp2);

```

$E$ is a minimal model for $X_0(45)/w_9$ and $prjE$ is the projection from $X_0(45)$ to $E$ that takes the cusp $\infty$ to the zero point of $E$. We compute the image of the cusps under $prjE$ so as to discount these when we find all the rational points on $E$. Since $p$ and $w_9(p)$ map to the same point under $prjE$, we only need consider cusps up to $w_9$ equivalence. The non-rational conjugate cusps $\pm 1/3$ are defined over ${\bf Q}(\sqrt{-3})$ and are swapped by $w_9$, so map to the same rational point. The same holds for the cusps $\pm 1/15$.

```magma
> i0 := prjE(Cusp(X45,45,1));
> K := QuadraticField(-3);
> c3 := Cusp(X45,45,3);
> c3p := X45(K)!Representative(Support(c3,K));
> i3 := E!(prjE(c3p));
> c15 := Cusp(X45,45,15);
> c15p := X45(K)!Representative(Support(c15,K));
> i15 := E!(prjE(c15p));
> Ecusps := [E!0,i0,i3,i15];

```

$E$ has rank zero, so we can recover all of its rational points using `TorsionSubgroup`. There are 8 in all, 4 of which are images of cusps. We find the 4 non-cuspidal ones and compute the pullbacks of them to $X_0(45)$. In each case, the pull back is a pair of conjugate points defined over a quadratic field. It is easiest to work with places here (and we don’t have to worry about the base scheme of $prjE$). The pullback of each point gives a single place corresponding to the two conjugate points.

```magma
> T,mp := TorsionSubgroup(E);
> Epts := [mp(g) : g in T];
> Eptsnc := [P : P in Epts | P notin Ecusps];
> plcs := [Support(Pullback(prjE,Place(p)))[1] : p in Eptsnc];

```

We now perform the 3-projection to $X_0(5)$ on these places and discard duplicate images.

```magma
> X5 := SmallModularCurve(5);
> prj3 := ProjectionMap(X45,45,X5,5,3);
> prj3 := Expand(prj3);
> plcs5 := [Support(Pushforward(prj3,p))[1] : p in plcs];
> plcs5 := Setseq(Seqset(plcs5));

```

We compute the $j$-invariants of the two images and verify that they represent isogenous curves under the cyclic 5-isogeny coming from the rational 5-subgroup (i.e. they are images of each other under $w_5$).

```magma
> js := [jInvariant(p,5) : p in plcs5];
> js;
[ -1680914269/32768, 1331/8 ]
> w5 := AtkinLehnerInvolution(X5,5,5);
> Pullback(w5,plcs5[1]) eq plcs5[2];
true

```

Finally, we can use Magma intrinsics to check that the elliptic curves with these $j$-invariants actually do satisfy the property that the image of the action of Galois on $3$-torsion is the normaliser of a split Cartan subgroup ($D_8$). As this property remains true for quadratic twists and is unchanged by images under a rational 5-isogeny, we only need check it for one curve over **Q** with one of the $j$-invariants. We also check that a minimal twist has conductor 338 from which modularity can be checked explicitly.

```magma
> Ej := EllipticCurveWithjInvariant(js[2]);
> Ej := MinimalModel(MinimalTwist(Ej));
> Conductor(Ej);
338
> ThreeTorsionType(Ej);
Dihedral

```
