# Modular abelian surfaces of small conductor with nontrivial Tate-Shafarevich groups

Sam Frengley, Dylan Laird

► To cite this version:

Sam Frengley, Dylan Laird. Modular abelian surfaces of small conductor with nontrivial Tate-Shafarevich groups. 2026. hal-05525956

HAL Id: hal-05525956

https://hal.science/hal-05525956v1

Preprint submitted on 24 Feb 2026

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
MODULAR ABELIAN SURFACES OF SMALL CONDUCTOR
WITH NONTRIVIAL TATE–SHAFAREVICH GROUPS

SAM FRENGLEY AND DYLAN LAIRD

ABSTRACT. We exhibit examples of geometrically simple abelian surfaces A/Q with conductor bounded by (10 000)² whose Tate–Shafarevich groups contain a subgroup isomorphic to (Z/pZ)² for each p = 5, 7, 11, 13. To find these examples we generalise work of Cremona–Freitas to enumerate all congruences of a certain type between pairs of weight 2 newforms f ∈ S₂new(Γ₀(N)) and g ∈ S₂new(Γ₀(M)) contained in the LMFDB (i.e., with N, M < 10 000) and with coefficient fields of degree ≤ 4. Passing from the modular forms to the corresponding abelian varieties we use visibility to (unconditionally) prove the existence of non-trivial elements of the Tate–Shafarevich group. Finally we construct an example of an abelian surface with (Z/7Z)² ⊂ III(A/Q) which is (conjecturally) not visible in any abelian threefold.

# 1. INTRODUCTION

Let $G_Q = \text{Gal}(\bar{Q}/Q)$ be the absolute Galois group of $Q$. Let $A/Q$ be an abelian variety and let $\text{III}(A/Q) \subset H^1(Q, A)$ be the Tate–Shafarevich group of $A$, i.e., the subgroup

$$ \text{III}(A/Q) = \ker \left( H^1(Q, A) \to \prod_p H^1(Q_p, A) \right). $$

Let $A^d/Q$ denote the quadratic twist of an abelian variety $A/Q$ by a squarefree integer $d$. In this article we prove the following theorem.

**Theorem 1.1.** Let $(A, p)$ be any of the pairs in Table 1.1 where $A/Q$ is an abelian surface, $p$ is a prime number. Then $A/Q$ is geometrically simple and the Tate–Shafarevich group $\text{III}(A/Q)$ contains a subgroup isomorphic to $(\mathbb{Z}/p\mathbb{Z})^2$.

To our knowledge these are the first examples of geometrically simple abelian surfaces with non-trivial 11- and 13-torsion in their Tate–Shafarevich groups. Works of Bruin–Flynn–Testa [BFT14] and Flynn [Fly15] provide examples of geometrically simple abelian surfaces $A/Q$ with $(\mathbb{Z}/p\mathbb{Z})^2 \subset \text{III}(A/Q)$ for each $p = 3, 5$ using $(p, p)$-descent. In [AS05, Table 1] Agashe and Stein used visibility in modular Jacobians to give many examples of abelian varieties (often of very large dimension) with real multiplication and nontrivial $\text{III}(A/Q)[p]$ (including the abelian surface 571.2.a.c with $(\mathbb{Z}/3\mathbb{Z})^2 \subset \text{III}(A/Q)$). In [Fre25, Theorem 1] (cf. [KS25, Appendix A]) the first named author found examples of geometrically simple abelian surfaces $A/Q$ with $(\mathbb{Z}/7\mathbb{Z})^2 \subset \text{III}(A/Q)$ by leveraging visibility in an abelian threefold (in particular, the example 3200.2.a.bm in Theorem 1.1 is given in [Fre25, KS25]). Our approach is closely related to [AS05], [Fis16, Section 5], and [Fre25].

**Remark 1.2.** In the works [AS05], [BFT14], [Fly15], and [Fre25] the examples provided have mod $p$ Galois representations $\bar{\rho}_{A,p}: G_Q \to \text{Sp}_{2g}(\mathbb{F}_p)$ which are not

<footnote>Date: February 23, 2026.</footnote>
<table><caption>TABLE 1.1. Examples of geometrically simple abelian surfaces $A/\mathbb{Q}$ with real multiplication by an order in the field $K_A$ and with $(\mathbb{Z}/p\mathbb{Z})^2 \subset \text{III}(A/\mathbb{Q})$. Abelian surfaces are labelled by the corresponding weight 2 newform from the LMFDB [LMFDB], explicit Weierstrass equations realising $A/\mathbb{Q}$ as the Jacobian of a curve are given in Table B.3.</caption><thead><tr><th>p</th><th>A</th><th>K<sub>A</sub></th><th>p</th><th>A</th><th>K<sub>A</sub></th></tr></thead><tbody><tr><td>5</td><td>2597.2.a.m</td><td>Q(√11)</td><td>7</td><td>3200.2.a.bm</td><td>Q(√2)</td></tr><tr><td>5</td><td>2736.2.a.bb</td><td>Q(√41)</td><td>7</td><td>5220.2.a.r</td><td>Q(√57)</td></tr><tr><td>5</td><td>4864.2.a.y</td><td>Q(√11)</td><td>7</td><td>8464.2.a.bg</td><td>Q(√2)</td></tr><tr><td>5</td><td>4968.2.a.bf</td><td>Q(√41)</td><td>7</td><td>8475.2.a.r</td><td>Q(√2)</td></tr><tr><td>5</td><td>5056.2.a.ba</td><td>Q(√6)</td><td>7</td><td>8976.2.a.bm</td><td>Q(√2)</td></tr><tr><td>5</td><td>5221.2.a.b</td><td>Q(√29)</td><td>7</td><td>9603.2.a.o</td><td>Q(√2)</td></tr><tr><td>5</td><td>7632.2.a.v</td><td>Q(√41)</td><td>11</td><td>6962.2.a.q</td><td>Q(√5)</td></tr><tr><td>5</td><td>8784.2.a.bj</td><td>Q(√6)</td><td>11</td><td>9025.2.a.r</td><td>Q(√5)</td></tr><tr><td>5</td><td>9472.2.a.n</td><td>Q(√29)</td><td>13</td><td>6776.2.a.r</td><td>Q(√3)</td></tr></tbody></table>

surjective. The same is true for the examples in Theorem 1.1 since the abelian surfaces have real multiplication (this will play a key role). It would be interesting to construct examples where $\bar{\rho}_{A,p}$ is surjective.

Let $\Delta/\mathbb{Q}$ be a finite group scheme and suppose that there exist embeddings $\Delta \hookrightarrow A$ and $\Delta \hookrightarrow B$. Consider the abelian variety $Z = (A \times B)/\Delta$ (where $\Delta$ is embedded diagonally in $A \times B$). Writing $\iota: A \to Z$ for the natural morphism, we define the visible subgroup

$$ \text{Vis}_Z H^1(\mathbb{Q}, A) = \ker(H^1(\mathbb{Q}, A) \xrightarrow{\iota_*} H^1(\mathbb{Q}, Z)) $$

and accordingly $\text{Vis}_Z \text{III}(A/\mathbb{Q}) = \text{III}(A/\mathbb{Q}) \cap \text{Vis}_Z H^1(\mathbb{Q}, A)$. We say that an element $\xi \in \text{III}(A/\mathbb{Q})$ is visible in $Z$ if $\xi \in \text{Vis}_Z \text{III}(A/\mathbb{Q})$.

If $A/\mathbb{Q}$ is an abelian variety and $\mathfrak{p} \subset \text{End}(A)$ is an ideal in (a subring of) $\text{End}(A)$, we write $A[\mathfrak{p}] \subset A$ for the subgroup annihilated by $\mathfrak{p}$.

**Definition 1.3.** Let $A/\mathbb{Q}$ and $B/\mathbb{Q}$ be simple abelian varieties and let $\mathfrak{p} \subset \text{End}(A)$ and $\mathfrak{q} \subset \text{End}(B)$ be prime ideals. We say that $A$ and $B$ are $(\mathfrak{p}, \mathfrak{q})$-congruent if there exists an isomorphism $A[\mathfrak{p}] \cong B[\mathfrak{q}]$ of $G_{\mathbb{Q}}$-modules.

We deduce Theorem 1.1 from the following more precise result.

**Theorem 1.4.** Let $(A, B, \mathfrak{p})$ be any of the tuples in Table B.2 where $A/\mathbb{Q}$ and $B/\mathbb{Q}$ are abelian varieties and $\mathfrak{p}$ is a prime number. Then there exist prime ideals $\mathfrak{p}$ and $\mathfrak{q}$ such that the Tate-Shafarevich group $\text{III}(A/\mathbb{Q})[\mathfrak{p}]$ contains a subgroup isomorphic to $(\mathbb{Z}/p\mathbb{Z})^2$ which made visible by a $(\mathfrak{p}, \mathfrak{q})$-congruence $A[\mathfrak{p}] \cong B[\mathfrak{q}]$.

For any abelian variety $A/\mathbb{Q}$ and each element $\xi \in \text{III}(A/\mathbb{Q})$ there exists some abelian variety $Z/\mathbb{Q}$ such that $\xi \in \text{Vis}_Z \text{III}(A/\mathbb{Q})$ (see [CM00, p.5 Proposition] or [AS02, Proposition 2.3]). It is therefore natural to ask for the visibility dimension of $\xi \in \text{III}(A/\mathbb{Q})$ which is defined to be the minimum dimension of an abelian variety $Z/\mathbb{Q}$ visualising $\xi$.
To this end, we draw the reader's attention to the abelian varieties with labels 9603.2.a.o, 6962.2.a.q and 9025.2.a.r in Table B.2. In each of these cases A/Q is an abelian surface and the subgroup (Z/pZ)² ⊂ III(A/Q) is made visible by a congruence with an abelian surface B/Q.

**Conjecture 1.5.** The Tate–Shafarevich group of the abelian surface A/Q with label 9603.2.a.o contains an element of order 7 which is not visible in any abelian threefold, in particular its visibility dimension is 4.

Conjecture 1.5 follows if one can determine the rational points on a pair of explicit plane quartic curves (given in Section 5).

**Question 1.6.** Can the elements of order 11 in the Tate–Shafarevich groups of the abelian surfaces with labels 6962.2.a.q and 9025.2.a.r be visualised in an abelian threefold?

**1.1. Congruences of weight 2 newforms.** The key technical input in this article is to find several examples of (p, q)-congruent abelian varieties over Q. Testing each of these examples against the criterion in [Fis16, Theorem 2.2] (see Theorem 4.1) yields Theorems 1.1 and 1.4. To construct examples of congruences, we exploit the correspondence between abelian varieties with real multiplication and weight 2 newforms. We then utilise the database of newforms in the LMFDB [LMFDB]. A less systematic version of this approach was discussed by Fisher [Fis16, Section 5].

Let $\mathcal{O}$ be an order in a totally real number field of degree $d$. By work of Shimura [Shi73] we may associate to a Galois orbit of newforms $f \in S_2^{\text{new}}(\Gamma_0(N))$ with coefficient ring $\mathcal{O}$ (and trivial nebuntypus) an isogeny class of abelian varieties $A/\mathcal{Q}$ of dimension $d$, conductor $N^d$, and with $\text{End}(A) \cong \mathcal{O}$. Conversely, work of Ribet [Rib04, Theorem 4.4] and Serre's conjecture [KW09a, KW09b] implies that this construction is a bijective correspondence.

Let $A/\mathcal{Q}$ be such an abelian variety associated to a Galois orbit of newforms $f \in S_2^{\text{new}}(\Gamma_0(N))$. If $p$ is a prime number coprime to $N$ then we have

$$T_p(A) \cong \bigoplus_{\mathfrak{p}} T_p(A)$$

where the direct sum ranges over those prime ideals $\mathfrak{p}$ of $\mathcal{O}$ lying above $p$ and $T_p(A) = \lim_{\leftarrow \mathfrak{p}^n} A[\mathfrak{p}^n]$ is the p-adic Tate module. In particular we obtain p-adic Galois representations $\rho_{A,\mathfrak{p}}: G_{\mathcal{Q}} \to \text{GL}_2(\mathcal{O}_{\mathfrak{p}})$, and for each good prime $\ell \neq p$ of $A$ we have $a_\ell(f) = \text{tr} \rho_{A,\mathfrak{p}}(\text{Frob}_\ell)$. For a prime $\mathfrak{p}$ of $\mathcal{O}$ we write $\mathbb{F}_{\mathfrak{p}} = \mathcal{O}/\mathfrak{p}$ for the residue field. For simplicity we restrict our attention only to primes unramified in $\mathcal{O}$.

**Definition 1.7.** Let $f \in S_2^{\text{new}}(\Gamma_0(N))$ and $g \in S_2^{\text{new}}(\Gamma_0(M))$ be newforms such that for all $\ell$ we have $a_\ell(f), a_\ell(g) \in \mathcal{O}_L$ for some maximal order $\mathcal{O} \subset L$ where $L$ is a totally real field. Let $\mathfrak{m}$ be a prime ideal of $\mathcal{O}_L$ such that the ramification index $e(\mathfrak{m}/p) = 1$. We say that $f$ and $g$ are $\mathfrak{m}$-congruent if $a_\ell(f) - a_\ell(g) \in \mathfrak{m}$ for all $\ell \nmid pNM$.

Suppose $\mathcal{O}_f \subset K_f$ and $\mathcal{O}_g \subset K_g$ are maximal orders and let $\mathfrak{p} \subset \mathcal{O}_f$ and $\mathfrak{q} \subset \mathcal{O}_g$ be prime ideals lying above a prime $p \in \mathbb{Z}$ such that the ramification indices $e(\mathfrak{p}/p) = e(\mathfrak{q}/p) = 1$. We say that the Galois orbits of the forms $f$ and $g$ are $(\mathfrak{p}, \mathfrak{q})$-congruent if there exists a number field $L$, a prime ideal $\mathfrak{m} \subset \mathcal{O}_L$ with $e(\mathfrak{m}/p) = 1$, and embeddings $\mathcal{O}_f \hookrightarrow L$ and $\mathcal{O}_g \hookrightarrow L$ for which $\mathfrak{m} \mid \mathfrak{p}$ and $\mathfrak{m} \mid \mathfrak{q}$ and such that $f$ and $g$ are $\mathfrak{m}$-congruent.
Since for all good primes $\ell \neq p$ of $A$ we have $a_\ell(A) = \text{tr } \rho_{A,p}(\text{Frob}_\ell)$ (and respectively for $B$), if $A/\mathbb{Q}$ and $B/\mathbb{Q}$ are $(\mathfrak{p}, \mathfrak{q})$-congruent then the corresponding (Galois orbits of) modular forms $f$ and $g$ are $(\mathfrak{p}, \mathfrak{q})$-congruent (in fact the converse is true up to semisimplification, see Proposition 2.2(2)). This suggests that, in order to search for $(\mathfrak{p}, \mathfrak{q})$-congruences between abelian varieties, one may instead search for congruences of modular forms. Our main tool for finding the examples in Theorem 1.1 is the following theorem which builds on work of Cremona–Freitas [CF22] when the coefficient fields are $\mathbb{Q}$.

**Theorem 1.8.** Let $f \in S_2^{\text{new}}(\Gamma_0(N))$ and $g \in S_2^{\text{new}}(\Gamma_0(M))$ be newforms which are not Galois conjugate, have level $N, M < 10000$, and coefficient rings $\mathcal{O}_f$ and $\mathcal{O}_g$. Suppose that the coefficient fields $K_f = \mathcal{O}_f \otimes \mathbb{Q}$ and $K_g = \mathcal{O}_g \otimes \mathbb{Q}$ have dimension at most 4 and that $\mathcal{O}_f$ and $\mathcal{O}_g$ are the respective rings of integers in $K_f$ and $K_g$.

Let $\mathfrak{p} \subset \mathcal{O}_f$ and $\mathfrak{q} \subset \mathcal{O}_g$ be prime ideals lying above a prime $5 \le p \le 4000$ for which $e(\mathfrak{p}/p) = e(\mathfrak{q}/p) = 1$. Then if (the Galois orbits of) $f$ and $g$ are $(\mathfrak{p}, \mathfrak{q})$-congruent the triple $(f, g, p)$ is listed in [GitHub] (if $23 \le p \le 4000$ and $\text{deg}(K_f), \text{deg}(K_g) \le 2$ then $(f, g, p)$ is listed in Table B.1).

**Remark 1.9.**

(1) It is almost certain that each triple listed in Theorem 1.8 is an example of a $(\mathfrak{p}, \mathfrak{q})$-congruence. Indeed for each such pair $a_\ell(f) \equiv a_\ell(g)$ in $\mathbb{F}_\ell$ for all $\ell < 1000$ with $\ell \nmid pNM$. To prove this in any individual case, one may compute Fourier coefficients up to a related Sturm bound (see Proposition 2.2).

(2) For each $d \le 4$ we found a $(\mathfrak{p}, \mathfrak{q})$-congruence of the form Theorem 1.8 with $\text{deg}(K_f), \text{deg}(K_g) \le d$ and $p = p_d$ where $p_1 = 13, p_2 = 59, p_3 = 197$, and $p_4 = 739$. These are the pairs $(735.2.a.d, 9555.2.a.h)$, $(4332.2.a.e, 4332.2.a.f)$, $(7854.2.a.bb, 7854.2.a.bc)$, and $(8775.2.a.bg, 8775.2.a.bo)$ respectively. It is likely that there exist no $(\mathfrak{p}, \mathfrak{q})$-congruences of this form (in particular with $N, M \le 10000$) for any $p \ge p_d$. It may be possible to prove this by adapting the methods used in the proof of [CF22, Theorem 1.3].

(3) It is notable that for each of the congruences visualising an element of $\text{III}(A/\mathbb{Q})[p]$ in Theorem 1.4 the prime $p$ splits in $\text{End}(A)$.

## 1.2. Outline of the paper.
In Section 2 we generalise a result of Kraus–Oesterlé [KO92, Proposition 4] which allows us to prove $(\mathfrak{p}, \mathfrak{q})$-congruences of (Galois orbits of) modular forms by comparing only finitely many Fourier coefficients. Applying this result to the pairs of forms in Table B.2 (which includes the examples in Theorem 1.1) we prove Proposition 2.3, which gives several examples of $(\mathfrak{p}, \mathfrak{q})$-congruent pairs of abelian varieties of dimension $\le 2$.

In Section 3 we describe our generalisation of the algorithm given by Cremona–Freitas [CF22] for determining $(\mathfrak{p}, \mathfrak{q})$-congruences of newforms and apply this to prove Theorem 1.8.

Note that if one is only interested in proving Theorem 1.1 Section 3 is not required, however it is Theorem 1.8 which provides the candidates which we search through to find these examples. With this in mind, in Section 4 we describe how we sieve for abelian varieties whose Tate–Shafarevich groups may be non-trivial, starting from Theorem 1.8. This step relies crucially on the works [CEH$^+$a, CEH$^+$b] who give explicit abelian surfaces whose associated newforms are contained in the LMFDB. At the end of Section 4 we prove Theorem 1.1 by combining
Proposition 2.3 with local criteria due to Agashe–Stein [AS02, Theorem 3.1] and Fisher [Fis16, Theorem 2.2] (see also Theorem 4.1 and Appendix A).

We study closely the case of the abelian surface 9603.2.a.o in Section 5 and in particular we provide evidence for Conjecture 1.5.

The code associated to this article is written in MAGMA [BCP97] and SAGE-MATH [SAGEMATH] and is available, together with the data from this article, at

https://github.com/dlaird-ens/p-tors-sha

**1.3. Acknowledgements.** We thank Martin Azon, Raymond van Bommel, Tom Fisher, and Céline Maistret for helpful comments and discussions. We are especially grateful to Brendan Creutz for discussions about Section 5, to Tim Dokchitser for computing several Tamagawa numbers using [DJ], and to Kimball Martin for sharing with us the RM abelian surfaces corresponding to newforms in the LMFDB from [CEH+a, CEH+b]. Much of the work for this article was done while the authors were based at the University of Bristol. SF was supported in part by the Royal Society through Céline Maistret’s Dorothy Hodgkin Fellowship and also by the HYPERFORM consortium, funded by France through Bpifrance.

## 2. PROVING CONGRUENCES OF MODULAR FORMS

In this section we give a criterion (Proposition 2.2) for proving that a candidate congruence is indeed $(\mathfrak{p}, \mathfrak{q})$-congruence, adapting (and closely following) [KO92, Proposition 4] (which is the case of Proposition 2.2 where $O_f = O_g = \mathbb{Z}$).

In preparation, we begin with a lemma which enables us to avoid working with a Galois field containing the coefficient fields of a pair of $(\mathfrak{p}, \mathfrak{q})$-congruent forms.

**Lemma 2.1.** Let $f \in S_2^{\text{new}}(\Gamma_0(N))$ and $g \in S_2^{\text{new}}(\Gamma_0(M))$ be newforms whose coefficient rings $O_f$ and $O_g$ are the rings of integers of $K_f$ and $K_g$ respectively. Let $\mathfrak{p} \subset O_f$ and $\mathfrak{q} \subset O_g$ be prime ideals lying above $\mathfrak{p}$, and suppose that $e(\mathfrak{p}/\mathfrak{p}) = e(\mathfrak{q}/\mathfrak{p}) = 1$. Let $L$ be the Galois closure of the composition of $K_f$ and $K_g$ and let $O_L$ be its ring of integers. Then the Galois orbits of $f$ and $g$ are $(\mathfrak{p}, \mathfrak{q})$-congruent if and only if there exists an isomorphism $\mathbb{F}_{\mathfrak{p}} \cong \mathbb{F}_{\mathfrak{q}}$ such that $a_\ell(f) \equiv a_\ell(g)$ in $\mathbb{F}_{\mathfrak{p}}$ for all $\ell \nmid pNM$.

*Proof.* First suppose that the Galois orbits of $f$ and $g$ are $(\mathfrak{p}, \mathfrak{q})$-congruent. By definition there exists a field $L$, a prime ideal $\mathfrak{m} \subset O_L$, and embeddings $K_f \hookrightarrow L$ and $K_g \hookrightarrow L$ so that $f$ and $g$ are $\mathfrak{m}$-congruent. Since $O_f$ is generated by those $a_\ell(f)$ with $\ell \nmid pNM$ (and respectively for $g$) the fields $\mathbb{F}_\mathfrak{p}$ and $\mathbb{F}_\mathfrak{q}$ have the same cardinality. In particular, they are the same subfields of $\mathbb{F}_\mathfrak{m}$ and this gives the isomorphism $\mathbb{F}_\mathfrak{p} \cong \mathbb{F}_\mathfrak{q}$ from the statement.

Conversely suppose that there exists an isomorphism $\tau: \mathbb{F}_\mathfrak{p} \cong \mathbb{F}_\mathfrak{q}$ such that $a_\ell(f) \equiv a_\ell(g)$ in $\mathbb{F}_\mathfrak{p}$ for all $\ell \nmid pNM$. Choose embeddings $K_f, K_g \subset \overline{\mathbb{Q}}$ and let $\tilde{L}$ be the Galois closure of the compositum of $K_f$ and $K_g$ inside $\overline{\mathbb{Q}}$. Let $O_{\tilde{L}} \subset \tilde{L}$ be the ring of integers of $\tilde{L}$. After possibly changing the embedding $K_g \mapsto \tilde{L}$ we may choose a prime $\tilde{\mathfrak{m}} \subset O_{\tilde{L}}$ lying above both $\mathfrak{p}$ and $\mathfrak{q}$. Let $I \subset D \subset \text{Gal}(\tilde{L}/\overline{\mathbb{Q}})$ be the decomposition and inertia groups of $\tilde{\mathfrak{m}}$ and choose $\tilde{\tau} \in D$ so that the image of $\tilde{\tau}$ in $D/I = \text{Gal}(\mathbb{F}_{\tilde{\mathfrak{m}}}/\mathbb{F}_\mathfrak{p})$ restricts to $\tau$ on $\mathbb{F}_\mathfrak{p}$. Let $L \subset \tilde{L}$ be the field fixed by $I$ and let $\mathfrak{m} = L \cap \tilde{\mathfrak{m}}$. Then $e(\mathfrak{m}/\mathfrak{p}) = 1$ and by construction for all $\ell \nmid pNM$ we have $\tilde{\tau}(a_\ell(f)) \equiv a_\ell(g) \pmod{\mathfrak{m}}$, as required. $\square$
For a positive integer $\eta$ we write $\mu(\eta) = \eta \cdot \prod_{p|\eta} (1 + 1/p)$ for the index of $\Gamma_0(\eta)$ in $\text{SL}_2(\mathbb{Z})$. For a prime $\ell$ we write $v_\ell$ for the $\ell$-adic valuation, normalised so that $v_\ell(\ell) = 1$. Given a representation $\rho$ we write $\rho^{ss}$ for the semisimplification of $\rho$.

**Proposition 2.2.** Let $f \in S_2^{\text{new}}(\Gamma_0(N))$ and $g \in S_2^{\text{new}}(\Gamma_0(M))$ be newforms whose coefficient rings $\mathcal{O}_f$ and $\mathcal{O}_g$ are the rings of integers of $K_f$ and $K_g$ respectively. Let $S$ be the set of prime numbers $\ell$ such that $v_\ell(N) = v_\ell(M) = 1$ and $a_\ell(f) \neq a_\ell(g)$. Define

$$ \eta = \text{lcm}(N, M) \prod_{\ell \in S} \ell. $$

Let $\mathfrak{p} \subset \mathcal{O}_f$ and $\mathfrak{q} \subset \mathcal{O}_g$ be primes lying above $p$ such that $e(\mathfrak{p}/p) = e(\mathfrak{q}/p) = 1$. The following are equivalent:

(1) The Galois orbits of $f$ and $g$ are $(\mathfrak{p}, \mathfrak{q})$-congruent.

(2) The semisimplifications $\bar{\rho}_{f,\mathfrak{p}}^{ss}$ and $\bar{\rho}_{g,\mathfrak{q}}^{ss}$ are isomorphic.

(3) There exists a choice of isomorphism $\mathbb{F}_{\mathfrak{p}} \cong \mathbb{F}_{\mathfrak{q}}$ such that both of the following hold:

(a) for all primes $\ell \le \mu(\eta)/6$ with $\ell \nmid NM$ we have $a_\ell(f) \equiv a_\ell(g) \pmod{\mathbb{F}_p}$, and

(b) for all primes $\ell \le \mu(\eta)/6$ with $v_\ell(NM) = 1$ we have $a_\ell(f)a_\ell(g) \equiv \ell+1 \pmod{\mathbb{F}_p}$.

*Proof.* That (1) ⇒ (2) follows immediately by combining the Brauer–Nesbitt and Chebotarev density theorems. The implication (2) ⇒ (3) follows from the same argument as Kraus–Oesterlé [KO92, Proposition 4], noting that by [Miy06, Theorem 4.6.17(2)] if $v_\ell(N) = 1$ then $a_\ell(f) \in \{\pm 1\}$.

For the implication (3) ⇒ (1), we again follow the argument of Kraus–Oesterlé [KO92, Proposition 4]. Possibly after replacing them by Galois conjugates, we may assume that $f$ and $g$ are newforms with coefficients contained in a common maximal order $\mathcal{O}_L$ and that the isomorphism $\mathbb{F}_p \cong \mathbb{F}_q$ is induced by reduction modulo a prime $\mathfrak{m} \subset \mathcal{O}_L$.

For positive integers $m, d$ the map $\tau \mapsto d\tau$ on the complex upper half plane induces a homomorphism $R_d: S_2(\Gamma_0(m)) \to S_2(\Gamma_0(md))$. Moreover, if $h \in S_2(\Gamma_0(m))$ is a cusp form then we have $L(R_d(h), s) = d^{-s}L(h, s)$. Recall that if $h \in S_2^{\text{new}}(\Gamma_0(m))$ is a newform of level $m$ we have $L(h, s) = \prod_{\ell} L_\ell(h, q^{-s})^{-1}$ where the local factors are determined by the formula:

$$ L_{\ell}(h, T) = \begin{cases} 1 - a_{\ell}(h)T + \ell T^2 & \text{if } v_{\ell}(m) = 0, \\ 1 - a_{\ell}(h)T & \text{if } v_{\ell}(m) = 1, \text{ and} \\ 1 & \text{if } v_{\ell}(m) \ge 2. \end{cases} $$

Writing $m = \text{lcm}(N, M)$, for each prime $\ell$ define linear operators

$$ \alpha_{\ell}, \beta_{\ell}: S_2(\Gamma_0(m)) \to S_2(\Gamma_0(\eta)) $$

by the case distinctions in Table 2.1. Define $\alpha = \prod_{\ell} \alpha_{\ell}$ and $\beta = \prod_{\ell} \beta_{\ell}$ and write $f' = \alpha(f)$ and $g' = \beta(g)$.

By [Miy06, Theorem 4.6.17(2)] if $v_\ell(N) = 1$ (resp. $v_\ell(M) = 1$) then we have $a_\ell(f) \in \{\pm 1\}$ (resp. $a_\ell(g) \in \{\pm 1\}$). A direct calculation shows that the local factors $L_\ell(f', T)$ and $L_\ell(g', T)$ are equal modulo $\mathfrak{m}$ for every prime $\ell \le \mu(\eta)/6$ (for details see the proof of [KO92, Proposition 4]). In particular we have $a_n(f') \equiv a_n(g') (\text{mod } \mathfrak{m})$ for all integers $n \le \mu(\eta)/6$.
<table><caption>TABLE 2.1. Definition of the operators $\alpha_\ell$ and $\beta_\ell$ when $v_\ell(N) \le v_\ell(M)$, the cases when $v_\ell(N) > v_\ell(M)$ are defined symmetrically.</caption><thead><tr><th>v<sub>ℓ</sub>(N)</th><th>v<sub>ℓ</sub>(M)</th><th>α<sub>ℓ</sub></th><th>β<sub>ℓ</sub></th></tr></thead><tbody><tr><td>0</td><td>0</td><td>1</td><td>1</td></tr><tr><td>0</td><td>1</td><td>1 - (a<sub>ℓ</sub>(f) - a<sub>ℓ</sub>(g))R<sub>ℓ</sub></td><td>1</td></tr><tr><td>1</td><td>1</td><td><table style="display: inline-table; vertical-align: middle; border-collapse: collapse; text-align: center;"><tbody><tr><td style="border: none; padding: 0 0.2em; border-bottom: 1px solid black;">1</td><td style="border: none; padding: 0 0.2em; padding-left: 0.2em;">ℓ &notin; S,</td></tr><tr><td style="border: none; padding: 0 0.2em; padding-left: 0.2em;">1 - a<sub>ℓ</sub>(f)R<sub>ℓ</sub></td><td style="border: none; padding: 0 0.2em; padding-left: 0.2em;">ℓ &in; S.</td></tr></tbody></table></td><td><table style="display: inline-table; vertical-align: middle; border-collapse: collapse; text-align: center;"><tbody><tr><td style="border: none; padding: 0 0.2em; border-bottom: 1px solid black;">1</td><td style="border: none; padding: 0 0.2em; padding-left: 0.2em;">ℓ &notin; S,</td></tr><tr><td style="border: none; padding: 0 0.2em; padding-left: 0.2em;">1 - a<sub>ℓ</sub>(g)R<sub>ℓ</sub></td><td style="border: none; padding: 0 0.2em; padding-left: 0.2em;">ℓ &in; S.</td></tr></tbody></table></td></tr><tr><td>0</td><td>&ge; 2</td><td>1 - a<sub>ℓ</sub>(f)R<sub>ℓ</sub> + ℓR<sub>ℓ</sub><sup>2</sup></td><td>1</td></tr><tr><td>1</td><td>&ge; 2</td><td>1 - a<sub>ℓ</sub>(f)R<sub>ℓ</sub></td><td>1</td></tr><tr><td>&ge; 2</td><td>&ge; 2</td><td>1</td><td>1</td></tr></tbody></table>

By the Sturm bound [Ste07, Corollary 9.20] all the Fourier coefficients of the modular forms $f'$ and $g'$ are equal modulo $m$. But for all $\ell \nmid NM$ we have $a_\ell(f) = a_\ell(f')$ and $a_\ell(g) = a_\ell(g')$, and the claim follows. $\square$

## 2.1. Promoting congruences to Galois representations.
With our target application of visibility in mind, we now turn to the task of relating congruences of modular forms to their associated abelian varieties.

**Proposition 2.3.** Let $(A, B, p)$ be any of the triples listed in Table B.2 where $A/\mathbb{Q}$ and $B/\mathbb{Q}$ are abelian varieties and $p$ is a prime number. Then $A$ and $B$ have real multiplication by the rings of integers $O_A$ and $O_B$ of totally real fields and there exist primes $p \subset O_A$ and $q \subset O_B$ dividing $p$ such that $A$ and $B$ are $(p, q)$-congruent.

*Proof.* Let $J/\mathbb{Q}$ be any of the abelian varieties $A/\mathbb{Q}$ or $B/\mathbb{Q}$ from the statement. We first claim that the (isogeny classes of the) $J/\mathbb{Q}$ corresponds to the newform $f \in S_2^{\text{new}}(\Gamma_0(N))$ listed in Table B.3. The abelian variety $J/\mathbb{Q}$ is given explicitly as either an elliptic curve or the Jacobian of genus 2 curve $C/\mathbb{Q}$.

If $\dim(J) = 2$ we check rigorously that $J$ has real multiplication by the maximal order (of discriminant $D$) in the field $K$ listed in Table B.3 by exhibiting a rational point on the Hilbert modular surface $Y_-(D)$ in the model given by Elkies-Kumar [EK14] which corresponds to $J$ (it may also be possible to rigorously check the existence of these endomorphisms using [CMSV19]). Using work of Dokchitser-Doris [DD19] we verify that the conductor of $J$ is equal to $N^2$ and thus the isogeny class of $J/\mathbb{Q}$ has an associated (Galois orbit of) weight 2 newforms $f_J \in S_2^{\text{new}}(\Gamma_0(N))$.

The set of (Galois orbits of) weight 2 newforms $g \in S_2^{\text{new}}(\Gamma_0(N))$ with coefficient field $K$ is listed in the LMFDB [LMFDB] together with the traces $\text{Tr}_{K/\mathbb{Q}}(a_\ell)$ and norms $\text{Nm}_{K/\mathbb{Q}}(a_\ell)$ for those primes $\ell < 1000$. By [FLS$^+$01, Section 2.1] or [MS93, Lemma 3] for each good prime $\ell$ of $C$ we have

$$ \text{Tr}_{K/\mathbb{Q}}(a_{\ell}) = \ell + 1 - n_1 \\ \text{Nm}_{K/\mathbb{Q}}(a_{\ell}) = (n_1^2 + n_2)/2 - (\ell + 1)n_1 - \ell $$
where $n_1 = \#C(\mathbb{F}_\ell)$ and $n_2 = \#C(\mathbb{F}_{\ell^2})$. In each case, computing the values $n_1$ and $n_2$ for a few small primes $\ell \nmid N$ suffices to show that $f$ is the unique (Galois orbit of) newforms whose trace and norm match that of $f_J$.

Now let $f$ and $g$ be the newforms corresponding to $A$ and $B$ respectively. Computing Fourier coefficients in MAGMA [BCP97] and applying Proposition 2.2 we see that there exist prime ideals $\mathfrak{p} \subset \mathcal{O}_A$ and $\mathfrak{q} \subset \mathcal{O}_B$ such that $f$ and $g$ are $(\mathfrak{p}, \mathfrak{q})$-congruent. In particular, by Proposition 2.2(2) we have isomorphisms of semisimplified Galois representations $\bar{\rho}_{f,\mathfrak{p}}^{ss} \cong \bar{\rho}_{g,\mathfrak{q}}^{ss}$.

However, in every case the Galois representation $\bar{\rho}_{f,\mathfrak{p}}^{ss}$ is readily seen to be irreducible by exhibiting a single prime $\ell \nmid pN$ for which the characteristic polynomial of Frobenius $X^2 - a_\ell(f)X + \ell$ is irreducible modulo $\mathfrak{p}$. In particular $\bar{\rho}_{f,\mathfrak{p}} \cong \bar{\rho}_{g,\mathfrak{q}}$, as required. $\square$

### 3. SIEVING THE LMFDB FOR CONGRUENCES BETWEEN MODULAR FORMS

We adapt the method used in [CF22] to determine $p$-congruences between elliptic curves for each $p \ge 7$. Let $\mathcal{S}$ denote the set of all Galois orbits of weight 2 newforms $f \in S_2^{\text{new}}(\Gamma_0(N))$ of conductor $1 \le N \le 10000$ and whose coefficient fields have degree $\le 4$. This algorithm rests on the heuristic that there are very few pairs of forms $f, g \in \mathcal{S}$ which are not congruent, but which nevertheless have congruent $a_\ell$-values for several primes $\ell$.

Fix a prime number $p$ and an algebraic closure $\bar{\mathbb{F}}_p$ of $\mathbb{F}_p$. For a finite set $\mathcal{L}$ of prime numbers let $\mathcal{S}_{\mathcal{L}}$ be the set of forms $f \in \mathcal{S}$ of level coprime to $\ell$ for each $\ell \in \mathcal{L}$. For each form $f \in \mathcal{S}_{\mathcal{L}}$ and prime $\mathfrak{p} \subset \mathcal{O}_f$ above $p$ define the tuple

$$ (1) \qquad h_{\mathcal{L}}(f; \mathfrak{p}) = (\bar{a}_{\ell}(f))_{\ell \in \mathcal{L}} \in \mathbb{F}_{\mathfrak{p}}^{\left|\mathcal{L}\right|} $$

where we write $\bar{a}_\ell(f)$ for the image of $a_\ell(f)$ in $\mathbb{F}_p$. The following lemma is immediate.

**Lemma 3.1.** If $f, g \in \mathcal{S}_{\mathcal{L}}$ are $(\mathfrak{p}, \mathfrak{q})$-congruent then there exist a pair of embeddings $\sigma: \mathbb{F}_p \hookrightarrow \bar{\mathbb{F}}_p$ and $\tau: \mathbb{F}_q \hookrightarrow \bar{\mathbb{F}}_q$ such that $\sigma(h_{\mathcal{L}}(f; \mathfrak{p})) = \tau(h_{\mathcal{L}}(g; \mathfrak{q}))$.

Our approach is to build a hash table associating forms $f$ to the hash values $\sigma(h_{\mathcal{L}}(f; \mathfrak{p}))$. The following lemma provides a list of sets $\mathcal{L}$ which we need to perform this calculation for.

**Lemma 3.2.** Consider the sets $\mathcal{L}_0, \dots, \mathcal{L}_5$ of 15 prime numbers given in Table 3.1. We have

$$ S \times S = \bigcup_{i=0}^{5} S_{\mathcal{L}_i} \times S_{\mathcal{L}_i}. $$

In particular, if $f, g \in S$ are $(\mathfrak{p}, \mathfrak{q})$-congruent then:

(i) there exists $i \in \{0, \dots, 5\}$ such that $f, g \in S_{\mathcal{L}_i}$, and

(ii) for each $i \in \{0, \dots, 5\}$ such that $f, g \in S_{\mathcal{L}_i}$ we have $\sigma(h_{\mathcal{L}_i}(f; \mathfrak{p})) = \tau(h_{\mathcal{L}_i}(g; \mathfrak{q}))$ for some $\sigma: \mathbb{F}_p \hookrightarrow \bar{\mathbb{F}}_p$ and $\tau: \mathbb{F}_q \hookrightarrow \bar{\mathbb{F}}_q$.

*Proof.* By a brute force calculation in PYTHON we check that for each pair of integers $(N, M) \in \{2, \dots, 10000\}^2$ there exists $1 \le i \le 6$ such that both $N$ and $M$ are coprime to all $\ell \in \mathcal{L}_i$. The claim follows since the levels of forms $f \in S$ are bounded by 10000. $\square$

Equipped with Lemmas 3.1 and 3.2 we are now able to prove Theorem 1.8.
<table><caption>TABLE 3.1. The sets of prime numbers $\mathcal{L}_0, \dots, \mathcal{L}_5$ from Lemma 3.2</caption><thead><tr><th>i</th><th>Li</th></tr></thead><tbody><tr><td>0</td><td>{419, 431, 577, 587, 599, 617, 733, 773, 823, 859, 877, 883, 887, 941, 983}</td></tr><tr><td>1</td><td>{419, 439, 541, 569, 587, 641, 709, 727, 751, 769, 773, 821, 827, 859, 971}</td></tr><tr><td>2</td><td>{419, 461, 569, 577, 601, 641, 701, 719, 733, 751, 887, 907, 919, 971, 983}</td></tr><tr><td>3</td><td>{439, 461, 617, 631, 691, 733, 739, 757, 787, 811, 827, 919, 937, 947, 983}</td></tr><tr><td>4</td><td>{439, 503, 587, 647, 683, 701, 709, 727, 739, 757, 797, 829, 839, 853, 929}</td></tr><tr><td>5</td><td>{467, 541, 683, 691, 761, 773, 811, 829, 853, 863, 929, 937, 947, 953, 991}</td></tr></tbody></table>

*Proof of Theorem 1.8.* For each of the sets $\mathcal{L}_i$ in Lemma 3.2 and $5 \le p \le 4000$ we compute a hash table which associates to each triple $(f, \mathfrak{p}, \sigma)$ the hash value $\sigma(\mathfrak{h}_{\mathcal{L}}(f; \mathfrak{p}))$. Combining Lemmas 3.1 and 3.2 we obtain a short list of pairs $f, g \in \mathcal{S}$ with the same hash values (for some choice of $\mathfrak{p}, \sigma$ and $\mathfrak{q}, \tau$). After comparing the remaining $a_\ell(f)$ and $a_\ell(g)$ for good primes $\ell \le 1000$ we are left only with the examples given in Theorem 1.8. $\square$

**Remark 3.3.**

(1) Note that in Lemma 3.2 we could take instead a single set $\mathcal{L}$ consisting only of primes $\ge 10000$, after which $\mathcal{S}_{\mathcal{L}} = \mathcal{S}$ (this is the approach taken by Cremona–Freitas [CF22]). However, the $a_\ell(f)$ values used to compute $\mathfrak{h}_{\mathcal{L}}(f; \mathfrak{p})$ are stored in the LMFDB for $\ell < 1000$ and we found it convenient to lookup, rather than recompute, these coefficients.

(2) When $f$ has coefficient field $\mathbb{Q}$ we have $\mathfrak{p} = (p)$ and that there exists a unique embedding $\sigma: \mathbb{F}_{\mathfrak{p}} \hookrightarrow \bar{\mathbb{F}}_{\mathfrak{p}}$. In particular, our hash value $\sigma(\mathfrak{h}_{\mathcal{L}}(f; \mathfrak{p}))$ collapses to that defined by Cremona–Freitas [CF22].

### 4. FILTERING FOR VISIBLE III AND THEOREMS 1.1 AND 1.4

Let $K$ be a number field and let $A/K$ and $B/K$ be abelian varieties. Let $\Delta/K$ be a finite group scheme and suppose that there exist embeddings $\Delta \hookrightarrow A$ and $\Delta \hookrightarrow B$ and let $Z = (A \times B)/\Delta$ (with $\Delta$ embedded diagonally). Consider the isogenies $\phi: A \to A'$ and $\psi: B \to B'$ whose kernel is $\Delta$.

**Theorem 4.1** ([AS02, Theorem 3.1], [Fis16, Theorem 2.2]). If $d = |\Delta|$ is odd, $A'(K)/\phi(A(K)) = 0$ and:

(i) the Tamagawa numbers of $A$ and $B'$ are coprime to $d$,

(ii) both $A$ and $B$ have good reduction at places $v \mid d$, and

(iii) at finite places $v \mid d$ we have $e(K_v/\mathbb{Q}_p) < p - 1$.

Then $\text{Vis}_Z \text{III}(A/K) \cong B'(K)/\psi(B(K))$.

**Remark 4.2.** Note the presence of $B'$ in Theorem 4.1(i). In [Fis16, Theorem 2.2] this is omitted (presumably this is a typographical error in [Fis16]) A corrected proof is given in Appendix A. This does not play a role in [Fis16] since all isogenies therein are endomorphisms.
4.1. Sieving for possible non-trivial III(A/Q)[p]. In order to apply Theorem 4.1 to construct elements of III(A/Q) we require two central conditions:

(1) there exists an abelian variety B/Q with a finite subgroup scheme $\Delta \subset B$ embedding in A, and

(2) that rk(A/Q) = 0 and rk(B/Q) ≥ 1,

in addition to the local criteria (i)-(ii) (when K = Q condition (iii) is automatically satisfied).

Pairs of simple abelian varieties A/Q and B/Q satisfying (1) are provided to us by Proposition 2.3. In this case, A and B have real multiplication by maximal orders O_A and O_B in a pair of totally real fields K_A and K_B, and A and B are (p, q)-congruent over Q for some prime ideals p ⊂ O_A and q ⊂ O_B, and have associated newforms f ∈ S_2^{new}(Γ_0(N)) and g ∈ S_2^{new}(Γ_0(M)) respectively (where N, M ≤ 10 000).

Filter 1 (good reduction): In light of the Theorem 4.1(ii) we discard pairs for which either N or M is divisible by the prime p below p and q.

**Remark 4.3.** As demonstrated by Fisher in several examples in [Fis16, Theorem 3.3] it is sometimes possible to apply Theorem 4.1 in cases when p divides N or M by passing to a ramified extension of $\mathbb{Q}_p$ over which A and B obtain good reduction. In particular, this filter may be finer than necessary. We do not investigate this further.

Filter 2 (rank discrepancy): Now, since A is simple, its L-function decomposes as a product

$$L(A, s) = \prod_{\sigma: K_A \hookrightarrow \mathbb{C}} L(f^{\sigma}, s)$$

and similarly for B. In particular we have rk$_{an}$(A) = [K_A : Q]rk$_{an}$(f) and rk$_{an}$(B) = [K_B : Q]rk$_{an}$(g).

Each newform f ∈ S_2^{new}(Γ_0(N)) of level N ≤ 10 000 and coefficient field of degree ≤ 2 has its (numerical) analytic rank recorded in the LMFDB [LMFDB]. It is therefore simple to apply the filter that rk$_{an}$(f) = 0 and rk$_{an}$(g) ≥ 1 to provide a shortlist of candidates for abelian varieties A/Q with non-trivial III(A/Q).

Filter 3 (q is a principal ideal): After applying Filters 1 and 2 we can be certain (by the Birch and Swinnerton-Dyer conjecture) that if the Tamagawa number criterion Theorem 4.1(i) is satisfied, then III(A/Q)[p] is non-trivial. That is, we require that the Tamagawa numbers of A and B' are coprime to p.

In each case A is presented to us as the Jacobian of a curve C/Q. In particular, we may (at least in principle) compute the Tamagawa numbers of A by computing the minimal regular models for these curves at each bad prime.

On the other hand, the subgroup scheme B[q] ⊂ B is not necessarily maximal isotropic with respect to the Weil pairing. In particular, although the abelian variety B is presented to us as the Jacobian of a curve, the isogeny ψ does not naturally equip B' with a principal polarisation (and therefore cannot easily be presented as the Jacobian of a curve). In this case we do not know of a computationally feasible way to extract the Tamagawa numbers of B'.
However if $\mathfrak{q} = (\eta)$ is principal, then $\psi$ is the multiplication-by-$\eta$ endomorphism of $B$ and therefore $B' \cong B$. We therefore impose the further filter that $\mathfrak{q}$ is a principal ideal.

**Filter 4 (Tamagawa numbers):** The first three filters yield a shortlist of pairs of Jacobians $A/\mathbb{Q}$ and $B/\mathbb{Q}$ for which, to apply Theorem 4.1, it remains to check that the Tamagawa numbers of $A$ and $B$ are coprime to $p$.

If $J = A$ or $B$ is an elliptic curve we compute the Tamagawa numbers of $J$ using Tate's algorithm as implemented in MAGMA [BCP97] and SAGEMATH [SAGEMATH].

We now describe the case when $J = A$ or $B$ has dimension 2. We require that $J$ is known (by $[\mathrm{CEH}^+\mathrm{a}, \mathrm{CEH}^+\mathrm{b}]$) to be the Jacobian of a genus 2 curve $C/\mathbb{Q}$. Let $\ell$ be a prime number and let $\Phi_\ell$ denote the component group of the Néron model of $J$ at $\ell$. We write $c_\ell(J) = |\Phi_\ell(\mathbb{F}_\ell)|$ for the Tamagawa number and $\bar{c}_\ell(J) = |\Phi_\ell(\overline{\mathbb{F}}_\ell)|$ for the order of the geometric component group.

There exist several practical methods for determining the orders $\bar{c}_\ell(J)$ (and often the Tamagawa numbers $c_\ell(J)$). Note that $c_\ell(J)$ divides $\bar{c}_\ell(J)$, so it suffices for our application to show that $\bar{c}_\ell(J)$ is coprime to $p$.

*General algorithms.* We first have the following general algorithms which apply to genus 2 curves $C/\mathbb{Q}$ (but which may not always return).

• Liu's program **genus2reduction** in PARI/GP [PARI] (which is available through SAGEMATH) computes $\bar{c}_\ell(J)$.

• Donnelly's MAGMA functions **RegularModel** and **ComponentGroup** to compute $\bar{c}_\ell(J)$ (these were extended by van Bommel [Bom21] to compute $c_\ell(J)$).

• Dokchitser–Jakovac's [DJ] algorithm<fnref n="1" /> to compute $\bar{c}_\ell(J)$.

When $\ell = 2$ we also mention recent work of Liu [Liu25] which computes the minimal regular model of a hyperelliptic curve $C/\mathbb{Q}_2$ and therefore yields $c_\ell(J)$ (according to [Liu25], implementation is ongoing). If these programs fail to return an answer we also have the following approaches which can be applied depending on whether $\ell^2 | N$.

*The case $\ell \parallel N$.* In this case $J$ has semistable (indeed, totally toric) reduction at $\ell$ (see [CS01, Section 7.1]). In particular, we have access to the following additional methods.

• When $\ell$ is odd the Tamagawa number $c_\ell(J)$ can be computed from the cluster picture of $C$ (see [DDMM23], [Bet22, Theorem 3.0.2], [BBB+22, Section 10]) as implemented in SAGEMATH [BB].

• If $\tilde{J}$ is an optimal<fnref n="2" /> quotient of the modular Jacobian $J_0(N)$ an algorithm of Kohel–Stein [KS00, Section 3] computes $\bar{c}_\ell(\tilde{J})$ from the corresponding newform (this is implemented in MAGMA as the function **ComponentGroupOrder**). If $p$ is principal and both $J[p]$ and $J[\overline{p}]$ are irreducible then $p | \bar{c}_\ell(\tilde{J})$ if and only if $p | \bar{c}_\ell(J)$, since there exists an isogeny $J \to \tilde{J}$ of degree coprime to $p$ (all

<footnote n="1">¹The work [DJ] remains in preparation and we are grateful to Tim Dokchitser for performing these calculations for us. Cases in Table B.2 which rely on these (unpublished) results are marked with a † (these are excluded from Theorem 1.1).</footnote>

<footnote n="2">²A quotient $J_0(N) \to \tilde{J}$ is said to be *optimal* if the kernel is connected.</footnote>
isogenies of degree divisible by $p$ factor as $\psi \circ \varphi$ where $\psi$ has degree coprime to $p$ and $\varphi$ is a composition of the endomorphisms $\mathfrak{p}$ and $\bar{\mathfrak{p}}$.

When $\ell = 2$ work Gehrunger [Geh25, Figure 10] (implemented in SAGEMATH [Geh]) computes the stable model of $C/\bar{\mathbb{Q}}_2$ together with the “thicknesses”$^3$ of the nodes. It may be possible to obtain the minimal regular model from this through repeated applications of [Liu02, Corollary 10.3.25].

The case $\ell^2 | N$. In this case we either fall back on more general algorithms or use the following result when $p > 2 \dim(J) + 1$.

* If $p > 2 \dim(J) + 1$ a theorem of Lenstra-Oort [LO85, Theorem 1.13] implies (by the discussion in [AS05, Section 3.7]) that $p$ is coprime to $c_\ell(J)$ (cf. [Sil83] for the case when $A$ has potentially good reduction).

*Proof of Theorem 1.4.* After applying the Filters 1–4 we are left with the examples recorded in Theorem 1.4. Each of the abelian surfaces is checked to be geometrically simple by applying the criterion in [CF96, Section 14.4] and [Sto95]. By Theorem 4.1, to prove Theorem 1.4 it remains to check that in each case the (algebraic) ranks of $A$ and $B$ are correctly recorded in Table B.2. Upper bounds on are found via a 2-descent (RankBounds in MAGMA) and lower bounds are found by a point search (Points in MAGMA). □

## 5. ON CONJECTURE 1.5

Let $A/\mathbb{Q}$ be the abelian surface with label 9603.2.a.o and let $B/\mathbb{Q}$ be the abelian surface with label 9603.2.a.m. Applying the algorithm in [CMSV19] we check that the abelian varieties $A$ and $B$ both have real multiplication by $\mathbb{Z}[\sqrt{2}]$ defined over $\mathbb{Q}$.

By Theorem 1.8 we may choose the embeddings $\mathbb{Z}[\sqrt{2}] \hookrightarrow \mathrm{End}(A)$ and $\mathbb{Z}[\sqrt{2}] \hookrightarrow \mathrm{End}(B)$ so that $A[\mathfrak{p}] \cong B[\mathfrak{p}]$ where $\mathfrak{p} = (3 + \sqrt{2})$. By Theorem 1.4 the group $\mathrm{III}(A/\mathbb{Q})[\mathfrak{p}] \subset \mathrm{III}(A/\mathbb{Q})[7]$ contains a subgroup isomorphic to $(\mathbb{Z}/7\mathbb{Z})^2$. Note that, since $A[\mathfrak{p}]$ is irreducible, if an element $\xi \in \mathrm{III}(A/\mathbb{Q})[\mathfrak{p}]$ is visible in an abelian three-fold then there exists an elliptic curve $E/\mathbb{Q}$ of rank at least 2 which is $(7, \mathfrak{p})$-congruent to $A$.

By [PSS07, Section 4.4] (see [Fre25, Lemmas 7 and 8]) there exist twists $X_{A[\mathfrak{p}]}^{+}(7)$ and $X_{A[\mathfrak{p}]}^{-}(7)$ of the (connected) modular curve of full level 7 whose $K$-points parametrise elliptic curves $E/K$ that are $(7, \mathfrak{p})$-congruent to $A$ over $K$. Using the algorithms from [Fre25, Sections 3 and 4] we compute these twists explicitly as

$$X_{A[\mathfrak{p}]}^{\pm}(7) : 71x^4 + 62x^3y - 42x^3z + 9x^2y^2 + 3x^2yz - 42x^2z^2 - 38xy^3 + 39xy^2z + 9xyz^2 + 33xz^3 - 6y^4 + 25y^3z - 6y^2z^2 + 13yz^3 - 9z^4,$$

$$X_{A[\mathfrak{p}]}^{\mp}(7) : x^4 + 11x^3z + 15x^2y^2 + 21x^2yz + 9x^2z^2 + 21xy^3 + 21xy^2z - 15xyz^2 - 9xz^3 + 6y^4 + 41y^3z + 15y^2z^2 - 4yz^3 - 15z^4,$$

for some choice of sign.

<footnote>$^3$Note that by convention the “thicknesses” in [Geh25] is taken with respect to the valuation on $\bar{\mathbb{Q}}_2$ with $v(2) = 1$.</footnote>
Searching for rational points up to moderate height on these twisted modular curves yields the point $(-2 : 1 : 2) \in X_{A[p]}^{\pm}(7)(\mathbb{Q})$ which corresponds to the elliptic curve $(7, \mathfrak{p})$-congruent to $A/\mathbb{Q}$

$$E : y^2 + y = x^3 - 28153533873x + 1818290903847853.$$

We check with a descent calculation (using the function Rank in MAGMA [BCP97]) that $E(\mathbb{Q}) = 0$. It follows immediately that the non-trivial elements of $\text{III}(A/\mathbb{Q})[\mathfrak{p}]$ are not made visible by the congruence with $E$. In particular Conjecture 1.5 follows if one can prove:

$$X_{A[p]}^{\pm}(7)(\mathbb{Q}) = \{(-2 : 1 : 2)\} \quad \text{and} \quad X_{A[p]}^{\mp}(7)(\mathbb{Q}) = \emptyset.$$

It may be possible to prove the former claim by applying the 2-descent as in [PSS07, Section 11] together with Chabauty's method. On the other hand we do not know of an approach to prove the non-existence of rational points on $X_{A[p]}^{\mp}(7)$ since there is no local obstruction (as is readily checked in MAGMA).

## APPENDIX A. ON THE THEOREM OF AGASHE–STEIN AND FISHER

The following proof of Theorem 4.1 is almost identical to [AS02, Theorem 3.1] and [Fis16, Theorem 2.2] with the distinction that we allow an arbitrary finite subgroup $\Delta$ (whereas [AS02] allows only the case $\Delta = B[n]$) and we correct a small typographical error from [Fis16] (see Remark 4.2).

*Proof of Theorem 4.1.* Under the hypotheses of the theorem [Fis16, Lemma 2.1] implies that $\text{Vis}_Z H^1(K, A) \cong B'(K)/\psi(B(K))$. It remains to show that the classes in this subgroup are contained in $\text{III}(A/K)$. By [Fis16, (2.1)] for each place $v$ of $K$ we have the following commutative diagram with exact rows:

$$\begin{tikzcd}
B(K_v) \arrow[r, "\psi"] \arrow[d] & B'(K_v) \arrow[r] \arrow[d] & H^1(K_v, \Delta) \arrow[d] \\
Z(K_v) \arrow[r, "\pi_v"] & B'(K_v) \arrow[r, "\pi_v"] & H^1(K_v, A) \arrow[r, "\iota_*"] & H^1(K_v, Z).
\end{tikzcd}$$

We claim that $\pi_v = 0$ at each place $v$ of $K$. Indeed, by definition we have $\text{Vis}_Z H^1(K, A) = \ker \iota_*$ so the claim suffices to prove the theorem.

Recall that we write $d = |\Delta|$. Since $\pi_v$ factors through the group $H^1(K, \Delta)$ (which is annihilated by multiplication by $d$) it follows that $d \cdot \pi_v = 0$.

If $v$ is an infinite place then $H^1(K_v, A)$ is killed by multiplication by 2, but by assumption $d$ is odd, and the claim follows. Thus, suppose that $v$ is a finite place of $K$. We first recall the following fact from [AS02, Section 3.4].

**Lemma A.1.** For any finite place $v$ of $K$ the Tamagawa number $c_v(A)$ is equal to the order of the unramified subgroup of $H^1(K_v, A)$.

First if $v \mid d$ the argument in [AS02, Section 3.4, Case 3] implies that (under hypotheses (ii) and (iii) of Theorem 4.1) the map $Z(K_v^{\text{nr}}) \to B'(K_v^{\text{nr}})$ is surjective. But then the image of $\pi_v$ is contained in the unramified subgroup of $H^1(K_v, A)$, as required.

Now suppose that $v \nmid d$. In this case it is shown in [AS02, Section 3.4, Case 2] that the map $\psi : B^0(K_v^{\text{nr}}) \to B'^0(K_v^{\text{nr}})$ is surjective.
Let $P \in B'(K_v)$ and recall the $B'^0(K_v^{nr}) \subset B'(K_v^{nr})$ is a subgroup of index $c_v(B')$. In particular $c_v(B') \cdot P \in B'^0(K_v)$ and therefore there exists $Q \in B^0(K_v^{ur})$ such that $\psi(Q) = c_v(B') \cdot P$.

Thus $c_v(B') \cdot \pi_v(P) = \pi_v(c_v(B') \cdot P)$ is in the same cohomology class as the cocycle $\sigma \mapsto Q^\sigma - Q$, and in particular $c_v(B') \cdot \pi_v(P)$ is unramified. But by Lemma A.1 this implies that

$$c_v(A)c_v(B') \cdot \pi_v(P) = 0.$$

Combining this with the fact that $d \cdot \pi_v = 0$ and the hypothesis that $c_v(A)c_v(B')$ is coprime to $d$ we deduce $\pi_v(P) = 0$, as required. $\square$

## APPENDIX B. TABLES

### B.1. How to read the tables.

**Table B.1.** We list all $(\mathfrak{p}, \mathfrak{q})$-congruent weight 2 newforms $f \in S_2^{\text{new}}(\Gamma_0(N))$ and $g \in S_2^{\text{new}}(\Gamma_0(M))$ in the LMFDB (i.e., $N, M \le 10000$) with coefficient fields of degree $\le 2$ where $\mathfrak{p}$ and $\mathfrak{q}$ lie above a prime $p \ge 23$ in the respective orders $O_f$ and $O_g$. Note the existence of the triple 4725.2.a.bb, 4725.2.a.bc, 4725.2.a.x of 29-congruent forms. Every form listed in Table B.1 has irreducible mod $\mathfrak{p}$ (resp. mod $\mathfrak{q}$) Galois representation.

**Table B.2.** We list examples of abelian varieties $A/\mathbb{Q}$ and $B/\mathbb{Q}$ with real multiplication by an order in the respective fields $K_A$ (resp. $K_B$) such that a subgroup $(\mathbb{Z}/p\mathbb{Z})^2 \subset \text{III}(A/\mathbb{Q})[\mathfrak{p}]$ is made visible by a $(\mathfrak{p}, \mathfrak{q})$-congruence between $A$ and $B$. For each $J = A$ or $B$ we record the label of the weight 2 newform $f \in S_2^{\text{new}}(\Gamma_0(N))$ associated to $J$. Moreover, if $\text{deg}(K_J) = 1$ the elliptic curve $J$ is chosen to be $\Gamma_0(N)$-optimal and if $\text{deg}(K_J) = 2$ the abelian variety $J$ is the Jacobian of the corresponding genus 2 curve listed in Table B.3. In each case we list the rank of $J/\mathbb{Q}$ and an integer $c(J)$ such that the product of Tamagawa numbers $\prod_c c_c(J)$ divides $c(J)$ (when $J$ is an elliptic curve $c(J) = c(J) = \prod_c c_c(J)$). The term $\mathcal{P}$ denotes the product $\mathcal{P} = \prod_{\ell^2|N} c_c(J)$ (by [LO85, Theorem 1.13]) $\mathcal{P}$ is supported on primes $q$ for which $q^2 | N$ or $q \le 2\dim(J) + 1$. Cases where the Tamagawa product was computing using the unpublished work [DJ] are marked with a dagger.

Cases which are unproved (since we could not compute a Tamagawa number) are marked with an asterisk. In the example 9802.2.a.j we failed to compute the order of the component group at 2. However, since $2 \nmid 9802$ the algorithm of Kohel-Stein [KS00] (the MAGMA function `ComponentGroupOrder`) can be applied in this case. Unfortunately, we were unable to receive a return after several hours.

**Table B.3.** We give explicit Weierstrass equations for the genus 2 curves whose Jacobians have a $p$-torsion element in $\text{III}(J/\mathbb{Q})$ by Theorem 1.1. Note that this relies heavily on the work [CEH+a, CEH+b] in preparation where the authors construct RM abelian whose associated newforms can be found in the LMFDB (we prove in Proposition 2.3 that the abelian varieties and newforms correspond).
<table><caption>TABLE B.1. All $(p, q)$-congruent weight 2 newforms in the LMFDB whose coefficient fields have degree $\le 2$ and such that $p$ and $q$ lie above a prime $23 \le p \le 4000$. For every form in this table the mod $p$ (resp. $q$) Galois representation is irreducible.</caption><thead><tr><th>p</th><th>f</th><th>g</th><th>p</th><th>f</th><th>g</th></tr></thead><tbody><tr><td>23</td><td>1755.2.a.g</td><td>1755.2.a.l</td><td>23</td><td>8820.2.a.bd</td><td>8820.2.a.bg</td></tr><tr><td>23</td><td>1755.2.a.h</td><td>1755.2.a.k</td><td>23</td><td>8820.2.a.bi</td><td>8820.2.a.bl</td></tr><tr><td>23</td><td>2205.2.a.ba</td><td>2205.2.a.q</td><td>29</td><td>2178.2.a.bb</td><td>2178.2.a.x</td></tr><tr><td>23</td><td>2205.2.a.n</td><td>2205.2.a.z</td><td>29</td><td>2178.2.a.p</td><td>2178.2.a.t</td></tr><tr><td>23</td><td>3332.2.a.h</td><td>3332.2.a.k</td><td>29</td><td>2250.2.a.c</td><td>2250.2.a.f</td></tr><tr><td>23</td><td>4510.2.a.o</td><td>4510.2.a.q</td><td>29</td><td>2250.2.a.m</td><td>2250.2.a.n</td></tr><tr><td>23</td><td>5320.2.a.i</td><td>5320.2.a.l</td><td>29</td><td>2394.2.a.w</td><td>2394.2.a.z</td></tr><tr><td>23</td><td>6358.2.a.a</td><td>6358.2.a.k</td><td>29</td><td>3249.2.a.i</td><td>3249.2.a.j</td></tr><tr><td>23</td><td>6358.2.a.g</td><td>6358.2.a.j</td><td>29</td><td>3249.2.a.o</td><td>3249.2.a.p</td></tr><tr><td>23</td><td>6650.2.a.bu</td><td>6650.2.a.bx</td><td>29</td><td>4356.2.a.r</td><td>4356.2.a.t</td></tr><tr><td>23</td><td>6942.2.a.q</td><td>6942.2.a.s</td><td>29</td><td>4356.2.a.u</td><td>4356.2.a.w</td></tr><tr><td>23</td><td>7050.2.a.bu</td><td>7050.2.a.bv</td><td>29</td><td>4725.2.a.bb</td><td>4725.2.a.bc</td></tr><tr><td>23</td><td>7425.2.a.bd</td><td>7425.2.a.bl</td><td>29</td><td>4725.2.a.bb</td><td>4725.2.a.x</td></tr><tr><td>23</td><td>7425.2.a.bi</td><td>7425.2.a.z</td><td>29</td><td>5418.2.a.bb</td><td>5418.2.a.x</td></tr><tr><td>23</td><td>7560.2.a.bb</td><td>7560.2.a.x</td><td>29</td><td>5742.2.a.bk</td><td>5742.2.a.bl</td></tr><tr><td>23</td><td>7560.2.a.bg</td><td>7560.2.a.bj</td><td>29</td><td>6426.2.a.be</td><td>6426.2.a.bm</td></tr><tr><td>23</td><td>7650.2.a.c</td><td>7650.2.a.cw</td><td>29</td><td>6426.2.a.bn</td><td>6426.2.a.bv</td></tr><tr><td>23</td><td>7650.2.a.cj</td><td>7650.2.a/dc</td><td>29</td><td>6890.2.a.q</td><td>6890.2.a.r</td></tr><tr><td>23</td><td>8085.2.a.ba</td><td>8085.2.a.bh</td><td>31</td><td>6650.2.a.bq</td><td>6650.2.a.bv</td></tr><tr><td>23</td><td>8775.2.a.be</td><td>8775.2.a.t</td><td>59</td><td>4332.2.a.e</td><td>4332.2.a.f</td></tr><tr><td>23</td><td>8775.2.a.bf</td><td>8775.2.a.s</td><td>59</td><td>4332.2.a.j</td><td>4332.2.a.k</td></tr></tbody></table>

<table><caption>TABLE B.2. Abelian varieties $A/\mathbb{Q}$ and $B/\mathbb{Q}$ with real multiplication by an order in the field $K_A$ (resp. $K_B$) and such that a subgroup $(\mathbb{Z}/p\mathbb{Z})^2 \subset \text{III}(A/\mathbb{Q})[p]$ is made visible by a $(p, q)$-congruence between $A$ and $B$. Note that $\text{dim}(A) = \text{deg}(K_A)$ and $\text{dim}(B) = \text{deg}(K_B)$.</caption><thead><tr><th>p</th><th>A</th><th>B</th><th>K<sub>A</sub></th><th>rk(A)</th><th>c(A)</th><th>K<sub>B</sub></th><th>rk(B)</th><th>c(B)</th></tr></thead><tbody><tr><td>5</td><td>1058.2.a.e</td><td>1058.2.a.a</td><td>Q</td><td>0</td><td>1</td><td>Q</td><td>2</td><td>2</td></tr><tr><td>5</td><td>1246.2.a.g</td><td>1246.2.a.a</td><td>Q</td><td>0</td><td>4</td><td>Q</td><td>2</td><td>4</td></tr><tr><td>5</td><td>1664.2.a.r</td><td>1664.2.a.a</td><td>Q</td><td>0</td><td>2</td><td>Q</td><td>2</td><td>4</td></tr><tr><td>5</td><td>2366.2.a.g</td><td>2366.2.a.a</td><td>Q</td><td>0</td><td>1</td><td>Q</td><td>2</td><td>12</td></tr><tr><td>5</td><td>2574.2.a.j</td><td>2574.2.a.a</td><td>Q</td><td>0</td><td>2</td><td>Q</td><td>2</td><td>8</td></tr><tr><td>5<sup>†</sup></td><td>2736.2.a.bb</td><td>2736.2.a.a</td><td>Q(√41)</td><td>0</td><td>256</td><td>Q</td><td>2</td><td>16</td></tr><tr><td>5</td><td>2834.2.a.e</td><td>2834.2.a.c</td><td>Q</td><td>0</td><td>1</td><td>Q</td><td>2</td><td>24</td></tr><tr><td>5</td><td>3384.2.a.f</td><td>3384.2.a.a</td><td>Q</td><td>0</td><td>8</td><td>Q</td><td>2</td><td>16</td></tr><tr><td>5</td><td>3952.2.a.g</td><td>3952.2.a.d</td><td>Q</td><td>0</td><td>1</td><td>Q</td><td>2</td><td>4</td></tr><tr><td>5</td><td>4092.2.a.d</td><td>4092.2.a.a</td><td>Q</td><td>0</td><td>4</td><td>Q</td><td>2</td><td>12</td></tr></tbody></table>
<table><caption>TABLE B.2. Abelian varieties $A/Q$ and $B/Q$ with real multiplication by an order in the field $K_A$ (resp. $K_B$) and such that a subgroup $(Z/pZ)^2 \subset \text{III}(A/Q)[\mathfrak{p}]$ is made visible by a $(\mathfrak{p}, \mathfrak{q})$-congruence between $A$ and $B$. Note that $\dim(A) = \deg(K_A)$ and $\dim(B) = \deg(K_B)$.</caption><thead><tr><th>p</th><th>A</th><th>B</th><th>K<sub>A</sub></th><th>rk(A)</th><th>c(A)</th><th>K<sub>B</sub></th><th>rk(B)</th><th>c(B)</th></tr></thead><tbody><tr><td>5</td><td>4592.2.a.k</td><td>4592.2.a.a</td><td>Q</td><td>0</td><td>8</td><td>Q</td><td>2</td><td>4</td></tr><tr><td>5</td><td>4968.2.a.bf</td><td>4968.2.a.a</td><td>Q(√41)</td><td>0</td><td>72</td><td>Q</td><td>2</td><td>12</td></tr><tr><td>5</td><td>5056.2.a.ba</td><td>5056.2.a.d</td><td>Q(√6)</td><td>0</td><td>32</td><td>Q</td><td>2</td><td>4</td></tr><tr><td>5</td><td>5082.2.a.h</td><td>5082.2.a.c</td><td>Q</td><td>0</td><td>1</td><td>Q</td><td>2</td><td>24</td></tr><tr><td>5<sup>†</sup></td><td>5221.2.a.b</td><td>5221.2.a.a</td><td>Q(√29)</td><td>0</td><td>7</td><td>Q</td><td>2</td><td>1</td></tr><tr><td>5</td><td>5586.2.a.d</td><td>5586.2.a.c</td><td>Q</td><td>0</td><td>2</td><td>Q</td><td>2</td><td>4</td></tr><tr><td>5</td><td>5904.2.a.o</td><td>5904.2.a.b</td><td>Q</td><td>0</td><td>8</td><td>Q</td><td>2</td><td>16</td></tr><tr><td>5<sup>*</sup></td><td>6864.2.a.bf</td><td>6864.2.a.a</td><td>Q(√41)</td><td>0</td><td>?</td><td>Q</td><td>2</td><td>8</td></tr><tr><td>5</td><td>7014.2.a.k</td><td>7014.2.a.g</td><td>Q</td><td>0</td><td>1</td><td>Q</td><td>2</td><td>24</td></tr><tr><td>5</td><td>7084.2.a.j</td><td>7084.2.a.a</td><td>Q</td><td>0</td><td>1</td><td>Q</td><td>2</td><td>24</td></tr><tr><td>5<sup>*</sup></td><td>7632.2.a.v</td><td>7632.2.a.h</td><td>Q(√41)</td><td>0</td><td>?</td><td>Q</td><td>2</td><td>16</td></tr><tr><td>5</td><td>8526.2.a.f</td><td>8526.2.a.a</td><td>Q</td><td>0</td><td>1</td><td>Q</td><td>2</td><td>8</td></tr><tr><td>5</td><td>8568.2.a.j</td><td>8568.2.a.a</td><td>Q</td><td>0</td><td>8</td><td>Q</td><td>2</td><td>32</td></tr><tr><td>5</td><td>8784.2.a.bj</td><td>8784.2.a.a</td><td>Q(√6)</td><td>0</td><td>384</td><td>Q</td><td>2</td><td>16</td></tr><tr><td>5</td><td>8866.2.a.g</td><td>8866.2.a.b</td><td>Q</td><td>0</td><td>4</td><td>Q</td><td>2</td><td>6</td></tr><tr><td>5<sup>*</sup></td><td>9802.2.a.j</td><td>9802.2.a.b</td><td>Q(√29)</td><td>0</td><td>?</td><td>Q</td><td>2</td><td>4</td></tr><tr><td>5</td><td>9936.2.a.bp</td><td>9936.2.a.d</td><td>Q</td><td>0</td><td>2</td><td>Q</td><td>2</td><td>4</td></tr><tr><td>7</td><td>3200.2.a.bm</td><td>3200.2.a.a</td><td>Q(√2)</td><td>0</td><td>P</td><td>Q</td><td>2</td><td>12</td></tr><tr><td>7</td><td>5220.2.a.r</td><td>5220.2.a.a</td><td>Q(√57)</td><td>0</td><td>P · 6</td><td>Q</td><td>2</td><td>24</td></tr><tr><td>7</td><td>8464.2.a.bg</td><td>8464.2.a.d</td><td>Q(√2)</td><td>0</td><td>P</td><td>Q</td><td>2</td><td>6</td></tr><tr><td>7</td><td>8475.2.a.r</td><td>8475.2.a.a</td><td>Q(√2)</td><td>0</td><td>P</td><td>Q</td><td>2</td><td>36</td></tr><tr><td>7</td><td>8976.2.a.bm</td><td>8976.2.a.a</td><td>Q(√2)</td><td>0</td><td>P · 146</td><td>Q</td><td>2</td><td>4</td></tr><tr><td>7<sup>†</sup></td><td>9510.2.a.f</td><td>9510.2.a.x</td><td>Q</td><td>0</td><td>6</td><td>Q(√2)</td><td>4</td><td>544</td></tr><tr><td>7</td><td>9603.2.a.o</td><td>9603.2.a.m</td><td>Q(√2)</td><td>0</td><td>P · 71</td><td>Q(√2)</td><td>4</td><td>P · 2</td></tr><tr><td>11<sup>†</sup></td><td>6962.2.a.q</td><td>6962.2.a.o</td><td>Q(√5)</td><td>0</td><td>P · 41</td><td>Q(√5)</td><td>4</td><td>P · 76</td></tr><tr><td>11</td><td>9025.2.a.r</td><td>9025.2.a.n</td><td>Q(√5)</td><td>0</td><td>P · 1</td><td>Q(√5)</td><td>4</td><td>P · 1</td></tr><tr><td>13</td><td>6776.2.a.r</td><td>6776.2.a.b</td><td>Q(√3)</td><td>0</td><td>P · 3</td><td>Q</td><td>2</td><td>32</td></tr></tbody></table>
<table><caption>TABLE B.3. Weierstrass equations of curves whose Jacobians have associated newforms $f \in S_2^{\text{new}}(\Gamma_0(N))$ with LMFDB label given by the first column.</caption><thead><tr><th>Label</th><th>Weierstrass equation</th></tr></thead><tbody><tr><td>2736.2.a.bb</td><td>y<sup>2</sup> = -168x<sup>6</sup> + 828x<sup>5</sup> - 282x<sup>4</sup> + 633x<sup>3</sup> - 3189x<sup>2</sup> - 1629x - 2997</td></tr><tr><td>3200.2.a.bm</td><td>y<sup>2</sup> = -520x<sup>6</sup> + 680x<sup>5</sup> - 60x<sup>4</sup> - 240x<sup>3</sup> + 80x<sup>2</sup> + 20x - 10</td></tr><tr><td>4968.2.a.bf</td><td>y<sup>2</sup> = -408x<sup>6</sup> + 3690x<sup>5</sup> - 15084x<sup>4</sup> + 34470x<sup>3</sup> - 45351x<sup>2</sup> + 31176x - 7368</td></tr><tr><td>5056.2.a.ba</td><td>y<sup>2</sup> = 3608x<sup>6</sup> - 47912x<sup>5</sup> + 225314x<sup>4</sup> - 473684x<sup>3</sup> + 419938x<sup>2</sup> - 97768x + 6504</td></tr><tr><td>5220.2.a.r</td><td>y<sup>2</sup> = 34992x<sup>5</sup> + 1939380x<sup>4</sup> + 42861081x<sup>3</sup> + 472182963x<sup>2</sup> + 2593258155x + 5680766145</td></tr><tr><td>5221.2.a.b</td><td>y<sup>2</sup> = 16x<sup>5</sup> + 1576x<sup>4</sup> + 58697x<sup>3</sup> + 1072475x<sup>2</sup> + 10723808x + 45456220</td></tr><tr><td>6776.2.a.r</td><td>y<sup>2</sup> = -100936x<sup>6</sup> - 375441x<sup>5</sup> + 574585x<sup>4</sup> + 2425533x<sup>3</sup> - 3932753x<sup>2</sup> + 1298528x - 219604</td></tr><tr><td>6864.2.a.bf</td><td>y<sup>2</sup> = 16x<sup>5</sup> + 504x<sup>4</sup> - 10815x<sup>3</sup> - 115171x<sup>2</sup> + 1444344x<sup>1</sup> - 14672700</td></tr><tr><td>6962.2.a.o</td><td>y<sup>2</sup> - (x<sup>2</sup> + x)y = -16x<sup>5</sup> - 21x<sup>4</sup> + 34x<sup>3</sup> + 155x<sup>2</sup> + 176x + 64</td></tr><tr><td>6962.2.a.q</td><td>y<sup>2</sup> = -236x<sup>6</sup> - 1652x<sup>5</sup> - 295x<sup>4</sup> + 10502x<sup>3</sup> - 4071x<sup>2</sup> - 4484x - 708</td></tr><tr><td>7632.2.a.v</td><td>y<sup>2</sup> = -1295760x<sup>6</sup> - 16237368x<sup>5</sup> - 82883841x<sup>4</sup> - 222068034x<sup>3</sup> - 330803205x<sup>2</sup> - 260544348x - 84941220</td></tr><tr><td>8464.2.a.bg</td><td>y<sup>2</sup> = -5152x<sup>6</sup> + 47012x<sup>5</sup> - 166313x<sup>4</sup> + 259532x<sup>3</sup> - 116403x<sup>2</sup> - 113344x + 99659</td></tr><tr><td>8475.2.a.r</td><td>y<sup>2</sup> - (x<sup>3</sup> + 1)y = 3056991x<sup>6</sup> + 46889085x<sup>5</sup> + 299096355x<sup>4</sup> + 1015447247x<sup>3</sup> + 1934906580x<sup>2</sup> + 1961596845x + 826414211</td></tr><tr><td>8784.2.a.bj</td><td>y<sup>2</sup> = -36x<sup>5</sup> + 15x<sup>4</sup> - 231x<sup>3</sup> + 177x<sup>2</sup> + 81x - 63</td></tr><tr><td>8976.2.a.bm</td><td>y<sup>2</sup> = -207558x<sup>6</sup> - 394134x<sup>5</sup> - 320476x<sup>4</sup> - 182650x<sup>3</sup> - 75478x<sup>2</sup> - 14976x - 1053</td></tr><tr><td>9025.2.a.n</td><td>y<sup>2</sup> - (x<sup>3</sup> + x<sup>2</sup> + 1)y = 756x<sup>6</sup> - 2583x<sup>5</sup> + 3676x<sup>4</sup> - 2773x<sup>3</sup> + 1157x<sup>2</sup> - 250x + 21</td></tr><tr><td>9025.2.a.r</td><td>y<sup>2</sup> - (x<sup>2</sup> + x)y = 95x<sup>6</sup> + 166x<sup>4</sup> + 617x<sup>3</sup> + 641x<sup>2</sup> + 760x + 285</td></tr><tr><td>9510.2.a.x</td><td>y<sup>2</sup> - (x + 1)y = 3600x<sup>6</sup> - 10200x<sup>5</sup> + 11189x<sup>4</sup> - 5864x<sup>3</sup> + 1447x<sup>2</sup> - 143x + 6</td></tr><tr><td>9603.2.a.m</td><td>y<sup>2</sup> - (x<sup>3</sup> + 1)y = 2210x<sup>6</sup> - 6246x<sup>5</sup> + 7230x<sup>4</sup> - 4406x<sup>3</sup> + 1497x<sup>2</sup> - 270x + 20</td></tr><tr><td>9603.2.a.o</td><td>y<sup>2</sup> = -15x<sup>6</sup> + 66x<sup>5</sup> - 1113x<sup>4</sup> + 7086x<sup>3</sup> - 26139x<sup>2</sup> + 91284x - 151440</td></tr><tr><td>9802.2.a.j</td><td>y<sup>2</sup> = 2704x<sup>5</sup> - 1352x<sup>4</sup> - 22399x<sup>3</sup> - 10582x<sup>2</sup> + 69017x + 52468</td></tr></tbody></table>
REFERENCES

[AS02] A. Agashe and W. Stein, Visibility of Shafarevich-Tate groups of abelian varieties, J. Number Theory 97 (2002), no. 1, 171–185. MR1939144. ↑2, ↑5, ↑9, ↑13

[AS05] __________, *Visible evidence for the Birch and Swinnerton-Dyer conjecture for modular abelian varieties of analytic rank zero*, Math. Comp. **74** (2005), no. 249, 455–484, With an appendix by J. Cremona and B. Mazur. MR2085902. ↑1, ↑12

[BB] A. J. Best and R. van Bommel, *sage-cluster-pictures: Cluster pictures in Sage-Math*, https://alexjbest.github.io/cluster-pictures/index.html, Accessed 05 November 2025. ↑11

[BBB$^{+22}$] A. J. Best, L. A. Betts, M. Bisatt, R. van Bommel, V. Dokchitser, O. Faraggi, S. Kunzweiler, C. Maistret, A. Morgan, S. Muselli, and S. Nowell, *A user's guide to the local arithmetic of hyperelliptic curves*, Bull. Lond. Math. Soc. **54** (2022), no. 3, 825–867. ↑11

[BCP97] W. Bosma, J. Cannon, and C. Playoust, *The Magma algebra system. I. The user language*, J. Symbolic Comput. **24** (1997), no. 3-4, 235–265, Computational algebra and number theory (London, 1993). MR1484478. ↑5, ↑8, ↑11, ↑13

[Bet22] L. A. Betts, *Variation of Tamagawa numbers of Jacobians of hyperelliptic curves with semistable reduction*, J. Number Theory **231** (2022), 158–213 (English). ↑11

[BFT14] N. Bruin, E. V. Flynn, and D. Testa, *Descent via (3,3)-isogeny on Jacobians of genus 2 curves*, Acta Arith. **165** (2014), no. 3, 201–223. MR3263947. ↑1

[Bom21] R. van Bommel, *Efficient computation of BSD invariants in genus 2*, Arithmetic geometry, number theory, and computation, Simons Symp., Springer, Cham, 2021, pp. 237–258. MR4427964. ↑11

[CEH$^{+}$a] E. Costa, N. D. Elkies, S. Hashimoto, A. Jha, K. Martin, B. Poonen, and J. Voight, *A database of curves with modular Jacobians*, In preparation. ↑4, ↑5, ↑11, ↑14

[CEH$^{+}$b] __________, *Github repository for “A database of curves with modular Jacobians”*, https://github.com/edgarcosta/ModularAbelianSurfaces.git. ↑4, ↑5, ↑11, ↑14

[CF96] J. W. S. Cassels and E. V. Flynn, *Prolegomena to a middlebrow arithmetic of curves of genus 2*, London Mathematical Society Lecture Note Series, vol. 230, Cambridge University Press, Cambridge, 1996. MR1406090. ↑12

[CF22] J. E. Cremona and N. Freitas, *Global methods for the symplectic type of congruences between elliptic curves*, Rev. Mat. Iberoam. **38** (2022), no. 1, 1–32. MR4382462. ↑4, ↑8, ↑9

[CM00] J. E. Cremona and B. Mazur, *Visualizing elements in the Shafarevich-Tate group*, Experiment. Math. **9** (2000), no. 1, 13–28. MR1758797. ↑2

[CMSV19] E. Costa, N. Mascot, J. Sijsling, and J. Voight, *Rigorous computation of the endomorphism ring of a Jacobian*, Math. Comp. **88** (2019), no. 317, 1303–1339. ↑7, ↑12

[CS01] B. Conrad and W. A. Stein, *Component groups of purely toric quotients*, Math. Res. Lett. **8** (2001), no. 5-6, 745–766. ↑11

[DD19] T. Dokchitser and C. Doris, *3-torsion and conductor of genus 2 curves*, Math. Comp. **88** (2019), no. 318, 1913–1927. MR3925491. ↑7

[DDMM23] T. Dokchitser, V. Dokchitser, C. Maistret, and A. Morgan, *Arithmetic of hyperelliptic curves over local fields*, Math. Ann. **385** (2023), no. 3-4, 1213–1322. ↑11

[DJ] T. Dokchitser and G. Jakovac, *Regular models of curves*, In preparation. ↑5, ↑11, ↑14

[EK14] N. D. Elkies and A. Kumar, *K3 surfaces and equations for Hilbert modular surfaces*, Algebra Number Theory **8** (2014), no. 10, 2297–2411. MR3298543. ↑7

[Fis16] T. A. Fisher, *Visualizing elements of order 7 in the Tate-Shafarevich group of an elliptic curve*, LMS J. Comput. Math. **19** (2016), no. suppl. A, 100–114. MR3540949. ↑1, ↑3, ↑5, ↑9, ↑10, ↑13

[FLS$^{+01}$] E. V. Flynn, F. Leprévost, E. F. Schaefer, W. A. Stein, M. Stoll, and J. L. Wetherell, *Empirical evidence for the Birch and Swinnerton-Dyer conjectures for modular Jacobians of genus 2 curves*, Math. Comp. **70** (2001), no. 236, 1675–1697. MR1836926. ↑7

[Fly15] E. V. Flynn, *Descent via (5,5)-isogeny on Jacobians of genus 2 curves*, J. Number Theory **153** (2015), 270–282. MR3327574. ↑1
[Fre25] S. Frengley, *Explicit 7-torsion in the Tate-Shafarevich groups of genus 2 Jacobians*, J. Théor. Nombres Bordx. **37** (2025), no. 2, 727-746. ↑1, ↑12

[Geh] T. Gehringer, *Worksheets for "The classification of the stable marked reduction of genus 2 curves in residue characteristic 2", https://doi.org/10.3929/ethz-b-000743349*. ↑12

[Geh25] __________, *The classification of the stable marked reduction of genus 2 curves in residue characteristic 2*, arXiv e-prints (2025), arXiv:2507.02426. ↑12

[GitHub] S. Frengley and D. Laird, *Github repository, https://github.com/dlaird-ens/p-tors-sha*. ↑4

[KO92] A. Kraus and J. Oesterlé, *Sur une question de B. Mazur*, Math. Ann. **293** (1992), no. 2, 259-275. MR1166121. ↑4, ↑5, ↑6

[KS00] D. R. Kohel and W. A. Stein, *Component groups of quotients of $J_0(N)$*, Algorithmic Number Theory, Springer Berlin Heidelberg, Berlin, Heidelberg, 2000, pp. 405-412. ↑11, ↑14

[KS25] T. Keller and M. Stoll, *Complete verification of strong BSD for many modular abelian surfaces over $\mathbb{Q}$*, Forum Math. Sigma **13** (2025), 82, Id/No e20. ↑1

[KW09a] C. Khare and J.-P. Wintenberger, *Serre's modularity conjecture. I*, Invent. Math. **178** (2009), no. 3, 485-504. MR2551763. ↑3

[KW09b] __________, *Serre's modularity conjecture. II*, Invent. Math. **178** (2009), no. 3, 505-586. MR2551764. ↑3

[Liu02] Q. Liu, *Algebraic geometry and arithmetic curves*, Oxford Graduate Texts in Mathematics, vol. 6, Oxford University Press, Oxford, 2002, Translated from the French by Reinie Erné, Oxford Science Publications. MR1917232. ↑12

[Liu25] Q. Liu, *Desingularization of double covers of regular surfaces*, arXiv e-prints (2025), arXiv:2504.16808. ↑11

[LO85] H. W. Lenstra and F. Oort, *Abelian varieties having purely additive reduction*, J. Pure Appl. Algebra **36** (1985), 281-298. ↑12, ↑14

[Miy06] T. Miyake, *Modular forms*, corrected 2nd printing ed., Springer Monogr. Math., Springer, Berlin, 2006, Translated from the Japanese by Joshitaku Maeda. ↑6

[MS93] J. R. Merriman and N. P. Smart, *Curves of genus 2 with good reduction away from 2 with a rational Weierstrass point*, Math. Proc. Cambridge Philos. Soc. **114** (1993), no. 2, 203-214. MR1230127. ↑7

[PSS07] B. Poonen, E. F. Schaefer, and M. Stoll, *Twists of $X(7)$ and primitive solutions to $x^2 + y^3 = z^7$*, Duke Math. J. **137** (2007), no. 1, 103-158. MR2309145. ↑12, ↑13

[Rib04] K. A. Ribet, *Abelian varieties over $\mathbb{Q}$ and modular forms*, Modular curves and Abelian varieties (J. E. Cremona, J.-C. Lario, J. Quer, and K. A. Ribet, eds.), Birkhäuser Basel, 2004, pp. 241-261. ↑3

[Shi73] G. Shimura, *On the factors of the Jacobian variety of a modular function field*, J. Math. Soc. Japan **25** (1973), 523-544. MR318162. ↑3

[Sil83] J. H. Silverman, *The Neron fiber of Abelian varieties with potential good reduction*, Math. Ann. **264** (1983), 1-3. ↑12

[Ste07] W. Stein, *Modular forms, a computational approach*, Graduate Studies in Mathematics, vol. 79, American Mathematical Society, Providence, RI, 2007, With an appendix by P. E. Gunnells. MR2289048. ↑7

[Sto95] M. Stoll, *Two simple 2-dimensional abelian varieties defined over $\mathbb{Q}$ with Mordell-Weil group of rank at least 19*, C. R. Acad. Sci. Paris Sér. I Math. **321** (1995), no. 10, 1341-1345. MR1363577. ↑12

[LMFDB] The LMFDB Collaboration, *The L-functions and modular forms database*, https://www.lmfdb.org, [Online; accessed December 2025]. ↑2, ↑3, ↑7, ↑10

[PARI] The PARI Group, Univ. Bordeaux, PARI/GP version 2.15.4, 2023, available from http://pari.math.u-bordeaux.fr/. ↑11

[SAGEMATH] The Sage Developers, *Sagemath, the Sage Mathematics Software System (Version 9.2)*, 2023, https://www.sagemath.org. ↑5, ↑11
INRIA AND LABORATOIRE D'INFORMATIQUE DE L'ÉCOLE POLYTECHNIQUE, CNRS, INSTITUT POLYTECHNIQUE DE PARIS, PALAISEAU, FRANCE

Email address: samuel.frengley@inria.fr

ÉCOLE NORMALE SUPÉRIEURE DE LYON, LYON, FRANCE

Email address: dylan.laird@ens-lyon.fr