Uniform bounds for the number of rational points\\ on hyperelliptic curves of small Mordell-Weil rank
Michael Stoll
We show that there is a bound depending only on~$g$ and~$[K:\Q]$ for the number of $K$-rational points on a hyperelliptic curve~$C$ of genus~$g$ over a number field~$K$ such that the Mordell-Weil rank~$r$ of its Jacobian is at most~$g-3$. If $K = \Q$, an explicit bound is $8(r + 4)(g - 1) + \max\{1, 4r\} \cdot g$. The proof is based on Chabauty's method; the new ingredient is an estimate for the number of zeros of a logarithm in a $p$-adic `annulus' on the curve, which generalizes the standard bound on disks. The key observation is that for a $p$-adic field~$k$, the set of $k$-points on~$C$ can be covered by a collection of disks and annuli whose number is bounded in terms of~$g$ (and~$k$). We also show, strengthening a recent result by Poonen and the author, that the lower density of hyperelliptic curves of odd degree over~$\Q$ whose only rational point is the point at infinity tends to~$1$ uniformly over families defined by congruence conditions, as the genus~$g$ tends to infinity.
1307.1773.tex
\documentclass[12pt]{amsart}
\usepackage{fullpage,url,amssymb,enumerate,colonequals}
\usepackage[all]{xy} % for complicated commutative diagrams, use pdf driver

\usepackage{color}

\newcommand{\Aff}{\mathbb{A}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\Gm}{\mathbb{G}_{\mathrm{m}}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\eps}{\varepsilon}
\newcommand{\calC}{\mathcal{C}}
\newcommand{\calJ}{\mathcal{J}}
\newcommand{\calO}{\mathcal{O}}
\DeclareMathOperator{\Log}{Log}
\DeclareMathOperator{\rank}{rank}
\newcommand{\smooth}{{\operatorname{smooth}}}
\newcommand{\tors}{{\operatorname{tors}}}
\newcommand{\unr}{{\operatorname{unr}}}
\newcommand{\rholog}{\rho \log}
\newcommand{\To}{\longrightarrow}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\uom}{\underline{\omega}}
\newcommand{\dashedarrow}{\dashrightarrow}
\newcommand{\calF}{\mathcal{F}}

\numberwithin{equation}{section}

\newtheorem{theorem}[equation]{Theorem}
\newtheorem{lemma}[equation]{Lemma}
\newtheorem{corollary}[equation]{Corollary}
\newtheorem{proposition}[equation]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[equation]{Definition}
\newtheorem{question}[equation]{Question}
\newtheorem{conjecture}[equation]{Conjecture}
\newtheorem{example}[equation]{Example}
\newtheorem{examples}[equation]{Examples}

\theoremstyle{remark}
\newtheorem{remark}[equation]{Remark}
\newtheorem{remarks}[equation]{Remarks}

\definecolor{darkgreen}{rgb}{0,0.5,0}
\usepackage[
%       draft,
        colorlinks, citecolor=darkgreen,
        backref,
        pdfauthor={Michael Stoll},
        pdftitle={Uniform bounds for the number of rational points %
                  on hyperelliptic curves of small Mordell-Weil rank},
]{hyperref}
\usepackage[alphabetic,backrefs,lite]{amsrefs} % for bibliography

\setlength{\parindent}{0mm}
\setlength{\parskip}{1ex plus 0.5ex}

\begin{document}

\title[Uniform bounds for rational points]%
      {Uniform bounds for the number of rational points\\
       on hyperelliptic curves of small Mordell-Weil rank}
%\subjclass[2010]{Primary 11G30; Secondary 14G25, 14G40, 14K15, 14K20}

\author{Michael Stoll}
\address{Mathematisches Institut,
         Universit\"at Bayreuth,
         95440 Bayreuth, Germany.}
\email{Michael.Stoll@uni-bayreuth.de}
\urladdr{http://www.computeralgebra.uni-bayreuth.de}

\date{March 15, 2015}

\begin{abstract}
  We show that there is a bound depending only on~$g$ and~$[K:\Q]$
  for the number of $K$-rational points on a hyperelliptic curve~$C$ of genus~$g$
  over a number field~$K$ such that the Mordell-Weil rank~$r$
  of its Jacobian is at most~$g-3$. If $K = \Q$, an explicit bound is
  $8(r + 4)(g - 1) + \max\{1, 4r\} \cdot g$.

  The proof is based on Chabauty's method; the new ingredient is an estimate
  for the number of zeros of a logarithm in a $p$-adic `annulus'
  on the curve, which generalizes the standard bound on disks.
  The key observation is that for a $p$-adic field~$k$, the set of
  $k$-points on~$C$ can be covered by a collection of disks and annuli
  whose number is bounded in terms of~$g$ (and~$k$).

  We also show, strengthening a recent result by Poonen and the author,
  that the lower density of hyperelliptic curves of odd degree over~$\Q$
  whose only rational point is the point at infinity tends to~$1$ uniformly
  over families defined by congruence conditions, as the genus~$g$ tends to infinity.
\end{abstract}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Introduction}

Since Faltings' proof~\cite{Faltings1983} of Mordell's conjecture, we know
that a curve of genus~$g \ge 2$ can have only finitely many rational points.
This raises the question whether there might be uniform bounds of some
sort on the number of rational points.
Caporaso, Harris, and Mazur~\cite{CaporasoHarrisMazur1997} have
shown that the validity of the Lang
conjecture on rational points on varieties of general type would imply
the existence of a bound depending only on the genus~$g$.
Pacelli~\cite{Pacelli1997} has extended this to curves over a number field~$K$,
with the bound only depending on the degree of~$K$, in addition to the genus.
(For function fields like $k = \F_p(t)$, the number of $k$-points on curves
over~$k$ of fixed genus is unbounded, however, see for
example~\cite{ConceicaoUlmerVoloch}.)
On the other hand,
considering an embedding of the curve into its Jacobian variety, which
identifies the set of rational points on the curve with the intersection
of the curve and the Mordell-Weil group, one can formulate the following purely
geometric statement (Mazur~\cite{Mazur1986}*{end of Section~III.2}
asks it as a question):

\begin{conjecture}[Uniform Mordell-Lang for curves] \label{Conj:uML}
  Given $g \ge 2$ and $r \ge 0$, there is a constant $N(g, r)$ such that
  for any curve $C$ over~$\C$ of genus~$g$ with an embedding $\iota \colon C \to J$
  into its Jacobian and for any subgroup $\Gamma \subset J(\C)$ of rank~$r$, one has
  $\#\iota^{-1}(\Gamma) \le N(g, r)$.
\end{conjecture}

That this number is finite for each individual curve and subgroup
follows from further work by Faltings~\cite{Faltings1994}.
Heuristic arguments suggest that such a uniform bound should exist.
The existence of such bounds has been shown for $k$ a \emph{function
field} if $C$ is not defined over the algebraic numbers by Buium~\cite{Buium1993}
(and also for function fields in characteristic~$p$ by
Buium and Voloch~\cite{BuiumVoloch}). In Section~\ref{S:ZBuML} below,
we will show that Conjecture~\ref{Conj:uML} is implied by (a special case of)
the Zilber-Pink conjecture; this implication can be seen as making precise the
`heuristic arguments' alluded to above.

A weaker variant of Conjecture~\ref{Conj:uML}, turning the geometric statement
into an arithmetic one, is the following.

\begin{conjecture} \label{Conj:dgr}
  Given $d \ge 1$, $g \ge 2$ and $r \ge 0$, there is a constant $R(d,g,r)$
  such that for any number field $K$ of degree~$d$ and any curve $C$ over~$K$
  of genus~$g$ with Jacobian~$J$ such that $\rank J(K) = r$, we have
  $\#C(K) \le R(d,g,r)$.
\end{conjecture}

This is formulated as a question again by Mazur in~\cite{Mazur2000}*{page~223} (allowing
the constant to depend on~$K$, not just on the degree~$d$).

However, to our knowledge, so far
not even a uniform (and unconditional) bound for the number of
\emph{rational torsion points} on curves of some fixed genus~$g \ge 2$
has been obtained! In this note, we finally obtain such a bound for
\emph{hyperelliptic} curves of genus at least~$3$.
More generally, we can show that on a hyperelliptic curve~$C$ of genus~$g$
over a number field of degree~$\le d$, there can be at most
$R(d,g,r)$ rational points mapping
into a given subgroup of rank $r \le g-3$ of the Mordell-Weil group,
where $R(d,g,r)$ depends only on~$d$, $g$ and~$r$. This
implies uniform bounds in terms of~$d$, $g$ and~$r$ only
for the number of rational points on such curves
as long as the Mordell-Weil rank is at most~$g-3$
and also for the number of rational points in a torsion packet when $g \ge 3$,
see Theorem~\ref{T:main-ratpoints-general} and Corollary~\ref{C:torsion}
below. In particular, this proves Conjecture~\ref{Conj:dgr} for hyperelliptic
curves when $r \le g-3$.

The proof is based on Chabauty's
method~\cites{Chabauty1941,Coleman1985chabauty,McCallum-Poonen2013,Stoll2006-chabauty},
whose `classical' version we now sketch.
If $C$ is a curve over~$\Q$, with Jacobian~$J$ and minimal regular model
$\calC$ over~$\Z_p$,
where the prime $p$ is sufficiently large and we assume
that $r = \rank J(\Q) < g$, then one can bound $\#C(\Q)$ by the number of
smooth $\F_p$-points on the special fiber of~$\calC$ plus~$2r$,
see~\cite{Katz-Zureick-Brown}. This bound is obtained as follows.
Consider the Chabauty-Coleman pairing (defined below in Section~\ref{S:notation})
\[ \Omega^1_J(\Q_p) \times J(\Q_p) \To \Q_p, \quad
   (\omega, P) \longmapsto \oint_O^P \omega
\]
This pairing is $\Q_p$-linear
in~$\omega$ and additive in~$P$; its kernel on the left is trivial. If $r < g$, then
there is a linear subspace $V \subset \Omega^1_J(\Q_p)$ of dimension at
least~$g-r \ge 1$ that annihilates the Mordell-Weil group $J(\Q) \subset J(\Q_p)$
under the pairing. Let $P_0 \in C(\Q)$ and use $P_0$ as basepoint
for an embedding $i \colon C \to J$. Then for all $P \in C(\Q)$ and
all $\omega \in V$, we have
\[ 0 = \oint_O^{i(P)} \omega = \oint_{P_0}^P i^* \omega \]
where $i^* \omega \in \Omega^1_C(\Q_p)$ is a regular differential on~$C$.
The integral on the right is defined by this equality.
One then shows (see for example~\cite{Stoll2006-chabauty}) that the number
of zeros of the function
\[ P \longmapsto \oint_{P_0}^P i^* \omega \]
on a $p$-adic residue disk of~$C$, which is the set of $p$-adic points reducing
mod~$p$ to a given smooth point on the special fiber of~$\calC$, is at most
one plus the number of zeros (counted with multiplicity) of~$\omega$ on
that residue disk. (Here we use that $p$ is large enough, otherwise the
bound has to be modified.) Choosing a `good' $\omega \in V$ for each residue disk
leads to the bound
\[ \#C(\Q) \le \#\calC(\F_p)^\smooth + 2r \]
mentioned earlier.

The problem with this approach is that the bound depends on the complexity
of the special fiber of~$\calC$, which is unbounded --- there can be
arbitrarily long chains of rational curves in the special fiber, which
can lead to an arbitrarily large number of smooth $\F_p$-points.
The idea for overcoming this problem is to parameterize the subset of~$C(\Q_p)$
corresponding to such a chain not by a union of (an unbounded number of) disks,
but by an `annulus'.
We can then obtain a bound for the number of
points in that subset that is independent of the number of residue disks.
Since both the number of such annuli and the number of remaining residue
disks are bounded in terms of the genus (and~$p$), we do obtain a uniform bound.
The price we have to pay is that on (at least some of) the annuli, we
need to impose additional linear conditions on the differential~$\omega$,
so that we need the space of differentials annihilating the relevant
subgroup of~$J(\Q_p)$ to be of dimension at least three. This translates
into the rank bound $r \le g-3$. The key result for our application
is Proposition~\ref{P:good-A}, which gives a precise comparison
of the abelian integral pulled back to an annulus and the $p$-adic
integral of the pulled-back $1$-form. It turns out that the difference
between the two is a linear function of the valuation.

We carry out this approach in the case of hyperelliptic curves.
Our method does in fact generalize to arbitrary curves as demonstrated
by ongoing work of Katz, Rabinoff and Zureick-Brown~\cite{KRZB}.

\subsection*{Acknowledgments}

The vague idea that one should be able to use Chabauty's method to prove
uniform upper bounds for the number of rational points had long been in
the author's mind, but was put aside as infeasible because of the
apparent problems described above. The new activity leading to the
results presented here was prompted by a question Manjul Bhargava
asked related to~\cite{PoonenStoll2014}: could we give a
family of odd degree hyperelliptic curves~$C$ of any genus, defined by
congruences, such that our method would not work for any curve
in the family? The intuition that this should not be possible for
large genus led to the idea of using integration on annuli to prove
that the image of $C(\Q_2)$ in~$\PP^{g-1}(\F_2)$ under the `$\rholog$'
map of~\cite{PoonenStoll2014} is bounded by a polynomial in~$g$.
This result (with a quadratic bound) is given in Section~\ref{S:rholog} below.
The idea then extended naturally to the original problem.
So I would like to thank Manjul for asking the right question.
I also wish to thank Amnon Besser for help with questions
about $p$-adic integration
and Stefan Wewers for answering my questions on stable models (which have
now been eliminated from the argument).
Dino Lorenzini was very helpful on the question (discussed in
Section~\ref{S:AG}) of how to bound
the number of `$\Aff^1$-components' in the special fiber of the
minimal regular model of a curve. Felipe Voloch provided some pointers
to the literature.
The idea for proving that Zilber-Pink implies uniform Mordell-Lang
for curves germinated upon hearing a talk by Umberto Zannier
at the joint \"OMG and DMV meeting in Innsbruck in September~2013 and
took shape while reading his book~\cite{ZannierBook} afterwards.
Padmavathi Srinivasan asked some questions that helped improve the
argument in the proof of Theorem~\ref{T:specialfiber}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Zilber-Pink implies uniform Mordell-Lang for curves} \label{S:ZBuML}

In~\cite{Pink2005preprint}*{Conjecture~6.1}, Pink formulates
a more general version of the following conjecture. It is a special case of
a conjecture on mixed Shimura varieties that belongs to a circle of ideas
usually referred to as the `Zilber-Pink conjecture(s)'.

\begin{conjecture}[Pink] \label{ConjPink}
  Let $\pi \colon A \to B$ be an algebraic family of abelian varieties over~$\C$.
  Consider an irreducible subvariety $X \subset A$ of dimension~$d$
  such that $X$ is not contained in any proper closed subgroup scheme of~$A$.
  Then the set of points $x \in X$ that are contained in a subgroup
  of~$A_{\pi(x)}$ of codimension $> d$ is not Zariski dense in~$X$.
\end{conjecture}

The idea behind this is that based on the dimensions, one would not expect
any intersection between $X$ and a subgroup scheme of codimension $> d$,
so intersection points are `unlikely' and should therefore form a `sparse'
subset of~$X$. See Zannier's book~\cite{ZannierBook} for background information
on the subject of `unlikely intersections'.

(Pink's original version is for families of semi-abelian varieties. However,
Bertrand~\cite{Bertrand2011preprint} gave a counterexample to this more general
formulation. It turns out that the semi-abelian version needs to be modified
to be compatible with the original conjecture on mixed Shimura varieties.)

In this section we show that Conjecture~\ref{ConjPink} implies Conjecture~\ref{Conj:uML}.
The strategy is similar to that employed by Caporaso, Harris, and
Mazur in~\cite{CaporasoHarrisMazur1997}.
Namely, we show that Pink's conjecture implies that if a curve has many
points whose differences generate a subgroup of bounded rank in the Jacobian,
then the points have algebraic dependencies, similar to what is implied by
`correlation' in the sense of~\cite{CaporasoHarrisMazur1997} under the
weak Lang conjecture.
In more or less the same way as in that paper, the result then follows.

Let $\pi \colon \calC \to B$ be a smooth family of irreducible curves
of genus~$g$ over~$\C$, with $B$ (say, irreducible) of dimension~$d$.
We write $\calJ \to B$ for the induced family of
Jacobians. Fix $r \ge 0$. Given $n > r$, consider the $n$-th fiber power
$\calC_B^n \to B$. We denote by $\phi$ the morphism
\[ \calC_B^n \To \calJ_B^{n-1}, \qquad
   (b; P_0, P_1, \ldots, P_{n-1}) \longmapsto (b; [P_1-P_0], \ldots, [P_{n-1}-P_0]) \,.
\]
Since, given $b \in B$, we can always choose the points in~$\calC_b$
in such a way that they are independent over the endomorphism ring of~$\calJ_b$,
it follows that $\phi(\calC_B^n)$ is not contained in a proper subgroup scheme
(even fiber-wise).
If the subgroup of the Jacobian generated by the point differences has
rank at most~$r$, then there are $n-1-r$ independent relations of the form
\[ a_{i1}[P_1-P_0] + a_{i2}[P_2-P_0] + \ldots + a_{i,n-1}[P_{n-1}-P_0] = 0 \]
with integers~$a_{ij}$. For points $(b; Q_1, \ldots, Q_{n-1}) \in \calJ_B^{n-1}$,
the relations
\[ a_{i1} Q_1 + a_{i2} Q_2 + \ldots + a_{i,n-1} Q_{n-1} = 0 \]
then define a subgroup scheme of~$\calJ_B^{n-1}$
containing $\phi(b; P_0, P_1, \ldots, P_{n-1})$
and of codimension $(n-1-r)g$.
The dimension of the image of~$\phi$ is at most $\dim \calC_B^n = d + n$.
So the codimension is greater than this dimension whenever
\begin{equation} \label{E:lb}
  n > \frac{d + g}{g-1} + \frac{g}{g-1} r \,.
\end{equation}
We conclude:

\begin{lemma} \label{L:start}
  Assume Conjecture~\ref{ConjPink}. If $d$, $g$, $r$ and $n$ satisfy~\eqref{E:lb},
  then the set of points in~$\calC_B^n$ such that the differences lie in
  a subgroup of rank $\le r$ is not Zariski dense.
\end{lemma}

Now we mimic the argument given in~\cite{CaporasoHarrisMazur1997}*{Section~1.2}.
We first prove the following lemma.

\begin{lemma} \label{L:ind}
  Assume Conjecture~\ref{ConjPink}. Let $\pi \colon \calC \to B$ be a smooth
  family of irreducible curves of genus~$g \ge 2$ over~$\C$. Fix $r \ge 0$.
  Then there is a bound $N(\pi, r)$ and a proper closed subvariety~$B'$ of~$B$
  such that for all $b \in B(\C) \setminus B'(\C)$, and for any choice of
  strictly more than~$N(\pi, r)$
  distinct points on the curve~$\calC_b$, the differences of these points
  will generate a subgroup of rank strictly greater than~$r$ in the Jacobian~$\calJ_b$.
\end{lemma}

\begin{proof}
  Fix some $n$ satisfying~\eqref{E:lb} for the given values of $g$, $r$,
  and $d = \dim B$.
  Denote by $Z_n \subset \calC_B^n$ the Zariski closure of the set of
  points $(b;P_0,P_1,\ldots,P_{n-1}) \in \calC_B^n$ such that the differences
  of the~$P_j$ generate a subgroup of rank $\le r$. By Lemma~\ref{L:start},
  $Z_n$ is a proper closed subvariety of~$\calC_B^n$. Now for $1 \le j \le n$,
  we let $\rho_j \colon \calC_B^j \to \calC_B^{j-1}$ denote the forgetful
  morphism that leaves out the last point. For $j = n-1, n-2, \ldots, 0$,
  define successively $Z_j$ as the (closed) subvariety of~$\calC_B^j$ of
  points~$x$ such that $\rho_{j+1}^{-1}(x) \subset Z_{j+1}$. Since (inductively)
  $Z_{j+1}$ is a proper closed subvariety of~$\calC_B^{j+1}$, $Z_j$
  is a proper closed subvariety of~$\calC_B^j$. We let $B' = Z_0 \subset \calC_B^0 = B$.

  Arguing as in~\cite{CaporasoHarrisMazur1997}*{Proof of Lemma~1.1},
  there are integers~$d_j$ such that $\#\rho_j^{-1}(x) \cap Z_j \le d_j$
  for all $x \in \calC_B^{j-1} \setminus Z_{j-1}$.
  We now show by downward induction the following statement.

  {\em Let $0 \le m \le n$. Then there is $N_m \ge m$ such that
  for each $(b;P_0,P_1,\ldots,P_{m-1}) \in \calC_B^m \setminus Z_m$,
  whenever we choose $N_m-m+1$ distinct additional
  points $P_m, P_{m+1}, \ldots, P_{N_m} \in \calC_b$, then
  the differences of the~$P_j$ generate a subgroup of rank $> r$ in~$\calJ_b$.}

  For $m = n$ we can take $N_n = n$, by definition of~$Z_n$. Now let $m < n$
  and assume the claim is true for $m+1$ in place of~$m$. Let
  $x = (b;P_0,P_1,\ldots,P_{m-1}) \in \calC_B^m \setminus Z_m$,
  then there are at most~$d_{m+1}$ points in~$Z_{m+1}$ mapping to~$x$.
  By the inductive assumption, if we choose points $P_m, \ldots, P_{N_{m+1}}$
  with $P_m$ not one of the finitely many possibilities leading to a preimage
  in~$Z_{m+1}$, then the statement is true. In any case, once we take
  more than~$d_{m+1}$ additional (distinct) points, then at least one of
  them will lead to a preimage outside~$Z_{m+1}$. Since we can permute the
  additional points, this brings us back to the previous case. We see that
  we can take $N_m = \max\{N_{m+1}, m+d_{m+1}\}$.

  The final case $m = 0$ then gives the statement of the lemma, with
  \[ N(\pi, r) = N_0 = \max\{m + d_{m+1} : 0 \le m \le n\} \]
  (where $d_{n+1} \colonequals 0$).
\end{proof}

Now we are almost done.

\begin{theorem}
  Conjecture~\ref{ConjPink} implies Conjecture~\ref{Conj:uML}.
\end{theorem}

\begin{proof}
  Assume Conjecture~\ref{ConjPink}.
  Fix $g \ge 2$ and~$r \ge 0$ and let $\calC_0 \to B_0$ be a universal family
  of smooth curves of genus~$g$. By Lemma~\ref{L:ind}, there is a proper closed
  subvariety $B_1 \subset B_0$ and a bound~$N_0$ such that the statement
  of Conjecture~\ref{Conj:uML} holds with this bound for all fibers of~$\calC_0$
  above points not in~$B_1$. If $B_1 \neq \emptyset$, we can apply Lemma~\ref{L:ind}
  to the restricted family $\calC_1 \to B_1$ and obtain a proper closed subvariety
  $B_2 \subset B_1$ and a bound~$N_1$ valid for all fibers above points outside~$B_2$.
  We continue this process, which must stop after finitely many steps since $B$
  is noetherian. The statement of Conjecture~\ref{Conj:uML} then holds
  with $N(g,r) = \max_j N_j$.
\end{proof}

\begin{remark}
  The same argument shows that there is a uniform bound for any smooth family
  of curves inside abelian varieties of dimension at least~$2$ that are
  generated fiber-wise by the curves.
\end{remark}

Note that we can take $\dim B_j \le \dim B_0 = 3g - 3$. Looking at~\eqref{E:lb},
this implies that it suffices to take $n = 5 + 2r$. So we would expect that
except for points occurring systematically in certain families of curves,
there should be a bound of the
form $\ll r + 1$ for the number of points on a curve mapping into a subgroup
of rank~$r$ in the Jacobian. For hyperelliptic curves of genus~$g$, taking a Weierstrass point
as basepoint, we always have the $2g+2$ Weierstrass points mapping to points
of order~$2$ (and no other systematically occurring torsion points,
see~\cite{PoonenStoll2014}*{Section~7}).
Since any generically chosen additional set of $r$~pairs of `opposite' points
on such a curve will generate a subgroup of rank~$r$, we obtain a lower
bound of $2g + 2 + 2r \gg g + r$. In~\cite{Stoll2006-chabauty} we show that
for the family of quadratic twists of a fixed hyperelliptic curve (and over
any fixed number field~$K$), there is an upper bound of $2g + 2 + 2r$ for the
number of $K$-rational points whenever $r < g$, with at most finitely many exceptions.
In this paper, we prove an upper bound $\ll_{[K:\Q]} (r + 1) g$ for the set of $K$-rational
points when the curve is hyperelliptic and $r \le g-3$.
It appears possible that the method can be refined to give a bound of
the form $\ll_{[K:\Q]} g + r$. This leads to the following question.

\begin{question}
  Can we take $R(d,g,r) \ll_d g + r$ in Conjecture~\ref{Conj:dgr}?
  Can we perhaps even take $N(g,r) \ll g + r$ in Conjecture~\ref{Conj:uML}?
\end{question}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Notation} \label{S:notation}

Until further notice, we fix the following notation.

Let $p$ be a prime number. As usual, $\Q_p$ denotes the field of $p$-adic numbers
and $\C_p$ the completion of an algebraic closure of~$\Q_p$. We let
$v \colon \C_p \to \Q \cup \{\infty\}$ denote the valuation on~$\C_p$
that is normalized by $v(p) = 1$. We also fix an absolute value~$| \cdot |$
on~$\C_p$. Throughout the paper, $k \subset \C_p$ stands for a finite field extension of~$\Q_p$
with ramification index~$e$; we write $\calO$ for its
ring of integers and $\kappa$ for the
residue field. We set $q \colonequals \#\kappa$;
$k^\unr \subset \C_p$ is the maximal unramified extension of~$k$.

Let $g \ge 3$ be an integer and let $C$ be a smooth, projective, and
geometrically integral curve of genus~$g$ over~$k$.
The Jacobian variety of~$C$ is denoted~$J$; the origin on~$J$ is~$O$.
We denote the image of the divisor $(P)-(Q)$ on~$C$ in~$J$ by $[P-Q]$.
We denote by~$\log_J$ the $p$-adic abelian logarithm map $J(k) \to T_O J(k) \cong k^g$.
On a sufficiently small subgroup neighborhood of~$O$, it is given by evaluating
the formal logarithm, and then extended to all of~$J(k)$ by linearity.
The space~$\Omega^1_J(k)$ of global regular $1$-forms on~$J$ defined over~$k$
agrees with the
space of invariant (under translations) $1$-forms on~$J$ and can be identified
with the cotangent space $(T_O J(k))^*$ of~$J$ at the origin. This induces a pairing
\[ \Omega^1_J(k) \times J(k) \To k, \quad
    (\omega, P) \longmapsto \langle \omega, \log_J(P) \rangle
                        \mathrel{=:} \oint_O^P \omega\,,
\]
which we call the \emph{Chabauty-Coleman pairing}. It is $k$-linear in~$\omega$
and additive (and $\calO$-linear on the kernel of reduction) in~$P$.
Its kernel on the left is trivial, and its kernel on
the right is the torsion subgroup of~$J(k)$.

Let $P_0 \in C(k)$ and let $i \colon C \to J$ be the embedding given by
$P \mapsto [P-P_0]$. Then $i^* \colon \Omega^1_J \to \Omega^1_C$ is an
isomorphism (which does not depend on~$P_0$). If $\omega \in \Omega^1_C(k)$
is $i^* \omega_J$ for some $\omega_J \in \Omega^1_J(k)$,
then we set for points $P, Q \in C(k)$
\[ \oint_P^Q \omega \colonequals \oint_{i(P)}^{i(Q)} \omega_J
                    = \oint_O^{[Q-P]} \omega_J \,.
\]
We use the symbol $\oint$ to distinguish this integral defined via abelian
logarithms from the integral~$\int$ given by $p$-adic integration
theory. This distinction will be relevant in Section~\ref{S:integ}.

Inclusions `$A \subset B$' are meant to be non-strict.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Combinatorics of arithmetic graphs} \label{S:AG}

In this section, we study the combinatorics of the (smooth part of the)
special fiber of the minimal regular model~$\calC$ over~$\calO$ of a (smooth
projective geometrically integral) curve~$C$ of genus~$g \ge 2$ over~$k$.
For the general background, we refer to~\cite{Liu-book}*{Section~10.1}.

The special fiber~$\calC_s$ of~$\calC$ decomposes
into irreducible components; we assume for now that the residue field~$\kappa$
is large enough so that the components are geometrically irreducible.
Let $\Gamma$ be one of these components of~$\calC_s$.
If $W$ denotes a relative canonical divisor, then by the adjunction formula we have
(writing as usual $p_a(\Gamma)$ for the arithmetic genus of~$\Gamma$)
\begin{equation} \label{E:adjunction}
  \Gamma \cdot W = 2 p_a(\Gamma) - 2 - \Gamma^2 \,.
\end{equation}
There are two cases: $\Gamma \cdot W > 0$ and $\Gamma \cdot W = 0$.
If $m(\Gamma)$ denotes the multiplicity of~$\Gamma$ in~$\calC_s$, then
\begin{equation} \label{E:adjglobal}
  2g-2 = \calC_s \cdot W = \sum_\Gamma m(\Gamma) (\Gamma \cdot W) \,,
\end{equation}
which implies that there can be at most $2g-2$ components~$\Gamma$
having $\Gamma \cdot W > 0$ (note that $W$ can be taken to be effective in the situation
considered here). On the other hand, $\Gamma \cdot W = 0$
means $p_a(\Gamma) = 0$ and $\Gamma^2 = -2$ or $p_a(\Gamma) = 1$ and
$\Gamma^2 = 0$ (the intersection pairing is negative semidefinite,
so $\Gamma^2 \le 0$). $\Gamma^2 = 0$ would imply that $\Gamma$ is the
only component; then $2g-2 = 0$ and so $g = 1$, which we have excluded.
So $\Gamma$ is isomorphic to~$\PP^1$ over~$\kappa$ and has self-intersection~$-2$.
Such components are called \emph{$(-2)$-curves}.

Associated to the special fiber~$\calC_s$ is a graph~$G$, whose vertices
correspond to the components of~$\calC_s$, with two (distinct) vertices
$\Gamma_1$ and~$\Gamma_2$ joined by $\Gamma_1 \cdot \Gamma_2$ edges.
The graph~$G$ is connected. To each vertex~$\Gamma$, we associate
its multiplicity~$m(\Gamma)$ and its arithmetic genus~$p_a(\Gamma)$.
This data is equivalent to what is called a `type' in~\cite{ArtinWinters}.
The intersection pairing satisfies
\[ \Gamma \cdot \sum_{\Gamma'} m(\Gamma') \Gamma' = \Gamma \cdot \calC_s = 0 \,. \]
Using the adjunction formula~\eqref{E:adjunction}, we can write this as
\begin{equation} \label{E:GammaW}
  \sum_{\Gamma' \neq \Gamma} m(\Gamma') \Gamma \cdot \Gamma'
     = -m(\Gamma) \Gamma^2
     = m(\Gamma) (\Gamma \cdot W + 2) - 2 m(\Gamma) p_a(\Gamma) \,.
\end{equation}

We are interested in the structure of the smooth part~$\calC_s^\smooth$
of the special fiber. It is the union of the components of multiplicity~$1$
minus their singular points and the points where they meet other components.
We have already seen that there can be at most~$2g-2$ such components
with $\Gamma \cdot W > 0$. The remaining components are $(-2)$-curves
of multiplicity~$1$, so by~\eqref{E:GammaW} the total intersection
number with other components is~$2$. There are four cases for such a
component~$\Gamma$.
\begin{enumerate}[(1)]
  \item $\Gamma$ meets two components of multiplicity~$1$ in two distinct points.
        Then $\Gamma$ is part of a maximal \emph{chain} of such components that
        connects two components of multiplicity~$1$ (which can be identical)
        that are not $(-2)$-curves.
  \item $\Gamma$ meets a component of multiplicity~$2$ in one point.
  \item \label{case3}
        $\Gamma$ meets two components of multiplicity~$1$ in the same point.
  \item \label{case4}
        $\Gamma$ meets a component of multiplicity~$1$ in one point
        with intersection multiplicity~$2$.
\end{enumerate}
In the latter three cases, the corresponding component of~$\calC_s^\smooth$
is isomorphic to~$\Aff^1$. We will call such components of~$\calC$
simply \emph{$\Aff^1$-components}.

Artin and Winters~\cite{ArtinWinters}*{Theorem~1.6} show that there
are only finitely many different `types' of fixed genus up to an equivalence
that ignores the lengths of chains (also of higher multiplicity) as above.
This implies that there must be bounds that depend only on~$g$ for the number
of (maximal) chains and for the number of $\Aff^1$-components.
The following result gives explicit and optimal such bounds.

\begin{theorem} \label{T:specialfiber}
  Let $\calC_s$ be the special fiber of the minimal proper regular model
  of a smooth projective geometrically integral curve~$C$ of genus~$g \ge 2$
  over a $p$-adic field~$k$. Then, writing $t$ and~$u$ for the toric and
  unipotent ranks of the special fiber of the N\'eron model of the Jacobian
  of~$C$, respectively, we have
  \begin{enumerate}[\upshape (i)]
    \item The number of components $\Gamma$ with $\Gamma \cdot W > 0$ is $N \le 2g-2$.
    \item The number of chains is at most $N-1+t \le 2g-3+t$.
    \item The number of $(-2)$-curves of multiplicity~$1$ outside of chains
          is at most~$3u$.
  \end{enumerate}
\end{theorem}

\begin{remark}
  It is not very hard to construct an arithmetic graph of genus~$g$
  with $2g-2$ components~$\Gamma$ such that $\Gamma \cdot W > 0$ and having
  $2g-3+t$ chains and $3(g-t)$ $\Aff^1$-components, for every $t = 0,1,\ldots,g$.
  We leave this as an exercise for the interested reader. This shows that
  the bounds given in the theorem above are optimal.
\end{remark}

\begin{proof}
  We write $\chi(G) = 1 - t'$ for the Euler characteristic of~$G$, where
  $t'$ denotes the number of independent loops in~$G$; we have $t' \le t$.

  We have $N \le 2g-2$ by~\eqref{E:adjglobal}.
  We now bound the number of chains. Consider the subgraph~$G'$ of~$G$
  spanned by the $N$~vertices corresponding to components~$\Gamma$
  with $\Gamma \cdot W > 0$ and by the vertices corresponding
  to components in chains. Contracting each chain to an edge, we obtain
  a graph~$G''$ whose Euler characteristic equals that of~$G'$, which in turn
  cannot be smaller than that of~$G$ (since $G$ is connected). So we find that
  \[ \#\{\text{chains}\}
      \le \#\{\text{edges of $G''$}\}
      = N - \chi(G'')
      \le N - \chi(G)
      = N - (1-t')
      \le N - 1 + t
  \]
  as claimed.

  In cases \eqref{case3} and~\eqref{case4} in the enumeration preceding the theorem, we can modify
  the graph~$G$ locally to obtain a situation avoiding these cases and such that the
  number of $\Aff^1$-components is larger than before. So a bound for the simpler
  graphs (which have the property that all $\Aff^1$-components meet a component
  of multiplicity~$2$) will also provide a general bound. The local modifications are given
  in the diagram below. In this diagram, a vertex corresponding to a
  $(-2)$-curve is represented as~$\bullet$, whereas a vertex corresponding
  to a component~$\Gamma$ with $\Gamma \cdot W > 0$ is represented as~$\circ$.
  The numbers near the symbols are the multiplicities.
  \[
    \xymatrix@=8mm@!0%
    {
      & & & & \mathop{\bullet}\limits_1 \ar@{-}[dr] & &
      & & & \mathop{\bullet}\limits_1 & & \mathop{\bullet}\limits_1 \\
      & & {} \ar@{.}[r] & \mathop{\circ}\limits_1 \ar@{-}[ur] \ar@{-}[rr]
        & & \mathop{\circ}\limits_1 \ar@{.}[r] & {} & \longrightarrow
        & {} \ar@{.}[r]
        & \mathop{\circ}\limits_1 \ar@{-}[r]
        & \mathop{\bullet}\limits_2 \ar@{-}[ul] \ar@{-}[ur] \ar@{-}[r]
        & \mathop{\circ}\limits_1 \ar@{.}[r]
        & {} \\
%     }  \\
%     \xymatrix@=8mm@!0%
%     {
      & & \mathop{\bullet}\limits_1 \ar@{-}[dd] &
      & & & & & & & & \mathop{\bullet}\limits_1 \\
      {} \ar@{.}[r] & \mathop{\circ}\limits_1 \ar@{-}[ur] \ar@{-}[dr]
      & & \text{or} &
      {} \ar@{.}[r]
      & \mathop{\circ}\limits_1 \ar@/^/@{-}[r] \ar@/_/@{-}[r]
      & \mathop{\bullet}\limits_1 & \longrightarrow
      & {} \ar@{.}[r]
      & \mathop{\circ}\limits_1 \ar@{-}[r]
      & \mathop{\bullet}\limits_2 \ar@{-}[r] \ar@{-}[ur] \ar@{-}[dr]
      & \mathop{\bullet}\limits_1 \\
      & & \mathop{\bullet}\limits_1
      & & & & & & & & & \mathop{\bullet}\limits_1
    }
  \]

  To obtain a bound on the number of $\Aff^1$-components in this simpler case,
  we classify the vertices $\Gamma$ of~$G$ according to the pair
  $(m(\Gamma), \Gamma \cdot W) \in \Z_{>0} \times \Z_{\ge 0}$ of invariants.
  Given $m \ge 1$ and $w \ge 0$, we call a vertex~$\Gamma$ of~$G$
  with $m(\Gamma) = m$ and $\Gamma \cdot W = w$ an \emph{$(m,w)$-vertex}.
  We denote by $v_{(m,w)}$ the number of $(m,w)$-vertices.
  We consider each edge of~$G$ as an oriented edge with both
  possible choices of orientation. We then denote by~$e_{(m,w),(m',w')}$
  the number of oriented edges leading from an $(m,w)$-vertex to
  an $(m',w')$-vertex. We also write $p_{(m,w)}$ for the sum of~$p_a(\Gamma)$
  over all $(m,w)$-vertices~$\Gamma$.

  Taking the sum of~\eqref{E:GammaW} over all $(m,w)$-vertices, we obtain
  \[  m (w + 2) v_{(m,w)} - 2 m p_{(m,w)} = \sum_{(m',w')} m' e_{(m,w),(m',w')}\,, \]
  or equivalently,
  \begin{equation} \label{E:relation1}
    v_{(m,w)} = \frac{1}{m(w+2)} \sum_{(m',w')} m' e_{(m,w),(m',w')} + \frac{2}{w+2} p_{(m,w)}\,,
  \end{equation}
  which allows us to replace $v_{(m,w)}$ by the right hand side.
  If we use this in~\eqref{E:adjglobal}, this gives
  \begin{equation} \label{E:relation2}
    \sum_{(m,w),(m',w')} \frac{w m'}{w+2} e_{(m,w),(m',w')}
          + \sum_{(m,w)} \frac{2 w}{w+2} p_{(m,w)}
      = \sum_{(m,w)} m w \,v_{(m,w)}
      = 2g - 2 \,.
  \end{equation}
  In addition, remembering that $G$ is connected and that for $(m,w) \neq (m',w')$,
  the sum
  $e_{(m,w),(m',w')} + e_{(m',w'),(m,w)}$ counts twice the edges between vertices
  with invariants $(m,w)$ and~$(m',w')$, whereas $e_{(m,w),(m,w)}$ counts twice
  the edges between $(m,w)$-vertices, we have the relation
  \[ 2 \sum_{(m,w)} v_{(m,w)} - 2 + 2 t' = \sum_{(m,w),(m',w')} e_{(m,w),(m',w')} \,, \]
  which we rewrite using~\eqref{E:relation1} as
  \[ \sum_{(m,w),(m',w')} \Bigl(\frac{2m'}{m(w+2)} - 1\Bigr) e_{(m,w),(m',w')}
        + \sum_{(m,w)} \frac{4}{w+2} p_{(m,w)}
      = 2 - 2 t' \,.
  \]
  Adding \eqref{E:relation2} to this, we finally have
  \begin{equation} \label{E:relation3}
    \sum_{(m,w),(m',w')} \Bigl(\frac{m'(mw+2)}{m(w+2)} - 1\Bigr) e_{(m,w),(m',w')}
       = 2(g - t' - p) \,,
  \end{equation}
  where we have set
  \[ p = \sum_{(m,w)} p_{(m,w)} = \sum_\Gamma p_a(\Gamma) \,. \]
  Note that $t' + p \ge t + a$, where $a$ denotes the abelian rank
  of the special fiber of the N\'eron model of the Jacobian of~$C$,
  so that $g - t' - p \le g - t - a = u$.
  Let `$<$' denote the lexicographical ordering of the pairs~$(m,w)$.
  Using the obvious equality $e_{(m,w),(m',w')} = e_{(m',w'),(m,w)}$,
  we can rewrite~\eqref{E:relation3} as
  \begin{align}
    \sum_{(m,w)} \frac{(m-1)w}{w+2} e_{(m,w),(m,w)}
      {} + \!\!\!\!\sum_{(m,w) < (m',w')}\!\!
          \Bigl(\frac{m'(mw+2)}{m(w+2)} + \frac{m(m'w'+2)}{m'(w'+2)} - 2\Bigr)
                              e_{(m,w),(m',w')}
      \le 2u \,.  \label{E:relation4}
  \end{align}
  We can bound the coefficient of~$e_{(m,w),(m',w')}$ in~\eqref{E:relation4} from below:
  \begin{align*}
    \frac{m'(mw+2)}{m(w+2)} + \frac{m(m'w'+2)}{m'(w'+2)} - 2
      &= m' - 2 \frac{m'(m-1)}{m(w+2)} + m - 2 \frac{m(m'-1)}{m'(w'+2)} - 2 \\
      &\stackrel{w \ge 0}{\ge} m' - \frac{m'(m-1)}{m} + m - \frac{m(m'-1)}{m'} - 2 \\
      &= \frac{m'}{m} + \frac{m}{m'} - 2 \ge 0 \,.
  \end{align*}
  So all coefficients on the left hand side of~\eqref{E:relation4} are nonnegative;
  the coefficient of~$e_{(m,w),(m,w)}$ vanishes if and only if $w = 0$ or $m = 1$, and
  the coefficient of~$e_{(m,w),(m',w')}$ vanishes if and only if we have equality
  everywhere in the above, which is equivalent to $m = m' = 1$ (or $m = m'$ and $w = w' =0$,
  but then $(m,w) = (m',w')$).
  % We obtain
  % \begin{align*}
  %   \Bigl(\frac{1}{2} e_{(1,0),(2,0)} &+ \frac{2}{3} e_{(1,0),(2,1)}
  %        + \frac{3}{4} e_{(1,0),(2,2)} + \ldots\Bigr)
  %      + \frac{1}{2} \sum_{w \ge 1} e_{(1,w),(2,0)} \\
  %     &+ \Bigl(\frac{1}{3} e_{(2,0),(2,1)} + \frac{1}{2} e_{(2,0),(2,2)}
  %        + \frac{3}{5} e_{(2,0),(2,3)} + \ldots\Bigr) \\
  %     &+ \Bigl(\frac{1}{6} e_{(2,0),(3,0)} + \frac{11}{18} e_{(2,0),(3,1)}
  %        + \frac{5}{6} e_{(2,0),(3,2)} + \ldots\Bigr)
  %        + \ldots
  %      = 2(g - t) \,,
  % \end{align*}
  % which implies that

  Let $\lambda_{(m,w),(m',w')}$ denote the coefficient of $e_{(m,w),(m',w')}$
  in~\eqref{E:relation4}. Then
  \begin{align*}
    \lambda_{(1,w),(2,0)} &= \frac{1}{2} \quad \text{for all $w \ge 0$}, %\\
    &\lambda_{(1,0),(2,w')} &\ge \frac{2}{3} \quad \text{for all $w' \ge 1$}, \\
    \lambda_{(2,0),(2,w')} &\ge \frac{1}{3} \quad \text{for all $w' \ge 1$}, %\\
    &\lambda_{(2,0),(3,w')} &\ge \frac{1}{6} \quad \text{for all $w' \ge 0$}.
  \end{align*}
  Using this in~\eqref{E:relation4} we obtain
  \begin{equation} \label{E:relation5}
    \frac{1}{2} e_{(1,0),(2,0)} + \frac{1}{2} \sum_{w \ge 1} e_{(1,w),(2,0)}
      + \frac{1}{3} \sum_{w' \ge 1} e_{(2,0),(2,w')}
      + \frac{1}{6} \sum_{w' \ge 0} e_{(2,0),(3,w')}
      + \frac{2}{3} \sum_{w' \ge 1} e_{(1,0),(2,w')}
      \le 2 u \,.
  \end{equation}
  We now claim that
  \begin{equation} \label{E:crucial}
    3 \sum_{w \ge 1} e_{(1,w),(2,0)}
      + 2 \sum_{w' \ge 1} e_{(2,0),(2,w')}
      + \sum_{w' \ge 0} e_{(2,0),(3,w')} \ge e_{(1,0),(2,0)} \,.
  \end{equation}
  Assuming this for a moment, we can use~\eqref{E:crucial} in~\eqref{E:relation5}
  to obtain
  \[ \frac{2}{3} \sum_{w' \ge 0} e_{(1,0),(2,w')} \le 2 u
    \qquad\text{or equivalently,}\qquad
    \sum_{w' \ge 0} e_{(1,0),(2,w')} \le 3 u \,.
  \]
  The left hand side counts exactly the $(-2)$-curves of multiplicity~$1$
  that meet a component of multiplicity~$2$. Since we have seen that after possibly
  a local modification of the graph this is an upper bound for the $\Aff^1$-components
  we want to count, this shows the last assertion in Theorem~\ref{T:specialfiber}.

  It remains to prove~\eqref{E:crucial}. We first observe that contracting
  an edge between two $(2,0)$-vertices does not change
  the genus or the topological properties of~$G$ and also does not
  affect~\eqref{E:relation4}. So we can assume without loss of generality
  that no such edges are present. We now consider those $(2,0)$-vertices
  that contribute to $e_{(1,0),(2,0)}$, i.e., that have an edge
  to a $(1,0)$-vertex. Let $a_j$ ($1 \le j \le 3$) denote the number of such
  vertices~$\Gamma$ such that the highest multiplicity of a vertex connected
  to~$\Gamma$ is~$j$. Since $g \ge 2$, there cannot be a $(2,0)$-vertex
  connected only to $(1,0)$-vertices, as this would give rise to a connected
  component of genus~$1$, contradicting the fact that $G$ is connected.
  This implies that a vertex counted by~$a_j$ can have at most $(4-j)$ edges
  to $(1,0)$-vertices; it also has at least one edge to a vertex with multiplicity~$j$
  that is not a $(1,0)$-vertex. So
  \[ \sum_{w \ge 1} e_{(1,w),(2,0)} \ge a_1, \quad
     \sum_{w' \ge 1} e_{(2,0),(2,w')} \ge a_2, \quad
     \sum_{w' \ge 0} e_{(2,0),(3,w')} \ge a_3
  \]
  and therefore
  \[ e_{(1,0),(2,0)}
      \le 3 a_1 + 2 a_2 + a_3
      \le 3 \sum_{w \ge 1} e_{(1,w),(2,0)}
          + 2 \sum_{w' \ge 1} e_{(2,0),(2,w')}
          + \sum_{w' \ge 0} e_{(2,0),(3,w')}
  \]
  as claimed.
\end{proof}

In general, some of the components of~$\calC_s$ may not be defined
over~$\kappa$. If a chain contains a component defined over~$\kappa$,
then either all components of the chain are defined over~$\kappa$,
or else the chain contains an odd number of components of which only
the middle one is defined over~$\kappa$ (and the action of Frobenius
reverses the orientation of the chain).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Partition into disks and annuli} \label{S:part}

We keep the notation introduced so far. Let $P \in C(k)$ be a point.
Then $P$ reduces to a point $\bar{P} \in \calC_s^\smooth(\kappa)$,
and so $\bar{P}$ is either on a component~$\Gamma$ with $\Gamma \cdot W > 0$
(and multiplicity~$1$), or on an $\Aff^1$-component, or on a component
belonging to a chain. We bound the number of smooth $\kappa$-points
occurring in the first two cases. Denoting by~$p_g(\Gamma)$ the geometric
genus of the component~$\Gamma$ and writing $\Gamma_1, \ldots, \Gamma_{N'}$
for the components occurring in the first case (with $N' \le N$, since we
only consider components defined over~$\kappa$ and with multiplicity~$1$),
we obtain the bound
\[ \sum_{j=1}^{N'} \bigl(q + 1 + 2 p_g(\Gamma_j) \sqrt{q}\bigr)
     \le (2g-2)(q+1) + 2a \sqrt{q}
\]
for the number of smooth $\kappa$-points on components having positive
intersection with~$W$. Here $a$ denotes the abelian rank of the special fiber
of the N\'eron model of the Jacobian of~$C$.
For the number of smooth $\kappa$-points
on $\Aff^1$-components, we have the bound $3 u q$, since each $\Aff^1$-component
defined over~$\kappa$ has $q$ smooth $\kappa$-points. Fixing $a+u = g-t$,
the sum of these bounds is maximal when $a = 0$, leading to a bound of
\[ (2g-2)(q+1) + 3(g-t)q = (5q+2) (g-1) - 3 q (t-1) \]
for the number of smooth $\kappa$-points outside components belonging to chains.
Each such point~$P$ gives rise to a \emph{residue disk}, which is the subset
of $C(k)$ of points reducing to~$P$; these subsets are analytically isomorphic
to open $p$-adic disks in~$k$.

Now consider a chain in the special fiber~$\calC_s$. Its two ends 
each meet some other component of
multiplicity~$1$ transversally. Contracting the components in the chain,
we obtain another model~$\calC'$ of~$C$ such that the image of the chain
in~$\calC'_s$ is a simple double point~$Q$. (We consider only chains containing
a component defined over~$\kappa$. If the action of Frobenius reverses the
orientation of the chain, we replace $k$ by its unramified extension of
degree~$2$, so that the Frobenius action is trivial. Since the bound we will
obtain for the number of relevant points in the residue annulus of~$Q$
does not depend on~$q$ and so is valid even for $k^\unr$-points, we do not
lose anything in this way.) By~\cite{BoschLuetkebohmert-stabredI}*{Proposition~2.3},
the preimage of~$Q$ in~$C(k)$ under the reduction map is analytically isomorphic
to an open annulus of the form $\{x : \alpha < |x| < 1\}$ with $\alpha = |\xi|$
for some $\xi \in k$. The number of such annuli equals the number of chains
(defined over~$\kappa$) and so is bounded according to Theorem~\ref{T:specialfiber}
by~$2g - 3 + t$.

Summarizing the discussion above, we have shown:
\begin{proposition} \label{P:DAbounds}
  Let $C$ be a smooth projective geometrically integral curve over~$k$ of genus~$g$.
  Then there is a number $0 \le t \le g$ such that $C(k)$ can be written as a
  disjoint union of at most $(5q+2) (g-1) - 3 q (t-1)$ open (residue) disks and at most
  $2g - 3 + t$ open (residue) annuli.
\end{proposition}

Let $C_D(k)$ be the union of the disks and $C_A(k)$ the union of the annuli
in this partition.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{The pull-back of an abelian logarithm to an annulus} \label{S:integ}

We fix a basepoint $P_0 \in C(k)$; this gives rise to the embedding
$i \colon C \to J$, $P \mapsto [P-P_0]$, defined over~$k$.
Let $\omega$ be a regular differential on~$C$ and denote by~$\omega_J$
the corresponding regular and invariant $1$-form on~$J$ (so that $\omega = i^* \omega_J$).
We write for $P \in C(k)$
\[ \lambda_\omega(P) = \oint_{P_0}^P \omega
                     = \oint_O^{[P-P_0]} \omega_J
                     = \langle \omega_J, \log_J {[P-P_0]} \rangle \,.
\]
Let $D_0 = \{\xi : |\xi| < 1\}$ be the unit disk. If
$\varphi \colon D_0 \to C$ parameterizes a residue disk, then
\[ \varphi^* \omega = w(z)\,dz \]
with a power series $w(z)$ converging on~$D_0$. Let $\ell$ be a power
series whose derivative is~$w$. Then it is well-known that for
$\xi_0, \xi_1 \in D_0(k)$ we have
\[ \oint_{\varphi(\xi_0)}^{\varphi(\xi_1)} \omega
     = \int_{\xi_0}^{\xi_1} w(z)\,dz
     = \ell(\xi_1) - \ell(\xi_0) \,.
\]
Using Newton polygons, one then shows (see for example~\cite{Stoll2006-chabauty}*{Section~6})
that the number of zeros of~$\lambda_\omega$ on~$\varphi(D_0(k))$
(or even $\varphi(D_0(k^\unr))$)
is bounded by $1$ plus the number~$n$ of zeros of~$\omega$ (counted with multiplicity)
on~$\varphi(D_0(\bar{k}))$ plus a term (denoted by $\delta(v,n)$ in~\cite{Stoll2006-chabauty})
that depends only on~$n$, $p$ and the ramification
index~$e$ of~$k$. We write $\Delta_k(s,r)$ for what is denoted~$\Delta_v(s,r)$
in~\cite{Stoll2006-chabauty}, namely
\[ \Delta_k(s,r) = \max\Bigl\{\sum_{j=1}^s \delta(v,m_j)
                                : m_j \ge 0, \sum_{j=1}^s m_j \le r\Bigr\} \,.
\]
Then we have the following bound.

\begin{lemma} \label{L:points-D}
  Let $V \neq 0$ be a linear subspace of the space of regular differentials on~$C$
  of codimension~$r$ and let $N_D$ denote
  the number of residue disks whose union is~$C_D(k)$.
  Then the functions~$\lambda_\omega$ for $\omega \in V$ have at most
  \[ N_D + 2r + \Delta_k(N_D, 2r) \]
  common zeros in~$C_D(k)$. If $p > e + 1$, then we can take the bound to be
  \[ N_D + 2r + e \Bigl\lfloor \frac{2r}{p-e-1} \Bigr\rfloor
      \le (5q+2) (g-1) - 3 q (t-1) + 2r + e \Bigl\lfloor \frac{2r}{p-e-1} \Bigr\rfloor \,.
  \]
\end{lemma}

\begin{proof}
  This is essentially \cite{Stoll2006-chabauty}*{Theorem~6.6},
  using~\cite{Katz-Zureick-Brown}*{Theorem~4.4} in the case of bad reduction.
  The bound for~$\Delta_k$ is~\cite{Stoll2006-chabauty}*{Lemma~6.2},
  and the bound for~$N_D$ comes from Proposition~\ref{P:DAbounds}.
\end{proof}

Now we consider the situation for an annulus~$A = \{\xi : \rho_1 < v(\xi) < \rho_2\}$
parameterizing the preimage under
reduction of a chain in~$\calC_s$. Let $\varphi \colon A \to C$
be the parameterization. Pulling back~$\omega$, we obtain, using~$z$ as the coordinate on~$A$,
\[ \varphi^* \omega = w(z)\,dz = d \ell(z) + c(\omega) \frac{dz}{z} \]
for Laurent series $w$ and~$\ell$ converging on~$A$ and some constant
$c(\omega) \in k$. Let $\Log_0$ denote the branch of the $p$-adic logarithm
that takes the value~$0$ at~$p$. Then, given this choice,
there is a unique global $p$-adic integral on~$A$ that in our is case given by
\[ \int_{\xi_0}^{\xi_1} \varphi^* \omega
     = \bigl(\ell(\xi_1) + c(\omega) \Log_0(\xi_1)\bigr)
         - \bigl(\ell(\xi_0) + c(\omega) \Log_0(\xi_0)\bigr) \,.
\]
We want to compare this with
\[ \oint_{\varphi(\xi_0)}^{\varphi(\xi_1)} \omega \,. \]
Perhaps surprisingly, these two integrals can differ.

The following result is crucial. It was first suggested by numerical computations
and appears to be new. When we asked Amnon Besser about this, we learned that a
related result also is part of current work of his with Sarah Zerbes.
To make this paper independent of
(so far) unpublished work, a (different) proof is presented here.

\begin{proposition} \label{P:integration-A}
  Let $\omega$, $A$ and $\varphi \colon A \to C$ be as above, and write
  \[ \varphi^* \omega = d \ell(z) + c(\omega) \frac{dz}{z} \,. \]
  Then there is a constant~$a(\omega)$ depending
  linearly on~$\omega$ such that for $\xi_0, \xi_1 \in A(k)$ we have
  \begin{align*}
    \oint_{\varphi(\xi_0)}^{\varphi(\xi_1)} \omega
      &= \bigl(\ell(\xi_1) + c(\omega) \Log_0(\xi_1) + a(\omega) v(\xi_1)\bigr)
           - \bigl(\ell(\xi_0) + c(\omega) \Log_0(\xi_0) + a(\omega) v(\xi_0)\bigr) \\
      &= \int_{\xi_0}^{\xi_1} \varphi^* \omega
            + a(\omega) \bigl(v(\xi_1) - v(\xi_0)\bigr) \,.
  \end{align*}
\end{proposition}

\begin{proof}
  We assume without loss of generality that $1 \in A$.
  Let $i \colon C \to J$ be the embedding sending $\varphi(1)$ to~$O$.

  According to~\cite{BoschLuetkebohmert-stabredII}*{Proposition~6.3}, the
  analytic map $i \circ \varphi \colon A \to J$ can be written
  uniquely as
  \[ i(\varphi(\xi)) = \psi_1(j(\xi)) + \psi_2(\xi) \]
  where $j \colon A \to \Gm$ is the natural inclusion,
  $\psi_1 \colon \Gm \to J$ is an analytic group homomorphism and
  $\psi_2 \colon A \to U$ is an analytic map, where $U$ denotes the
  formal fiber of the origin on~$J$ (so that $U(k)$ is the subgroup of
  points reducing to the origin). We write $\omega_J$ for the regular $1$-form on~$J$
  such that $i^* \omega_J = \omega$; $\omega_J$ is translation invariant.
  On~$U$, $\omega_J$ is exact, so $\omega_J = d\lambda$ for some analytic
  function~$\lambda$ on~$U$; we can assume $\lambda(0) = 0$.
  The pull-back $\psi_1^* \omega_J$ is a translation
  invariant differential on~$\Gm$, so it has the form $c\,dz/z$ for some $c \in k$.
  The pull-back $\psi_2^* \omega_J$ is $\psi_2^* d\lambda = d(\lambda \circ \psi_2)$.
  Since
  \[ \varphi^* \omega = \varphi^* i^* \omega_J
                      = \psi_1^* \omega_J + \psi_2^* \omega_J
                      = c \frac{dz}{z} + d \lambda\bigl(\psi_2(z)\bigr) \,,
  \]
  we see that $\ell(z) = \lambda(\psi_2(z))$ (up to a constant) and $c = c(\omega)$.
  Fix $\xi \in A(k)$. We obtain on the one side that
  \begin{align*}
    \oint_{\varphi(1)}^{\varphi(\xi)} \omega
      &= \oint_O^{i(\varphi(\xi))} \omega_J
       = \oint_O^{\psi_1(\xi)+\psi_2(\xi)} \omega_J
       = \oint_O^{\psi_1(\xi)} \omega_J + \oint_O^{\psi_2(\xi)} d\lambda
       = \oint_O^{\psi_1(\xi)} \omega_J + \lambda\bigl(\psi_2(\xi)\bigr)
  \end{align*}
  and on the other side that
  \begin{align*}
    \int_1^{\xi} \varphi^* \omega
      &= \int_1^{\xi} \Bigl(d\ell(z) + c\frac{dz}{z}\Bigr)
       = \ell(\xi) - \ell(1) + c \Log_0(\xi)
       = \lambda\bigl(\psi_2(\xi)\bigr) + c \Log_0(\xi) \,.
  \end{align*}
  So the difference is
  \[ \delta(\xi) = \oint_{\varphi(1)}^{\varphi(\xi)} \omega - \int_1^{\xi} \varphi^* \omega
                 = \oint_O^{\psi_1(\xi)} \omega_J - c \Log_0(\xi) \,.
  \]
  Since $\psi_1$ is a group homomorphism, the first term in the last difference
  is a homomorphism $k^\times \to k$; the same is true for the second term.
  Both terms in the first difference agree on the residue disk~$U_1$ of~$1$,
  since they are given by the same formal integral on~$U_1$. Since $\calO^\times/U_1$
  is torsion and the target group~$k$ is torsion-free, we have $\delta = 0$ on~$\calO^\times$.
  This implies that $\delta(\xi)$ is a linear function of the valuation~$v(\xi)$, so there
  is $a = a(\omega) \in k$ such that $\delta(\xi) = a v(\xi)$. This gives the claim
  for $(\xi_0, \xi_1) = (1, \xi)$; by taking differences the more general statement follows.

  That $a(\omega)$ is linear in~$\omega$ is clear, since $\ell$ (if we set $\ell_0 = 0$),
  $c(\omega)$ and the left-hand side are.
\end{proof}

\begin{remark}
  The numerical example mentioned above shows that it is possible to have
  $a(\omega) \neq 0$ and $c(\omega) = 0$, so that the appearance of~$a(\omega)$
  cannot in all cases be avoided by choosing a suitable branch of the $p$-adic
  logarithm.

  In this situation we have $\psi_1^* \omega_J = 0$ and the difference term above
  is given by $\oint_O^{\psi_1(\xi)} \omega_J$. Even though the pull-back of~$\omega_J$
  along~$\psi_1$ vanishes, it does not follow that the abelian integral vanishes
  on the image of~$\psi_1$. Consider for example $\xi = p$ and $P = \psi_1(p) \in J(k)$.
  There is a positive integer $n$ such that $n P \in U$; then
  \[ \oint_O^{\psi_1(p)} \omega_J = \frac{1}{n} \oint_O^{nP} \omega_J
                                  = \frac{1}{n} \lambda(nP) \,.
  \]
  There is no reason to assume that $\log_J (nP)$ is parallel to the derivative
  of~$\psi_1$ at~$1$, so $\psi_1^* \omega_J = 0$ does not in general imply
  that $\lambda(nP)$ vanishes.
\end{remark}

We say that $\omega$ is \emph{good} for the subset of~$C(k)$ parameterized by~$A$
if both $c(\omega)$ and~$a(\omega)$ in Proposition~\ref{P:integration-A} vanish.
This is a linear condition on~$\omega$ of codimension at most two.

Recall that we fix some $P_0 \in C(k)$ and set
\[ \lambda_\omega \colon C(k) \To k, \qquad P \longmapsto \oint_{P_0}^P \omega \,. \]

\begin{proposition} \label{P:good-A}
  In the situation of Proposition~\ref{P:integration-A} assume that
  $V \neq 0$ is a linear subspace of the space of regular differentials on~$C$
  of codimension~$r \ge 1$ and such that all elements of~$V$ are good.
  Assume further that $C$ is hyperelliptic and that $p$ is odd.
  Then the number of common zeros of~$\lambda_\omega$ on $\varphi(A(k^\unr))$
  for $\omega \in V$
  is bounded by a number~$B_A(p,e,r)$ that depends only on~$r$, $p$ and the ramification
  index~$e$ of~$k$. If $p > e + 1$, then we can take
  $B_A(p,e,r) = 2r + e \lfloor 2r/(p-e-1) \rfloor$.
\end{proposition}

\begin{proof}
  We first indicate how to show the claim under the following additional assumption.
  Write $\varphi^* \omega = w(z)\,dz$, which by assumption has no $z^{-1}$ term.
  Then $w(z) = u(z) h(z)$ with a Laurent polynomial~$u$ and a Laurent series~$h$
  such that $|h(\xi) - 1| < 1$ for all $\xi \in A$. We assume that for some
  $0 \neq \omega \in V$ the terms in~$u$
  have exponents between $n_1$ and~$n_2$ such that $n_1 < -1 < n_2$
  and $n_2 - n_1 \le 2r$. Given this, the proof can be carried out using Newton polygons
  in essentially the same way as for power series.

  Now one can check by an explicit computation that this condition is satisfied
  when $C$ is a hyperelliptic curve and $p$ is odd.
  A proof is given in Lemma~\ref{L:hyp-diff} below (where $m = g-r$).
\end{proof}

\begin{corollary} \label{C:points-A}
  Let $V$ be a linear subspace of the space of regular differentials on~$C$ of
  codimension $r \le g-3$, where $C$ is as in Proposition~\ref{P:good-A}.
  Then the number of common zeros of all $\lambda_\omega$
  for $\omega \in V$ in~$C_A(k)$ is bounded by
  \[ (2g - 3 + t) B_A(p, e, r+2) \,, \]
  which for $p > e + 1$ is at most
  \[ (2g - 3 + t) \bigl(2(r+2) + e \Bigl\lfloor \frac{2(r+2)}{p-e-1} \Bigr\rfloor\bigr) \,. \]
\end{corollary}

\begin{proof}
  For each annulus $A$ occurring in~$C_A(k)$,
  we let $V_A$ be the subspace of~$V$ consisting of differentials
  that are good for~$A$. Then $V_A$ has codimension at most $r+2 < g$,
  and by Proposition~\ref{P:good-A}
  the number of common zeros of~$\lambda_\omega$ on~$A$ for $\omega \in V_A$
  is at most~$B_A(p,e,r+2)$. We
  multiply by the bound $2g-3+t$ for the number of annuli from Proposition~\ref{P:DAbounds}
  to obtain the result.
\end{proof}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Bounding the number of points mapping into a subgroup of small rank}

In this section we state and prove our main result.

\begin{theorem} \label{T:local-main}
  Let $k$ be a $p$-adic field with $p$ odd and write $e$ for the ramification
  index of~$k$ and $q$ for the size of its residue field. Let $g \ge 3$ and $0 \le r \le g-3$.
  Then there is a bound $N(k, g, r)$ depending only on~$k$, $g$ and~$r$ such that
  the following holds.

  Let $C \colon y^2 = f(x)$ be a hyperelliptic curve of genus~$g$ over~$k$.
  We denote by~$J$ the Jacobian variety of~$C$. Let $\Gamma \subset J(k)$ be
  a subgroup of rank~$r$.
  Let $i \colon C \to J$ be an embedding given by choosing some basepoint~$P_0 \in C(k)$.
  Then
  \[ \#\{P \in C(k) : i(P) \in \Gamma\} \le N(k, g, r) \,. \]

  If $p > e + 1$, then we can take
  \begin{align*}
    N(k, g, r) &= (5q+2) (g-1) + 3 q + 2r + e \Bigl\lfloor \frac{2r}{p-e-1} \Bigr\rfloor
                   + (2g - 3) \bigl(2r + 4 + e \Bigl\lfloor \frac{2(r+2)}{p-e-1} \Bigr\rfloor\bigr)
                   \\
               &\qquad{}
             + g \max\Bigl\{0, 2r+4+e \Bigl\lfloor \frac{2(r+2)}{p-e-1} \Bigr\rfloor - 3q \Bigr\}
                \\
               &\le (g-1)\bigl(2 + 2q + 4 \mu (r+3)\bigr) + g \max\{3q-4\mu, 2\mu r\} \\
               &\le g \bigl(2 + 5q + 6 \mu (r+2)\bigr) \,,
%                \ll g \bigl(q + (r + 1) \mu\bigr) \,,
  \end{align*}
  where $\mu = (p-1)/(p-e-1) \le e+1$.
\end{theorem}

\begin{proof}
  The rank condition implies that there is a $k$-vector space~$V$
  of regular differentials on~$C$ of codimension $\le r \le g-3$ and
  such that each $\omega \in V$ annihilates~$\Gamma$ under the Chabauty-Coleman pairing.
  This means that (taking~$P_0$ to be the basepoint for~$\lambda_\omega$)
  the set of points in question is contained in the common zero set of
  all~$\lambda_\omega$ for $\omega \in V$. We can then use
  Lemma~\ref{L:points-D} and Corollary~\ref{C:points-A} to bound the
  number of points in~$C_D(k)$ and in~$C_A(k)$, respectively, that map to~$\Gamma$.
  Adding these bounds and maximizing over $0 \le t \le g$ gives the result.
\end{proof}

\begin{remark}
  It is conceivable that a more careful analysis of the functions $\lambda_\omega$
  on annuli will result in a bound for the number of zeros that applies to
  differentials~$\omega$ that do not necessarily satisfy the conditions that
  $c(\omega)$ and/or~$a(\omega)$ (in the notation of Proposition~\ref{P:integration-A}) vanish.
  If this is indeed the case, then the condition
  $r \le g-3$ can be relaxed to $r \le g-2$ or even $r \le g-1$.
  However, in view of the facts that $\Log_0(z) = 0$ has infinitely many solutions
  in~$\Q_p$ and that the number of solutions to $z^{-1} + a v(z) + z = 0$
  is unbounded when the valuation of~$a$ can be arbitrarily negative, it is very
  likely that more subtle arguments will be necessary to obtain uniform bounds
  under these less restrictive assumptions.
\end{remark}

\begin{remark}
  We sketch two variations of the approach taken here.
  \begin{enumerate}[(i)]
    \item One possibility is to prove a result like Theorem~\ref{T:local-main}
          above for \emph{semi-stable} curves. Since a curve of genus~$g$ over
          a $p$-adic field~$k$ acquires semi-stable reduction over an extension
          of~$k$ of degree bounded in terms of~$g$ only, this implies the general
          result. The advantage of this approach is that the structure of the
          special fiber of the minimal regular model is much easier to understand,
          so the discussion of the combinatorics of arithmetic graphs as in
          Section~\ref{S:AG} can be bypassed. The disadvantage is that the
          explicit bounds one obtains are much worse, since one is effectively
          working over much larger fields. This approach is taken by
          Katz, Rabinoff and Zureick-Brown~\cite{KRZB} in their generalization
          of the result to arbitrary curves.
    \item Another variation is to prove directly that for a given hyperelliptic
          curve~$C$ of genus~$g$ over~$k$, one can partition $\PP^1(k)$
          into $\ll q g$ disks containing at most one branch point and $\ll g$
          disks containing exactly two branch points and annuli containing
          no branch points of the hyperelliptic covering map $\pi \colon C \to \PP^1$.
          Since each of the former gives rise to zero, one or two residue disks
          on~$C$ (when $p$ is odd) and each of the latter gives rise to zero, one or two annuli,
          one obtains a result similar to Proposition~\ref{P:DAbounds}.
          The advantage is again that one circumvents the discussion of arithmetic
          graphs, which, however, has to be replaced by a discussion of partitions
          of~$\PP^1(k)$ as above. A disadvantage of this approach is that it
          is restricted to hyperelliptic curves from the start.
  \end{enumerate}
  No matter which approach is taken, Proposition~\ref{P:good-A} remains
  the crucial ingredient of the proof.
\end{remark}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{A uniform bound on the number of rational points}

We can apply the result of the previous section to obtain bounds for
the number of rational points on hyperelliptic curves with small
Mordell-Weil rank relative to the genus.

\begin{theorem} \label{T:main-ratpoints-general}
  Let $g \ge 3$, $d \ge 1$ and $0 \le r \le g-3$. Then there is a bound
  $R(d,g,r)$ depending only on $d$, $g$ and~$r$ such that for any
  hyperelliptic curve~$C$ of genus~$g$ over a number field~$K$
  of degree at most~$d$ such that the Mordell-Weil rank of its Jacobian
  is~$r$, we have $\#C(K) \le R(d,g,r)$.

  For $d = 1$ (hence $K = \Q$), we can take
  \[ R(1,g,r) = 8(r + 4)(g - 1) + \max\{1, 4r\} \cdot g  \,. \]
\end{theorem}

\begin{proof}
  Fix some odd prime~$p$. Then there are only finitely many possible
  completions~$k$ at places above~$p$ of number fields of degree~$\le d$.
  We take $R(d,g,r)$ to be the maximum of the bounds~$N(k,g,r)$
  of Theorem~\ref{T:local-main} over all these~$k$.

  Let $C$ be a curve as in the statement. If $C(K) = \emptyset$, there
  is nothing to prove. So we can assume that there is some $P_0 \in C(K)$,
  which we use as basepoint for an embedding $i \colon C \to J$.
  We can then apply Theorem~\ref{T:local-main} to $C$ base-changed
  to a completion~$k$ of~$K$ at a place above~$p$ and to
  $\Gamma = J(K) \subset J(k)$.

  To obtain the bound for $d = 1$, we take $k = \Q_3$ (with $p = 3 > 2 = e + 1$
  and $q = p = 3$).
\end{proof}

\begin{remark}
  We will improve the bound given in Theorem~\ref{T:main-ratpoints-general}
  for $\#C(\Q)$ somewhat in Section~\ref{S:hyp} below when $r \ge 1$.
  For this, we use the explicit description
  of the annuli for hyperelliptic curves in odd residue characteristic.
\end{remark}

\begin{remark}
  Using the bound in Theorem~\ref{T:local-main} when $p > e+1$, we obtain
  the estimate
  \[ R(d,g,r) \ll g \bigl(p^d + d(r+1)\bigr) \ll g \bigl((2d)^d + d(r+1)\bigr) \]
  where $p$ is the smallest prime $> d+1$. (The worst case is when $K$ is totally
  ramified at all primes $\le d+1$ and inert at all reasonably small primes $> d+1$.)
\end{remark}

Taking $r = 0$, we obtain the following.

\begin{corollary} \label{C:torsion}
  Let $C$ be a hyperelliptic curve of genus $g \ge 3$ over~$\Q$. Then
  any torsion packet on~$C$ can contain at most $33 (g - 1) + 1$ rational points.
\end{corollary}

Recall that a \emph{torsion packet} on~$C$ is a subset of~$C$ such that the
difference of any two points in the set is a torsion point on the Jacobian.

If we write $T(g)$ for the maximal number of rational points in a torsion
packet on a hyperelliptic curve of genus~$g$ over~$\Q$, then this gives
\[ 2 \le \liminf_{g \to \infty} \frac{T(g)}{g}
     \le \limsup_{g \to \infty} \frac{T(g)}{g} \le 33
\]
(the leftmost inequality is obtained by considering curves with all $2g+2$
Weierstrass points rational). So we know that the growth rate of~$T(g)$ is linear!
An analogous statement holds for the size of a set of rational points
mapping into a subgroup of rank $\le r$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Explicit results for hyperelliptic curves} \label{S:hyp}

In this section, we show that the assumption we needed for the proof
of Proposition~\ref{P:good-A} holds in the case of hyperelliptic curves
over a $p$-adic field with $p$ odd. We then give a similar result for $k = \Q_2$;
this is needed in the next section for the strengthening of the main result
of~\cite{PoonenStoll2014}.

Recall that $\kappa$ denotes the residue field of~$k$.
In the statement below, the \emph{endpoints} of a chain are the two points
where it intersects the remaining part of the special fiber.

\begin{lemma} \label{L:hyp-diff}
  Let $k$ be a $p$-adic field with $p$ odd, and let $C$ be a hyperelliptic
  curve over~$k$ of genus~$g$. Consider a maximal chain in the special fiber
  of the minimal regular model~$\calC$ of~$C$ over~$\calO$. We assume
  that the two endpoints of the chain are defined over~$\kappa$
  (this implies that each component of the chain is defined over~$\kappa$
  and therefore also all the intersection points of components in the chain
  are defined over~$\kappa$).
  Then there is a $k$-defined annulus $A = \{\xi : \rho_1 < |\xi| < \rho_2\}$
  and an analytic embedding $\varphi \colon A \to C$ defined over~$k$
  such that the following holds.

  Let $V \subset \Omega^1_C$ be a linear subspace of dimension~$m \ge 1$
  of the space of regular differentials on~$C$ such that $c(\omega) = a(\omega) = 0$
  for all $\omega \in V$ in the notation of Proposition~\ref{P:integration-A}.
  Then there is some $0 \neq \omega \in V$ such that
  $\varphi^* \omega = u(z) h(z)\,dz$
  with a Laurent series~$h$ satisfying $|h(\xi)-1| < 1$ on~$A$
  and a Laurent polynomial~$u$ with the property that all its terms have
  exponents between $n_1$ and~$n_2$ where $n_1 < -1 < n_2$ and
  $n_2 - n_1 \le \max\{2(g - m), 2\}$.
\end{lemma}

The assumption that the endpoints of the chain are defined over~$\kappa$
is harmless, since we can replace $k$ by an unramified extension.
The bound for the number of $k$-points in the corresponding annulus
in Corollary~\ref{C:points-A} depends only on the ramification index,
so it is in fact valid for $k^\unr$-points.

\begin{proof}
  We write $\pi \colon C \to \PP^1$ for the hyperelliptic double cover.
  We already know that there is a $k$-defined annulus~$A$ parameterizing
  the preimage of the chain under reduction. We want to give an explicit
  construction of~$A$ and the map~$\varphi$. To this end,
  we consider the action of the hyperelliptic involution~$\iota$ of~$C$
  on~$A$ and on the corresponding chain in~$\calC_s$.
  There are three possibilities:
  \begin{enumerate}[a)]
    \item The \emph{odd case}.
          $\iota$ fixes the chain component-wise. Then $\iota$ acts on~$A$
          preserving the valuation (which is determined by the component of the chain
          the point under consideration maps to). The image $A' = \pi(\varphi(A))$
          in~$\PP^1$ is an annulus not containing any branch points of~$\pi$;
          this annulus separates the set of branch points into two subsets
          of odd cardinality $\ge 3$.
    \item The \emph{even case}.
          $\iota$ interchanges the chain with another (disjoint) chain.
          Then the image $A' = \pi(\varphi(A))$ in~$\PP^1$ is an annulus isomorphic to~$A$
          that does not contain any branch points of~$\pi$ and separates
          the branch points into two subsets of even cardinality $\ge 4$.
    \item The \emph{Weierstrass case}.
          $\iota$ fixes the chain but reverses its orientation. Then $\iota$
          acts on~$A$ interchanging the `inner' and `outer' boundaries.
          The image $A' = \pi(\varphi(A))$ in~$\PP^1$ is a disk containing
          exactly two branch points of~$\pi$.
  \end{enumerate}
  (In the first two cases, the quotient of the chain by the action of
  its stabilizer in the group $\langle \iota \rangle$ is again a chain,
  hence the annulus maps to an annulus in~$\PP^1$. The action has no fixed
  points on the smooth part of the chain, so the map is \'etale. This means
  that the image annulus does not contain any branch points of~$\pi$. We will see
  below that such annuli give indeed rise to annuli in~$C$ and that the type
  depends on the parity of size of the sets in the induced partition of the
  branch points.

  In the third case, the quotient by~$\iota$ is a `half-chain' ending in
  a $(-1)$-curve; this corresponds to a disk in~$\PP^1$. The action has
  two fixed points on the middle component of the chain (it may be necessary
  to make a ramified quadratic extension to `see' this middle component),
  so the disk contains exactly two branch points of~$\pi$. We will see below
  that such a disk gives indeed rise to an annulus in~$C$.)

  Note that if one of the subsets of branch points in the odd or even cases
  would have at most one element, then the annulus in~$\PP^1$ would be contained
  in a $k$-defined disk containing at most one branch point, which would
  give rise to either one (Weierstrass) point (odd case) or a pair of points
  (even case)
  in~$\calC^\smooth_s(\kappa)$, contradicting the assumption that the annulus
  comes from a chain.
  In the even case with two branch points in the `interior' of~$A'$ (say),
  `filling in' the annulus~$A'$ would result in a disk containing two branch
  points. This would correspond to a chain of type~c) containing the chain
  considered, contradicting its maximality.

  We write $\Theta \subset \PP^1$ for the set of branch points. In the
  odd and even cases, we can assume without loss of generality that
  $0, \infty \notin A'$ and $\infty \notin \Theta$. Then
  \[ A' = \{\xi : \rho'_1 < |\xi| < \rho'_2\} \subset \Aff^1 \subset \PP^1\,.\]
  We write $\Theta_0$ and
  $\Theta_\infty$ for the two subsets of~$\Theta$ defined by~$A'$,
  where $\Theta_0$ contains the branch points in the `interior' of~$A'$
  (i.e., such that $|\theta| \le \rho'_1$)
  and $\Theta_\infty$ those in the `exterior' of~$A'$
  (such that $|\theta| \ge \rho'_2$).

  We assume that $C$ is given by the affine equation $y^2 = f(x)$
  (with $f \in k[x]$ squarefree of degree~$2g+2$, since $\infty \notin \Theta$).
  Let $c$ be the leading coefficient of~$f$, so that
  \[ f(x) = c \prod_{\theta \in \Theta} (x - \theta) \,. \]
  We can then write
  \begin{align*}
    f(x) &= c \prod_{\theta \in \Theta_\infty} (x - \theta)
              \prod_{\theta \in \Theta_0} (x - \theta) \\
         &= c \prod_{\theta \in \Theta_\infty} (-\theta) \cdot x^{\#\Theta_0}
              \prod_{\theta \in \Theta_\infty} \Bigl(1 - \frac{x}{\theta}\Bigr)
              \prod_{\theta \in \Theta_0} \Bigl(1 - \frac{\theta}{x}\Bigr) \,.
  \end{align*}
  In the odd and even cases,
  each factor $1 - \theta/x$ or $1 - x/\theta$ can be written
  as the square of a Laurent series that converges on~$A'$,
  so that \[ f(x) = \gamma x^{\#\Theta_0} \tilde{h}(x)^2 \]
  for some Laurent series~$\tilde{h}$ converging on~$A'$, where
  $\gamma = c \prod_{\theta \in \Theta_\infty} (-\theta) \in k^\times$ and
  $|\tilde{h}(\xi) - 1| < 1$ for all $\xi \in A'$.
  \begin{enumerate}[a)]\addtolength{\itemsep}{1mm}
    \item In the odd case with $\#\Theta_0 = 2\nu + 1$, say (with $1 \le \nu \le g-1$),
          we can take
          \[ A = \{\tau : \gamma \tau^2 \in A'\} \,; \]
          and
          \[ \varphi \colon A \To C, \quad
             \tau \longmapsto
                    \bigl(\gamma \tau^2, \gamma^{\nu+1} \tau^{2\nu+1}
                          \tilde{h}(\gamma \tau^2)\bigr)\,;
          \]
          note that $\varphi$ is equivariant with respect to $\tau \mapsto -\tau$
          on the left and $\iota$ on the right.
    \item In the even case we write $\#\Theta_0 = 2\nu$ (with $2 \le \nu \le g-1$)
          and we let $\alpha \in k^\times$ denote a suitable square root of~$\gamma$.
          (Note that $\gamma$ must be a square in this case.)
          Taking $A = A'$, we have
          \[ \varphi \colon A \To C, \quad
                       \tau \longmapsto \bigl(\tau, \alpha \tau^{\nu} \tilde{h}(\tau)\bigr) \,.
          \]
    \item In the Weierstrass case, write $A' \cap \Theta = \{\theta_1, \theta_2\}$.
          Without loss of generality, we can assume that $A' = \{\xi : |\xi| < 1\}$.
          In a similar way as above, we can write
          \[ f(x) = \gamma \tilde{h}(x)^2 (x - \theta_1) (x - \theta_2) \]
          with a power series~$\tilde{h}$ converging on~$A'$ such that $|\tilde{h}(\xi)-1| < 1$
          for $\xi \in A'$. We can in addition assume that $\theta_2 = -\theta_1$,
          so that $(x - \theta_1) (x - \theta_2) = x^2 - a$ for some $a \in k^\times$.
          Write $\gamma = \pi^n u$ with $u \in \calO^\times$ and $n \in \Z$.
          When $n$ is odd, then one easily sees that the part of~$\calC_s$
          corresponding to $\pi^{-1}(A')$ contains a component of multiplicity~$2$,
          contradicting the assumption that it is a chain. So we can assume that
          $\gamma$ is a unit. One can then check that the action of Frobenius
          on the endpoints of the chain is given by the action on~$\sqrt{\gamma}$,
          so our assumption on the Frobenius action implies that $\gamma = \alpha^2$
          is a square in~$k$. \\[1ex]
          Setting $y = \alpha \tilde{h}(x) \tilde{y}$,
          the equation of~$C$ becomes $\tilde{y}^2 = x^2 - a$.
          This can be parameterized by setting $t = x + \tilde{y}$, so that
          \[ x = \frac{1}{2} \Bigl(t + \frac{a}{t}\Bigr)
                  \quad\text{and}\quad
             \tilde{y} = \frac{1}{2}\Bigl(t - \frac{a}{t}\Bigr) \,, \quad\text{so}\quad
             y = \frac{\alpha}{2} \Bigl(t - \frac{a}{t}\Bigr)
                                  \tilde{h}\Bigl(\frac{1}{2}\Bigl(t + \frac{a}{t}\Bigr)\Bigr) \,.
          \]
          Taking $A = \{\tau : |a| < |\tau| < 1\}$,
          the map $\tau \mapsto \frac{1}{2}(\tau + a/\tau)$ gives a double cover $A \to A'$
          branched at $\theta_1$ and~$\theta_2$. This implies that
          $\tilde{h}\bigl(\frac{1}{2}(t+a/t)\bigr)$ converges on~$A$ with values
          close to~$1$; we obtain an analytic embedding $\varphi \colon A \to C$.
          We note that $t \mapsto a/t$ fixes~$x$ and changes the sign of~$y$,
          so it corresponds to the hyperelliptic involution on the image of~$\varphi$.
  \end{enumerate}

  Now we consider a regular differential~$\omega$ on~$C$. It can be written in the form
  \[ \omega = \tilde{u}(x)\,\frac{dx}{2y} \]
  with a polynomial~$\tilde{u}$ of degree at most~$g-1$. This leads to
  $\varphi^* \omega = u(t) h(t)\,dt$ with a Laurent series
  $h(t)$ such that $|h(\tau)-1| < 1$ on~$A$ and a Laurent
  polynomial~$u$ given by
  \begin{equation} \label{E:diff-pulled-back}
    \text{a)} \;\frac{\tilde{u}(\gamma t^2)}{(\gamma t^2)^\nu}\,, \qquad
    \text{b)} \;\frac{\tilde{u}(t)}{2 \alpha t^\nu}\,, \qquad\text{or}\qquad
    \text{c)} \;\frac{\tilde{u}(t + at^{-1})}{2 \alpha t}\,.
  \end{equation}
  Since we are free to impose up to~$m-1$ linear conditions on~$\omega$,
  we can arrange for the terms in~$\tilde{u}$ to have exponents in any interval
  of length~$g-m$ containing~$\nu$ in cases a) and~b), or in the interval~$[0,g-m]$
  in case~c). Writing $\nu_1$ and~$\nu_2$ for the minimal and maximal degree
  of a term in~$u$, we can therefore arrange in all cases to have $\nu_1 \ge n_1$,
  $\nu_2 \le n_2$ such that $n_2 - n_1 = \max\{2(g-m), 2\}$ and $n_1 < -1 < n_2$.
  This proves the claim.
\end{proof}

The explicit description of the pulled-back differentials in~\eqref{E:diff-pulled-back}
shows that for an even annulus~$A$ we can replace the bound of Proposition~\ref{P:good-A}
by $r + e \lfloor r/(p-e-1) \rfloor$ when $p > e+1$. Put differently, the bound
of Proposition~\ref{P:good-A} is valid for the \emph{pair} of annuli consisting of~$A$
and its image under the hyperelliptic involution~$\iota$. We can therefore replace the upper
bound $2g-3+t$ for the numer of annuli in Corollary~\ref{C:points-A} by an upper
bound for the number of orbits of annuli under~$\iota$. This leads to the following.

\begin{corollary}
  Let $C$ be a hyperelliptic curve over~$\Q$ of genus~$g$ and such that
  the Mordell-Weil rank of its Jacobian is~$1 \le r \le g-3$. Then
  \[ \#C(\Q) \le 8rg + 33(g - 1) - 1 \,. \]
\end{corollary}

This is an improvement over the bound $8(r+4)(g-1) + \max\{1,4r\} \cdot g$.

\begin{proof}
  We have to bound the number of orbits of annuli. The image of
  a minimal skeleton of the $p$-adic Berkovich analytic space associated to~$C$
  in the Berkovich projective line is a tree with at most~$2g$ nodes (it is obtained
  from the convex hull of the branch points, which is a tree with $2g+2$ leaves,
  by removing the leaves and the edges connected to them) and hence at
  most~$2g-1$ edges. The edges correspond to the orbits of annuli under~$\iota$,
  so there are at most~$2g-1$ such orbits. (These are the orbits we see when
  $C$ has split semistable reduction. Since annuli persist under finite extensions
  of the $p$-adic base field, this gives an upper bound for the orbits of annuli
  that are relevant to us here.) We can therefore replace the bound
  $2g-3+t$ in Corollary~\ref{C:points-A} by $\min\{2g-3+t, 2g-1\}$.
  This has the effect of replacing the factor~$g$ by~$2$
  in front of the max in the formula for~$N(k,g,r)$ in Theorem~\ref{T:local-main}.
  Using $p = q = 3$ and~$e = 1$, we obtain the bound as stated.
\end{proof}

We note that by choosing $p \approx \sqrt{r}$ for large~$r$ instead of~$p = 3$,
one obtains a bound with leading term $(4r + O(\sqrt{r})) g$.

We now consider the situation when $k = \Q_2$.

\begin{lemma} \label{L:core1}
  Let $C$ be a hyperelliptic curve of genus~$g$ over~$\Q_2$ and
  let $\varphi \colon A \to C(\Q_2)$ be a maximal annulus. Then there is a (possibly empty)
  sub-annulus $A_0 \subset A$ with the following properties.
  \begin{enumerate}[\upshape(1)]
    \item There are integers $n_- < -1 < n_+$ with $n_+ - n_- \le 2g-2$ such that
          the pull-back of any regular differential $\omega$ on~$C$ to~$A_0$
          can be written in the form $\varphi^* \omega = u(t) h(t)\,dt$
          with a Laurent series~$h$ converging on~$A_0$ and satisfying $|h(\tau) - 1| < 1$
          for all $\tau \in A_0$ and a Laurent polynomial~$u$ all of whose terms
          have exponents in the interval~$[n_-, n_+]$.
    \item The set $\varphi(A \setminus A_0)$ is the union of at most four
          residue disks.
  \end{enumerate}
\end{lemma}

\begin{proof}
  If $A \neq \emptyset$, then the chain corresponding to~$A$ must have
  at least one component defined over~$\F_2$. Then the endpoints of the
  chain are either defined individually over~$\F_2$, or else they are
  defined over~$\F_4$ and conjugate. In the latter case, there is only
  one component of the chain that is defined over~$\F_2$ (which must be
  the middle one) and it has exactly three smooth $\F_2$-points, so
  $\varphi(A)$ is a union of three residue disks, and the claims hold
  with $A_0 = \emptyset$. So we can assume that the endpoints are
  defined over~$\F_2$.

  We follow the arguments in the proof of Lemma~\ref{L:hyp-diff} above.
  It is still true that the image of a maximal annulus~$A$ in~$C(\Q_2)$ under~$\pi$
  is contained in an annulus of~$\PP^1$ not containing any branch points and separating
  the branch points into two sets of size at least three or in a disk of~$\PP^1$
  containing exactly two branch points. The image may fail to be a maximal
  such annulus or disk, however. Noting that the power series for $(1+x)^{1/2}$
  converges $2$-adically whenever $|x| < |4|$, we can still use the same
  parameterizations as in the proof above to describe
  the sub-annulus~$A_0$ of~$A$ whose image under~$\pi$ is
  $A'_0 = \{\xi : \rho'_1/|4| < |\xi| < \rho'_2 |4|\}$
  in the odd and even cases, or $A'_0 = \{\xi : |\xi| < |4|\}$ in the
  Weierstrass case. In the odd or even case, we have $f(x) = \gamma x^{\#\Theta_0} \tilde{h}(x)^2$
  on~$A'_0$ with a Laurent series~$\tilde{h}$ converging on~$A'_0$ and satisfying
  $|\tilde{h}(\xi) - 1| < 1$ for all $\xi \in A'_0$; in the Weierstrass case,
  we similarly have $f(x) = \gamma (x^2 - a) \tilde{h}(x)^2$. The argument
  proceeds from there as in the proof above. In the Weierstrass case, it follows again that
  $\gamma$ must be a square in~$\Q_2$, though the argument is a bit more involved.
  (One checks that there is a component of multiplicity~$2$ in the reduction
  unless $\gamma \equiv 1 \bmod 4$ after scaling~$y$. The condition that the
  endpoints are fixed under Frobenius is then equivalent to $\gamma \equiv 1 \bmod 8$.)
  We get that $\varphi^* \omega$ has the form given in~\eqref{E:diff-pulled-back}
  times a Laurent series~$h$ with the required properties, according to
  the type of the annulus (odd, even or Weierstrass). Since $\tilde{u}$ is
  a polynomial of degree at most~$g-1$, we can take
  \[ (n_-, n_+) = (-2\nu, 2g-2-2\nu), \quad (-\nu, g-1-\nu) \quad\text{or}\quad
                  (-g, g-2)
  \]
  in the odd, even and Weierstrass cases, respectively.

  Since we have a difference of~$2$ in the valuation on the boundary of~$A'_0$
  compared to the maximal annulus or disk, the reduction of~$A_0$ is the
  chain corresponding to~$A$ with at most two components at either end removed.
  Since each component of a chain (with all components and intersection points
  defined over~$\F_2$) has exactly one smooth $\F_2$-point,
  we can write $\varphi(A)$ as the union of~$\varphi(A_0)$ and at most four
  residue disks.
\end{proof}

\begin{remark}
  We actually expect that one can take $A_0 = A$.
\end{remark}

In the situation of Lemma~\ref{L:core1}, we call $A_0$ a \emph{core annulus} of~$C(\Q_2)$.
Combining Lemma~\ref{L:core1} with our previous results, we obtain the following.

\begin{lemma} \label{L:core-annuli}
  Let $C$ be a hyperelliptic curve of genus~$g$ over~$\Q_2$.
  Then $C(\Q_2)$ can be written as a union of at most $20g - 18$ residue disks
  and at most $3g-3$ core annuli.
\end{lemma}

\begin{proof}
  This follows from Lemma~\ref{L:core1}
  and from the bounds for the number of disks and annuli in Proposition~\ref{P:DAbounds}.
\end{proof}

\begin{remark}
  It is clear that a similar statement will hold for any $2$-adic field~$k$
  in place of~$\Q_2$. This can be used to remove the condition that $p$ must be odd in
  Theorem~\ref{T:local-main}.
\end{remark}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{A uniform version of the Poonen-Stoll result} \label{S:rholog}

Let $C$ be a curve of genus~$g$ over the $p$-adic field~$k$. We fix a $k$-basis
$\uom = (\omega_1, \ldots, \omega_g)$ of the space of regular differentials on~$C$
defined over~$k$. We also fix a point $P_0 \in C(k)$. As 
in~\cite{PoonenStoll2014}, we write $\rho$ for the partially
defined composition
\[ k^g \dashedarrow k^g \setminus \{0\} \To \PP^{g-1}(k) \To \PP^{g-1}(\kappa) \]
(recall that $\kappa$ denotes the residue field of~$k$). We define the map
\[ {\log_{\uom}} \colon C(k) \To k^g, \quad
   P \longmapsto \oint_{P_0}^P \underline{\omega} \,;
\]
then we have the partially (away from the finitely many points mapping to torsion
under the embedding of $C$ into~$J$ given by the base-point~$P_0$) defined composition
\[ \rholog_{\uom} \colon C(k) \dashedarrow \PP^{g-1}(\kappa) \,. \]
For a subset~$X$ of~$C(k)$, we write $\rholog_{\uom}(X)$ for the image of the
subset of~$X$ consisting of elements on which $\rholog_{\uom}$ is defined.

We now specialize to $k = \Q_2$.

\begin{lemma} \label{L:rhologA}
  Let $\varphi \colon A \to C(\Q_2)$ be the analytic parameterization of a core
  annulus. Then with the notation introduced above, we have
  \[ \#\rholog_{\uom}(\varphi(A)) \le 48 (g-1) + 31 \,. \]
\end{lemma}

\begin{proof}
  We first need a version of~\cite{PoonenStoll2014}*{Proposition~3.8}
  for Laurent series. So let $\underline{\ell}$ and $\underline{w}$ be
  tuples of Laurent series with coefficients in~$\Q_2$, converging on~$A$ and with
  $d\underline{\ell}(t)/dt = \underline{w}(t)$.
  Assume that a linear combination $\sum b_j w_j(t)$, with $(b_j)$ a $\Z_2$-basis
  of the ring of integers of a suitable unramified extension of~$\Q_2$,
  can be written in the form $u(t) h(t)$, where $|h(\tau) - 1| < 1$ for all
  $\tau \in A$ and $u$ is a Laurent polynomial with exponents contained in $[n_-, n_+]$,
  where $n_- < -1 < n_+$.
  Then $\#\rho(\underline{\ell}(A)) \le 3 (n_+-n_-) + 3$.
  This can be proved in the same way as~\cite{PoonenStoll2014}*{Proposition~3.8};
  the point is that the relevant range of exponents of~$\underline{\ell}$
  is contained in $[n_- - \delta(2,-2-n_-) + 1, n_+ + \delta(2, n_+) + 1]$.
  We also use $\delta(2, n) \le 1 + n/2$. (This is also analogous to the proof
  of Proposition~\ref{P:good-A}.)

  Write $\varphi^*\uom = d \underline{\ell}(z) + \underline{c}\frac{dz}{z}$
  with $\underline{c} \in \Q_2^g$; we can assume that the constant term
  in~$\underline{\ell}(z)$ is zero. Let $\underline{a} = (a_1, \ldots, a_g)$
  with $a_j = a(\omega_j)$ the constants arising in Proposition~\ref{P:integration-A}.
  Then, by the same proposition, we have
  \[ \log_{\uom}(\varphi(\xi))
        = \underline{\ell}(\xi) + \underline{c} \Log_0(\xi) + \underline{a} v(\xi) + \underline{b}
  \]
  with a constant vector~$\underline{b}$.
  Let $r \colon \Q_2^g \setminus \{0\} \to \F_2^g \setminus \{0\}$ be the map
  that first scales its argument by a power of~$2$ so that
  its entries are coprime elements of~$\Z_2$ and then reduces it mod~$2$
  (so that $\rho$ is $r$ followed by the canonical map
  $\F_2^g \setminus \{0\} \to \PP^{g-1}(\F_2)$). Since the size of
  $\#\rholog_{\uom}(\varphi(A))$ depends only on the $\Z_2$-module generated by~$\uom$,
  we are free to replace $\uom$ by any other $\Z_2$-basis of this module.
  We can choose a basis such that all of $\underline{a}$, $\underline{b}$ and~$\underline{c}$
  are of the form $(\ast,\ast,\ast,0,\ldots,0)$.
  We assume in the following that $\underline{a}$, $\underline{b}$ and~$\underline{c}$
  are linearly independent. (If the dimension of their span is strictly less than~$3$,
  an argument similar to that carried out below results in a better bound.)
  For any given $\xi \in A$ such that $\rholog_{\uom}(\varphi(\xi))$ is defined,
  we then have that $r(\log_{\uom}(\varphi(\xi)))$ is of the form
  $(\alpha,\beta,\gamma,0,\ldots,0)$ with $(\alpha,\beta,\gamma) \in \F_2^3 \setminus \{(0,0,0)\}$
  or $(\alpha,\beta,\gamma,\lambda_4,\ldots,\lambda_g)$ with $(\alpha,\beta,\gamma) \in \F_2^3$,
  where $(0,0,0,\lambda_4, \ldots, \lambda_g) = r(0,0,0,\ell_4(\xi),\ldots,\ell_g(\xi))$.
  This shows that
  \begin{equation} \label{E:bound-rholog}
    \#\rholog_{\uom}(\varphi(A))
      \le 8\#\{r(0,0,0,\ell_4(\xi),\ldots,\ell_g(\xi))
                 : \xi \in A, (\ell_4,\ldots,\ell_g)(\xi) \neq 0\} + 7 \,.
  \end{equation}
  Now by Lemma~\ref{L:core1}, there are integers $n_- < -1 < n_+$ with $n_+ - n_- \le 2g-2$
  such that the derivative of any linear combination of the~$\ell_j$ can be written in the form
  $u(t) h(t)$ with a Laurent series~$h(t)$ such that $|h(\tau) - 1| < 1$ for $\tau \in A$
  and a Laurent polynomial~$u$ all of whose terms have exponents in $[n_-,n_+]$.
  The generalization of~\cite{PoonenStoll2014}*{Proposition~3.8} stated
  above, applied to $(\ell_4, \ldots, \ell_g)$, then gives
  \[ \#\{r(0,0,0,\ell_4(\xi),\ldots,\ell_g(\xi))
                 : \xi \in A, (\ell_4,\ldots,\ell_g)(\xi) \neq 0\}
        \le 3(2g-2) + 3 \,.
  \]
  Using this in~\eqref{E:bound-rholog} gives the bound in the statement of the lemma.
\end{proof}

% \begin{remark}
%   A similar result holds for arbitrary $p$-adic fields~$k$.
% \end{remark}

This now implies a uniform bound on $\#\rholog_{\uom}(C(\Q_2))$.

\begin{proposition} \label{P:rhologim}
  Let $C$ be a curve of genus~$g$ over~$\Q_2$. Then
  \[ \#\rholog_{\uom}(C(\Q_2)) \le 144 (g-1)^2 + 199 (g-1) + 10 \,. \]
  In particular, $\#\rholog(C(\Q_2)) \le 144 (g-1)^2 + 199 (g-1) + 10$ where $\rholog$ is
  as in~\cite{PoonenStoll2014}.
\end{proposition}

\begin{proof}
  We partition $C(\Q_2)$ into residue disks and core annuli according
  to Lemma~\ref{L:core-annuli}. Write $C_D$ for the union of disks and $C_A$
  for the union of core annuli. By~\cite{PoonenStoll2014}*{Proposition~5.4}
  (with $p = 2$), we have $\#\rholog_{\uom}(C_D) \le 5d + 6g - 6$ where
  $d$ is the number of disks. By Lemma~\ref{L:core-annuli},
  $d \le 20g - 18$. Combining this with the bound $3g-3$ for the number of
  (core) annuli and with Lemma~\ref{L:rhologA}, we obtain the bound
  \begin{align*}
    \#\rholog_{\uom}(C(\Q_2))
      &\le \#\rholog_{\uom}(C_D) + \#\rholog_{\uom}(C_A) \\
      &\le \bigl(5 (20g - 18) + 6g - 6\bigr) + (3g - 3) (48(g-1) + 31) \\
      &= 144 (g-1)^2 + 199 (g-1) + 10 %\\
      % &= 144 g^2 - 89 g - 45
  \end{align*}
  as claimed. The $\rholog$ map from~\cite{PoonenStoll2014} is
  $\rholog_{\uom}$ for a specific choice of~$\uom$.
\end{proof}

We remark that this bound can be improved somewhat with a bit of more work.
However, it appears that our method will not produce a bound better than
linear in~$g$ for the size of the image of an annulus under~$\rholog$,
and so the final bound for $\#\rholog(C(\Q_2))$ will stay quadratic in~$g$.

We finally obtain a uniformity result for the density of odd degree hyperelliptic
curves with only one rational point in any family defined by congruence conditions,
assuming the genus is sufficiently large.

\begin{corollary}
  Let $g \ge 17$ and consider any subfamily~$\calF$ of odd degree hyperelliptic curves
  of genus~$g$ over~$\Q$ defined by finitely many congruence conditions and ordered
  by height as in~\cite{PoonenStoll2014}. Then the lower density of
  curves in~$\calF$ whose only rational point is the point at infinity
  is at least $1 - \bigl(288(g-1)^2 + 398(g-1) + 22) 2^{-g} > 0$.
\end{corollary}

\begin{proof}
  This follows from Proposition~8.13
  of~\cite{PoonenStoll2014} (with $p = 2$), since we know
  from Proposition~\ref{P:rhologim} that (in the notation of~\cite{PoonenStoll2014})
  $\#I \le 144 (g-1)^2 + 199 (g-1) + 10$.
\end{proof}

The lower bound on the density tends to~$1$ quickly as $g \to \infty$,
so we can phrase this result as `most odd degree hyperelliptic curves in
any congruence family have only one rational point.'


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{bibdiv}
\begin{biblist}

\bib{ArtinWinters}{article}{
   author={Artin, M.},
   author={Winters, G.},
   title={Degenerate fibres and stable reduction of curves},
   journal={Topology},
   volume={10},
   date={1971},
   pages={373--383},
   issn={0040-9383},
   review={\MR{0476756 (57 \#16313)}},
}

\bib{Bertrand2011preprint}{misc}{
   author={Bertrand, Daniel},
   title={Special points and Poincar\'e bi-extensions},
   date={2011},
   note={Preprint, \texttt{arXiv:1104.5178}, with an appendix by Bas Edixhoven},
}

\bib{BoschLuetkebohmert-stabredI}{article}{
   author={Bosch, Siegfried},
   author={L{\"u}tkebohmert, Werner},
   title={Stable reduction and uniformization of abelian varieties. I},
   journal={Math. Ann.},
   volume={270},
   date={1985},
   number={3},
   pages={349--379},
   issn={0025-5831},
   review={\MR{774362 (86j:14040a)}},
   doi={10.1007/BF01473432},
}

\bib{BoschLuetkebohmert-stabredII}{article}{
   author={Bosch, Siegfried},
   author={L{\"u}tkebohmert, Werner},
   title={Stable reduction and uniformization of abelian varieties. II},
   journal={Invent. Math.},
   volume={78},
   date={1984},
   number={2},
   pages={257--297},
   issn={0020-9910},
   review={\MR{767194 (86j:14040b)}},
   doi={10.1007/BF01388596},
}

\bib{Buium1993}{article}{
   author={Buium, Alexandru},
   title={Effective bound for the geometric Lang conjecture},
   journal={Duke Math. J.},
   volume={71},
   date={1993},
   number={2},
   pages={475--499},
   issn={0012-7094},
   review={\MR{1233446 (95c:14055)}},
   doi={10.1215/S0012-7094-93-07120-7},
}

\bib{BuiumVoloch}{article}{
   author={Buium, Alexandru},
   author={Voloch, Jos{\'e} Felipe},
   title={Lang's conjecture in characteristic $p$: an explicit bound},
   journal={Compositio Math.},
   volume={103},
   date={1996},
   number={1},
   pages={1--6},
   issn={0010-437X},
   review={\MR{1404995 (98a:14038)}},
}

\bib{CaporasoHarrisMazur1997}{article}{
   author={Caporaso, Lucia},
   author={Harris, Joe},
   author={Mazur, Barry},
   title={Uniformity of rational points},
   journal={J. Amer. Math. Soc.},
   volume={10},
   date={1997},
   number={1},
   pages={1--35},
   issn={0894-0347},
   review={\MR{1325796 (97d:14033)}},
   doi={10.1090/S0894-0347-97-00195-1},
}

\bib{Chabauty1941}{article}{
  author={Chabauty, Claude},
  title={Sur les points rationnels des courbes alg\'ebriques de genre sup\'erieur \`a l'unit\'e},
  language={French},
  journal={C. R. Acad. Sci. Paris},
  volume={212},
  date={1941},
  pages={882\ndash 885},
  review={\MR {0004484 (3,14d)}},
}

\bib{Coleman1985chabauty}{article}{
  author={Coleman, Robert F.},
  title={Effective Chabauty},
  journal={Duke Math. J.},
  volume={52},
  date={1985},
  number={3},
  pages={765\ndash 770},
  issn={0012-7094},
  review={\MR {808103 (87f:11043)}},
}

\bib{ConceicaoUlmerVoloch}{article}{
   author={Concei{\c{c}}{\~a}o, Ricardo},
   author={Ulmer, Douglas},
   author={Voloch, Jos{\'e} Felipe},
   title={Unboundedness of the number of rational points on curves over
   function fields},
   journal={New York J. Math.},
   volume={18},
   date={2012},
   pages={291--293},
   issn={1076-9803},
   review={\MR{2928577}},
}

\bib{Faltings1983}{article}{
  author={Faltings, G.},
  title={Endlichkeitss\"atze f\"ur abelsche Variet\"aten \"uber Zahlk\"orpern},
  language={German},
  journal={Invent. Math.},
  volume={73},
  date={1983},
  number={3},
  pages={349--366},
  issn={0020-9910},
  review={\MR {718935 (85g:11026a)}},
%   translation={ title={Finiteness theorems for abelian varieties over number fields}, booktitle={Arithmetic geometry (Storrs, Conn., 1984)}, pages={9--27}, translator = {Edward Shipz}, publisher={Springer}, place={New York}, date={1986}, },
  note={Erratum in: Invent.\ Math.\ {\bf 75} (1984), 381},
}

\bib{Faltings1994}{article}{
   author={Faltings, Gerd},
   title={The general case of S. Lang's conjecture},
   conference={
      title={Barsotti Symposium in Algebraic Geometry},
      address={Abano Terme},
      date={1991},
   },
   book={
      series={Perspect. Math.},
      volume={15},
      publisher={Academic Press},
      place={San Diego, CA},
   },
   date={1994},
   pages={175--182},
   review={\MR{1307396 (95m:11061)}},
}

\bib{Katz-Zureick-Brown}{article}{
   author={Katz, Eric},
   author={Zureick-Brown, David},
   title={The Chabauty-Coleman bound at a prime of bad reduction and
   Clifford bounds for geometric rank functions},
   journal={Compos. Math.},
   volume={149},
   date={2013},
   number={11},
   pages={1818--1838},
   issn={0010-437X},
   review={\MR{3133294}},
   doi={10.1112/S0010437X13007410},
}

\bib{KRZB}{misc}{
  author={Katz, Eric},
  author={Rabinoff, Joseph},
  author={Zureick-Brown, David},
  title={Uniform bounds for the number of rational points on curves of small Mordell-Weil rank},
  note={in preparation},
}

\bib{Liu-book}{book}{
   author={Liu, Qing},
   title={Algebraic geometry and arithmetic curves},
   series={Oxford Graduate Texts in Mathematics},
   volume={6},
   note={Translated from the French by Reinie Ern\'e;
   Oxford Science Publications},
   publisher={Oxford University Press},
   place={Oxford},
   date={2002},
   pages={xvi+576},
   isbn={0-19-850284-2},
   review={\MR{1917232 (2003g:14001)}},
}

\bib{Mazur1986}{article}{
   author={Mazur, Barry},
   title={Arithmetic on curves},
   journal={Bull. Amer. Math. Soc. (N.S.)},
   volume={14},
   date={1986},
   number={2},
   pages={207--259},
   issn={0273-0979},
   review={\MR{828821 (88e:11050)}},
   doi={10.1090/S0273-0979-1986-15430-3},
}

\bib{Mazur2000}{article}{
   author={Mazur, Barry},
   title={Abelian varieties and the Mordell-Lang conjecture},
   conference={
      title={Model theory, algebra, and geometry},
   },
   book={
      series={Math. Sci. Res. Inst. Publ.},
      volume={39},
      publisher={Cambridge Univ. Press},
      place={Cambridge},
   },
   date={2000},
   pages={199--227},
   review={\MR{1773708 (2001e:11061)}},
}

\bib{McCallum-Poonen2013}{article}{
   author={McCallum, William},
   author={Poonen, Bjorn},
   title={The method of Chabauty and Coleman},
   language={English, with English and French summaries},
   conference={
      title={Explicit methods in number theory},
   },
   book={
      series={Panor. Synth\`eses},
      volume={36},
      publisher={Soc. Math. France, Paris},
   },
   date={2012},
   pages={99--117},
   review={\MR{3098132}},
}

\bib{Pacelli1997}{article}{
   author={Pacelli, Patricia L.},
   title={Uniform boundedness for rational points},
   journal={Duke Math. J.},
   volume={88},
   date={1997},
   number={1},
   pages={77--102},
   issn={0012-7094},
   review={\MR{1448017 (98b:14020)}},
   doi={10.1215/S0012-7094-97-08803-7},
}

\bib{Pink2005preprint}{misc}{
   author={Pink, Richard},
   title={A Common Generalization of the Conjectures of Andr\'e-Oort, Manin-Mumford, %
          and Mordell-Lang},
   date={2005},
   note={Preprint, \texttt{http://www.math.ethz.ch/$\sim$pink/ftp/AOMMML.pdf}},
}

\bib{PoonenStoll2014}{article}{
   author={Poonen, Bjorn},
   author={Stoll, Michael},
   title={Most odd degree hyperelliptic curves have only one rational point},
   journal={Ann. of Math. (2)},
   volume={180},
   date={2014},
   number={3},
   pages={1137--1166},
   issn={0003-486X},
   review={\MR{3245014}},
   doi={10.4007/annals.2014.180.3.7},
}

\bib{Stoll2006-chabauty}{article}{
  author={Stoll, Michael},
  title={Independence of rational points on twists of a given curve},
  journal={Compos. Math.},
  volume={142},
  date={2006},
  number={5},
  pages={1201--1214},
  issn={0010-437X},
  review={\MR {2264661}},
}

\bib{ZannierBook}{book}{
   author={Zannier, Umberto},
   title={Some problems of unlikely intersections in arithmetic and geometry},
   note={With appendixes by David Masser},
   series={Annals of Mathematics Studies},
   volume={181},
   publisher={Princeton University Press},
   place={Princeton, NJ},
   date={2012},
   pages={xiv+160},
   isbn={978-0-691-15371-1},
}

\end{biblist}
\end{bibdiv}

\end{document}
