#  Quadratic Chabauty for Modular curves:
Algorithms and Examples

Jennifer S. Balakrishnan  Jennifer S. Balakrishnan, Department of Mathematics
and Statistics, Boston University, 111 Cummington Mall, Boston, MA 02215, USA
<EMAIL_ADDRESS>,  Netan Dogra  Netan Dogra, Department of Mathematics, King’s
College London, London, WC2R 2LS, UK<EMAIL_ADDRESS>,  J. Steffen
Müller  J. Steffen Müller, Bernoulli Institute, Rijksuniversiteit Groningen,
Nijenborgh 9, 9747 AG Groningen, The Netherlands<EMAIL_ADDRESS>,  Jan
Tuitman  Jan Tuitman<EMAIL_ADDRESS>and  Jan Vonk  Jan Vonk,
Mathematisch Instituut, Universiteit Leiden, Postbus 9512, 2300 RA Leiden, The
Netherlands<EMAIL_ADDRESS>
###### Abstract.

We describe how the quadratic Chabauty method may be applied to determine the
set of rational points on modular curves of genus $g$ whose Jacobians have
Mordell–Weil rank $g$. This extends our previous work on the split Cartan
curve of level 13 and allows us to consider modular curves that may have few
known rational points or nontrivial local height contributions away from our
working prime. We illustrate our algorithms with a number of examples where we
determine the set of rational points on several modular curves of genus 2 and
3: this includes Atkin–Lehner quotients $X_{0}^{+}(N)$ of prime level $N$, the
curve $X_{S_{4}}(13)$, as well as a few other curves relevant to Mazur’s
Program B.

##  1\. Introduction

In this paper, we describe the current state of quadratic Chabauty–based
algorithms for the resolution of Diophantine equations arising from modular
curves. Here we consider the usual modular curves associated to congruence
subgroups of $\operatorname{SL}_{2}(\operatorname{\mathbf{Z}})$, as well as
Atkin–Lehner quotients of such curves.

We first recall the motivating question of the subject: let $E$ be an elliptic
curve over a number field $K$. What are the possible ways for the Galois group
$\operatorname{\mathrm{Gal}}(\overline{K}/K)$ to act on the group
$E_{\mathrm{tors}}$ of torsion points of $E$? Equivalently, what are the
conjugacy classes of subgroups of
$\operatorname{\mathrm{GL}}_{2}(\operatorname{\mathbf{Z}}/N\operatorname{\mathbf{Z}})$
that arise as images of the mod $N$ Galois representation $\rho_{E,N}$?

By a theorem of Serre [Ser72], if $E$ is an elliptic curve without complex
multiplication, then for all primes $N\gg 0$, the representation $\rho_{E,N}$
is surjective. Serre’s uniformity question [Ser72] asks whether this can be
made uniform over $\operatorname{\mathbf{Q}}$: is there an absolute constant
$N_{0}$ such that for all primes $N>N_{0}$, the representation $\rho_{E,N}$ is
surjective for all elliptic curves $E/\operatorname{\mathbf{Q}}$ without
complex multiplication? By a classification of maximal subgroups of
$\operatorname{\mathrm{GL}}_{2}(\operatorname{\mathbf{Z}}/N\operatorname{\mathbf{Z}})$,
this amounts to determining elliptic curves whose mod $N$ Galois
representation is contained in a Borel subgroup, the normaliser of a split
Cartan subgroup, the normaliser of a non-split Cartan subgroup, or an
‘exceptional’ subgroup (such that the projective image is $S_{4},A_{4},$ or
$A_{5}$).

Mazur’s Program B [Maz77] asks for all of the possible Galois actions on
torsion subgroups of elliptic curves without complex multiplication. This
question includes Serre’s uniformity question but is more general. From a
Diophantine perspective, it roughly amounts to determining the rational points
on all modular curves.

Recently, Rouse and Zureick-Brown have studied this question in the context of
2-primary torsion [RZB15] and, in preparation with Sutherland, in the context
of $p$-primary torsion for other small primes $p$ . For each $p$, this
produces a finite number of curves, the determination of whose rational points
would resolve the $p$-primary part of Mazur’s question. In §4.1 and §4.3 we
compute the rational points on three modular curves ($X_{S_{4}}(13),X_{11}$,
and $X_{15}$) arising in Mazur’s Program B. In particular, we show the
following in §4.1:

######  Theorem 1.1.

We have $\\#X_{S_{4}}(13)(\operatorname{\mathbf{Q}})=4$.

This completes the classification of elliptic curves
$E/\operatorname{\mathbf{Q}}$ and prime level $N>0$ such that $\rho_{E,N}$ is
contained in an exceptional subgroup.

Moving beyond torsion points of elliptic curves over
$\operatorname{\mathbf{Q}}$, another interesting problem in the Diophantine
geometry of modular curves is the determination of the set of rational points
on the Atkin–Lehner quotient

$X_{0}^{+}(N):=X_{0}(N)/\langle w_{N}\rangle$

of the modular curve $X_{0}(N)$. In [Gal02], Galbraith asks whether, for all
primes $N\gg 0$, the only rational points on $X_{0}^{+}(N)$ are cusps or CM
points. From a moduli perspective, this amounts to finding quadratic
$\operatorname{\mathbf{Q}}$-curves that are $N$-isogenous to their conjugates.
Our computations described in §4.2 prove the following result.

######  Theorem 1.2.

The only prime values $N$ such that the curve $X_{0}^{+}(N)$ is of genus 2 or
3 and has an exceptional rational point are $N=73,103,191$. In particular for
prime $N$, there are no exceptional rational points on curves $X_{0}^{+}(N)$
of genus 3.

Dogra and Le Fourn [DF] proved that the quadratic Chabauty set
$X_{0}^{+}(N)(\operatorname{\mathbf{Q}}_{p})_{2}$ is finite whenever the genus
is larger than one. Hence it is natural to ask whether the methods of this
paper can be used to give an algorithm for computing
$X_{0}^{+}(N)(\operatorname{\mathbf{Q}}_{p})_{2}$ for any $N$. In [Sik17],
Siksek describes explicit sufficient conditions for finiteness of
$X(\operatorname{\mathbf{Q}}_{p})_{2}$ for more general modular curves $X$.

Going further, the reader may wonder what the potential applications of these
algorithms are to non-modular curves. The main stumbling block in attempting
such a generalisation is the assumption on the Mordell–Weil rank and Picard
number of the Jacobian. Since a generic curve will have Picard number one, it
is not clear how often one should expect a genus $g$ curve with Mordell–Weil
rank $g$ to satisfy the quadratic Chabauty hypothesis. Nevertheless, there are
other interesting curves where one would expect to get some mileage out of
such algorithms. The most obvious examples are (Atkin–Lehner quotients of)
Shimura curves. In particular, determining the set of rational points on the
curves $X^{D}/\langle w_{D}\rangle$, in the notation of Parent–Yafaev [PY07],
would resolve a conjecture of Clark [Cla03] (Parent and Yafaev determine the
rational points for an infinite family of Shimura curves whose Jacobian
contains a rank zero isogeny factor).

### Acknowledgements

It is a pleasure to thank Noam Elkies, Barry Mazur, Jeremy Rouse, Andrew
Sutherland, and David Zureick-Brown for sharing several modular curves of
interest, which provided the impetus for this work. We are grateful for the
contributions of Nikola Adz̆aga, Vishal Arul, Lea Beneish, Alex Best,
Francesca Bianchi, Mingjie Chen, Shiva Chidambaram, Timo Keller, Nicholas
Triantafillou, and Boya Wen in finding a number of bugs in earlier versions of
our code. We would also like to thank Michael Stoll for kindly providing an
implementation of the Mordell–Weil sieve, on which ours is based.

JB was supported by NSF grant DMS-1702196, the Clare Boothe Luce Professorship
(Henry Luce Foundation), Simons Foundation grant #550023, and a Sloan Research
Fellowship. ND was supported by a Royal Society University Research
Fellowship. SM was supported by an NWO Vidi grant. JV was supported by ERC-COG
Grant 724638 ‘GALOP’ and Francis Brown, the Carolyn and Franco Gianturco
Fellowship at Linacre College (Oxford), and NSF Grant No. DMS-1638352, during
various stages of this project.

##  2\. Quadratic Chabauty: Theory

We give a brief overview of the method of quadratic Chabauty. A more complete
exposition can be found in [BBB+], and we refer the reader to [BD18, BDM+19]
for more precise details and proofs. Our description is in terms of Galois
representations and filtered $\phi$-modules, but we note that recently,
Edixhoven and Lido [EL19] have developed a geometric version of quadratic
Chabauty, which they have used to determine the rational points on the modular
curve $X_{0}^{*}(129):=X_{0}(129)/\langle w_{3},w_{43}\rangle$.

An early version of the method appeared in work of Kim [Kim10, BKK11], where
Massey products were used to construct a locally analytic function, vanishing
on the set of integral points of an elliptic curve of rank $1$. These
functions were interpreted as $p$-adic height functions, extending the method,
in Balakrishnan–Besser [BB15] and Balakrishnan–Besser–Müller [BBM16]. It was
extended to its current form in Balakrishnan–Dogra [BD18], where a systematic
use of Nekovář’s theory of $p$-adic heights suggested a streamlined approach
towards a very general class of curves allowing an abundance of geometric
correspondences. It was carried out in full to determine the set of rational
points on the split Cartan curve of level 13, $X_{\rm
s}^{+}(13)(\operatorname{\mathbf{Q}})$, in [BDM+19].

######  Remark 2.1.

This method fits into the vastly more general framework developed by Kim
[Kim05, Kim09], elaborating on the idea of studying rational points on curves
through path torsors of the étale fundamental group, suggested by
Grothendieck’s section conjecture. The approach discussed here represents an
effective way to make this theory computable and applicable to a variety of
examples. It is, however, important to note that different quotients of the
fundamental group have been successfully used for this purpose, see for
instance [BD20]. Finally, we note that even though we restrict our attention
to the base field $\operatorname{\mathbf{Q}}$, suitable versions exist over
number fields, see [BD18, BD20, BBBM].

###  2.1. Rational points and global heights.

Consider a smooth projective curve $X_{\operatorname{\mathbf{Q}}}$ of genus
$g\geq 2$ with good reduction at a prime $p$ whose Jacobian $J$ has rank
$r=g$. We also assume that the abelian logarithm induces an isomorphism

(2.1) $\log\colon
J(\operatorname{\mathbf{Q}})\otimes\operatorname{\mathbf{Q}}_{p}\to\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}$

and that $X(\operatorname{\mathbf{Q}})$ is non-empty, so we may choose a base
point $b$ in $X(\operatorname{\mathbf{Q}})$. Suppose that the Néron–Severi
rank $\mathrm{rk}_{\operatorname{\mathbf{Z}}}\mathrm{NS}(J)$ is at least $2$,
so that there exists a non-trivial class

$Z\ \in\
\mathrm{Ker}\left(\mathrm{NS}(J)\longrightarrow\mathrm{NS}(X)\simeq\operatorname{\mathbf{Z}}\right).$

As explained in Balakrishnan–Dogra [BD18], we can attach to any such choice of
$Z$ a suitable quotient $U_{Z}$ of the $\operatorname{\mathbf{Q}}_{p}$-pro-
unipotent fundamental group, which via a twisting construction by path
torsors, gives rise to a certain family of Galois representations

$\begin{array}[]{ccc}X(K)&\longrightarrow&\left\\{G_{K}\to\mathrm{GL}_{2g+2}(\operatorname{\mathbf{Q}}_{p})\right\\}\\\
x&\longmapsto&\mathrm{A}(x)\colonequals\mathrm{A}_{Z}(b,x)\end{array}$

where $G_{K}:=\operatorname{\mathrm{Gal}}(\overline{K}/K)$ and
$K\in\\{\operatorname{\mathbf{Q}},\operatorname{\mathbf{Q}}_{p}\\}$. We refer
the reader to [BD18] for the details of this construction, and merely recall
here that with respect to a suitable choice of basis, the representation
$\mathrm{A}(x)$ is lower triangular, of the form

(2.2) $g\in G_{K}\ \longmapsto\ \left(\begin{matrix}1&&\\\
\alpha(g)&\rho_{V}(g)&\\\ \gamma(g)&\beta(g)&\chi_{p}(g)\end{matrix}\right)$

where

$\rho_{V}\colon
G_{K}\longrightarrow\mathrm{GL}_{2g}(\operatorname{\mathbf{Q}}_{p})$

is a frame for the Galois action on the $p$-adic étale homology
$V=\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{\acute{e}t}}}(X_{\overline{K}},\operatorname{\mathbf{Q}}_{p})^{\vee}$,
and $\chi_{p}:G_{K}\to\operatorname{\mathbf{Q}}_{p}^{\times}$ is the $p$-adic
cyclotomic character. Representations of this form, which admit a
$G_{K}$-stable filtration with graded pieces
$\operatorname{\mathbf{Q}}_{p}(1),V,\operatorname{\mathbf{Q}}_{p}$, are
referred to as mixed extensions, see [BDM+19, §3.1].

The theory of $p$-adic heights due to Nekovář [Nek93, §2] attaches to any
mixed extension $M$ a $p$-adic height $h(M)$. When applied to the family of
mixed extensions $\mathrm{A}(x)$, this results in a map

$h\colon
X(\operatorname{\mathbf{Q}})\longrightarrow\operatorname{\mathbf{Q}}_{p}.$

The algebraic properties of this map lie at the heart of the method of
quadratic Chabauty. Most notably, the method relies on the following two
facts:

  * •

The $p$-adic height $h(\mathrm{A}(x))$ is a bilinear function of the pair of
Galois cohomology classes defined by the cochains $(\alpha,\beta)$ appearing
in (2.2).

  * •

It decomposes as a sum of local height functions $h_{v}$ defined locally at
every finite place $v$.

###  2.2. Local decomposition.

We now discuss in more detail the decomposition of the global $p$-adic height
$h$ described above, as a sum of local height functions

$h_{v}\colon X(\operatorname{\mathbf{Q}}_{v})\ \longrightarrow\
\operatorname{\mathbf{Q}}_{p}.$

The nature of these local height functions is as follows:

  1. (1)

The case $v\neq p$: It follows from Kim–Tamagawa [KT08] that the function
$h_{v}$ has finite image, in the sense that there exists a finite set
$\Upsilon_{v}$ such that

$h_{v}\colon X(\operatorname{\mathbf{Q}}_{v})\ \longrightarrow\
\Upsilon_{v}\subset\operatorname{\mathbf{Q}}_{p}.$

  2. (2)

The case $v=p$: The map $h_{p}$ is locally analytic and has an explicit
description in terms of linear algebra data of the filtered $\phi$-module

$M(x)\colonequals\left(\mathrm{A}(x)\otimes_{\operatorname{\mathbf{Q}}_{p}}\mathrm{B}_{\operatorname{\scriptstyle\mathrm{cris}}}\right)^{G_{\operatorname{\mathbf{Q}}_{p}}},$

where $\mathrm{B}_{\operatorname{\scriptstyle\mathrm{cris}}}$ is Fontaine’s
crystalline period ring. A crucial point in the method of quadratic Chabauty
is that the definition of the family of Galois representations $\mathrm{A}(x)$
comes from a motivic quotient of the fundamental group of $X$, and non-abelian
$p$-adic Hodge theory yields an analogous de Rham realisation in the form of a
filtered connection $(\mathscr{M},\nabla)$ on $X$ with a Frobenius structure,
together with an isomorphism of filtered $\phi$-modules

$x^{*}\mathscr{M}\simeq M(x).$

Associated to the filtered $\phi$-module $M(x)$ we have a pair of elements
$\pi_{1}(M(x))$ and $\pi_{2}(M(x))^{\vee}(1)$ of
$\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega)^{\vee}$
, via the isomorphism

$\operatorname{\mathrm{Ext}}^{1}_{\operatorname{\scriptstyle\mathrm{Fil}},\phi}(\operatorname{\mathbf{Q}}_{p},\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{p}})^{\vee})\simeq\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega)^{\vee}.$

###  2.3. Finiteness.

The decomposition $h=\sum_{v}h_{v}$ can be used to leverage the bilinear
nature of $h$ against the properties of the functions $h_{v}$. We know that
there exists a finite set
$\Upsilon=\Upsilon_{Z}\subset\operatorname{\mathbf{Q}}_{p}$ such that

(2.3) $h(x)-h_{p}(x)\ \in\ \Upsilon,$

for any $x$ in $X(\operatorname{\mathbf{Q}})$. The terms in this equation can
all be computed explicitly:

  * •

The set $\Upsilon$ is given by
$\\{\sum_{v}\epsilon_{v}:\epsilon_{v}\in\Upsilon_{v}\\}$, where the sum is
over primes of bad reduction, and $\Upsilon_{v}$ is the set of values of
$h_{v}(\mathrm{A}(x))$ for $x\in X(\operatorname{\mathbf{Q}}_{v}).$ For $v\neq
p$, the map $h_{v}$ will be made explicit in §3.1, using the results of
Betts–Dogra [BD19] to compute $\Upsilon_{v}$ when a regular semi-stable model
$\mathcal{X}$ is known. The map $h_{v}$ factors through the reduction map to
the irreducible components of the special fibre of $\mathcal{X}$.

  * •

The map $h_{p}$ may be computed using the results of [BDM+19], where it is
explained how the universal properties of the bundle $\mathscr{M}$ rigidify
the (known) structures on the graded pieces, enough to allow us to compute
them explicitly, see §3.2.

  * •

Under our running assumptions, we may view the global height as a pairing

$h\colon\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}\otimes\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}\
\longrightarrow\ \operatorname{\mathbf{Q}}_{p}.$

Using global information, such as an abundance of global points $x\in
X(\operatorname{\mathbf{Q}})$ if available, we can solve for the height
pairing explicitly. This will be discussed in §3.3, where we also explain what
to do in cases where too few rational points are available.

Via the above, the map $h$ may be extended to a function on
$X(\operatorname{\mathbf{Q}}_{p})$, by sending $x$ to

$h\left(\pi_{1}(\mathrm{A}(x)),\pi_{2}(\mathrm{A}(x))^{\vee}(1)\right)\,.$

By the proof of [BDM+19, Lemma 3.7], the resulting map

$\rho=h-h_{p}\colon X(\operatorname{\mathbf{Q}}_{p})\ \longrightarrow\
\operatorname{\mathbf{Q}}_{p}$

is Zariski dense on every residue disk. We call $\rho$ a quadratic Chabauty
function, and we write $\rho_{Z}$ if we want to emphasise the dependence on
$Z$. Hence (2.3) implies that $X(\operatorname{\mathbf{Q}})$ is finite.
Moreover, the computable nature of the quantities involved in (2.3), discussed
at length in the next section, allows us to explicitly determine a $p$-adic
approximation of the finite set

$\\{x\in X(\operatorname{\mathbf{Q}}_{p}):h(x)-h_{p}(x)\in\Upsilon\\}\supset
X(\operatorname{\mathbf{Q}}).$

As explained in [BD18, Proposition 5.5], this finite set contains the
Chabauty–Kim set $X(\operatorname{\mathbf{Q}}_{p})_{2}$. In particular, a
proof that this set equals $X(\operatorname{\mathbf{Q}})$ gives a verification
of Kim’s conjecture [BDCKW18, Conjecture 3.1] for the curve $X$ (we refer the
reader to the references for a precise definition of the set
$X(\operatorname{\mathbf{Q}}_{p})_{2}$).

##  3\. Quadratic Chabauty: Algorithms

In this section, we discuss the explicit computation of the three ingredients
outlined above:

  1. (1)

The local height function $h_{v}$ for $v$ away from $p$, which is described
explicitly in §3.1 using the techniques in Betts–Dogra [BD19], given a regular
semi-stable model at $v$.

  2. (2)

The height function $h_{p}$, whose computation is summarised in §3.2 using the
techniques of [BDM+19].

  3. (3)

The determination of the global height pairing $h$, described in §3.3 using
rational divisors as input in the absence of a plentiful supply of rational
points on the curve.

Our contribution in this paper lies mainly in (1) and (3), which reflect
general features of the method of quadratic Chabauty that were not needed for
the curve $X_{\rm s}^{+}(13)$ treated in [BDM+19]. In addition, we discuss
some computational techniques to further automate the method of quadratic
Chabauty to work for a wide class of modular curves. This includes the
Mordell–Weil sieve, which is used to attempt to further refine the finite set
of local points in the output to the true set of rational points
$X(\operatorname{\mathbf{Q}})$.

######  Remark 3.1.

The global height depends on the choice (which we fix for the rest of this
article) of

  * •

a continuous idèle class character
$\chi\colon\mathbf{A}_{\operatorname{\mathbf{Q}}}^{\times}/\operatorname{\mathbf{Q}}^{\times}\operatorname{\longrightarrow}\operatorname{\mathbf{Q}}_{p}$
ramified at $p$;

  * •

a splitting $s\colon
V_{\operatorname{\scriptstyle\mathrm{dR}}}/\operatorname{\mathrm{Fil}}^{0}V_{\operatorname{\scriptstyle\mathrm{dR}}}\operatorname{\longrightarrow}V_{\operatorname{\scriptstyle\mathrm{dR}}}$
of the Hodge filtration, where

$V_{\operatorname{\scriptstyle\mathrm{dR}}}=\mathrm{D}_{\operatorname{\scriptstyle\mathrm{cris}}}(V)=\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{p}})^{\vee}\,.$

We also fix differentials $\omega_{0},\ldots,\omega_{2g-1}$ of the second kind
whose classes form a symplectic basis of
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{p}})$
with respect to the cup product, such that $\omega_{0},\ldots,\omega_{g-1}$
generate
$\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})$.

###  3.1. Local heights away from $p$

Let $\ell\neq p$ and let $F$ be an endomorphism of $J$ that has trace zero and
is symmetric with respect to the Rosati involution. Then we may associate to
$F$ an element $Z$ of
$\mathrm{Ker}\left(\mathrm{NS}(J)\to\mathrm{NS}(X)\right)$ (see e.g. [BDM+19,
Lemma 2.4]). In [BD19], an explicit description of the map

$h_{\ell}\colon
X(\operatorname{\mathbf{Q}}_{\ell})\operatorname{\longrightarrow}\operatorname{\mathbf{Q}}_{p}\,;\quad
x\mapsto h_{\ell}(\mathrm{A}_{Z}(b,x))$

associated to $F$ and $\chi$ is given, in terms of harmonic analysis on the
reduction graph in the sense of Zhang [Zha93].

To explain the result, we introduce some notation. Over some finite extension
$K/\operatorname{\mathbf{Q}}_{\ell}$, the curve $X$ admits a regular
semistable model $\mathcal{X}_{\mathrm{reg}}/\mathcal{O}_{K}$, and a stable
model $\mathcal{X}_{\mathrm{st}}/\mathcal{O}_{K}$. Let $\Gamma_{\mathrm{reg}}$
and $\Gamma_{\mathrm{st}}$ denote the respective dual graphs of the special
fibres of these models. By regularity, we have a reduction map

$\mathrm{red}\colon
X(\operatorname{\mathbf{Q}}_{\ell})\operatorname{\longrightarrow}V(\Gamma_{\mathrm{reg}})$

from $X(\operatorname{\mathbf{Q}}_{\ell})$ to the vertices of the dual graph
$\Gamma_{\mathrm{reg}}$ of the special fibre of $\mathcal{X}_{\mathrm{reg}}$.
By definition, these are the irreducible components of the special fibre. The
definition is the natural one: given $x\in
X(\operatorname{\mathbf{Q}}_{\ell})$, there is a unique extension to an
$\mathcal{O}_{K}$-section $x\in X(\mathcal{O}_{K})$. By regularity, the
specialisation to the special fibre lies on a unique irreducible component.

We may give $\Gamma_{\mathrm{reg}}$ and $\Gamma_{\mathrm{st}}$ the structure
of rationally metrised graphs (i.e. graphs whose edges $e$ have associated
lengths $\ell(e)\in\mathbb{\operatorname{\mathbf{Q}}}_{>0}$) by defining the
length of an edge $e$ to be $i(e)/r$, where $i$ is the intersection
multiplicity of the corresponding singular point and $r$ is the ramification
degree of $K/\operatorname{\mathbf{Q}}_{\ell}$. Choose an orientation of the
edges of $\Gamma\colonequals\Gamma_{\mathrm{st}}$, so that each $e\in
E(\Gamma)$ has a source $s(e)$ and target $t(e)$ in $V(\Gamma)$. Define
$\Gamma_{\operatorname{\mathbf{Q}}}$ to be the set of points on $\Gamma$ whose
distance from a vertex is rational: formally,

$\Gamma_{\operatorname{\mathbf{Q}}}=\sqcup_{e\in
E(\Gamma)}\\{e\\}\times([0,\ell(e)]\cap\operatorname{\mathbf{Q}})/\sim\,,$

where the equivalence relation is that $(e_{1},1)\sim(e_{2},0)$ whenever
$t(e_{1})=s(e_{2})$. Since $\mathcal{X}_{\mathrm{reg}}$ is obtained from
$\mathcal{X}_{\operatorname{\scriptstyle\mathrm{st}}}$ by blowing up each
singular point (corresponding to an edge $e$) $i(e)$ times, we have an
inclusion $V(\Gamma_{\mathrm{reg}})\subset\Gamma_{\operatorname{\mathbf{Q}}}$
(in the terminology of [BD19, 3.7.1], we may view $\Gamma_{\mathrm{reg}}$ as a
rational subdivision of $\Gamma$). In this way we can think of the reduction
map $\mathrm{red}$ as a map from $X(K)$ to
$\Gamma_{\operatorname{\mathbf{Q}}}$, see [BD19, Definition 1.3.1].

In [BD19], a map

$j_{\Gamma}\colon\Gamma_{\operatorname{\mathbf{Q}}}\to\operatorname{\mathbf{Q}}$

is defined such that

(3.1) $h_{\ell}=c\cdot j_{\Gamma}\circ\mathrm{red}\,,$

where $c$ is a constant (in fact, it follows from the proof of this identity
that $c=\chi_{p}(\ell)$, but this result is not explicitly stated). The map
$j_{\Gamma}$ is defined in terms of the Laplacian operator associated to
$\Gamma$, which we now define. We say a function

$\Gamma_{\operatorname{\mathbf{Q}}}\to\operatorname{\mathbf{Q}}$

is piecewise polynomial if on each edge it is the restriction of a polynomial
function $\operatorname{\mathbf{Q}}\to\operatorname{\mathbf{Q}}$. As in [BD19,
Definition 7.2.2], we define the Laplacian $\nabla^{2}(g)$ of a piecewise
polynomial function
$g\colon\Gamma_{\operatorname{\mathbf{Q}}}\to\operatorname{\mathbf{Q}}$ to be
the formal sum

$-\sum_{e\in E(\Gamma)}g^{\prime\prime}(x_{e})\cdot e+\sum_{v\in
V(\Gamma)}(\sum_{s(e)=v}g^{\prime}(0)-\sum_{t(e)=v}g^{\prime}(1))\cdot v,$

where we write the function $g$ restricted to the edge $e$ as a polynomial in
$\operatorname{\mathbf{Q}}[x_{e}]$ for notational simplicity. Hence we have

$\nabla^{2}(g)\in\bigoplus_{e\in
E(\Gamma)}\operatorname{\mathbf{Q}}[x_{e}]\cdot e\,\oplus\bigoplus_{v\in
V(\Gamma)}\operatorname{\mathbf{Q}}\cdot v\,.$

The Laplacian map is linear on piecewise polynomial functions, and its kernel
consists of constant functions. Thus $g$ is uniquely determined by
$\nabla^{2}(g)$ and its value at one point.

We define the morphism

$\pi\colon\operatorname{\mathbf{Q}}E(\Gamma)\to\operatorname{\mathrm{H}}_{1}(\Gamma,\operatorname{\mathbf{Q}})$

to be the orthogonal projection with respect to the pairing $e\cdot
e^{\prime}=\ell(e)\cdot\delta_{ee^{\prime}}$ on
$\operatorname{\mathbf{Q}}E(\Gamma)$. For an irreducible component $X_{v}$ of
the special fibre of $\mathcal{X}_{\mathrm{reg}}$, let $V_{p}(X_{v})$ denote
the $\operatorname{\mathbf{Q}}_{p}$-Tate module of its Jacobian. The action of
$F$ on $V_{p}(X)$ preserves the weight filtration, and hence induces an action
of $F$ on the weight $-1$ part of $V_{p}(X)$, which is isomorphic to
$\oplus_{v}V_{p}(X_{v})$. Although the action of $F$ need not respect the
direct sum decomposition, the decomposition

$\operatorname{\mathrm{End}}(\oplus_{v}V_{p}(X_{v}))\simeq\oplus_{v,w}\operatorname{\mathrm{Hom}}(V_{p}(X_{v}),V_{p}(X_{w}))$

implies that we can define $\operatorname{\mathrm{Tr}}(F|V_{p}(X_{v}))$ to be
the trace of the $\operatorname{\mathrm{End}}(V_{p}(X_{v}))$ component of $F$.

######  Theorem 3.2 ([BD19, Theorem 1.1.2, Lemma 12.1.1, and Corollary
12.1.3]).

Let $j_{\Gamma}$ be the unique piecewise polynomial function

$j_{\Gamma}\colon\Gamma_{\operatorname{\mathbf{Q}}}\to\operatorname{\mathbf{Q}}$

satisfying $j_{\Gamma}(\mathrm{red}(b))=0$ and

$\nabla^{2}(j_{\Gamma})=\sum_{e\in
E(\Gamma)}\frac{1}{\ell(e)}e^{*}F(\pi(e))\cdot e+\frac{1}{2}\sum_{v\in
V(\Gamma)}\operatorname{\mathrm{Tr}}(F|V_{p}(X_{v}))\cdot v.$

Then we have

$h_{\ell}=\chi_{p}(\ell)\cdot j_{\Gamma}\circ\mathrm{red}\,.$

To determine the possible local heights, it suffices to compute the action of
$F$ on $\operatorname{\mathrm{H}}_{1}(\Gamma)$ and on $V_{p}(X_{v})$. In this
paper, we do not discuss methods for the algorithmic computation of the action
of $F$ on $\operatorname{\mathrm{H}}_{1}(\Gamma)$, but algorithms for these
computations in the case when the curve $X$ is hyperelliptic will be discussed
in forthcoming joint work of the first, second, and fifth authors with Oana
Adascalitei, David Corwin, Sachi Hashimoto, Benjamin Matschke, Ciaran
Schembri, and Tian Wang.

As we explain in Section 4.4, one can sometimes use partial information
deduced from Theorem 3.2 to determine the possible local heights without
computing the action of $F$ on $\operatorname{\mathrm{H}}_{1}(\Gamma)$ (for
example, if one has enough rational points that are suitably independent in
$J(\operatorname{\mathbf{Q}})$ and $\Gamma_{\operatorname{\mathbf{Q}}}$).

######  Example 3.3.

One example for which this strategy succeeds is the genus 2 curve
$C_{188}/\operatorname{\mathbf{Q}}$ defined by the equation

$y^{2}=x^{5}-x^{4}+x^{3}+x^{2}-2x+1\,.$

This curve does not have semistable reduction over
$\operatorname{\mathbf{Q}}_{2}$. Over
$K=\operatorname{\mathbf{Q}}_{2}[\sqrt[3]{2}]$, we find a regular semistable
model $\mathcal{X}_{\mathrm{reg}}$ whose special fibre consists of two genus 1
curves that do not intersect and a genus 0 curve intersecting both of them
transversely in a unique point each. Hence the metric graph
$\Gamma_{\mathrm{reg}}$ is a line segment and the image of
$C_{188}(\operatorname{\mathbf{Q}}_{2})$ in
$\Gamma_{\operatorname{\mathbf{Q}}}$ consists of three points on this line.
The two edges of $\Gamma_{\mathrm{reg}}$ both have length $1/3$. Note that in
this case, since $\Gamma$ has trivial homology, the function $j_{\Gamma}$ is
affine linear. Hence it is uniquely determined by evaluating it at two
distinct points. We will use this to compute the rational points on $C_{188}$
below in Example 4.19.

###  3.2. Local heights at $p$

We briefly discuss the description of the local height component

$h_{p}\colon X(\operatorname{\mathbf{Q}}_{p})\ \operatorname{\longrightarrow}\
\operatorname{\mathbf{Q}}_{p},$

which appeared in [BDM+19]. Recall that $h_{p}$ is a locally analytic
function, described in terms of the filtered $\phi$-module $M(x)$ discussed in
§2.2. Concretely, we may find two unipotent isomorphisms

$\lambda^{\star}(x):\ \operatorname{\mathbf{Q}}_{p}\oplus
V_{\operatorname{\scriptstyle\mathrm{dR}}}\oplus\operatorname{\mathbf{Q}}_{p}(1)\
\stackrel{{\scriptstyle\sim}}{{\operatorname{\longrightarrow}}}\
M(x),\quad\qquad\mbox{for}\ \ \star\in\\{\phi,\operatorname{\mathrm{Fil}}\\}$

where $\lambda^{\phi}$ respects the Frobenius action and
$\lambda^{\operatorname{\mathrm{Fil}}}$ respects the Hodge filtration, which
with respect to a suitable basis for $M(x)$ may be represented in ($1+2g+1$)
block matrix form

(3.2) $\lambda^{\phi}(x)=\left(\begin{array}[]{ccc}1&0&0\\\
\boldsymbol{\alpha}_{\phi}&1&0\\\
\gamma_{\phi}&\boldsymbol{\beta}^{\intercal}_{\phi}&1\\\
\end{array}\right),\qquad\lambda^{\operatorname{\mathrm{Fil}}}(x)=\left(\begin{array}[]{ccc}1&0&0\\\
\boldsymbol{\alpha}_{\operatorname{\mathrm{Fil}}}&1&0\\\
\gamma_{\operatorname{\mathrm{Fil}}}&\boldsymbol{\beta}^{\intercal}_{\operatorname{\mathrm{Fil}}}&1\\\
\end{array}\right).$

The isomorphism $\lambda^{\phi}$ is uniquely determined, whereas
$\lambda^{\operatorname{\mathrm{Fil}}}$ is only well-defined up to the
stabiliser of the Hodge filtration $\operatorname{\mathrm{Fil}}^{0}$, and by
choosing it suitably, we may assume that
$\boldsymbol{\alpha}_{\operatorname{\mathrm{Fil}}}=0$.

Recall that the $p$-adic height of Nekovář depends on the choice of a
logarithm and a splitting $s$ of the Hodge filtration
$\operatorname{\mathrm{Fil}}^{0}V_{\operatorname{\scriptstyle\mathrm{dR}}}$.
The splitting $s$ defines idempotents $s_{1},s_{2}$ on
$V_{\operatorname{\scriptstyle\mathrm{dR}}}$ with images
$s(V_{\operatorname{\scriptstyle\mathrm{dR}}}/\operatorname{\mathrm{Fil}}^{0}V_{\operatorname{\scriptstyle\mathrm{dR}}})$
and
$\operatorname{\mathrm{Fil}}^{0}V_{\operatorname{\scriptstyle\mathrm{dR}}}$
respectively, with respect to which the local height at $p$ is

$h_{p}(x)=\gamma_{\phi}-\gamma_{\operatorname{\mathrm{Fil}}}-\boldsymbol{\beta}^{\intercal}_{\phi}\cdot
s_{1}(\boldsymbol{\alpha}_{\phi})-\boldsymbol{\beta}^{\intercal}_{\operatorname{\mathrm{Fil}}}\cdot
s_{2}(\boldsymbol{\alpha}_{\phi}).$

In [BDM+19] we outline a method to compute these quantities explicitly as
functions of the local point $x\in X(\operatorname{\mathbf{Q}}_{p})$, which
exploits the existence of the connection $(\mathscr{M},\nabla)$ discussed in
§2.2. The Hodge filtration and Frobenius structures of this bundle are
characterised by suitable universal properties, discussed at length in
[BDM+19, §§4–5]. We have made the algorithms for the computation of $h_{p}$
more general and streamlined, but did not make further contributions to this
part of the method beyond what is already contained in loc. cit.

###  3.3. The global height pairing

One key step in the construction of a quadratic Chabauty function is to write
the global height pairing $h$ in terms of a basis of the space of bilinear
pairings on
$\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}$.
In [BDM+19], we had as a working hypothesis that our curve $X$ had
sufficiently many rational points, in the following sense: For $x\in
X(\operatorname{\mathbf{Q}}_{p})$, the Galois representation $\mathrm{A}(x)$
can be projected onto $\operatorname{\mathrm{H}}^{1}_{f}(G_{T},V)$
(respectively $\operatorname{\mathrm{H}}^{1}_{f}(G_{T},V^{*}(1))$). With
respect to the dual basis $\omega^{\ast}_{0},\ldots,\omega^{\ast}_{g-1},$ the
image is the vector $\alpha$ (respectively $\beta)$ in (2.2). Both of these
cohomology groups are isomorphic, under our running assumptions, to
$\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}$,
so we obtain

$\pi(\mathrm{A}(x))=\left(\pi_{1}(\mathrm{A}(x)),\pi_{2}(\mathrm{A}(x))\right)\in\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}\times\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}\,.$

Suppose that we can find a basis of
$\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}\otimes\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}$
consisting of elements of the form
$\pi_{1}(\mathrm{A}_{Z}(b,x))\otimes\pi_{2}(\mathrm{A}_{Z}(b,x))$, where the
$Z$ are cycles on $J$ pulling back to degree 0 cycles on $X$, and the $x$ are
rational points on $X$. Then we compute the coefficients of $h$ in terms of
the dual basis by evaluating $h_{p}(\mathrm{A}_{Z}(b,x))$ (and, if necessary,
$h_{\ell}(\mathrm{A}_{Z}(b,x))$ for primes $\ell\neq p$). With this choice of
basis, the extension of $h$ to a locally analytic function $h\colon
X(\operatorname{\mathbf{Q}}_{p})\to\operatorname{\mathbf{Q}}_{p}$ is
immediate.

The number of required rational points can be reduced by working with
symmetric $\operatorname{\mathrm{End}}(J)$-equivariant heights. By the latter,
we mean that $h(f(x),y)=h(x,f(y))$ for all
$f\in\operatorname{\mathrm{End}}(J)$, using (2.1). This holds if the splitting
$s$ of the Hodge filtration on $V_{\operatorname{\scriptstyle\mathrm{dR}}}$
commutes with $\operatorname{\mathrm{End}}(J)$ and has the property that
$\mathrm{Ker}(s)$ is isotropic with respect to the cup product (see [Nek93,
§4.11] and [BD20, §4.1]). For instance, if $p$ is a prime of ordinary
reduction for the Jacobian, then the height associated to the unit root
splitting is symmetric and $\operatorname{\mathrm{End}}(J)$-equivariant.
Henceforth we shall assume that $s$ satisfies these assumptions, and we say
that $X$ has sufficiently many rational points if the approach outlined above
succeeds.

####  3.3.1. Heights on the Jacobian

If our curve does not have sufficiently many rational points in the above
sense, then, in light of (2.1), it is natural to solve for the height pairing
using rational points on the Jacobian. In this case, we do not have an
algorithm to compute $h$ using Nekovář’s construction at our disposal, but we
can use the equivalence between this construction and that of Coleman and
Gross [CG89], proved by Besser [Bes04]. We assume that we know $g$ independent
points on the Jacobian.

With respect to the choices of $s$ and $\chi$, Coleman and Gross define the
local $p$-adic height pairing
$h_{v}(D_{1},D_{2})\in\operatorname{\mathbf{Q}}_{p}$ at a finite prime $v$ for
divisors
$D_{1},D_{2}\in\operatorname{\mathrm{Div}}^{0}(X_{\operatorname{\mathbf{Q}}_{v}})$
with disjoint support. The local pairing is symmetric and bi-additive, and we
have $h_{v}(D_{1},D_{2})=\chi_{v}(f(D_{2}))$ if $D_{2}=\operatorname{div}(f)$
is principal. Moreover, for $D_{1},D_{2}\in\operatorname{\mathrm{Div}}^{0}(X)$
with disjoint support, only finitely many $h_{v}(D_{1},D_{2})$ are nonzero.
Therefore

$h\colonequals\sum_{v}h_{v}$

defines a symmetric bilinear pairing $h\colon
J(\operatorname{\mathbf{Q}})\times
J(\operatorname{\mathbf{Q}})\to\operatorname{\mathbf{Q}}_{p}$.

If we have algorithms to compute all local height pairings, we can then solve
for the global height pairing in terms of the basis of symmetric bilinear
pairings on $J(\operatorname{\mathbf{Q}})\otimes\operatorname{\mathbf{Q}}_{p}$
defined by

$g_{ij}(D,E)\colonequals\frac{1}{2}(\log(D)(\omega_{i})\log(E)(\omega_{j})+\log(D)(\omega_{j})\log(E)(\omega_{i}))\,,\;\,0\leq
i\leq j\leq g-1\,.$

Since we can express $\pi_{1}(\mathrm{A}(x))$ and $\pi_{2}(\mathrm{A}(x))$ in
terms of the dual basis $\\{\omega_{i}^{*}\\}$, we can compute
$g_{ij}(\pi(\mathrm{A}(x)))$ for $x\in X(\operatorname{\mathbf{Q}}_{p})$ (with
the obvious abuse of notation) and extend $h$ to a locally analytic function
$h\colon X(\operatorname{\mathbf{Q}}_{p})\to\operatorname{\mathbf{Q}}_{p}$.

It remains to discuss the computation of local heights. For
$D_{1},D_{2}\in\operatorname{\mathrm{Div}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}})$
with disjoint support, the local height is the Coleman integral

$h_{p}(D_{1},D_{2})=c_{p}\int_{D_{2}}\omega_{D_{1}}\,,$

where $\omega_{D_{1}}$ is a differential with residue divisor $D_{1}$,
normalised with respect to the splitting $s$, and the integral is taken with
respect to the branch
$\operatorname{\mathbf{Q}}_{p}^{\times}\to\operatorname{\mathbf{Q}}_{p}$ of
the $p$-adic logarithm that extends $c_{p}^{-1}\chi_{p}$.

The local height at a prime $\ell\neq p$ is defined in terms of intersection
theory. We can extend $D_{1}$ and $D_{2}$ to divisors $\mathcal{D}_{1}$ and
$\mathcal{D}_{2}$ on a regular model of $X_{\operatorname{\mathbf{Q}}_{\ell}}$
so that both $\mathcal{D}_{i}$ have trivial intersection multiplicity with all
vertical divisors; then

$h_{\ell}(D_{1},D_{2})=-(\mathcal{D}_{1}\cdot\mathcal{D}_{2})\chi_{p}(\ell)\,.$

###  3.4. Mordell–Weil sieving

The idea of the Mordell–Weil sieve, originally due to Scharaschkin [Sch99], is
to deduce information on rational points on $X$ via the intersection of the
images of $X(\operatorname{\mathbf{F}}_{v})$ and
$J(\operatorname{\mathbf{Q}})$ in $J(\operatorname{\mathbf{F}}_{v})$ (or
suitable quotients) for several primes $v$ of good reduction. It is often
applied to verify that $X(\operatorname{\mathbf{Q}})=\varnothing$, but it can
also be employed in conjunction with $p$-adic techniques to compute
$X(\operatorname{\mathbf{Q}})$ when there are rational points.

We review the basic idea, which is straightforward. Making the sieve perform
well in practice is a different matter; see [BS10] for an elaborate discussion
of the issues one encounters and detailed solutions. For ease of exposition,
we assume that $J(\operatorname{\mathbf{Q}})$ is torsion-free and that we have
generators $P_{1},\ldots,P_{r}$ of $J(\operatorname{\mathbf{Q}})$ available.
Let $M>1$ be an integer and let $S$ be a finite set of primes of good
reduction for $X$. Then the natural diagram

$\textstyle{X(\operatorname{\mathbf{Q}})\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{J(\operatorname{\mathbf{Q}})/MJ(\operatorname{\mathbf{Q}})\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\alpha_{S,M}}$$\textstyle{\prod_{v\in
S}X(\operatorname{\mathbf{F}}_{v})\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\beta_{S,M}}$$\textstyle{\prod_{v\in
S}J(\operatorname{\mathbf{F}}_{v})/MJ(\operatorname{\mathbf{F}}_{v})\,}$

is commutative. In the situation of interest to us, the horizontal maps are
induced by our choice of base point $b\in X(\operatorname{\mathbf{Q}})$.

In our work, we use the Mordell–Weil sieve in two ways. On the one hand, we
apply it to show that for a fixed prime $p$, a given residue disk in
$X(\operatorname{\mathbf{Q}}_{p})$ does not contain a rational point. To this
end, we set $M=M^{\prime}\cdot p$ for some suitable auxiliary integer
$M^{\prime}$, and we choose $S$ to consist of primes $\ell$ so that
$\gcd(\\#J(\operatorname{\mathbf{F}}_{\ell}),\\#J(\operatorname{\mathbf{F}}_{q}))$
is large for some prime divisors $q\mid pM^{\prime}$. We can then hope that
the image of the reduction of the disk under $\prod\beta_{S,m}$ does not meet
the image of the map $\prod\alpha_{S,m}$.

On the other hand, we use the sieve to show for fixed $M>1$ that a given coset
of $MJ(\operatorname{\mathbf{Q}})$ does not contain the image of a point in
$X(\operatorname{\mathbf{Q}})$ under the Abel–Jacobi map $P\mapsto[P-b]$.
Suppose a point $P\in X(\operatorname{\mathbf{Q}}_{p})$ is given to finite
precision $p^{N}$. If $P$ is rational, then there are integers
$a_{1},\ldots,a_{g}$ such that

$[P-b]=a_{1}P_{1}+\ldots+a_{g}P_{g}.$

Via the abelian logarithm, we compute a tuple
$(\tilde{a}_{1},\ldots,\tilde{a}_{g})\in\operatorname{\mathbf{Z}}/p^{N}\operatorname{\mathbf{Z}}$
satisfying $a_{i}\equiv\tilde{a}_{i}\pmod{p^{N}}$ for all
$i\in\\{1,\ldots,g\\}$. To show that $P$ is not rational, it then suffices to
show that the corresponding coset of $p^{N}J(\operatorname{\mathbf{Q}})$ does
not contain the image of such a point.

In our implementation, we have not tried to optimise the interplay between
quadratic Chabauty and the Mordell–Weil sieve. Such an optimisation is
discussed in [BBM17]. Let us only note here that we may combine quadratic
Chabauty information coming from several primes, and that we can enhance that
information using an auxiliary integer $M^{\prime}$ similar to the above.
Another account of combining quadratic Chabauty with the Mordell–Weil sieve
can be found in [BBB+, §6.7].

######  Remark 3.4.

All examples discussed in the following section satisfy
$r=g=\operatorname{\mathrm{rk}}_{\operatorname{\mathbf{Z}}}\mathrm{NS}(J)$,
resulting in at least two independent locally analytic functions vanishing in
$X(\operatorname{\mathbf{Q}})$ for the $g>2$ examples. Since we expect that
their common zero set is precisely $X(\operatorname{\mathbf{Q}})$ (or that
there is a geometric reason for the appearance of any additional $p$-adic
solutions), we do not expect to require the sieve. Indeed, we only had to
apply the sieve for curves of genus 2. For these examples, we always required
only one prime for the quadratic Chabauty computation; we chose this prime in
such a way as to simplify the sieving.

###  3.5. Implementation and scope

We have implemented the algorithms described in this section in the computer
algebra system Magma [BCP97]. Our code is freely available at [BDM+]. It
extends the code used for $X_{\mathrm{s}}^{+}(13)$ in [BDM+19] and can be used
to recover that example. It is applied to new examples in §4.

We begin by summarising our discussion so far and describe the general
procedure to determine a finite set containing
$X(\operatorname{\mathbf{Q}}_{p})_{2}$ as it would apply to the modular curve
$X$ attached to a general congruence subgroup, and Atkin–Lehner quotients
thereof. In this generality, several steps cannot be easily automated, so we
discuss the extent to which our implementation has automated the procedure,
and point out which steps require additional action from the user. See Example
4.4 for a fairly detailed worked example.

Input:

  * •

A modular curve $X/\operatorname{\mathbf{Q}}$ satisfying $r=g$, for which the
image of $J(\operatorname{\mathbf{Q}})$ in
$\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}$
has rank $g$.

  * •

A prime $p$ of good reduction such that the Hecke operator $T_{p}$ is a
generator of
$\operatorname{\mathrm{End}}^{0}(J)\colonequals\operatorname{\mathrm{End}}(J)\otimes_{\operatorname{\mathbf{Z}}}\operatorname{\mathbf{Q}}$.

Output: A finite set containing the set of points
$X(\operatorname{\mathbf{Q}}_{p})_{2}$.

  1. (1)

Find a covering of $X$ by affine opens that are birational to a planar curve
cut out by an equation that is monic in one variable and has $p$-integral
coefficients. See §3.5.1.

  2. (2)

Compute a symplectic basis for
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}})$.

  3. (3)

Compute the action of Frobenius on
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{p}})$
using Tuitman’s algorithm. Use the Eichler–Shimura relation to compute the
matrix of the action of the Hecke operator $T_{p}$ on
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{{p}}})$.

  4. (4)

Compute a splitting of the Hodge filtration that is equivariant for the action
of $\mathrm{End}(J)$ in the sense of §3.3.

  5. (5)

Compute elements
$Z_{1},\ldots,Z_{\operatorname{\mathrm{rk}}\operatorname{\mathrm{NS}}(J)-1}$
of a basis of $\mathrm{Ker}\left(\mathrm{NS}(J)\to\mathrm{NS}(X)\right)$ as
matrices acting on
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{p}})$,
see §3.5.2.

  6. (6)

Initialise a set $A$. For each $Z_{i}$, compute the associated heights:

    1. (a)

Compute local heights away from $p$, using Theorem 3.2. See §3.5.3.

    2. (b)

For each affine patch, do the following:

      1. (i)

Compute the functions $\lambda^{\operatorname{\mathrm{Fil}}}$ from (3.2) using
[BDM+19, §4].

      2. (ii)

Compute the functions $\lambda^{\phi}$ from (3.2) using [BDM+19, §5].

    3. (c)

Solve for the height pairing using a large enough supply of known points
$P_{1},\ldots,P_{n}$ in $X(\operatorname{\mathbf{Q}})$, if possible; else
compute the Coleman–Gross height pairing on $r$ independent points in
$J(\operatorname{\mathbf{Q}})$. See §3.5.4.

    4. (d)

Compute solutions of the function(s) coming from $Z_{i}$.

    5. (e)

Compute the multiplicities of the solutions and add to the set $A$ the
solutions that (simultaneously) satisfy the(se) function(s).

  7. (7)

Return $A$.

######  Remark 3.5.

We assume that we know that the Mordell–Weil rank of the Jacobian is equal to
the genus of the curve. For modular curves, by Gross–Zagier–Kolyvagin–Logachev
this can be verified by checking that the associated eigenforms have analytic
rank one (see e.g. [DF, §7]). For hyperelliptic curves, it is sometimes
simpler to carry out a two-descent. The assumption on the image of
$J(\operatorname{\mathbf{Q}})$ in
$\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}$
is innocuous: if $r=g$ and this assumption does not hold, one could apply the
Chabauty–Coleman method. For the Atkin–Lehner quotients $X_{0}^{+}(N)$, the
weak Birch–Swinnerton conjecture implies $J(\operatorname{\mathbf{Q}})$ always
generates
$\operatorname{\mathrm{H}}^{0}(X_{\operatorname{\mathbf{Q}}_{p}},\Omega^{1})^{\vee}$
(see [DF, Lemma 7]).

Note that one can have $r>g$ for the curves $X_{0}^{+}(N)$ (with $N$ prime),
even though $X_{0}^{+}(N)(\operatorname{\mathbf{Q}}_{p})_{2}$ is always finite
when the genus is greater than one by [DF]. However the smallest genus for
which this happens is $g=206$ (with $N=5077$), so the $r=g$ assumption is not
the main restriction to the scope of our algorithm for this family of curves.

To further determine the subset of rational points
$X(\operatorname{\mathbf{Q}})$ from the finite set of points produced by our
algorithm, we carry out the Mordell–Weil sieve. In practice it may happen (see
below) that $X(\operatorname{\mathbf{Q}})$ is returned by the algorithm, but
this is typically not the case when $X$ has genus two.

####  3.5.1. Affine patches

All examples discussed in the next section are either hyperelliptic curves or
smooth plane quartics, but our code is sometimes able to treat more general
examples. Our implementation was designed to take as input a plane affine
patch $Y\colon Q(x,y)=0$ of a modular curve $X/\operatorname{\mathbf{Q}}$
satisfying the requirements in §2.1 and a prime $p$ of good reduction. It
returns all rational points on $X$ in affine residue disks where the lift of
Frobenius constructed in [Tui16, Tui17] is defined. Note that we do not
require $Y$ to be smooth, but we need $Q$ to be monic with $p$-integral
coefficients.

We can sometimes find an affine patch $Y$ having the convenient property that
all rational points on $X$ must be among the points returned by running our
algorithm on $Y$. If no such $Y$ is found, then we need to find two suitable
affine patches such that every rational point on $X$ is contained in at least
one patch. For smooth plane quartics, our implementation includes an algorithm
that automates this process for convenience of the user. For other curves,
this step is left to the user.

######  Remark 3.6.

In a project started at the 2020 Arizona Winter School, Adžaga, Arul, Beneish,
Chen, Chidambaram, Keller, and Wen have developed a method to find suitable
affine patches for non-hyperelliptic curves of genus 4, 5, and 6.

####  3.5.2. The Néron–Severi classes $Z_{i}$

Under the assumption that $T_{p}$ generates the endomorphism algebra of the
Jacobian, which we made for convenience above, one may proceed precisely as in
[BDM+19, §6.4] to determine a non-trivial class

$Z\ \in\
\mathrm{Ker}\left(\mathrm{NS}(J)\longrightarrow\mathrm{NS}(X)\right).$

Indeed, the matrix $A_{p}$ of the Hecke operator $T_{p}$ acting on
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{p}})$
is easily determined from the matrix of Frobenius $F_{p}$ (which is already a
byproduct of the algorithms for the local height at $p$), by the
Eichler–Shimura relation:

$T_{p}=F_{p}+pF_{p}^{-1}.$

Under our assumption, the matrix of the classes $Z_{i}$ acting on
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{p}})$
may then be computed as linear combinations of powers of $A_{p}$.

######  Remark 3.7.

This is the only part of our algorithm specific to modular curves, since it
relies on the Eichler–Shimura relation. It should however be noted that this
is mainly a matter of convenience adopted for the purpose of automation. More
generally, for a smooth projective curve $X/\operatorname{\mathbf{Q}}$
satisfying the assumptions of §2.1, one could find $p$-adic approximations of
the action of the non-trivial classes $Z_{i}$ on
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{p}})$
using just $p$-adic linear algebra. Indeed, by the $p$-adic Lefschetz-(1,1)
theorem [BO83, §3.8] they correspond to elements of

$\mathrm{Ker}\left(\wedge^{2}\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{p}})\stackrel{{\scriptstyle\cup}}{{\operatorname{\longrightarrow}}}\operatorname{\mathrm{H}}^{2}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{p}})\right)\,$

that lie in the intersection of the $\operatorname{\mathrm{Fil}}^{1}$ and
$\phi=p$ subspaces. Note that since our algorithms only compute $p$-adic
approximations of this intersection, one needs to know
$\operatorname{\mathrm{rk}}_{\operatorname{\mathbf{Z}}}\operatorname{\mathrm{NS}}(J_{\operatorname{\mathbf{Q}}_{p}})$
in advance to obtain an algorithm for computing classes $Z$ (for modular
curves we have lower bounds on the Picard number coming from the Hecke
algebra, but for more general curves one could use algorithms for rigorous
computation of the endomorphism algebra of the Jacobian [CMSV19]). The
assumption that $T_{p}$ generates the endomorphism algebra is therefore not
strictly necessary in this step, though it is used in the computation of the
local heights away from $p$, see below. When the assumption is not satisfied
for the working prime $p$, our implementation will throw an error.

####  3.5.3. The local heights away from $p$

This step requires an explicit knowledge of a semi-stable model of the modular
curve $X$, as well as a description of the action of $Z_{i}$ on the
concomitant cohomological structures in order to be able to apply Theorem 3.2.
It is clear that a full automation of this step, starting from a set of
defining equations for $X$, falls outside the scope of our implementation.

Semi-stable models for modular curve are known in many cases, see for instance
the recent work of Edixhoven–Parent [EP19]. In practice, one can also often
use the SageMath toolbox MCLF 111 https://github.com/MCLF/mclf due to Rüth and
Wewers to compute such models. The main advantage of having computed the
$Z_{i}$ in §3.5.2 as combinations of powers of $T_{p}$ is that this makes it
easier to compute the quantities appearing in Theorem 3.2. Even though we see
no way to fully automate this step, we hope to convince the reader of its
practicality by working it out for two examples in §4.4.

####  3.5.4. The global height pairing

If we do not have sufficiently many rational points on the curve to solve for
the height pairing, we need to compute the local heights $h_{v}$ in the sense
of Coleman and Gross, see §3.3.1. For hyperelliptic curves
$X/\operatorname{\mathbf{Q}}_{p}$ of odd degree, $h_{p}(D_{1},D_{2})$ can be
computed using an algorithm due to Balakrishnan–Besser [BB12, BB19]. Based on
earlier SageMath code due to the first author, we have implemented this in
Magma for divisors $D_{1}$ and $D_{2}$ that split over
$\operatorname{\mathbf{Q}}_{p}$ and have support contained in disjoint non-
Weierstrass residue disks. To compute the local heights $h_{\ell}$ for
$\ell\neq p$, we rely on Magma’s implementation of an algorithm for local
canonical heights on hyperelliptic curves described in [Hol12, Mül14]. An
algorithm for general curves can be found in [vBHM20].

In order to solve for the height pairing, we need to find representatives for
$r$ independent points in $J(\operatorname{\mathbf{Q}})$ that satisfy the
various assumptions mentioned above. Our implementation for this task is
currently restricted to genus 2 curves, since this step was only necessary for
such curves in our work.

####  3.5.5. Possible extensions

The code is currently restricted to the base field
$K=\operatorname{\mathbf{Q}}$. There seems to be little difficulty in
extending it to work over more general number fields; the case of quadratic
imaginary fields is in progress. For more general number fields, one could
follow the strategy discussed in [BBBM] for working with independent idèle
class characters.

##  4\. Examples

In this section, we apply our techniques to compute the rational points on

  * •

the exceptional modular curve $X_{S_{4}}(13)$ (see §4.1);

  * •

all curves $X_{0}^{+}(N)$ of genus 2 and 3 for which $N$ is prime and the
rational points were not previously known (see §4.2);

  * •

two genus 2 curves of interest in Mazur’s Program B (see §4.3);

  * •

two genus 2 curves with Jacobian of $\mathrm{GL}_{2}$-type that have non-
trivial local heights away from $p$ (see §4.4).

For the computations, we used our Magma implementation. The specific code used
for the examples, along with detailed log files, can be found in the folder
`Examples` at [BDM+].

###  4.1. The exceptional curve $X_{S_{4}}(13)$

Recall that for a prime $\ell\geq 5$, any proper subgroup of
$\mathrm{GL}_{2}(\operatorname{\mathbf{F}}_{\ell})$ is conjugate to a subgroup
of a Borel subgroup, the normaliser of a Cartan subgroup, or an “exceptional”
subgroup with projective image isomorphic to $S_{4},A_{4}$, or $A_{5}$. The
field of definition of the modular curves attached to the exceptional
subgroups is the unique quadratic subfield
$\operatorname{\mathbf{Q}}(\sqrt{\pm\ell})$ of the cyclotomic field
$\operatorname{\mathbf{Q}}(\zeta_{\ell})$, with the exception of the curves
$X_{S_{4}}(\ell)$ for $\ell\equiv\pm 3\pmod{8}$, which are defined over the
field of rational numbers $\operatorname{\mathbf{Q}}$. For such values of
$\ell$, we would therefore like to determine
$X_{S_{4}}(\ell)(\operatorname{\mathbf{Q}})$.

Serre [Ser72] shows by a monodromy argument that such tetrahedral modular
curves have no local points as soon as $\ell$ is large enough, and in
particular he obtains

$X_{S_{4}}(\ell)(\operatorname{\mathbf{Q}})=\varnothing,\qquad\mbox{if}\ \
\ell>13.$

On the other hand, Ligozat [Lig77] showed that $X_{S_{4}}(11)$ is an elliptic
curve of conductor $11^{2}$, whose Mordell–Weil group is trivial. This leaves
the curve $X_{S_{4}}(13)$, which has genus $3$. In fact, this curve is the
last remaining modular curve of level $13^{n}$ whose rational points have not
been determined.

Using modular symbols algorithms, Banwait–Cremona [BC14] show that the curve
$X_{S_{4}}(13)$ is a smooth plane quartic whose canonical model is given by

$\displaystyle 4x^{3}y-3x^{2}y^{2}+3xy^{3}-x^{3}z+16x^{2}yz-11xy^{2}z+$
$\displaystyle 5y^{3}z+3x^{2}z^{2}+9xyz^{2}+y^{2}z^{2}+xz^{3}+2yz^{3}=0.$

Furthermore, they exhibit the following four rational points:

$\\{\left(1:3:-2\right),\left(0:0:1\right),\left(0:1:0\right),\left(1:0:0\right)\\}\subseteq
X_{S_{4}}(13)(\operatorname{\mathbf{Q}})$

and compute the $j$-invariant of the corresponding elliptic curves with
projective mod $13$ image isomorphic to $S_{4}$. The Jacobian of
$X_{S_{4}}(13)$ is isogenous to that of $X_{\rm s}^{+}(13)$, so it is
absolutely simple and has Mordell–Weil rank 3 over $\operatorname{\mathbf{Q}}$
by the results of [BDM+19, §6]. The curve has potential good reduction at
$p=13$, as can be seen, for instance, using the SageMath toolbox MCLF.

We determine the set of rational points on the curve $X_{S_{4}}(13)$ using
quadratic Chabauty with $p=11$ for the affine patches

$\displaystyle y^{4}$
$\displaystyle+(18x+9)y^{3}+(160x^{2}+176x+52)y^{2}+(560x^{3}+832x^{2}+384x+48)y$
$\displaystyle+192x^{4}+512x^{3}+384x^{2}+64x=0$

and

$\displaystyle y^{4}$
$\displaystyle+(9x+9)y^{3}+(52x^{2}+72x+36)y^{2}+(48x^{3}+240x^{2}+208x+64)y$
$\displaystyle+64x^{3}+192x^{2}-64x=0.$

The computation is analogous to the computation of $X^{+}_{\rm s}(13)$ in
[BDM+19]. Since the Hecke operator $T_{11}$ generates the Hecke algebra, we
construct cycles $Z_{1},Z_{2}$ from $T_{11}$ and its square, respectively. The
common zero set of the resulting quadratic Chabauty functions consists
precisely of the known rational points, so we obtain a proof of Theorem 1.1.

In order to solve for the height pairing, we use the four known rational
points and the cycle $Z_{1}$, so the resulting function automatically vanishes
there. However, since the cycles $Z_{1}$ and $Z_{2}$ are independent, and
$Z_{2}$ is not used to solve for the height, the vanishing of the resulting
function in the rational points provides a check for the correctness of our
code.

######  Remark 4.1.

Note that since the Jacobian of $X_{S_{4}}(13)$ is isogenous to that of
$X^{+}_{\mathrm{s}}(13)$, even if there were not enough rational points on
$X_{S_{4}}(13)$ to solve for the height pairing, one could instead solve for
it using $X^{+}_{\mathrm{s}}(13)$.

###  4.2. The Atkin-Lehner quotients $X_{0}^{+}(N)$

For a positive integer $N$, consider the Atkin–Lehner involution $w_{N}$
acting on the modular curve $X_{0}(N)$. Then the quotient

$X_{0}^{+}(N)\colonequals X_{0}(N)/\langle w_{N}\rangle$

is a smooth projective curve defined over $\operatorname{\mathbf{Q}}$ whose
non-cuspidal points classify unordered pairs $\\{E_{1},E_{2}\\}$ of elliptic
curves admitting an $N$-isogeny between them. The study of rational points on
these curves is also important in an ongoing program to compute quadratic
points on the modular curves $X_{0}(N)$; see, for instance, recent work of Box
[Box20]. Among the rational points, we distinguish between cusps, CM points
and exceptional points, those which are neither cusps nor CM points. The
exceptional points correspond to quadratic $\operatorname{\mathbf{Q}}$-curves
without complex multiplication.

In this section, we restrict to prime values $N$ such that $X_{0}^{+}(N)$ has
genus 2 or 3. Galbraith [Gal96] computed models for all these curves (and many
more) by finding relations in the vector space spanned by the newforms of
level $N$ and weight $2$ that are invariant under $w_{N}$. Up to conjugation,
there is a unique such newform.

The work of Galbraith shows that for prime $N$, the curve $X_{0}^{+}(N)$ has
genus 2 if and only if

(4.1) $N\in\\{67,73,103,107,167,191\\}\,.$

It has genus 3 if and only if

(4.2) $N\in\\{97,109,113,127,139,149,151,179,239\\}\,.$

Models for all these curves were recently communicated to us by Elkies; one
can also find such models in Galbraith’s thesis [Gal96] or by using the Magma
command `X0NQuotient`.

Via a search for small rational points, Galbraith [Gal99] found exceptional
rational points on $X_{0}^{+}(N)$ for $N=73,91,103,191$ (genus 2) and
$N=137,311$ (genus 4). The latter examples disproved an earlier conjecture of
Elkies that there are no exceptional rational points on non-hyperelliptic
$X_{0}^{+}(N)$ for prime level $N$. In [Gal02], Galbraith also found an
exceptional point on $X_{0}^{+}(125)$ and conjectured that there are no
further exceptional points on modular curves $X^{+}_{0}(N)$ of genus $2\leq
g\leq 5$.

Together with [BBB+] and [Gal96], our computations described below prove
Theorem 1.2. We first check that for level $N$ as in (4.1) and (4.2) the
curves $X_{0}^{+}(N)$ satisfy the requirements to apply our algorithm. The
Jacobian $J_{0}^{+}(N)$ of $X_{0}^{+}(N)$ has real multiplication over
$\operatorname{\mathbf{Q}}$, so the Picard number is at least $g$. Using
Magma, we computed the $L$-function of the corresponding newforms to show that
the analytic rank is $g$, so the work of Gross–Zagier and Kolyvagin–Logachev
proves that the rank of $J(\operatorname{\mathbf{Q}})$ is exactly $g$. For the
genus 2 examples, we also applied two-descent on $J_{0}^{+}(N)$, as
implemented in Magma, to have an independent check.

The curves $X_{0}^{+}(N)$ have good reduction away from $N$, but in contrast
to $X^{+}_{\rm s}(13)$ and $X_{S_{4}}(13)$, they do not have potentially good
reduction at $N$. Nevertheless, the following result implies that when
applying quadratic Chabauty, there are no non-trivial contributions to the
height away from $p$.

######  Lemma 4.2.

There is a regular semi-stable model $\mathcal{X}_{0}^{+}(N)$ of
$X_{0}^{+}(N)$ over $\operatorname{\mathbf{Z}}_{N}$ whose special fibre has a
unique irreducible component. In particular, the local height $h_{N}$ is
trivial on $X_{0}^{+}(\operatorname{\mathbf{Q}}_{N})$.

###### Proof.

Let $\mathcal{X}_{0}(N)$ be the Deligne–Mumford model for $X_{0}(N)$ over
$\mathrm{Spec}\operatorname{\mathbf{Z}}$. If $N=2$, the result is easily
checked. If $N>2$, it follows from Raynaud [Ray90, Proposition 5] that the
quotient $\mathcal{X}_{0}^{+}(N)\colonequals\mathcal{X}_{0}(N)/w_{N}$ is a
semi-stable model for $X_{0}^{+}(N)$, and we have

$\operatorname{\mathrm{H}}^{1}\left(\langle
w_{N}\rangle,\mathfrak{m}\right)=0.$

This implies that
$\mathcal{O}_{\mathcal{X}_{0}(N)^{+}}/\mathfrak{m}\simeq\left(\mathcal{O}_{\mathcal{X}_{0}(N)}/\mathfrak{m}\right)^{w_{N}}$,
and hence the special fibre of $\mathcal{X}_{0}^{+}(N)$ satisfies
$\mathcal{X}_{0}^{+}(N)_{s}=\mathcal{X}_{0}(N)_{s}/w_{N}$. The Atkin–Lehner
involution swaps the two components of $\mathcal{X}_{0}(N)_{s}$, and it acts
as Frobenius on the supersingular points. Therefore, the quotient is a
projective line, with an ordinary double point for every conjugate pair of
supersingular $j$-invariants in
$\operatorname{\mathbf{F}}_{N^{2}}\backslash\operatorname{\mathbf{F}}_{N}$.
Since $\mathcal{X}_{0}(N)$ is regular outside
$j=0,1728\in\operatorname{\mathbf{F}}_{N}$, the model $\mathcal{X}_{0}^{+}(N)$
must also be regular. It follows from Theorem 3.2 that $h_{N}$ is trivial. ∎

Finally, we checked for all $N$ in (4.1) and in (4.2) that the Jacobian is
absolutely simple by finding a prime $q$ of good reduction such that
$J_{\operatorname{\mathbf{F}}_{q}}$ is absolutely simple, using the criterion
of Howe and Zhu [HZ02, Proposition 3].

######  Remark 4.3.

Adžaga, Arul, Beneish, Chen, Chidambaram, Keller, and Wen have recently used
our code to compute the rational points on all prime level curves
$X_{0}^{+}(N)$ having genus between 4 and 6. The main difficulty was the
construction of suitable affine patches, see Remark 3.6.

####  4.2.1. Genus 2

The rational points on $X_{0}^{+}(N)$ for $N=67,73,103$ were computed by Best,
Bianchi, Lawrence, Triantafillou and the first-, third- and fifth-named
authors in [BBB+]. Using a combination of quadratic Chabauty and the
Mordell–Weil sieve, it is shown there that
$X_{0}^{+}(67)(\operatorname{\mathbf{Q}})$ contains no exceptional points and
that the sets $X_{0}^{+}(73)(\operatorname{\mathbf{Q}})$ and
$X_{0}^{+}(103)(\operatorname{\mathbf{Q}})$ both contain one pair of
exceptional points each.

The remaining prime level genus 2 curves $X_{0}^{+}(107)$, $X_{0}^{+}(167),$
and $X_{0}^{+}(191)$ are more challenging, because they do not have
sufficiently many rational points to solve for the height pairing using
Nekovář’s construction, so we need to compute heights between divisors. In all
cases, we find that the quadratic Chabauty function $\rho=h-h_{p}$ has
$p$-adic zeroes that do not come from a rational point; to verify this, we
have to apply the Mordell–Weil sieve.

######  Example 4.4.

We discuss our computations for the example $X\colonequals X_{0}^{+}(107)$ in
some detail. An affine equation for $X$ is given by

(4.3) $y^{2}=-3x^{6}-4x^{5}-2x^{4}+2x^{3}+5x^{2}+2x+1$

with small rational points $(\pm 1,\pm 1),\infty_{\pm}$. These do not suffice
to determine the height pairing as a bilinear pairing, so we resort to the
method discussed in §3.3.1 instead. We look for a prime $p$ of good reduction
such that

  * •

there is a unique $\operatorname{\mathbf{Q}}_{p}$-rational Weierstrass disk,
and it does not contain known rational points,

  * •

the Hecke operator $T_{p}$ generates the Hecke algebra, and

  * •

$p$ is suitable for the Mordell–Weil sieve.

For $p=61$, the first two conditions are satisfied; moreover, we have

$J(\operatorname{\mathbf{F}}_{229})\simeq\faktor{\operatorname{\mathbf{Z}}}{(4\cdot
61)\operatorname{\mathbf{Z}}}\times\faktor{\operatorname{\mathbf{Z}}}{(4\cdot
61)\operatorname{\mathbf{Z}}\,,}$

and since
$J(\operatorname{\mathbf{F}}_{61})\simeq\operatorname{\mathbf{Z}}/(31\cdot
151)\operatorname{\mathbf{Z}}$ has relatively smooth order, this prime is
suitable for our algorithm.

Step (1): Rather than working directly with the model (4.3), we move the
points at infinity to $(0,\pm 1)$, resulting in the model

$y^{2}=-3x^{6}-4x^{5}-2x^{4}+2x^{3}+5x^{2}+2x+1\equalscolon f(x),$

which has no points at infinity defined over $\operatorname{\mathbf{Q}}_{61}$,
so that we only need to run our algorithm for one affine patch.

Step (2): We compute the following symplectic basis of
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}})$:

$\displaystyle\omega_{0}=-\frac{\,dx}{y},\;\omega_{1}=\frac{x\,dx}{y},\;\omega_{2}=\frac{\left(1+3x+3x^{2}\right)x^{2}\,dx}{9y},\;\omega_{3}=\frac{(1+2x^{2}+3x^{3})\,dx}{18y}.$

Step (3): We determine the action of Frobenius on
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{61}})$
using Tuitman’s algorithm; then we get the Hecke operator $T_{61}$ on
$\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{{61}}})$
from Eichler–Shimura.

Step (4): Since the prime 61 is ordinary, we may use the unit root splitting
of the Hodge filtration.

Step (5): Using Step (3), we find the matrix representation

(4.4) $Z=(\operatorname{\mathrm{Tr}}(T_{{61}})\cdot
I_{4}-4T_{{61}})C^{-1}=\left(\begin{array}[]{cccc}0&2/3&-2&4\\\ -2/3&0&4&2\\\
2&-4&0&0\\\ -4&-2&0&0\\\ \end{array}\right)\,,$

with respect to the basis $(\omega_{0},\ldots,\omega_{3})$, where $C$ is the
matrix of the cup product on this basis. In other words,

$Z=\sum_{i,j}Z_{ij}\omega_{i}\otimes\omega_{j}\in\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{61}})\otimes\operatorname{\mathrm{H}}^{1}_{\operatorname{\scriptstyle\mathrm{dR}}}(X_{\operatorname{\mathbf{Q}}_{61}})\,$

corresponds to a nontrivial cycle
$Z\in\mathrm{Ker}(\operatorname{\mathrm{NS}}(J)\longrightarrow\operatorname{\mathrm{NS}}(X))$.

Step (6a): By Lemma 4.2, the local heights $h_{\ell}(\mathrm{A}(x))$ are
trivial for $\ell\neq{61}$, so $\Upsilon=\\{0\\}$.

Step (6b): The Hodge filtration for $Z$ is given by
$\gamma_{\operatorname{\mathrm{Fil}}}=-4x-4$ and
$\beta_{\operatorname{\mathrm{Fil}}}=0$. After computing the Frobenius
structure, we obtain a power series expansion of the function $x\mapsto
h_{61}(\mathrm{A}(x))$ on all residue disks of
$X(\operatorname{\mathbf{Q}}_{61})$, except for the disks at infinity and the
unique Weierstrass disk containing points that reduce to $(31,0)$.

Step (6c): The points $P,Q\in J(\operatorname{\mathbf{Q}})$ with respective
Mumford representations $(x^{2}+x,1)$ and $(x^{2}+1,2x-1)$ are independent,
generating a subgroup of $J(\operatorname{\mathbf{Q}})$ of index 2. To solve
for the height pairing via the approach of §3.3.1, we first need divisor
representatives with support in distinct non-Weierstrass residue disks. Let
$E$ be the degree 2 divisor on $X$ cut out by the functions $x^{2}+1$ and
$2x-1$ and let $E^{\prime}$ be its image under the action induced by the
hyperelliptic involution. We set

$\displaystyle D_{1}$
$\displaystyle=(0,1)+(-1,1)-\operatorname{div}_{0}(x-1),\quad
D^{\prime}_{1}=(0,-1)+(-1,-1)-\operatorname{div}_{0}(x-7)$ $\displaystyle
D_{2}$ $\displaystyle=E-\operatorname{div}_{0}(x-7),\quad
D^{\prime}_{2}=E^{\prime}-\operatorname{div}_{0}(x-1)\,.$

Then we have $h(P,Q)=\sum_{v}h_{v}(D_{1},D_{2})$ and

$\displaystyle h(P,P)$
$\displaystyle=-\sum_{v}h_{v}(D_{1},D_{1}^{\prime})\,,\quad
h(Q,Q)=-\sum_{v}h_{v}(D_{2},D_{2}^{\prime})\,.$

These divisors all split over $\operatorname{\mathbf{Q}}_{61}$, so we can
compute the height pairings $h_{61}(D_{1},D_{2})$,
$h_{61}(D_{1},D^{\prime}_{1})$, and $h_{61}(D_{2},D^{\prime}_{2})$, working on
a monic odd degree model over $\operatorname{\mathbf{Q}}_{61}$. Using Magma’s
implementation of the algorithm described in [Mül14], we also find

$\displaystyle\sum_{\ell\neq{61}}h_{\ell}(D_{1},D^{\prime}_{1})$
$\displaystyle=-2\log_{61}2+2\log_{61}3-\log_{61}7\,,$
$\displaystyle\sum_{\ell\neq{61}}h_{\ell}(D_{1},D_{2})$
$\displaystyle=2\log_{61}2-2\log_{61}3+\log_{61}7,$
$\displaystyle\sum_{\ell\neq{61}}h_{\ell}(D_{2},D^{\prime}_{2})$
$\displaystyle=3\log_{61}2-\log_{61}5\,,$

and we conclude that

$h=\alpha_{00}g_{00}+\alpha_{01}g_{01}+\alpha_{11}g_{11}\,,$

where

$\displaystyle\alpha_{00}$ $\displaystyle=58\cdot 61^{-1}+19+2\cdot 61+43\cdot
61^{2}+O(61^{3})\,,$ $\displaystyle\alpha_{01}$ $\displaystyle=43\cdot
61^{-1}+48+44\cdot 61+41\cdot 61^{2}+O(61^{3})\,,$ $\displaystyle\alpha_{11}$
$\displaystyle=49\cdot 61^{-1}+13+55\cdot 61+2\cdot 61^{2}+O(61^{3})\,.$

Steps (6d) – (7): Combining the functions resulting from Steps (6b) and (6c),
we find a power series expansion of the quadratic Chabauty function

$\rho=h-h_{61}\colon
X(\operatorname{\mathbf{Q}}_{61})\to\operatorname{\mathbf{Q}}_{61}$

in all affine non-Weierstrass disks. We find that indeed $\rho$ vanishes on
the known rational points, and that these are simple zeroes of $\rho$.

In addition, the quadratic Chabauty function $\rho$ vanishes to multiplicity
one on 82 points in $X(\operatorname{\mathbf{Q}}_{61})$ that do not appear to
be rational. As described in §3.4, these correspond to cosets of
$61^{2}J(\operatorname{\mathbf{Q}})$, and our implementation of the
Mordell–Weil sieve shows that the image of these cosets does not intersect the
image of $X(\operatorname{\mathbf{F}}_{229})$ inside
$J(\operatorname{\mathbf{F}}_{229})/61^{2}J(\operatorname{\mathbf{F}}_{229})$.
Hence these additional zeroes do not come from a rational point.

Recall that there are no $\operatorname{\mathbf{Q}}_{61}$-rational points at
infinity, so it only remains to show that there are no rational points in the
Weierstrass disk. To this end, we show that for

$S=\\{41,83,641,1697,4057,10853\\},$

the image of the reduction of this disk does not intersect

$\mathrm{im}(\beta_{S,\,2\cdot 61})\subset\prod_{v\in
S}\faktor{J(\operatorname{\mathbf{F}}_{v})}{(2\cdot
61)J(\operatorname{\mathbf{F}}_{v})}\,.$

This completes the proof that $\\#X(\operatorname{\mathbf{Q}})=6$. According
to Galbraith [Gal96], these points are all cusps or CM points.

######  Example 4.5.

We prove that the curve

$X_{0}^{+}(167)\colon y^{2}=x^{6}-4x^{5}+2x^{4}-2x^{3}-3x^{2}+2x-3$

only contains the four obvious rational points $\\{(-1,\pm
1),\infty_{\pm}\\}.$ In our computation, we use our quadratic Chabauty
algorithm for $p=7$ and the Mordell–Weil sieve, following the same strategy as
in Example 4.4. The verification that the additional solutions of the
resulting $p$-adic functions are not rational was the most challenging
Mordell–Weil sieve computation we encountered in our work; it required the
auxiliary integer $5\cdot 11\cdot 19$ and the set of good primes

$S=\\{3,5,19,29,31,67,263,281,283,769,1151,2377,3847,4957,67217\\}.$

######  Example 4.6.

A model for $X_{0}^{+}(191)$ is given by

$y^{2}=x^{6}+2x^{4}+2x^{3}+5x^{2}-6x+1\,.$

We use quadratic Chabauty for $p=31$ together with the Mordell–Weil sieve
exactly as above to show that

$X_{0}^{+}(191)(\operatorname{\mathbf{Q}})=\\{(0,\pm 1),(2\pm
11),\infty_{\pm}\\}.$

####  4.2.2. Genus 3

We apply our algorithm to show that the rational points on the curves
$X_{0}^{+}(N)$ for $N$ as in (4.2) are precisely the ones already found by
Galbraith in [Gal02]. All curves in our list are non-hyperelliptic and they
have the convenient feature that they have sufficiently many rational points,
so no heights on divisors need to be computed. We always find two independent
cycles in
$\mathrm{Ker}(\operatorname{\mathrm{NS}}(J)\longrightarrow\operatorname{\mathrm{NS}}(X))$,
and, as expected, the common zero set of the corresponding quadratic Chabauty
functions consists precisely of the rational points found by Galbraith.

######  Theorem 4.7.

Let $N$ be a prime such that $X_{0}^{+}(N)$ has genus 3. Then the rational
points on $X_{0}^{+}(N)$ are as below. In particular, all rational points are
either cusps or CM points, with discriminant $\Delta$.

######  Example 4.8.

A model for $X_{0}^{+}(97)$ is given by

$zx^{3}+(-y^{2}+zy)x^{2}+(-y^{3}-zy^{2}-z^{3})x+(zy^{3}+z^{2}y^{2})=0.$

Using our algorithm for $p=5$, we find that the rational points are as
follows:

$\Delta$ | Point
---|---
cusp | $(1:0:0)$
$-3$ | $(-2:1:1)$
$-4$ | $(-1:0:1)$
$-8$ | $(0:0:1)$
$-11$ | $(0:1:0)$
$-12$ | $(0:-1:1)$
$-16$ | $(1:0:1)$
$-27$ | $(1:1:1)$
$-43$ | $(-1:1:0)$
$-163$ | $(5:3:2)$

######  Example 4.9.

A model for $X_{0}^{+}(109)$ is given by

$zx^{3}+(zy+z^{2})x^{2}+(-y^{3}-zy^{2}-z^{3})x+(-zy^{3}-3z^{2}y^{2}-2z^{3}y)=0.$

Using our algorithm for $p=7$, we find that the rational points are as
follows:

$\Delta$ | Point
---|---
cusp | $(1:0:0)$
$-3$ | $(-2:1:2)$
$-4$ | $(0:-2:1)$
$-7$ | $(0:-1:1)$
$-12$ | $(0:1:0)$
$-16$ | $(0:0:1)$
$-27$ | $(-1:-1:1)$
$-28$ | $(-2:1:1)$
$-43$ | $(1:-1:1)$

######  Example 4.10.

A model for $X_{0}^{+}(113)$ is given by

$zx^{3}+(-y^{2}-z^{2})x^{2}+(y^{3}+z^{3})x+(-2z^{2}y^{2}+z^{3}y)=0.$

Using our algorithm for $p=7$, we find that the rational points are as
follows:

$\Delta$ | Point
---|---
cusp | $(1:0:0)$
$-4$ | $(2:2:1)$
$-7$ | $(0:1:0)$
$-8$ | $(1:1:1)$
$-11$ | $(1:1:0)$
$-16$ | $(0:0:1)$
$-28$ | $(0:1:2)$
$-163$ | $(5:3:1)$

######  Example 4.11.

A model for $X_{0}^{+}(127)$ is given by

$zx^{3}+(-y^{2}-3z^{2})x^{2}+(y^{3}-z^{2}y+4z^{3})x+(2zy^{3}-3z^{2}y^{2}+3z^{3}y-2z^{4})=0.$

Using our algorithm for $p=11$, we find that the rational points are as
follows:

$\Delta$ | Point
---|---
cusp | $(1:0:0)$
$-3$ | $(5:3:2)$
$-7$ | $(2:1:1)$
$-12$ | $(1:1:0)$
$-27$ | $(1:0:1)$
$-28$ | $(0:1:1)$
$-43$ | $(0:1:0)$
$-67$ | $(4:2:1)$

######  Example 4.12.

A model for $X_{0}^{+}(139)$ is given by

$zx^{3}+(-y^{2}+zy)x^{2}+(-y^{3}-2zy^{2}-3z^{2}y-z^{3})x+(y^{4}+zy^{3}+z^{2}y^{2}+z^{3}y)=0.$

Using our algorithm for $p=13$, we find that the rational points are as
follows:

$\Delta$ | Point
---|---
cusp | $(1:0:0)$
$-3$ | $(4:-3:1)$
$-8$ | $(0:0:1)$
$-12$ | $(0:-1:1)$
$-19$ | $(1:-1:1)$
$-27$ | $(1:0:1)$
$-43$ | $(-1:0:1)$

######  Example 4.13.

A model for $X_{0}^{+}(149)$ is given by

$zx^{3}-y^{2}x^{2}+(y^{3}+zy^{2}-2z^{2}y-z^{3})x+(-y^{4}+zy^{3}+z^{2}y^{2}-z^{3}y)=0.$

Using our algorithm for $p=11$, we find that the rational points are as
follows:

$\Delta$ | Point
---|---
cusp | $(1:0:0)$
$-4$ | $(-1:0:1)$
$-7$ | $(0:1:1)$
$-16$ | $(1:0:1)$
$-19$ | $(0:0:1)$
$-28$ | $(0:-1:1)$
$-67$ | $(2:2:1)$

######  Example 4.14.

A model for $X_{0}^{+}(151)$ is given by

$zx^{3}+(-2zy+z^{2})x^{2}+(-y^{3}+2zy^{2})x+(-zy^{3}+3z^{2}y^{2}-z^{3}y-2z^{4})=0.$

Using our algorithm for $p=19$, we find that the rational points are as
follows:

$\Delta$ | Point
---|---
cusp | $(1:0:0)$
$-3$ | $(-2:-2:1)$
$-7$ | $(0:1:0)$
$-12$ | $(0:2:1)$
$-27$ | $(1:1:1)$
$-28$ | $(2:3:2)$
$-67$ | $(1:0:1)$
$-163$ | $(3:2:1)$

######  Example 4.15.

A model for $X_{0}^{+}(179)$ is given by

$zx^{3}+(-2zy-z^{2})x^{2}+(-y^{3}-zy^{2}-2z^{2}y-z^{3})x+(-zy^{3}+z^{3}y)=0.$

Using our algorithm for $p=7$, we find that the rational points are as
follows:

$\Delta$ | Point
---|---
cusp | $(1:0:0)$
$-7$ | $(0:-1:1)$
$-8$ | $(0:1:0)$
$-11$ | $(0:0:1)$
$-28$ | $(0:1:1)$
$-163$ | $(-2:2:1)$

######  Example 4.16.

A model for $X_{0}^{+}(239)$ is given by

$zx^{3}+(-y^{2}+zy+z^{2})x^{2}+(-y^{3}-zy^{2}-z^{2}y)x+(y^{4}+3zy^{3}+2z^{2}y^{2}+z^{3}y)=0.$

Using our algorithm for $p=19$, we find that the rational points are as
follows:

$\Delta$ | Point
---|---
cusp | $(1:0:0)$
$-7$ | $(-1:0:1)$
$-19$ | $(0:0:1)$
$-28$ | $(1:-2:1)$
$-43$ | $(1:-1:1)$

###  4.3. Genus 2 curves in Mazur’s Program B

In this section, we determine the rational points on two genus 2 curves that
were communicated to us by David Zureick-Brown. They arise in the work of
Rouse, Sutherland, and Zureick-Brown on Mazur’s Program B as modular curves
$X_{H}=X(25)/H$, where $\Gamma(25)\subset
H\subset\operatorname{\mathrm{GL}}_{2}(\operatorname{\mathbf{Z}}_{5})$. Both
curves have the following properties:

  * •

They each have precisely two small rational points, good reduction away from
5, and potentially good reduction at 5.

  * •

Their Jacobians have real multiplication, no rational torsion, and
Mordell–Weil rank 2; they are both absolutely simple.

  * •

The Galois action on the 2-torsion field is $A_{5}$, which is too large for an
elliptic curve Chabauty computation.

We prove that $\\#X(\operatorname{\mathbf{Q}})=2$ using quadratic Chabauty and
the Mordell–Weil sieve, similar to the computation of
$X^{+}_{0}(107)(\operatorname{\mathbf{Q}})$ described in detail in Example
4.4.

######  Example 4.17.

A suitable affine model of the curve $X_{11}$ is given by

$X_{11}\colon y^{2}=-35x^{6}+310x^{5}-675x^{4}+750x^{3}-450x^{2}+140x-15.$

As in Example 4.4, we found the prime $p=61$ to be the most convenient one for
our computations. We determine the height pairing on the Jacobian using
divisors as in §3.3.1. The quadratic Chabauty function $\rho$ has 62 solutions
in addition to the rational ones. Applying the Mordell–Weil sieve with the
primes 7, 29, 257, and 3457, we show that these are in fact not rational; to
prove non-existence of rational points in the unique Weierstrass disk, we
sieve with the primes 31, 61, and 191. This shows that
$X_{11}(\operatorname{\mathbf{Q}})=\\{(1,\pm 5)\\}$.

######  Example 4.18.

We use the model

$X_{15}\colon y^{2}=5x^{6}-50x^{4}-150x^{3}+25x^{2}+90x+25$

with small rational points $(0,\pm 5)$. Again we run quadratic Chabauty for a
fairly large prime, namely $p=71$, resulting in 78 additional zeroes in
$X(\operatorname{\mathbf{Q}}_{71})$ that we show to be non-rational by sieving
with the primes $7,43,83,101,$ and $1399$. There is an additional final
sieving to show there are no rational points in the Weierstrass disk. We
conclude that $\\#X_{15}(\operatorname{\mathbf{Q}})=2$.

###  4.4. Two curves with non-trivial local heights away from $p$

We compute the rational points on two genus 2 curves $C_{188}$ and $C_{161}$
considered in [FLS+01]. In both cases, the Jacobian of $C_{N}$ is an optimal
quotient of $J_{0}(N)$, so it has real multiplication and Picard number 2. The
Mordell–Weil ranks are both 2 as well, and the rational torsion subgroup is
trivial. In [FLS+01] empirical evidence was presented that the full conjecture
of Birch and Swinnerton-Dyer holds for both Jacobians. The curves themselves
have good reduction away from $N$.

So far, all curves whose rational points were computed via quadratic Chabauty
had trivial contributions away from $p$, except for the bielliptic examples in
[BD18, BD20]. However, for those examples it was possible to find the local
contributions away from $p$ by relating them to local heights on the elliptic
quotients. In the examples presented here, we compute these contributions
using Theorem 3.2. As discussed in §3.1, we do not have a general algorithm
for the action induced by an endomorphism on étale cohomology. Nevertheless,
we show below that we can sometimes derive sufficient information from Theorem
3.2 to pin down the local contributions precisely, by computing the local
heights at $p$ for known rational points and by exploiting the bilinearity of
the global height pairing.

We include these examples to illustrate the practicality of our algorithms.
However, we note that the rational points on both curves can be computed by
combining covering collections with elliptic curve Chabauty. For $C_{188}$
this was pointed out to us by Nils Bruin, and for $C_{161}$, this computation
is due to Bars, Gonzalez, and Xarles [BGX20].

######  Example 4.19.

We first consider the genus 2 curve

(4.5) $C_{188}\colon y^{2}=x^{5}-x^{4}+x^{3}+x^{2}-2x+1\,.$

Over $\operatorname{\mathbf{Z}}_{47}$, it has a regular semistable model whose
special fibre is a curve of genus 1 with a node, so $h_{47}$ is trivial by
Theorem 3.2. However, as we shall see, there are non-trivial contributions to
the local height at 2.

The integral points on $C_{188}$ over $\operatorname{\mathbf{Q}}(\sqrt{-3})$
were computed in [BBBM, Example 6.5]. In the present work, we show that

(4.6) $C_{188}(\operatorname{\mathbf{Q}})=\\{(0,\pm 1),(1,\pm 1),(-1,\pm
1),(2,\pm 5),(4,\pm 29),\infty\\}.$

For our computations, we use the good ordinary prime $p=3$, the base point
$b=(1,1)$, and a cycle $Z$ constructed from the Hecke operator $T_{3}$ as in
(4.4).

Recall from Example 3.3 that there is a regular semistable model over
$K=\operatorname{\mathbf{Q}}_{2}(\sqrt[3]{2})$ and that the corresponding
metric graph $\Gamma_{\mathrm{reg}}$ is a line segment. The two genus one
vertices $v_{0}$ and $v_{1}$ have pre-images

$\mathcal{U}_{0}\colonequals\\{P\in
C_{188}(\operatorname{\mathbf{Q}}_{2}):\operatorname{\mathrm{ord}}_{2}(x(P))>0\\}\;,\;\mathcal{U}_{1}\colonequals\\{P\in
C_{188}(\operatorname{\mathbf{Q}}_{2}):\operatorname{\mathrm{ord}}_{2}(x(P))=0\\},$

respectively. The set

$\mathcal{U}_{2}\colonequals\\{P\in
C_{188}(\operatorname{\mathbf{Q}}_{2}):\operatorname{\mathrm{ord}}_{2}(x(P))<0\\}$

maps to the midpoint $v_{2}$ of the line segment.

Since the function $j_{\Gamma}$ from Theorem 3.2 is affine linear and vanishes
at $v_{1}$, there is a constant $c$ such that for all $x\in
C_{188}(\operatorname{\mathbf{Q}}_{2})$ we have

$h_{2}(\mathrm{A}(P))=m(P)\cdot c,$

where

$m(P)=\begin{cases}$2$,&\;\textrm{when $x(P)$ is divisible by 2},\\\
$0$,&\;\textrm{when $x(P)$ is a $2$-adic unit},\\\ $1$,&\;\textrm{when $x(P)$
is non-integral}.\end{cases}$

One could determine $c$ by further computing the trace of $Z$ acting on the
cohomology of the two genus one curves in the special fibre of the regular
model computed above. Instead, we determine $c$ by computing local heights at
3, because in this example there is a unique choice of $c$ such that

$h_{3}(\mathrm{A}(P))+m(P)\cdot c$

satisfies the bilinearity properties of a global height. We can reduce the
determination of $c$ to linear algebra by computing $h_{3}(\mathrm{A}(P))$ and
the values of a basis of the space of
$\operatorname{\mathrm{End}}^{0}(J)$-equivariant bilinear pairings for $3=g+1$
rational points $P\in X(\operatorname{\mathbf{Q}})$. We find
$c=\frac{4}{3}\log_{p}(2)$. Note that $c$ (but not $m(P)$) depends on the
choice of $Z$, and hence on the model, but that $c\cdot\log_{p}(2)^{-1}$ does
not depend on $p$.

To finish the computation of the rational points, we first solve for the
zeroes of the quadratic Chabauty function $\rho$ on the affine patch (4.5). In
order to deal with the Weierstrass disk at infinity, we repeat the computation
for the affine patch $Z=1$, and we apply the trick described in [BDM+19,
§5.5], changing the base point and reducing the computation of the Frobenius
structure to the computation of certain Coleman integrals.

We find that $\rho$ vanishes on the known rational points and that it vanishes
on 9 additional $\operatorname{\mathbf{Q}}_{3}$-points. Upon noticing that
$J(\operatorname{\mathbf{F}}_{43})\simeq(\operatorname{\mathbf{Z}}/54\operatorname{\mathbf{Z}})^{2}$,
we show that the reductions of the corresponding cosets of
$27J(\operatorname{\mathbf{Q}})$ do not meet the image of
$C_{188}(\operatorname{\mathbf{F}}_{43})$ in
$J(\operatorname{\mathbf{F}}_{43})/27J(\operatorname{\mathbf{F}}_{43})$. This
suffices to prove (4.6).

######  Example 4.20.

The curve $C_{161}$ has an affine equation

$\displaystyle C_{161}\colon y^{2}$
$\displaystyle=x^{6}+2x^{4}+6x^{3}+17x^{2}+18x+5$
$\displaystyle=(x^{3}-2x^{2}+3x+5)(x^{3}+2x^{2}+3x+1).$

As discussed in [BGX20], this is in fact a model for the modular curve
$X_{0}^{*}(161)\colonequals X_{0}(161)/\langle w_{7},w_{23}\rangle$. The curve
has the ten small rational points

(4.7) $\left(\frac{1}{4},\pm\frac{209}{64}\right),(-1,\pm 1),(1,\pm
7),\left(\frac{1}{2},\pm\frac{35}{8}\right),\pm\infty.$

Anticipating the need to use the Mordell–Weil sieve, we choose the prime
$p=29$ and the cycle $Z$ corresponding to the endomorphism
$4T_{29}-\operatorname{\mathrm{Tr}}(T_{29})I_{4}$.

The bad primes are $7$ and $23$. At both of these primes, the stable model has
special fibre a genus zero curve with two double points. Since the given
equation defines a regular semistable model over
$\operatorname{\mathbf{Z}}_{23}$, all of the $\operatorname{\mathbf{Q}}_{23}$
points lie on a common irreducible component of a minimal regular model over
$\operatorname{\mathbf{Z}}_{23}$, hence the height contribution at this prime
is zero by Theorem 3.2.

At 7, the first four rational points lie on the component reducing to the
smooth locus of the stable model. The sixth and seventh lie on the midpoint of
one edge, and the last two on another. We may again use Theorem 3.2 to
determine the possible values of $h_{7}(P)$, without computing the action of
our chosen correspondence on $\operatorname{\mathrm{H}}^{1}(\Gamma)$. Note
that in this case, the homology $\operatorname{\mathrm{H}}_{1}(\Gamma)$ is
simply generated by the two edges $e_{1},e_{2}$ corresponding to the two
singular points. Since $Z$ is trace zero on
$\operatorname{\mathrm{H}}_{1}(\Gamma)$, with respect to this basis, the
corresponding endomorphism must be of the form

$\left(\begin{array}[]{cc}a&b\\\ c&-a\\\ \end{array}\right).$

Then, by Theorem 3.2, the measure $\mu_{Z}$ is simply given by
$\frac{a}{2}(e_{1}-e_{2})$, since both edges have length 2. The image of
$X(\operatorname{\mathbf{Q}}_{7})$ in $\Gamma$ consists of the middle vertex
and the midpoints of the two edges, and hence if we take the basepoint
$(\frac{1}{4},\frac{209}{64})$ lying in the middle vertex, the values of
$j_{\Gamma}$ are simply $a,0,-a$.

We solve for $a$ using a 29-adic computation similar to the previous example,
and we find that $a=-4$. Finally, we apply the Mordell–Weil sieve with
$M=4\cdot 29^{3}$ and primes $199,373,463$ to show that the only 29-adic
points in the zero set of $\rho$ modulo $29^{3}$ are the rational points
listed in (4.7). This proves that these are indeed the only rational points on
$C_{161}$.

## References

  * [BB12] J. S. Balakrishnan and A. Besser.  Computing local $p$-adic height pairings on hyperelliptic curves.  IMRN, 2012(11):2405–2444, 2012.
  * [BB15] Jennifer S. Balakrishnan and Amnon Besser.  Coleman-Gross height pairings and the $p$-adic sigma function.  J. Reine Angew. Math., 698:89–104, 2015.
  * [BB19] J. S. Balakrishnan and A. Besser.  Errata for “Computing local $p$-adic height pairings on hyperelliptic curves".  http://math.bu.edu/people/jbala/cg_heights_errata.pdf, 2019.
  * [BBB+] Jennifer S. Balakrishnan, Alex J. Best, Francesca Bianchi, Brian Lawrence, J. Steffen Müller, Nicholas Triantafillou, and Jan Vonk.  Two recent $p$-adic approaches towards the (effective) Mordell conjecture.  In Regulators IV: An international conference on arithmetic L-functions and differential geometric methods, volume 338 of Progr. Math. Birkhäuser Boston, Boston, MA.  To appear.
  * [BBBM] J.S. Balakrishnan, A. Besser, F. Bianchi, and J.S. Müller.  Explicit quadratic Chabauty over number fields.  Israel J. Math.  To appear.
  * [BBM16] Jennifer S. Balakrishnan, Amnon Besser, and J. Steffen Müller.  Quadratic Chabauty: $p$-adic heights and integral points on hyperelliptic curves.  J. Reine Angew. Math., 720:51–79, 2016.
  * [BBM17] Jennifer S. Balakrishnan, Amnon Besser, and J. Steffen Müller.  Computing integral points on hyperelliptic curves using quadratic Chabauty.  Math. Comp., 86(305):1403–1434, 2017.
  * [BC14] Barinder S. Banwait and John E. Cremona.  Tetrahedral elliptic curves and the local-global principle for isogenies.  Algebra & Number Theory, 8(5):1201–1229, 2014.
  * [BCP97] W. Bosma, J. Cannon, and C. Playoust.  The Magma algebra system I: The user language.  J. Symb. Comp, 24(3-4):235–265, 1997.
  * [BD18] J.S. Balakrishnan and N. Dogra.  Quadratic Chabauty and rational points I: $p$-adic heights.  Duke Math. J., 167(11):1981–2038, 2018.
  * [BD19] A. Betts and N. Dogra.  The local theory of unipotent Kummer maps and refined Selmer schemes.  ArXiv preprint, arXiv:1909.05734v2, 2019.
  * [BD20] J.S. Balakrishnan and N. Dogra.  Quadratic Chabauty and rational points II: Generalised height functions on Selmer varieties.  IMRN, 2020.  rnz362.
  * [BDCKW18] Jennifer S. Balakrishnan, Ishai Dan-Cohen, Minhyong Kim, and Stefan Wewers.  A non-abelian conjecture of Tate-Shafarevich type for hyperbolic curves.  Math. Ann., 372(1-2):369–428, 2018.
  * [BDM+] J.S. Balakrishnan, N. Dogra, J.S. Müller, J. Tuitman, and J. Vonk.  Magma code.  https://github.com/steffenmueller/QCMod.
  * [BDM+19] J.S. Balakrishnan, N. Dogra, J.S. Müller, J. Tuitman, and J. Vonk.  Explicit Chabauty–Kim for the split Cartan modular curve of level $13$.  Annals of Math., 189(3), 2019.
  * [Bes04] A. Besser.  The $p$-adic height pairings of Coleman–Gross and of Nekovář.  In Number Theory, volume 36 of CRM Proc. Lect. Notes, pages 13–25. Amer. Math. Soc., 2004.
  * [BGX20] Francesc Bars, Josep González, and Xavier Xarles.  Hyperelliptic parametrizations of $\mathbb{Q}$-curves.  Ramanujan J., 2020.
  * [BKK11] Jennifer S. Balakrishnan, Kiran S. Kedlaya, and Minhyong Kim.  Appendix and erratum to “Massey products for elliptic curves of rank 1”.  J. Amer. Math. Soc., 24(1):281–291, 2011.
  * [BO83] P. Berthelot and A. Ogus.  F-isocrystals and de Rham cohomology I.  Invent. Math., 72:159–199, 1983.
  * [vBHM20] Raymond van Bommel, David Holmes, and J. Steffen Müller.  Explicit arithmetic intersection theory and computation of Néron-Tate heights.  Mathematics of Computation, 89(321):395–410, 2020.
  * [Box20] J. Box.  Quadratic points on modular curves with infinite Mordell–Weil group.  Math. Comp., 2020.
  * [BS10] Nils Bruin and Michael Stoll.  The Mordell-Weil sieve: proving non-existence of rational points on curves.  LMS J. Comput. Math., 13:272–306, 2010.
  * [CG89] Robert F. Coleman and Benedict H. Gross.  $p$-adic heights on curves.  In Algebraic number theory, volume 17 of Adv. Stud. Pure Math., pages 73–81. Academic Press, Boston, MA, 1989.
  * [Cla03] Pete L. Clark.  Rational points on Atkin-Lehner quotients of Shimura curves.  ProQuest LLC, Ann Arbor, MI, 2003.  Thesis (Ph.D.)–Harvard University.
  * [CMSV19] Edgar Costa, Nicolas Mascot, Jeroen Sijsling, and John Voight.  Rigorous computation of the endomorphism ring of a Jacobian.  Math. Comp., 88(317):1303–1339, 2019.
  * [DF] N. Dogra and S. Le Fourn.  Quadratic Chabauty for modular curves and modular forms of rank one.  Math. Ann. to appear.
  * [EL19] B. Edixhoven and G. Lido.  Geometric quadratic Chabauty.  ArXiv Preprint, arXiv:1910.10752, 2019.
  * [EP19] B. Edixhoven and P. Parent.  Semistable reduction of modular curves associated with maximal subgroups in prime level.  ArXiv Preprint, arXiv:1907.02418, 2019.
  * [FLS+01] E. Victor Flynn, Franck Leprévost, Edward F. Schaefer, William A. Stein, Michael Stoll, and Joseph L. Wetherell.  Empirical evidence for the Birch and Swinnerton-Dyer conjectures for modular Jacobians of genus 2 curves.  Math. Comp., 70(236):1675–1697, 2001.
  * [Gal96] S. D. Galbraith.  Equations for modular curves.  Oxford DPhil thesis, 1996.
  * [Gal99] Steven D. Galbraith.  Rational points on $X_{0}^{+}(p)$.  Experiment. Math., 8(4):311–318, 1999.
  * [Gal02] Steven D. Galbraith.  Rational points on $X^{+}_{0}(N)$ and quadratic $\mathbb{Q}$-curves.  J. Théor. Nombres Bordeaux, 14(1):205–219, 2002.
  * [Hol12] David Holmes.  Computing Néron-Tate heights of points on hyperelliptic Jacobians.  J. Number Theory, 132(6):1295–1305, 2012.
  * [HZ02] Everett W. Howe and Hui June Zhu.  On the existence of absolutely simple abelian varieties of a given dimension over an arbitrary field.  J. Number Theory, 92(1):139–163, 2002.
  * [Kim05] M. Kim.  The motivic fundamental group of $\mathbf{P}^{1}\backslash\\{0,1,\infty\\}$ and the theorem of Siegel.  Invent. Math., 161:629–656, 2005.
  * [Kim09] M. Kim.  The unipotent Albanese map and Selmer varieties for curves.  Publ. RIMS, 45:89–133, 2009.
  * [Kim10] M. Kim.  Massey products for elliptic curves of rank $1$.  J. Amer. Math. Soc., 23(3):725–747, 2010.
  * [KT08] M. Kim and A. Tamagawa.  The $l$-component of the unipotent Albanese map.  Math. Ann., 340(1):223–235, 2008.
  * [Lig77] G. Ligozat.  Courbes modulaires de niveau $11$.  In Modular Functions of One Variable V, volume 601 of Lecture Notes in Math., pages 149–237. Springer, Berlin, 1977.
  * [Maz77] B. Mazur.  Rational points on modular curves.  In Modular functions of one variable, V (Proc. Second Internat. Conf., Univ. Bonn, Bonn, 1976), pages 107–148. Lecture Notes in Math., Vol. 601, 1977.
  * [Mül14] J. Steffen Müller.  Computing canonical heights using arithmetic intersection theory.  Mathematics of Computation, 83(285):311–336, 2014.
  * [Nek93] J. Nekovář.  On $p$-adic height pairings.  In Séminaire de Théorie des Nombres, Paris 1990–1991, pages 127–202. Birkhäuser Boston, 1993.
  * [PY07] Pierre Parent and Andrei Yafaev.  Proving the triviality of rational points on Atkin-Lehner quotients of Shimura curves.  Math. Ann., 339(4):915–935, 2007.
  * [Ray90] M. Raynaud.  $p$-Groupes et réduction semi-stable des courbes.  In P. Cartier, editor, The Grothendieck Festschrift, vol. III, volume 88 of Progr. Math., pages 179–197. Birkhäuser, 1990.
  * [RZB15] J. Rouse and D. Zureick-Brown.  Elliptic curves over $\mathbb{Q}$ and 2-adic images of Galois.  Res. Number Theory, 1:Art. 12, 34, 2015.
  * [Sch99] Victor Scharaschkin.  Local-global problems and the Brauer-Manin obstruction.  ProQuest LLC, Ann Arbor, MI, 1999.  Thesis (Ph.D.)–University of Michigan.
  * [Ser72] Jean-Pierre Serre.  Propriétés galoisiennes des points d’ordre fini des courbes elliptiques.  Invent. Math., 15(4):259–331, 1972.
  * [Sik17] Samir Siksek.  Quadratic Chabauty for modular curves.  Arxiv preprint, 2017.
  * [Tui16] Jan Tuitman.  Counting points on curves using a map to $\mathbf{P}^{1}$.  Math. Comp., 85(298):961–981, 2016.
  * [Tui17] J. Tuitman.  Counting points on curves using a map to $\mathbb{P}^{1}$, II.  Finite Fields Appl., 45:301–322, 2017.
  * [Zha93] Shouwu Zhang.  Admissible pairing on a curve.  Invent. Math., 112(1):171–193, 1993.