\section{Introduction}

This paper is motivated by the study of the generalized Fermat equation
\begin{equation}\label{general-equ}
   x^r + y^q = z^p.
\end{equation}
We say that a solution $(a,b,c) \in \mathbb{Z}^3$ to \eqref{general-equ} is \textit{primitive} if $\text{gcd}(a,b,c) = 1$, and \textit{trivial} if $abc = 0$. It is an open conjecture that \eqref{general-equ} has no non-trivial primitive solutions if $r,q,p \ge 3$ (see for instance, \cite{Bennett-open}).

The special case of $r = q = p$ is Fermat's Last Theorem which was proven in \cite{Wiles} \cite{Taylor-Wiles} using Galois representations and modularity. In \cite{DarmonDuke}, Darmon described a program to show the generalized Fermat equations  \eqref{general-equ} have no non-trivial solutions for fixed primes $r,q \ge 3$ and varying prime exponent $p \ge 3$ using the approach of Galois representations and modularity.

Central to Darmon's program is the construction of Frey representations of signature $(r,q,p)$, which is done explicitly in \cite{DarmonDuke} for the case $(p,p,r)$ using Frey hyperelliptic curves. In order to carry out Darmon's program for a specific $r,q$, one needs to prove irreducibility and modularity of the $2$-dimensional residual Galois representations attached to a putative solution, as well as distinguish them from those of the trivial solutions. Due to recent breakthroughs in modularity results, establishing modularity is no longer the main difficulty.

Although irreducibility cannot be established in all cases, using local methods, it is possible to treat certain congruence classes. In addition, the trivial solution $\pm (1,-1,0)$ presents an essential obstruction to the method because its associated  Frey hyperelliptic curve is non-singular and modular at the Serre level. 

Unlike signature $(r,r,p)$ where one still has Frey elliptic curves due to \cite{F}, signature $(p,p,r)$ for $r \ge 5$ necessitates consideration of Frey abelian varieties of dimension greater than $1$ if the exponents are prime. For $r = 2, 3$, signature $(p,p,r)$ equations were resolved in \cite{Darmon-Merel} using Frey elliptic curves which exist in these cases. The equation studied in this paper thus represents an interesting test case for Darmon's program.





In this paper, we consider the specific signature $(p,p,5)$ and develop the necessary machinery to carry out Darmon's program in all congruence classes mod $10$ which avoid the two obstructions above. The method is sufficiently refined to establish optimal bounds on the exponents $p$. In particular, we prove the following theorem. 

\begin{theorem}\label{main-theorem}
For $n \ge 3$, there are no non-trivial primitive solutions $(a,b,c) \in \mathbb{Z}^3$ to the equation 
\begin{equation} \label{main-equ}
  x^n + y^n = z^5
\end{equation}
in the cases
\begin{enumerate}
\item[(I)] $2 \nmid ab$ and $5 \mid ab$, or
\item[(II)] $2 \mid ab$ and $5 \nmid ab$.
\end{enumerate} 
\end{theorem}
We remark that the proof of the above theorem requires the use of both Frey hyperelliptic curves introduced in \cite{DarmonDuke} for signature $(p,p,5)$ and necessitates the development of the following innovations:
\begin{enumerate}
    \item We provide more general local results which can be used for establishing irreducibility of residual Galois representations attached to Frey hyperelliptic curves.
    \item Typically, the conductor at $2$ of a Frey hyperelliptic is more difficult to determine. We show that it can be read off up to twist by using the relation between odd Frey hyperelliptic curves and the Legendre family of elliptic curves. This allows us to apply repeated elimination steps using several twists of the Frey hyperelliptic curve to avoid an exact determination of conductors and delicate inertia arguments at primes above $2$ such as in \cite{Chen-2022-x131337}.
    \item We give a precise conductor calculation at the prime above $5$ of the Frey hyperelliptic curves by identifying extensions which achieve semistable reduction.
\end{enumerate}

The programs and output transcripts for the computations needed in this paper are described and posted at \cite{programs}.


\section{Acknowledgements}

We would like to thank Nuno Freitas and Luis Dieulefait for helpful discussions and suggestions pertaining to the subject of this paper. We would also like to thank Mohammad Sadek for discussions about \cite[Th\'eor\`eme 1 (I)]{Liu93}. The second author is grateful to the Department of Mathematics of The University of British Columbia, especially to Michael Bennett, because part of this work was accomplished during his time in Vancouver.


\section{Hyperelliptic equations}

In this section, we summarize the basic theory of hyperelliptic equations, which is taken in part from \cite{Liu93, Liu96, Liu-book, Lockhart}.


Let $K$ be a finite extension of $\mathbb{Q}_\ell$. Denote by $\mathcal{O}$ the ring of integers of $K$, by $k$ the residue field of $\mathcal{O}$ and by $v$ the valuation of $K$. A \textit{hyperelliptic equation $E$ over $K$} is an equation of the form
\begin{equation}
  y^2 + Q(x) y = P(x),
\end{equation}
where $Q, P \in K[x]$, $\deg Q \le g+1$, and $\deg P \le n = 2g + 2$ with
\begin{equation}
    2 g + 1 \le \max(2 \deg Q, \deg P) \le 2 g + 2.
\end{equation}
Let
\begin{equation*}
  R = 4 P + Q^2,
\end{equation*}
and suppose $c$ is the leading coefficient of $R$. The \textit{discriminant} of $E$ \cite{Liu96} is given by
\begin{equation*}
   \Delta_E := \begin{cases}
    2^{-4(g+1)} \Delta(R) & \text{ if } \deg R = 2 g + 2, \\
    2^{-4(g+1)} c^2 \Delta(R) & \text{ if } \deg R = 2 g + 1,
\end{cases}
\end{equation*}
where $\Delta(H)$ denotes the discriminant of $H \in K[x]$. In particular, if $P$ is monic, $\deg P = 2 g + 1$, and $\deg Q \le g$, then
\begin{equation*}
  \Delta_E = 2^{4g} \Delta(P + Q^2/4),
\end{equation*}
using the fact that $\Delta(H)$ is homogeneous of degree $2n - 2$ in the coefficients of $H$.

\begin{definition}
An algebraic curve $C$ given by a hyperelliptic equation $E$ over $K$ such that $\Delta_E \not= 0$ is called \textit{a hyperelliptic curve over $K$}. A hyperelliptic equation $F$ with coefficients in $\mathcal{O}$ such that $K(F) \cong K(C) = K(E)$ is a called \textit{a hyperelliptic model} for $C$. 
\end{definition}

Two hyperelliptic models $E, F$ for a hyperelliptic curve $C$ over $K$ are related by the transformations
\begin{align}
\label{hyperelliptic-transform}
   & E : y^2 + Q(x) y = P(x), \notag \\
   & F: z^2 + T(u) z = S(u), \notag \\
   & \begin{pmatrix} a & b \\ c & d \end{pmatrix} \in \operatorname{GL}_2(K), \quad e \in K^*, \quad H(u) \in K[u], \quad \deg(H) \le g+1, \notag \\
   & x = \frac{a u +b}{c u + d}, \quad y = \frac{e z + H(u)}{(c u + d)^{g+1}}, \\
   & \Delta_F = \Delta_E \, e^{-4(n-1)} (ad-bc)^{n(n-1)}. \notag
\end{align}
In particular, we note that the valuation of the discriminant modulo
\begin{equation}
  \gcd(4(n-1),n(n-1)),
\end{equation}
is an invariant of the isomorphism class of $C$.

We say a \textit{hyperelliptic model has odd degree} if $P(x)$ is monic and
\begin{equation*}
     \deg P = 2 g + 1, \quad \deg Q \le g. 
\end{equation*}
Two odd degree hyperelliptic models~$E : y^2 + Q(x) y = P(x)$ and~$F : z^2 + T(u) z = S(u)$ for the same hyperelliptic 
curve~$C$ over~$K$ are related by a transformation of the shape
\begin{align*}
   & x = e^2 u + r, \quad y = e^{2g+1} z + t(u), \quad \text{where} \\
   & e \in K^*,\quad  r \in K,\quad t \in K[u],\quad \deg(t) \le g. 
\end{align*}
The discriminants of the odd degree hyperelliptic models are related by
\begin{equation}
\label{odd-discrim-trans}
\Delta_F = \Delta_E \, e^{-4g(2g+1)},
\end{equation}
hence the valuation of the discriminant modulo $4g(2g+1)$ is an invariant of the isomorphism class of $C$ among odd degree models.

\begin{definition}\label{def:model}
A \textit{model} $\mathcal{C}$ over $\mathcal{O}$ for a hyperelliptic curve $C$ over $K$ is a $\mathcal{O}$-scheme which is proper and flat over $\mathcal{O}$ such that $\mathcal{C}_K \cong C$ where $\mathcal{C}_K$ is the generic fiber of $\mathcal{C}$.
\end{definition}

\begin{definition}\label{def:model_good_mult}
A model $\mathcal{C}$ over $\mathcal{O}$ for a hyperelliptic curve $C$ over $K$ has \textit{good reduction} if and only if its reduction mod $v$ is non-singular over $k$. In addition, we say that $\mathcal{C}$ has \textit{bad semistable reduction} if and only if its reduction mod $v$ is reduced, singular, and has only ordinary double points as singularities.
\end{definition}


\begin{definition}\label{def:curve_good_mult}
A hyperelliptic curve $C$ over $K$ has \textit{good reduction} (resp.\ \textit{bad semistable reduction}) if and only if there is some model $\mathcal{C}$ over $\mathcal{O}$ for $C$ which has good reduction (resp.\ bad semistable reduction). We say that $C$ has \textit{semistable reduction} if and only if it has good or bad semistable reduction.
\end{definition}





\begin{definition}
Suppose $y^2 + Q(x)y = P(x)$ is a hyperelliptic model over $\mathcal{O}$ of a hyperelliptic curve over $K$. If $Q(x)=b_{g+1}x^{g+1} + \cdots + b_0$ and $P(x)=a_nx^n + \cdots + a_0$, then we define the \textit{valuation vectors over} $K$ of this hyperelliptic model as the pair of vectors
\begin{equation*}
(v(a_0),\cdots,v(a_n))\qquad (v(b_0),\cdots,v(b_{g+1})).
\end{equation*}
\end{definition}


\begin{proposition}\label{hyperelliptic-good}
Let $C$ be a hyperelliptic curve over $K$ with a $K$-rational point $P$. Then $C$ has good reduction if and only if $C$ has an odd degree hyperelliptic model $\mathcal{C}$ over $\mathcal{O}$ such that $v(\Delta(\mathcal{C})) = 0$.
\end{proposition}
\begin{proof}
If $C$ has an odd degree hyperelliptic model $\mathcal{C}$ over $\mathcal{O}$ such that $v(\Delta(\mathcal{C})) = 0$, then $\mathcal{C}$ is a model with good reduction so $C$ has good reduction.

Suppose $C$ has good reduction, so there exists a model $\mathcal{C}$ of $C$ with good reduction. By \cite[Exercise 8.3.6]{Liu-book}, the hyperelliptic map
\begin{equation*}
  \pi: C \rightarrow \mathbb{P}^1_K,
\end{equation*}
extends to
\begin{equation*}
  \pi : \mathcal{C} \rightarrow \mathbb{P}^1_\mathcal{O}.
\end{equation*}

As a result, $\mathcal{C}_k$ is a non-singular pointed hyperelliptic curve with a $k$-rational point $\tilde{P}$ where $\tilde{P}$ is the reduction of $P$ mod $v$, so using \cite[Proposition 1.2]{Lockhart} it follows that $\mathcal{C}_k$ can be given by a non-singular odd degree hyperelliptic equation. We deduce that $C$ has an odd degree hyperelliptic model $\mathcal{C}$ such that $v(\Delta(\mathcal{C}))=0$.
\end{proof}

\begin{definition}
An abelian variety over $K$ has \textit{semistable reduction} if and only if the linear part of the special fiber of the connected component of its N\'eron model is an algebraic torus. Furthermore, if its toric rank is positive, we say it has \textit{multiplicative reduction}.
\end{definition}

\begin{theorem}\label{thm:C_J_semistable_reduction}
Let $C$ be a curve over $K$ and let $J$ be the Jacobian of $C$. Then $C/K$ has semistable reduction if and only if $J/K$ has semistable reduction. Furthermore, if $C/K$ has bad semistable reduction with a model $\mathcal{C}$ that has integral special fiber, then $J/K$ has multiplicative reduction.
\end{theorem}

\begin{proof}
  See \cite[Theorem 2.4]{deligne-mumford} for the first assertion. As the special fiber of the given model over $\mathcal{O}$ is integral, $X' = X_\text{red} = X = \mathcal{C}$ and $c = 1$ in \cite[Lemma 3.3.5]{Romagny} so the toric rank of $J$ is positive. Thus, $J$ has multiplicative reduction.
\end{proof}








\section{Darmon's Frey hyperelliptic curve for signature $(p,p,r)$}

In this section, we briefly review from \cite{DarmonDuke,ttv} the construction of a suitable Frey hyperelliptic curve for the equation
\begin{equation}
\label{rrp-equ}
  x^p + y^p = z^r,
\end{equation}
where $r \ge 3$ and $p$ are odd primes.

Let $\zeta$ be a primitive $r$th root of unity, $\omega_j = \zeta^j + \zeta^{-j}$, and put
\begin{equation*}
  g(X) = \prod_{j=1}^{\frac{r-1}{2}} (X+\omega_j).
\end{equation*}

From here on, we let $K = \mathbb{Q}(\zeta+\zeta^{-1})$ and denote by $\mathfrak{r}$ the unique prime above $r$ in $K$. We also use the notation $\mathfrak{q}_q$ to denote a prime of $K$ above $q$.

\begin{proposition}
The quotient of the hyperelliptic curve
\begin{equation*}
  Y^2 = X (X^{2r}+t X^r + 1)
\end{equation*}
by the involution $\tau : (X,Y) \mapsto (1/X,Y/X^{r+1})$ is given by the hyperelliptic curve
\begin{equation*}
  y^2 = x g(x^2-2) + t.
\end{equation*}
\end{proposition}
\begin{proof}
  See \cite[Proposition 3]{ttv}.
\end{proof}

\begin{proposition}
The quotient of the hyperelliptic curve
\begin{equation*}
  Y^2 = X^{2r}+t X^r + 1
\end{equation*}
by the involution $\tau : (X,Y) \mapsto (1/X,Y/X^r)$ is given by the hyperelliptic curve
\begin{equation*}
  y^2 = (x+2)(x g(x^2-2) + t).
\end{equation*}
\end{proposition}
\begin{proof}
  See \cite[Remark, p.\ 1058]{ttv}.
\end{proof}

Consider the following hyperelliptic curves
\begin{align*}
  C_r^-(t) : & \quad y^2 = f_t^-(x) := f(x) + 2 - 4t, \\
  C_r^+(t) : & \quad y^2 = f_t^+(x) := (x+2)(f(x) + 2 - 4t),
\end{align*}
where $f(x) = xg(x^2-2)$.

\begin{theorem}
\label{discriminant-t}
  The discriminants of the polynomials $f_r^-(x)$ and $f_r^+(x)$ are given by
  \begin{align*}
    & \Delta(f^-_t) = (-1)^\frac{r-1}{2} 2^{2 (r-1)} r^r t^\frac{r-1}{2} (t-1)^\frac{r-1}{2} \\
    & \Delta(f^+_t) = (-1)^\frac{r+1}{2} 2^{2 (r+1)} r^r t^\frac{r+3}{2} (t-1)^\frac{r-1}{2}.
  \end{align*}
\end{theorem}
\begin{proof}
  This is stated in slightly different form in the proof of \cite[Proposition 1.15]{DarmonDuke}. For further details on how such formulae can be justified, we refer the reader to \cite{BillereyChenDieulefaitFreitasNajman}.
\end{proof}

\begin{theorem}
  Let $J_r^\pm(t)$ be the Jacobian of the hyperelliptic curve $C_r^\pm(t)$. Then, the endomorphism algebra $\End_K (J_r^\pm(t)) \otimes \mathbb{Q}$ contains the field $K$.
\end{theorem}

\begin{proof}
  For $J_r^-(t)$, see \cite[Theorem 1]{ttv}. For $J_r^+(t)$, the result follows from \cite[Remark, p.\ 1058]{ttv} and modifying the argument in \cite[\S 3.1]{ttv}.
\end{proof}






Let $(a,b,c) \in \mathbb{Z}^3$ be a non-trivial primitive solution to \eqref{rrp-equ}. The following lemma is readily verified and appears in \cite[p. 425]{DarmonDuke}.
\begin{lemma}
\label{lem:Frey-model}
Let
\begin{align*}
  C_r^-(a,b,c): & \quad y^2 = c^r f(x/c) - 2(a^p-b^p), \\
  C_r^+(a,b,c): & \quad y^2 = (x+2c) (c^r f(x/c) - 2 (a^p - b^p)).
\end{align*}
Then
\begin{enumerate}
\item $C_r^-(a,b,c)$ is isomorphic to a twist of $C_r^-(t)$ over $\mathbb{Q}$ where $t = \frac{a^p}{c^r}$,
\item $C_r^+(a,b,c)$ is isomorphic to $C_r^+(t)$ over $\mathbb{Q}$ where $t = \frac{a^p}{c^r}$.
\end{enumerate}
\end{lemma}

Some explicit examples are listed below.



$C_r^-(a,b,c)$ for:
\begin{align*}
r = 3: & \quad y^2 = (x^3 - 3 c^2 x - 2 (a^p - b^p)) \\
r = 5: & \quad y^2 = (x^5 - 5 c^2 x^3 + 5 c^4 x - 2 (a^p - b^p)) \\
r = 7: & \quad y^2 = (x^7 - 7 c^2 x^5 + 14 c^4 x^3 - 7 c^6 x - 2 (a^p - b^p)) \\
r = 11: & \quad y^2 = (x^{11} - 11 c^2 x^9 + 44 c^4 x^7 - 77 c^6 x^5 + 55 c^8 x^3 - 11 c^{10} x - 2(a^p - b^p)).
\end{align*}


$C_r^+(a,b,c)$ for:
\begin{align*}
r = 3: & \quad y^2 = (x + 2c) (x^3 - 3 c^2 x - 2 (a^p - b^p)) \\
r = 5: & \quad y^2 = (x + 2c) (x^5 - 5 c^2 x^2 + 5 c^4 x - 2 (a^p - b^p)) \\
r = 7: & \quad y^2 = (x + 2c) (x^7 - 7 c^2 x^5 + 14 c^4 x^3 - 7 c^6 x - 2 (a^p - b^p)) \\
r = 11: & \quad y^2 = (x + 2c) (x^{11} - 11 c^2 x^9 + 44 c^4 x^7 - 77 c^6 x^5 + 55 c^8 x^3 - 11 c^{10} x - 2(a^p - b^p)).
\end{align*}

From Theorem~\ref{discriminant-t} and Lemma~\ref{lem:Frey-model}, the discriminants of the hyperelliptic curves $C_r^-(a,b,c)$ and $C_r^+(a,b,c)$ are given by
\begin{align}
  \Delta(C_r^-) & = (-1)^{(r-1)/2} 2^{2(r-1)} r^r a^{p (r-1)/2} b^{p (r-1)/2}\label{disc-1} \\
  \Delta(C_r^+) & = (-1)^{(r-1)/2} 2^{2(r+1)} r^r a^{p (r+3)/2} b^{p (r-1)/2} \label{disc-2}.
\end{align}

We denote by $J_r^\pm = J_r^\pm(a,b,c)$ the Jacobians of $C_r^\pm(a,b,c)$.
\begin{remark}
  $C_r^\pm(1,-1,0)$ is non-singular and $J_r^\pm(1,-1,0)$ has complex multiplication by $\mathbb{Q}(\zeta)$ \cite[Proposition 3.7]{DarmonDuke}.
\end{remark} 





\section{Modularity of $\rho_{J^\pm,\p}$}

Let $G_M = \Gal(\overbar{M}/M)$ denote the absolute Galois group of a number field $M$, where $\overbar{M}$ is an algebraic closure of $M$.

From this section onward, we specialize to the case $r = 5$. For convenience, we denote $C^\pm = C^\pm_5$ and $J^\pm = J^\pm_5$. 


Let $(a,b,c) \in \mathbb{Z}^3$ be a non-trivial primitive solution to \eqref{rrp-equ}. 



\begin{theorem}\label{modularity-plus}
Suppose $5 \mid ab$. Then $\rho_{J^+,\p}$ is modular.
\end{theorem}

\begin{proof}
This is \cite[Theorem 2.9]{DarmonDuke}.
\end{proof}

In the case $5 \nmid ab$, there is no currently known modularity result we can apply to prove that $\rho_{J^+,\p}$ is modular in all cases. Therefore, we will work instead with $\rho_{J^-,\p}$.

\begin{lemma}
\label{legendre-info}
  Suppose $2 \mid a$, $b \equiv c \equiv -1 \pmod 4$, and $p > 3$. Then, the conductor at $\mathfrak{q}_2$ of the elliptic curve $E/K$ given by
  \begin{equation}
      E: y^2 = x(x + a^p)(x-b^p)
  \end{equation}
  is $\mathfrak{q}_2$. Furthermore, ${\bar{\rho}}_{E,5}$ has conductor at $\mathfrak{q}_2$ dividing $\mathfrak{q}_2$.
\end{lemma}

\begin{proof}
This can be proven using Tate's algorithm, for instance \cite[\S 2.2]{DDT}. Under the conditions on $a,b,c$ and $p$, the minimal discriminant of $E$ is given by $\Delta_E = 2^{-8} (ab)^{2p}c^{10}$. Note ${\bar{\rho}}_{E,5}$ has conductor at $\mathfrak{q}_2$ equal to $\mathfrak{q}_2$ if and only if  $5 \nmid v_2(\Delta_E) = 2 p v_2(a) - 8$.
\end{proof}  



\begin{proposition}\label{irreducible-minus-5}
The representation $\bar\rho_{J^-,\mathfrak{r}}$ extends to $G_\mathbb{Q}$ and is absolutely irreducible when restricted to $G_{K(\zeta_r)}$.
\end{proposition} 

\begin{proof}
The abelian variety $J^-/K$ is of $\operatorname{GL}_2$-type with $K\hookrightarrow \End_K(J^-)\otimes\mathbb{Q}$. Thus, the $5$-adic Tate module $T_5(J^-)\otimes\mathbb{Q}_5$ is a $2$-dimensional $K\otimes\mathbb{Q}_5$-vector space. As $5$ totally ramifies in $K$, we have that $K\otimes\mathbb{Q}_5\simeq K_{\Fq_{r}}$.

Since $J^-$ is defined over $\mathbb{Q}$, as Darmon explains in \cite[p.\ 443]{DarmonDuke}, the action of $G_K$ on $T_5(J^-)\otimes\mathbb{Q}_5$ as a $K_{\Fq_{r}}$-vector space extends to a $G_\mathbb{Q}$-action that is $G_K$-semilinear; it satisfies
\begin{equation*}
    \sigma(av)=\sigma(a)\sigma(v),
\end{equation*}
where $\sigma \in G_K$, $a\in K_{\Fq_{r}}$ and $v\in T_5(J^-)$. As $\mathfrak{r}$ is the unique prime above $5$, the action of $G_\mathbb{Q}$ on $T_5(J^-)\otimes_{\mathcal O_\mathfrak{r}} \mathbb{F}_5$, where the tensor product is taken with respect to the reduction map $\mathcal O_\mathfrak{r}\rightarrow \mathbb{F}_5$, is linear and restricts to the action of $G_K$ given by $\bar\rho_{J^-,\mathfrak{r}}$. 

By \cite[Theorem 2.6]{DarmonDuke}, we have that $\bar\rho_{J^-,\mathfrak{r}}$ arises up to quadratic twist from the Legendre family given by 
\begin{equation}
\label{L-curve}
  L : y^2 = x (x-1) (x-t),
\end{equation}  
where $t = a^p/c^r$. More precisely, there is a quadratic character $\chi$ of $G_K$ such that 
\begin{equation}
\label{L-isom}
  \bar\rho_{J^-,\mathfrak{r}}\simeq {\bar{\rho}}_{L,5} \otimes \chi.
\end{equation}
 
Suppose that $\bar\rho_{J^-,\mathfrak{r}} \mid_{G_{K(\zeta_5)}}$ is reducible; thus ${\bar{\rho}}_{L,5}|_{G_{K(\zeta_5)}}$ is reducible. We then obtain a non-cuspidal $K(\zeta_5)$-rational point in $X_0(20)$. A short {\tt Magma}~program allows one to verify the $K(\zeta_5)$-points on $X_0(20)$ are all cuspidal,
a contradiction. 


We have thus shown that $\bar\rho_{J^-,\mathfrak{r}} \mid_{G_{K(\zeta_5)}}$ is irreducible. To show absolute irreducibility, we need to check that ${\bar{\rho}}_{L,5} \mid_{G_{K(\zeta_5)}}$ cannot have image lying in a non-split Cartan subgroup $C'$, the only possible image for which the representation is irreducible, but becomes reducible after an extension of the coefficient field. The only possible image for ${\bar{\rho}}_{L,5} \mid_{G_K}$ is the normalizer of $C'$. Thus, for $L$ to have this property we must have that
\begin{equation}
    j_L(t) - 1728 = j_{5N'}(s) - 1728.
\end{equation}
where
\begin{equation}
    j_{5N'}(s) = \frac{125 s (2s+1)^3 (2s^2+7s+8)^3}{(s^2+s-1)^5}
\end{equation}
is the $j$-invariant of elliptic curves with normalizer of non-split Cartan structure on $5$-torsion points \cite[Corollary 5.3]{Chen-siegel}. Since the left hand side is a square, $L$ would give rise to a $K$-rational point on the hyperelliptic curve
\begin{equation}
    y^2 = 2 \left( x^2 + \frac{7}{2}x + \frac{27}{8} \right) (x^2+x-1).
\end{equation}
Using {\tt Magma}, it can be checked that all $K$-rational points arise from cusps.
\end{proof}






\begin{theorem}\label{modularity-minus}
Suppose $2 \mid a$, $b \equiv c \equiv -1 \pmod 4$. Then $\rho_{J^-,\mathfrak{p}}$ is modular.
\end{theorem}
\begin{proof}
By Proposition~\ref{irreducible-minus-5}, the representation ${\bar{\rho}}_{J^-,\mathfrak{r}}$ is absolutely irreducible and extends to a representation ${\bar{\rho}}$ of $G_\mathbb{Q}$. By Serre's Conjecture over $\mathbb{Q}$, now proven in \cite{KhareWintenberger09a,KhareWintenberger09b,Kisin09}, ${\bar{\rho}}$ is modular, hence $\bar\rho_{J^-,\mathfrak{r}}$ is also modular by cyclic base change. Modularity of $J^-/K$ now follows from \cite[Theorem~1.1]{KhareThorne} by checking its three hypotheses:
\begin{enumerate}
\item The representation $\rho_{J^-,\mathfrak{r}}$ is unramified outside the finite set of primes of $K$ dividing $10 \Delta(C^-)$.
\item The abelian variety $J^-/K$ is potentially semi-stable so $\rho_{J^-,\mathfrak{r}}$ is deRham and hence Hodge-Tate. The Hodge-Tate weights of $\rho_{J^-,\mathfrak{r}}$ are $\left\{ 0,1 \right\}$. 
\item The representation ${\bar{\rho}}_{J^-,\mathfrak{r}} \mid_{G_{K(\zeta_5)}}$ is absolutely irreducible from Proposition~\ref{irreducible-minus-5}.
\end{enumerate}

Since $J^-$ is modular, $\rho_{J^-,\mathfrak{p}}$ is modular for every prime $\mathfrak{p}$ of $K$.
\end{proof}



\section{Conductors of $\bar\rho_{J^{\pm},\p}$}

The discriminants of the hyperelliptic curves $C^\pm$ are given by
\begin{align}
    \Delta(C^-)  & = 2^8 5^5 (ab)^{2p}, \\
    \Delta(C^+)  & = 2^{12} 5^5 (a^2b)^{2p},
\end{align}
from \eqref{disc-1}-\eqref{disc-2} in the case $r = 5$.

Let $T_p(J^\pm)$ be the Tate module of $J^\pm$ and write $V_p(J^\pm) = T_p(J^\pm) \otimes \mathbb{Q}_p$. As $G_K$-modules we have that
\begin{equation}
\label{tate-decomp}
    V_p(J^\pm) \cong \oplus_{\mathfrak{p} \mid p} V_\mathfrak{p}(J^\pm)
\end{equation}
where $V_\mathfrak{p}(J^\pm) = V_p(J^\pm) \otimes K_\mathfrak{p}$ is the $\mathfrak{p}$-adic Tate module of $J^\pm$, $K_p = \oplus_{\mathfrak{p} \mid p} K_\mathfrak{p}$, and $K_\mathfrak{p}$ is the completion of $K$ at $\mathfrak{p}$.


Let $\rho_{J^\pm,\p}$ be the Galois representation of $G_K$ on the $\mathfrak{p}$-adic Tate module of $J^\pm$, where $\mathfrak{p}$ is a prime of $K$ above $p$. We also denote by $\bar\rho_{J^{\pm},\p}$ the Galois representation of $G_K$ on the $\mathfrak{p}$-torsion of $J^\pm$. 



By Theorems~\ref{modularity-plus}~and~\ref{modularity-minus}, $J^\pm/K$ is modular, which implies the $\rho_{J^\pm,\p}$ over all primes $\mathfrak{p}$ of $K$ form a strictly compatible system of $\mathfrak{p}$-adic representations. Hence, the $\rho_{J^\pm,\p}$ all have isomorphic local Weil-Deligne representations at primes $\mathfrak{q}$ not dividing $p$, and therefore have the same conductor exponent at $\mathfrak{q}$ independent of $\mathfrak{p} \mid p$.






\begin{remark} The work of Dokchitser-Dokchitser-Maistret-Morgan \cite{DokchitserDokchitserMaistretMorgan19, DDMM-local}
gives a method to compute the conductor of a fixed
hyperelliptic curve over local fields of odd residual
characteristic. Anni-Dokchitser \cite{AnniDokchitser20} have made this explicit in the case when the defining polynomial involves factors with shifted $t$-Eisenstein polynomials.
\end{remark}


Let $K_{\Fq_{r}}$ and $K_{\mathfrak{q}_2}$ denote the completions of $K$ at the unique primes $\Fq_{r}$ and $\mathfrak{q}_2$ of $K$ above $r$ and $2$, respectively.

\begin{lemma}\label{cond-q}
Let $q \not = 2, 5$ be a prime and $\mathfrak{q}$ a prime of $K$ above $q$. Then $C^\pm/K$ and $J^\pm/K$ are semistable at $\mathfrak{q}$. In particular, if $C^\pm/K$ has bad semistable reduction, then $J^\pm/K$ has multiplicative reduction.
\end{lemma}

\begin{proof}
Suppose $\mathfrak{q}$ is a prime of $K$ that does not divide $2$ and $5$. From Lemma \ref{lem:Frey-model} the curve $C^-$ is given by
$$
C^-:~y^2 = x^5 - 5c^2x^3 + 5c^4x - 2(a^p-b^p).
$$
By \eqref{disc-1} we recall that 
$$
\Delta(C_r^-) = (-1)^{(r-1)/2} 2^{2(r-1)} r^r a^{p (r-1)/2} b^{p (r-1)/2}.
$$ 
By Proposition \ref{hyperelliptic-good} if $\mathfrak{q} \nmid ab$ then $C^-/K$ has good reduction at $\mathfrak{q}$. 

Suppose $\mathfrak{q}\mid ab$. We treat the case $\mathfrak{q} \mid a$, as the case $\mathfrak{q} \mid b$ is similar. The special fiber of $C^-$ in the case $\mathfrak{q} \mid a$ is given by
$$
y^2 = (x + 2\tilde{c}) (x^2 -\tilde{c}x - \tilde{c}^2)^2,
$$
where $c$ reduces to the element $\tilde{c}$ in the residue field $\mathbb{F}_\mathfrak{q}$ of $\mathfrak{q}$. As $\Delta(x^2 -\tilde{c}x - \tilde{c}^2)=5\tilde{c}^2\neq 0$ in $\mathbb{F}_\mathfrak{q}$, it follows that $C^-$ satisfies the double root criterion \cite[Lemma 3.7]{BornerBouwWewers2017}. Hence $C^-$ has bad semistable reduction at $\mathfrak{q}$, and therefore $C^-$ is semistable at $\mathfrak{q}$. A similar argument can be given for $C^+$. 

Finally, the statement for $J^\pm$ follows from the statement about $C^\pm$, \cite[Proposition 3.1]{BornerBouwWewers2017}, and Theorem \ref{thm:C_J_semistable_reduction}.
\end{proof}


Let $m$ be a rational prime and $S$ a finite set of primes of $K$. We denote by $K(S,m)$ the \textit{$m$-Selmer group of $K$ with respect to $S$}. When $\zeta_m \in K$, let $K(S,m)^*$ denote the set of characters $\chi: G_K\rightarrow \mathbb{Z}/m\mathbb{Z}$ corresponding to the extensions $K(\sqrt[m]{d})/K$ where $d \in K(S,m)$.

In this section, we prove the following theorem on the conductors of $\bar\rho_{J^+,\p}$ and $\bar\rho_{J^-,\p}$.



\begin{theorem}\label{thm:Serre_level}
Let $p \not= 2, 5$ be a prime.
\begin{enumerate}
\item Suppose $2 \nmid ab$ and $5 \mid ab$. Then the Serre level of $\bar\rho_{J^+,\p}$ divides $\Fq_{r}$.
\item Suppose $2 \mid a$, $b \equiv c \equiv -1 \pmod 4$, and $5 \nmid ab$. Then, for some character $\chi_0\in K(S_2, 2)^*$, where $S_2=\lbrace\mathfrak{q}_2\rbrace$, the Serre level of $\rhobar_{J^-,\p} \otimes \chi_0$ is equal to $\mathfrak{q}_2^s \cdot \Fq_{r}^t$ where $s=0,1$ and $t=2,3$.
\end{enumerate}
For every $\mathfrak{p} \mid p$ in $K$, the representations $\bar\rho_{J^+,\p}$ and $\rhobar_{J^-,\p} \otimes \chi_0$ are finite at $\mathfrak{p}$.
\end{theorem}

\begin{proof}





For primes $\mathfrak{q}$ of $K$ not dividing $10$, $\bar\rho_{J^{\pm},\p}$ is unramified at $\mathfrak{q} \nmid p$, and finite at $\mathfrak{q}$ if $\mathfrak{q} \mid p$ by \cite[Proposition 1.15]{DarmonDuke}.

By Theorem \ref{conductor-plus} for $\rho_{J^+,\p}$ we have that 
\begin{equation*}
  N(\rho_{J^+,\p})=\Fq_{r}\cdot \prod_{\mathfrak{q} \not= \mathfrak{q}_r, \mathfrak{q} \mid ab} \mathfrak{q}
\end{equation*}
Therefore the Serre level of $\bar\rho_{J^+,\p}$ divides $\Fq_{r}$ (see also \cite[Theorem 3.5]{DarmonDuke}).

By Theorem \ref{conductor-minus} for $\rho_{J^-,\p} \otimes \chi_0$ we have that
\begin{equation*}
  N(\rho_{J^-,\p} \otimes \chi_0) = \mathfrak{q}_2 \cdot \Fq_{r}^t \cdot \prod_{\mathfrak{q} \not= \mathfrak{q}_2, \mathfrak{q}_r, \mathfrak{q} \mid ab} \mathfrak{q}
\end{equation*}  
where $t=2,3$. Therefore, the Serre level of $\rhobar_{J^-,\p} \otimes \chi_0$ divides $\mathfrak{q}_2 \cdot \Fq_{r}^t$. As the image of inertia of $\rho_{J^-,\p} \otimes \chi_0$ at $\Fq_{r}$ has order coprime to $p \not= 2, 5$ by the proof of Proposition~\ref{semistable_at_5_J_minus}, the conductor of $\rho_{J^-,\p} \otimes \chi_0$ at $\Fq_{r}$ does not degenerate upon reduction mod $\mathfrak{p}$ by applying \cite[Theorem 1.5]{Jarvis}. We conclude the conductor of $\rhobar_{J^-,\p} \otimes \chi_0$ at $\Fq_{r}$ is still $\Fq_{r}^t$. Finally, by Proposition \ref{cond-2B} the conductor of $\rhobar_{J^-,\p} \otimes \chi_0$ at $\mathfrak{q}_2$ divides $\mathfrak{q}_2$.
\end{proof}






\begin{remark}
The $2$-Selmer group $K(S_2,2)$ can be computed in {\tt Magma} to be
\begin{equation}
  K(S_2,2) = \left\{ 1, -1, -2, 2, \frac{-\sqrt{5} + 1}{2}, \frac{\sqrt{5} - 1}{2}, \sqrt{5} - 1, -\sqrt{5} + 1  \right\}.
\end{equation}
\end{remark}



\subsection{The conductor exponent of $\rho_{J^+,\p}$}

In this section we compute the conductor of $\rho_{J^+,\p}$.

\begin{theorem}\label{conductor-plus}
Suppose $2 \nmid ab$ and $5 \mid ab$. Then $N(\rho_{J^+,\p})=\Fq_{r}\cdot \mathfrak{q}_{ab}$ where $\mathfrak{q}_{ab}$ is the square-free ideal of $K$ divisible by the primes $\mathfrak{q} \not= \mathfrak{q}_5$ and $\mathfrak{q}\mid ab$.
\end{theorem}

\begin{proof}
By the proof of \cite[Proposition 1.15]{DarmonDuke}, $C^+/K$ has good reduction at the prime $\mathfrak{q}_2$. Applying Lemma \ref{cond-q}, Lemma \ref{lem:Cp_mult_Fr} and Theorem \ref{thm:C_J_semistable_reduction} show that $J^+/K$ has multiplicative reduction at the primes $\mathfrak{q} \mid \mathfrak{q}_r \cdot \mathfrak{q}_{ab}$ and good reduction for the other primes $\mathfrak{q}$. The argument in \cite[Theorem 9.15(d)]{BillereyChenDieulefaitFreitasNajman} using Grothendieck's inertial criterion then allows us to conclude the conductor exponents of $\rho_{J^+,\p}$ at the primes $\mathfrak{q} \mid \mathfrak{q}_r \cdot \mathfrak{q}_{ab}$ are $1$.





\end{proof}




\begin{lemma}\label{lem:Cp_mult_Fr}
Suppose $5 \mid ab$. Then the curve $C^+/K_{\Fq_{r}}$ has bad semistable reduction.
\end{lemma}
\begin{proof}
The initial model of $C^+$ is given by
\begin{equation*}
  y^2 = (x + 2c)(x^5-5 c^2 x^3+5 c^4 x-2 (a^p-b^p)).
\end{equation*}


Assume $5 \mid a$. Making the substitution $x \rightarrow \sqrt{5} x - a^p - 2c$ and $y \rightarrow \sqrt{5}^3 y$ we obtain a model with valuation vectors over $K_{\Fq_{r}}$
\begin{equation*}
  (\ge 1, \ge 1, 0, 1, 0, 1, 0)\qquad (\infty, \infty, \infty, \infty),
\end{equation*}
which satisfies the double root criterion.

Otherwise $5 \mid b$. Making the substitution $x \rightarrow \sqrt{5} x + a^p - 2c$ and $y \rightarrow \sqrt{5}^3 y$ we obtain a model with valuation vectors over $K_{\Fq_{r}}$
\begin{equation*}
  (\ge 1, \ge 1, 0, 1, 0, 1, 0)\qquad (\infty, \infty, \infty, \infty).
\end{equation*}
\end{proof}




\subsection{The conductor exponent of $\rho_{J^-,\p}$}

In this section we compute the conductor of $\rho_{J^-,\p} \otimes \chi_0$ where $\chi_0 \in K(S_2, 2)^*$ with $S_2=\lbrace\mathfrak{q}_2\rbrace$.

\begin{theorem}\label{conductor-minus}
Suppose $2 \mid a$, $b \equiv c \equiv -1 \pmod 4$, $5 \nmid ab$, and $p > 5$. Then, for some choice of $\chi_0$, the conductor of $\rho_{J^-,\p} \otimes \chi_0$ is of the form $\mathfrak{q}_2 \cdot \Fq_{r}^t\cdot \mathfrak{q}_{ab}$ where $t=2,3$ and $\mathfrak{q}_{ab}$ is the square-free ideal of $K$ divisible by the primes $\mathfrak{q}\mid ab$ and $\mathfrak{q}\nmid 10$.
\end{theorem}

\begin{proof}
This will follow from Lemma~\ref{cond-q}, and Propositions \ref{cond-2B} and \ref{cond-5}.
\end{proof}


\subsubsection{The conductor exponent of $\rho_{J^-,\p}$ at $\mathfrak{q}_2$}

\begin{proposition}\label{potmul2}
Suppose $2 \mid a$, $b \equiv c \equiv -1 \pmod 4$, and $p > 5$. Then $C^-/K_2$ has potentially bad semistable reduction and $\rho_{J^-,\p} \mid_{I_{\mathfrak{q}_2}}$ has special inertial type.
\end{proposition}
\begin{proof}
  This can be verified using \cite[Th\'eor\`eme 1 (I)]{Liu93} and ${\tt Magma}$.
\end{proof}














We need the following lemma.




\begin{lemma}\label{lem:d_congrunece_p2_square}
Let $K$ be an unramified extension of $\mathbb{Q}_2$ with uniformizer $\pi$ and ring of integers $\mathcal{O}_K$. Suppose $d \in \mathcal{O}_K^*$ satisfies $d \equiv 1 \pmod{\pi^2}$. Then $L = K(\sqrt{d})$ is unramified over $K$. 
\end{lemma}

\begin{proof}
Let $\alpha = \sqrt{d}$ and $\beta = \frac{1+\alpha}{2}$. Then $N_{L/K}(\beta) = \frac{1 - \alpha^2}{4} \in \mathcal{O}_K$ and $T_{L/K}(\beta) = 1 \in \mathcal{O}_K$. Hence, $\beta \in \mathcal{O}_L$. Now,
\begin{align}
    \beta^2 & = \frac{1 + 2 \alpha + \alpha^2}{4} \\
    & = \frac{1 - \alpha^2}{4} + \frac{\alpha}{2}
\end{align}

The relative discriminant of $\mathcal{O}_K[\beta] = \mathcal{O}_K + \mathcal{O}_K \beta$ over $\mathcal{O}_K$ is the determinant of
\begin{equation*}
    \begin{pmatrix}
    2 & 1 \\
    1 & \frac{1+d}{2}
    \end{pmatrix}
\end{equation*}
which is $d$. It now follows that $\mathcal{O}_L = \mathcal{O}_K[\beta]$ and the relative discriminant of $L/K$ is $d \mathcal{O}_K$ which is not divisible by $\pi$. Hence, $L/K$ is unramified.
\end{proof}

\begin{lemma}\label{lem:q2_unramified_character}
Let $\chi:G_{K}\rightarrow\lbrace\pm 1\rbrace$ be a quadratic or the trivial character. Then there exists a character $\chi_0\in K(S_2, 2)^*$ where $S_2=\lbrace\mathfrak{q}_2\rbrace$ such that $\chi\chi_0$ is unramified at $\mathfrak{q}_2$.
\end{lemma}









\begin{proof}
If $\chi$ is the trivial character then we choose $\chi_0$ to be the trivial character as well. We now assume that $\chi$ is a non-trivial character and let $L=K(\sqrt{d})$ be the corresponding quadratic extension, where $d\in\mathcal{O}_K^*$ is square-free.

Since the class number of $K$ is $1$, using the idelic definition of class group \cite[Chapter VI, Proposition 1.3]{neukirch}, there exists a $u \in K^\times$ such that
\begin{equation}
\label{lifting}
    d u^{-1} \in \hat \mathcal{O}_K^\times 
\end{equation}
where $\hat \mathcal{O}_K^\times = \prod_{v \text{ finite}} \mathcal{O}_{K_v}^\times$. Let $\mathcal{O}_K^\times = \langle -1, \frac{\sqrt{5}+1}{2} \rangle$. It can be checked that reduction map $\mathcal{O}_K^\times$ to $\left( \mathcal{O}_K/\mathfrak{q}_2^2 \right)^\times$ is surjective. Hence, without loss of generality, we may assume that $u \equiv 1 \pmod{\mathfrak{q}_2^2}$.

Let $d_0 = d u^{-1}$, then $d_0 \in K(S_2, 2)$ since $K(\sqrt{d_0})$ is unramified outside of $\mathfrak{q}_2$ by \eqref{lifting}. Let $\chi_0\in K(S_2, 2)^*$ and $\chi_u$ be the characters corresponding to $K(\sqrt{d_0})$ and $K(\sqrt{u})$, respectively. From $d_0 = d u^{-1}$, we have the relation $\chi_u = \chi \chi_0^{-1} = \chi \chi_0$. As $u \in \mathcal{O}_K$ and $u \equiv 1 \pmod{\mathfrak{q}_2^2}$, by Lemma \ref{lem:d_congrunece_p2_square} we have that $\chi_u$ is unramified at $\mathfrak{q}_2$, therefore $\chi\chi_0$ is unramified at $\mathfrak{q}_2$.
\end{proof}






\begin{proposition}\label{cond-2B-Fr}
Suppose $2\mid a$, $b \equiv c \equiv -1 \pmod 4$ and $p > 3$. Then there is a character $\chi_0\in K(S_2, 2)^*$, where $S_2=\lbrace\mathfrak{q}_2\rbrace$, such that the conductor at $\mathfrak{q}_2$ of $\rho_{J^-,\mathfrak{r}}\otimes\chi_0$ is equal to $\mathfrak{q}_2$. 
\end{proposition}

\begin{proof}
To the solution $(a,b,c)$ we attach the elliptic curve
$$
E:y^2 = x(x + a^p)(x-b^p).
$$
The elliptic curve
\begin{equation*}
E:y^2 = x(x + a^p)(x-b^p).
\end{equation*}
is a quadratic twist of $L$ in \eqref{L-curve} and hence by \eqref{L-isom} we have that
\begin{equation}
\label{E-isom}
    {\bar{\rho}}_{J^-,\mathfrak{r}} \cong {\bar{\rho}}_{E,5} \otimes \chi
\end{equation}
for some quadratic character $\chi$ of $G_K$. By \eqref{E-isom} we have that ${\bar{\rho}}_{J^-,\mathfrak{r}} \simeq {\bar{\rho}}_{E,5} \otimes\chi$ where $\chi$ is a character of $G_K$ of order dividing $2$. By Lemma \ref{lem:q2_unramified_character} there exists a character $\chi_0\in K(S_2, 2)^*$ such that $\chi\chi_0$ is unramified at $\mathfrak{q}_2$. By Lemma~\ref{legendre-info}, the conductor at $\mathfrak{q}_2$ of ${\bar{\rho}}_{J^-,\mathfrak{r}}\otimes\chi_0\simeq{\bar{\rho}}_{E,5} \otimes \chi \chi_0$ divides $\mathfrak{q}_2$.





The representation ${\bar{\rho}}_{J^-,\mathfrak{r}}$ is absolutely irreducible by Proposition \ref{irreducible-minus-5} and modular by Theorem \ref{modularity-minus}. Therefore, we conclude that $\rho_{J^-,\mathfrak{r}}\otimes\chi_0$ has conductor $\mathfrak{q}_2$ by applying \cite[Theorem 1.5 (2)]{Jarvis}. In particular, if the conductor of  $\rho_{J^-,\mathfrak{r}}\otimes\chi_0$ is $\mathfrak{q}_2^t$ for $t \ge 2$, degeneration of the conductor occurs under reduction. Since $\rho_{J^-,\mathfrak{r}} \otimes \chi_0 \mid_{I_{\mathfrak{q}_2}}$ has inertial special type associated to a character $\chi$, it follows that the reduction of $\chi$ is trivial and $N_{K/\mathbb{Q}}(\mathfrak{q}_2) \equiv 1 \pmod p$, which cannot happen as $N_{K/\mathbb{Q}}(\mathfrak{q}_2) - 1 = 3 < p$. We conclude $t \le 1$ and hence $t = 1$.
\end{proof}


\begin{proposition}\label{cond-2B}
Suppose $2\mid a$, $b \equiv c \equiv -1 \pmod 4$ and $p > 3$. Let $\chi_0$ be a character as in Proposition \ref{cond-2B-Fr}. Then the conductor at $\mathfrak{q}_2$ of $\rho_{J^-,\p} \otimes \chi_0$ is equal to $\mathfrak{q}_2$.
\end{proposition}
\begin{proof}
The conductor at $\mathfrak{q}_2$ of the compatible system $\rho_{J^-,\p} \otimes \chi_0$ is independent of $\mathfrak{p}$ for $\mathfrak{p}\nmid 2$, so by Proposition \ref{cond-2B-Fr} we have the conclusion.
\end{proof}





\begin{remark}
As $\chi_0$ is unramified outside of $\mathfrak{q}_2$, the conductors of $\rho_{J^-,\p}$ and $\rho_{J^-,\p} \otimes \chi_0$ are equal away from $\mathfrak{q}_2$.
\end{remark}


\subsubsection{The conductor exponent of $\rho_{J^-,\p}$ at $\Fq_{r}$}


\begin{proposition}\label{semistable_at_5_J_minus}
Suppose $5 \nmid ab$. Let $M/K_{\Fq_{r}}$ be a totally ramified extension of degree $4$ and 
\begin{equation*}
  f(x) = x^5-5 c^2 x^3+5 c^4 x-2 (a^p-b^p).
\end{equation*}  
Let $d(a,c)$ be the constant term of $g(x) = f(x - a^p - 2c)$.
\begin{enumerate}[(i)]
\item If $v_5(d(a,c))\geq 2$, then $C^-/K_{\Fq_{r}}$ attains good reduction over the extension $M/K_{\Fq_{r}}$. 
\item If $v_5(d(a,c)) = 1$, let $a_0, b_0, c_0 \in \mathbb{Z}$ be the least non-negative residues of $a, b, c$ modulo $25$, respectively. Then, there is an extension $L = L_{(a_0,b_0,c_0)}$ of $K_{\Fq_{r}}$ depending on $(a_0,b_0,c_0)$ such that $L/K_{\Fq_{r}}$ is a degree $20$ totally ramified extension and $C^-/K_{\Fq_{r}}$ attains good reduction over $L/K_{\Fq_{r}}$. 
\end{enumerate}

Moreover, these extensions are minimal with respect to ramification index.
\end{proposition}

\begin{proof}
The initial model for $C^-$ is given by the equation $y^2 = f(x)$. The hyperelliptic model $y^2 = g(x)$ of $C^-$ has valuation vectors over $M$
\begin{align*}
(8 ,8,\geq 8,8, \geq 8,0,\infty)\qquad (\infty,\infty,\infty,\infty), & & \text{if }v_5(d(a,c))=1,\\
(\geq 10 ,8,\geq 8,8, \geq 8,0,\infty)\qquad (\infty,\infty,\infty,\infty), & & \text{if }v_5(d(a,c))\geq 2.
\end{align*}
These valuations are determined by expanding the coefficients of $g(x)$ as power series in $a,c$.


\textbf{Case $v_5(d(a,c)) \ge 2$:} The substitution $x \rightarrow \pi_M^2 x$, $y \rightarrow \pi_M^5 y$ gives us a model with good reduction over $M$, where $\pi_M$ is a uniformizer of $M$.

The extension $M/K_{\Fq_{r}}$ has minimal ramification index with the property that $C^-/M$ has good reduction: Suppose $C^-$ attains good reduction over an extension $F/K_{\Fq_{r}}$ with ring of integers $\mathcal{O}_F$. As $C^-$ attains good reduction over $F$, it has an odd degree hyperelliptic model over $\mathcal O_F$ by Proposition~\ref{hyperelliptic-good}. Since $v_{K_{\Fq_{r}}}(\Delta(C^-)) = 10$, it follows that the ramification index of $F/K_{\Fq_{r}}$ must be divisible by $4$ from \eqref{odd-discrim-trans}.

\textbf{Case $v_5(d(a,c)) = 1$:} Let $g_0(x) = f_0(x - a_0^p - 2c_0)$. From the fact that the coefficients of $g(x)$ lie in $\mathbb{Q}_5$ and $M/\mathbb{Q}_5$ is a degree $8$ totally ramified extension, we have that Eisenstein's criterion holds for $g(x)$ over $\mathbb{Q}_5$. As $g(x)\equiv g_0(x)\pmod{25}$, $g_0(x)$ also satisfies Eisenstein's criterion over $\mathbb{Q}_5$. 

Let $\theta$ be a root of $g_0(x)$ and $L = M(\theta)$. Then $L/K_{\Fq_{r}}$ is a $20$ degree totally ramified extension. Making the substitution $x\rightarrow x + \theta$ to the model $y^2 = g(x)$ of $C^-$, we obtain a model with valuation vectors over $L$
\begin{equation*}
(\geq 80,40,\geq 40, 40,\geq 40,0,\infty)\qquad (\infty,\infty,\infty,\infty).
\end{equation*}
Making the substitution $x\rightarrow \pi_L^{10}x$, $y \rightarrow \pi_L^{25}y$, we get a model with good reduction over $L$, where $\pi_L$ is a uniformizer of $L$.

The extension $L/K_{\Fq_{r}}$ has minimal ramification index with the property that $C^-/L$ has good reduction: Suppose $C^-$ attains good reduction over an extension $F/K_{\Fq_{r}}$. Similar to the previous case, it follows that $4 \mid e(F/K_{\Fq_{r}})$. 

We know from \cite{SerreTate} that $[K^{\text{nr}}_{\Fq_{r}}(J^-[2]):K^{\text{nr}}_{\Fq_{r}}]\mid [F\cdot K^{\text{nr}}_{\Fq_{r}}:K^{\text{nr}}_{\Fq_{r}}]$, where $K_{\Fq_{r}}^{\text{nr}}$ is the maximal unramified extension of $K_{\Fq_{r}}$. As $g_0(x)$ is an Eisenstein polynomial over $\mathbb{Q}_5$, the extension $\mathbb{Q}_5(\theta)/\mathbb{Q}_5$ is a totally ramified extension of degree $5$, which in turn implies the extension $K_{\Fq_{r}}(\theta)/K_{\Fq_{r}}$ is a totally ramified extension of degree $5$. Since $K_{\Fq_{r}}(\theta)\subset K_{\Fq_{r}}(J^-[2])$ it follows that $5\mid [K^{\text{nr}}_{\Fq_{r}}(J^-[2]):K^{\text{nr}}_{\Fq_{r}}]$, and hence $5\mid [F\cdot K^{\text{nr}}_{\Fq_{r}}:K^{\text{nr}}_{\Fq_{r}}]$ so $5 \mid e(F/K_{\Fq_{r}})$. We have thus shown $20\mid e(F/K_{\Fq_{r}})$.
\end{proof}



\begin{proposition}\label{cond-5}
Suppose $5 \nmid ab$. Then the conductor of $\rho_{J^-,\p}$ at $\Fq_{r}$ is $\Fq_{r}^2$ or $\Fq_{r}^3$ accordingly as $v_5(d(a,c)) \ge 2$ or $v_5(d(a,c)) = 1$, respectively.
\end{proposition}
\begin{proof}
Let $F = M$ or $L$ as above. The field cut out by $\rho_{J^-,\p} \mid_{I_{\Fq_{r}}}$ corresponds to the extension $F \cdot K_{\Fq_{r}}^\text{nr}/K_{\Fq_{r}}^\text{nr}$.

There are finitely many possibilities for $F$. For each possible choice, we may compute the conductor exponent of $\rho_{J^-,\p} \mid_{I_{\Fq_{r}}}$ using the ${\tt Magma}$. In particular, using \texttt{Magma's} function \textit{GaloisRepresentations} we compute all possible irreducible Galois representations that factor through the Galois group of $F/K_{\Fq_{r}}$ faithfully. For each Galois representation we compute the conductor which is always equal to $\Fq_{r}^2$ when $F=M$ and $\Fq_{r}^3$ when $F=L$. Therefore, we conclude that the conductor of $\rho_{J^-,\p}$ is equal to $\Fq_{r}^2$ and $\Fq_{r}^3$ when $F=M$ and $L$, respectively.

Alternatively, we may obtain a bound on the conductor exponent at $\Fq_{r}$ using the valuation of the relative different of $F/K_{\Fq_{r}}$ and \cite[(18)]{LRS}. The bound on the conductor exponent is $\le 3$ in case $F = L$ and $\le 2$ in case $F = M$. Since we know the reduction type is potentially good reduction, the conductor exponent is $2$ or $3$, though we do not have an explicit criterion to determine which is the case, unlike the proof above.
\end{proof}


\begin{remark}
We also point out \cite[Proposition 1.16]{DarmonDuke} which covers general $r$ but does not give the exact conductor at $\mathfrak{r}$.
\end{remark}


\section{Irreducibility of $\bar\rho_{J^{\pm},\p}$}

We start with $K$ being a finite extension of $\mathbb{Q}_p$, having ring of integers $\mathcal{O}$, uniformizer $\pi$, and residue field $k$. Fix embeddings $\mathbb{Q}_p \subseteq K \subseteq \overline{\mathbb{Q}}_p$ and $\mathbb{F}_p \subseteq k \subseteq \overline{\mathbb{F}}_p$. For any integer $n\geq1$, denote by $\mathbb{F}_{p^n}$ the subfield of~$\overline{\mathbb{F}}_p$ with~$p^n$ elements. Let $I_K$ denote the inertia subgroup of $G_K$ and $P_K \subseteq I_K$ the wild inertia subgroup. Let $I_{t,K} = I_K/P_K$ denote the tame inertia group of $K$. We denote by $G_{L/K}$ the Galois group of a Galois extension $L/K$. Let $I_{L/K}$ and $I_{t,L/K}$ the inertia and tame inertia subgroups of $G_{L/K}$.

The action of $I_{t,K}$ on $\pi^{1/(p^n-1)}$ gives a homomorphism $\psi : I_{t,K} \rightarrow \mathbb{F}_{p^n}^\times \subseteq \overline{\mathbb{F}}_p^\times$, denoted $\theta_{p^n-1}$ as in~\cite{serre}, which we refer to as \textit{the fundamental character of level $n$}. In contrast, \textit{a fundamental character of level $n$} is any conjugate over $\mathbb{F}_p$ of $\psi = \theta_{p^n-1}$, that is, a character of the form $\sigma \circ \psi$, where $\sigma : \mathbb{F}_{p^n} \hookrightarrow \overline{\mathbb{F}}_p$ is an embedding. In particular, there are $n$ distinct fundamental characters of level $n$.


\begin{theorem}
We have
\begin{equation*}
  I_{t,K} \cong \varprojlim_{(d,p)=1} \mu_d \cong \varprojlim_m \mathbb{F}_{p^m}^\times,
\end{equation*}
where the projective limits are over the homomorphisms
\begin{align*}
\mu_{dd'} & \longrightarrow \mu_d \\
  \alpha & \longmapsto \alpha^{d'}
\end{align*}
and
\begin{align*}
\mathbb{F}_{p^{m n}}^\times & \longrightarrow \mathbb{F}_{p^m}^\times \\
  \alpha & \longmapsto \alpha^{\frac{1-p^{m n}}{1-p^m}}
\end{align*}
\end{theorem}

\begin{proof}
  See \cite[Section~1.2]{serre}.
\end{proof}



\begin{lemma}
\label{invert}

Suppose $k \cong \mathbb{F}_{p^n}$. Let $\psi = \theta_{p^n-1}$ be the fundamental character of level $n$. 

\begin{itemize}
\item Suppose $L$ is a finite tamely ramified abelian extension of $K$ such that $\psi$ factors as $\psi = \psi_{L/K} \circ \alpha$ where
\begin{equation*}
  \psi_{L/K} : I_{t,L/K} \cong I_K \cdot G_{L}/G_{L} \cong I_K/(I_K \cap G_{L}) \rightarrow \mathbb{F}_{p^n}^\times
\end{equation*}
and
\begin{equation*}
  \alpha : I_{t,K} \rightarrow I_{t,L/K}
\end{equation*}
is the natural homomorphism. 
\item Let $r_{L/K} : K^\times \rightarrow G_{L/K}$ be the local reciprocity map, whose restriction to $\mathcal{O}^\times$ factors through a map ${\bar r}_{L/K} : k^\times \rightarrow G_{L/K}$.
\end{itemize}

Then we have that
\begin{equation*}
  \psi_{L/K} \circ {\bar r}_{L/K} (\bar x) = {\bar x}^{-1}
\end{equation*}
for all $x \in \mathbb{F}_{p^n}^\times$.
\end{lemma}
\begin{proof}
From~\cite[Prop.~3]{serre}, we have that
\begin{equation*}
  {\bar r}_{L/K} \circ \psi(s^{-1}) = \alpha(s)
\end{equation*}
for all $s \in I_{t,K}$. Hence, we have
\begin{equation*}
  \psi_{L/K} \circ {\bar r}_{L/K} \circ \psi(s^{-1})  = \psi_{L/K} \circ \alpha(s) = \psi(s)
\end{equation*}
for all $s \in I_{t,K}$. Putting $x = \psi(s^{-1})$ and noting that $\psi$ is surjective to $\mathbb{F}_{p^n}^\times$ yields the result.
\end{proof}

\begin{corollary}
\label{torus-cor}
Suppose $\varphi : G_K \rightarrow \overline{\mathbb{F}}_p^\times$ is a continuous homomorphism. Then, we have that
\begin{equation*}
  \varphi \circ r_K(x) = \prod_{\sigma} \sigma(\bar x)^{n(\sigma)},
\end{equation*}
where $\bar x \in k^\times$ is the reduction of $x \in \mathcal{O}^\times$, $r_K\colon K^{\times}\rightarrow G_K^{ab}$ is the local reciprocity map, $0 \le n(\sigma) \le p-1$, and $\sigma$ runs through the embeddings of $k \hookrightarrow \overline{\mathbb{F}}_p$.
\end{corollary}
\begin{proof}
Let $p^n = |k|$. Firstly, we can write
\begin{equation}
\label{torus-map}
  \varphi \mid_{I_K} = \prod_{\sigma} (\sigma \circ \psi)^{-n(\sigma)}
\end{equation}
where $\psi = \theta_{p^n-1}$ and $0 \le n(\sigma) \le p-1$ as
\begin{equation}
  \varphi \mid_{I_K} = \psi^k
\end{equation}
for some $0 \le -k \le p^n-2$ as $\psi$ has order $p^n-1$. Write $k$ in the form
\begin{equation}
    k = a_0 + a_1 p + \ldots + a_{n-1} p^{n-1}
\end{equation}
where $0 \le -a_i \le p-1$ for all $0 \le i \le n-1$, then the conjugates $\sigma \circ \psi$ are of the form $\psi^{p^i}$ where $0 \le i \le n-1$.


Taking $L = K(\zeta_{p^n-1})(\pi^{1/(p^n-1)}) = K(\pi^{1/(p^n-1)})$, which is a finite tamely ramified abelian extension over $K$, we see from Lemma~\ref{invert} that the fundamental character $\psi$ of level $n$ has the description
\begin{equation}
\label{embed-label}
  \psi \circ r_K(x) = \bar{x}^{-1}.
\end{equation}

The desired result then follows from precomposing \eqref{torus-map} with $r_K$.


\end{proof}

Now let $K$ be a number field. The following result is a generalization of \cite[Appendice A]{kraus8} \cite{Dim,LV}. We provide additional details for the benefit of the reader.
\begin{proposition}\label{L:KrausAppendix}
Let $K$ be a number field with ring of integers~$\mathcal{O}_K$. Let~$p$ be a prime number unramified in~$K$ and~$S_p$ the set of places in~$K$ above~$p$. Let $\varphi : G_K \to \overline{\mathbb{F}}_p^\times$ be a continuous homomorphism satisfying the following conditions:
\begin{enumerate}
\item The Artin conductor of $\varphi$ is $\mathfrak{m}$, an ideal of $\mathcal{O}_K$ prime to $p$;
\item For all~$\mathfrak{p} \in S_p$, the restriction $\varphi \mid_{I_\mathfrak{p}}$ is equal to $\prod_{\sigma \in \Omega_\mathfrak{p}} (\sigma \circ \psi_\mathfrak{p})^{-n_\mathfrak{p}(\sigma)}$, where 
 \begin{enumerate} 
   \item $0 \le n_\mathfrak{p}(\sigma) \le p-1$,
   \item $k_\mathfrak{p}$ is the residue field of $\mathfrak{p}$,
   \item $\Omega_\mathfrak{p}$ denotes the set of embeddings of $k_\mathfrak{p}$ into $\overline{\mathbb{F}}_p$,
   \item $\psi_\mathfrak{p} : I_{t,K_\mathfrak{p}} \rightarrow k_\mathfrak{p}^\times \subseteq \overline{\mathbb{F}}_p^\times$ is the fundamental character, where $K_\mathfrak{p}$ is the completion of $K$ at $\mathfrak{p}$.
 \end{enumerate}
\end{enumerate}
Then, for all totally positive units~$u \in \mathcal{O}_K^\times$ such that $u \equiv 1 \pmod{\mathfrak{m}}$, we have that
\[
  \prod_{\mathfrak{p} \in S_p} \prod_{\sigma \in \Omega_\mathfrak{p}} \sigma (u + \mathfrak{p})^{n_\mathfrak{p}(\sigma)} = 1.
\]
\end{proposition}

\begin{proof}
Let $r_K : \mathbb{A}_K^\times \rightarrow G_K^\text{ab}$ be the global reciprocity map, and let $K_p = (K \otimes \mathbb{Q}_p)^\times = \prod_{\mathfrak{p} \in S_p} K_\mathfrak{p}^\times$, which sits inside the id\`ele group  $\mathbb{A}_K^\times$. We also denote by 
$$
U_\mathfrak{m}=\lbrace x\in\mathbb{A}_K^\times:~x_v\in\mathcal{O}_v^\times,~x_v>0\text{ for all real }v \text{ and }x_\mathfrak{q}\equiv 1\pmod{\mathfrak{q}^{v_{\mathfrak{q}}(\mathfrak{m})}}\text{ for all }\mathfrak{q}\mid \mathfrak{m}\rbrace.
$$

We have that
\begin{enumerate}
    \item $\varphi \circ r_K$ is trivial on $U_{\mathfrak{m},v}$ for places $v \nmid p$,
    \item $\varphi \circ r_K(x) = \prod_{\mathfrak{p} \in S_p} \prod_{\sigma \in \Omega_\mathfrak{p}} \sigma (\bar x_\mathfrak{p})^{n_\mathfrak{p}(\sigma)}$ for $x = \prod_\mathfrak{p} x_\mathfrak{p} \in K_p^\times$ by Corollary~\ref{torus-cor}.
\end{enumerate}

It follows that $\varphi \circ r_K$ is trivial on $E_\mathfrak{m} = U_\mathfrak{m} \cap K^\times$, that is, the group of totally positive units $u \in \mathcal{O}_K^\times$ such that $u \equiv 1 \pmod \mathfrak{m}$.
\end{proof}

We now have all the ingredients to prove $\bar\rho_{J^+,\p}$ and $\bar\rho_{J^-,\p}$ are irreducible.  

\begin{theorem}
\label{irreducible-plus} Suppose $2 \nmid ab$ and $5 \mid ab$. Then, $\bar\rho_{J^+,\p}$ is irreducible for $p > 5$.
\end{theorem}

\begin{proof}
Since $\bar\rho_{J^+,\p}$ is odd and $K$ is totally real it is well known that $\bar\rho_{J^+,\p}$ is absolutely irreducible if and only if it is irreducible.

Suppose ${\bar{\rho}}_{J_r^+,\mathfrak{p}}$ is reducible, that is,
\begin{equation*}
\bar\rho_{J^+,\p} \sim \begin{pmatrix} \theta & h \\ 0 & \theta' \end{pmatrix} 
\quad \text{with} \quad \theta, \theta' : G_K \rightarrow \mathbb{F}_{\mathfrak{p}}^*
\quad \text{satisfying} \quad \theta \theta' = \chi_p,
\end{equation*}
where $\mathbb{F}_{\mathfrak{p}}$ is the residual field of $K$ at $\mathfrak{p}$. As $\theta\theta'=\chi_p$, the characters $\theta$ and $\theta'$ have the same conductor exponents away from $p$.





Let $\mathfrak{q}\neq\mathfrak{p}$ be a prime of $\mathcal{O}_K$. The semi-simplification $\bar\rho^{\text{ss}}_{J^+,\p}$ of the reduction $\bar\rho_{J^+,\p}$ does not depend on the choice of lattice and its restriction to $I_{\mathfrak{q}}$ is isomorphic to $(\theta \oplus \theta') \mid_{I_{\mathfrak{q}}}$. Suppose $e_{\mathfrak{q}}$ is the conductor exponent of $\theta$ and $\theta'$ which is the same as mentioned above. Then, the conductor exponent at $\mathfrak{q}$ of $\bar\rho^{\text{ss}}_{J^+,\p}$ is $2e_{\mathfrak{q}}$. On the other hand, the conductor exponent at $\mathfrak{q}$ of $\bar\rho^{\text{ss}}_{J^+,\p}$ is bounded by the conductor exponent at $\mathfrak{q}$ of $\bar\rho_{J^+,\p}$ which is $0$ for $\mathfrak{q}\neq\Fq_{r}$ and $0$ or $1$ for $\mathfrak{q}=\Fq_{r}$ by Theorem \ref{thm:Serre_level}. Thus, $e_{\mathfrak{q}}=0$ for all $\mathfrak{q}$ and the conductor of $\theta$ and $\theta'$ away from $p$ is $\mathcal{O}_K$.

By Theorem \ref{thm:Serre_level} again, the representation $\bar\rho_{J^+,\p}$ is finite at all primes $\mathfrak{p} \mid p$, and as $p$ is unramified in $K$, it follows from \cite[Corollaire 3.4.4]{Raynaud} that the restriction to $I_\mathfrak{p}$ of $\theta \oplus~\theta^\prime$ is isomorphic to 
\begin{equation}\label{eq:Theta_plus_semi}
 \chi_p \oplus~1\qquad\text{or}\qquad \psi_\mathfrak{p} \oplus~\psi_\mathfrak{p}^p
\end{equation}
where $\chi_p$ is the $p$th cyclotomic character and $\psi_\mathfrak{p}$ is a fundamental character of level $2$.

Suppose that one of $\theta$ and $\theta^\prime$ is unramified at all primes $\mathfrak{p} \mid p$. We can assume it is $\theta$ (after relabeling if needed). Then, $\theta$ corresponds to a character of the Ray class group of modulus $\infty_1\infty_2$ where $\infty_i$ denote the two places at infinity, which is trivial. It follows that $\theta=1$ and $\theta^\prime = \chi_p$. As $C^+/K$ has good reduction at $\mathfrak{q}_2$, we have that
\begin{equation*}
  1 + 2^2 \equiv a_{\mathfrak{q}_2}(J^+)\pmod {\mathfrak{p}},
\end{equation*}
where $a_{\mathfrak{q}_2}(J^+)$ is the trace of $\rho_{J^+,\p}$ evaluated at a Frobenius element at $\mathfrak{q}_2$. Using the change of variables in \cite[Proposition 1.15]{DarmonDuke} with a short {\tt Magma}~script,
we check that $a_{\mathfrak{q}_2}=0$, so $\mathfrak{p}\mid 5$ which is a contradiction to the fact that $p>5$.

Suppose that both $\theta$ and $\theta^\prime$ ramify at some prime above $p$. Applying Lemma~\ref{L:KrausAppendix} over $K$ with $\phi$ equal to either $\theta$ or $\theta^\prime$ implies that $p$ divides the norm of $u - 1$ by \eqref{eq:Theta_plus_semi}, where $u = \epsilon_1$ is the fundamental unit in $K$. However, this norm is $-1$, a contradiction.
\end{proof}


\begin{theorem}
\label{irreducible-minus}
Suppose $2 \mid a$, $b \equiv c \equiv -1 \pmod 4$, and $5 \nmid ab$. Then, $\bar\rho_{J^-,\p}$ is irreducible for $p >5$.
\end{theorem}
\begin{proof}
Since $\bar\rho_{J^-,\p}$ is odd and $K$ is totally real it is well known that ${\bar{\rho}}_{J,\mathfrak{p}}$ is absolutely irreducible if and only if it is irreducible. To show $\bar\rho_{J^-,\p}$ is irreducible, it suffices to show ${\bar{\rho}}_{J, \mathfrak{p}}$ is irreducible where $J = J^- \otimes \chi_0$ and $\chi_0$ is as in Theorem~\ref{conductor-minus}.


Suppose ${\bar{\rho}}_{J,\mathfrak{p}}$ is reducible, that is,
\begin{equation*} 
{\bar{\rho}}_{J,\mathfrak{p}} \sim \begin{pmatrix} \theta & h \\ 0 & \theta' \end{pmatrix} 
\quad \text{with} \quad \theta, \theta' : G_K \rightarrow \mathbb{F}_{\mathfrak{p}}^*
\quad \text{satisfying} \quad \theta \theta' = \chi_p,
\end{equation*}
where $\mathbb{F}_{\mathfrak{p}}$ is the residual field of $K$ at $\mathfrak{p}$. As $\theta\theta'=\chi_p$, the characters $\theta$ and $\theta'$ have the same conductor exponents away from $p$. 

By Propositions \ref{potmul2} and \ref{cond-2B} we know that $\rho_{J,\mathfrak{p}} \mid_{I_{\mathfrak{q}_2}}$ is of special type attached to a character $\chi$ and the conductor at $\mathfrak{q}_2$ of $\rho_{J,\mathfrak{p}}$ does not degenerate under reduction mod $\mathfrak{p}$ with conductor exponent of $\rho_{J,\p}\mid_{I_{\mathfrak{q}_2}}$ and $\bar\rho_{J,\p}\mid_{I_{\mathfrak{q}_2}}$ equal to $1$. If $\chi$ is ramified then the conductor exponent of $\rho_{J,\mathfrak{p}} \mid_{I_{\mathfrak{q}_2}}$ is twice the conductor exponent of $\chi \mid_{I_{\mathfrak{q}_2}}$ which contradicts the fact that the conductor exponent at $\mathfrak{q}_2$ of $\rho_{J,\p}\mid_{I_{\mathfrak{q}_2}}$ is equal to $1$. Hence, $\chi$ is unramified at $\mathfrak{q}_2$.



The semi-simplification of the reduction ${\bar{\rho}}_{J,\mathfrak{p}}$ does not depend on the choice of lattice and its restriction to $I_{\mathfrak{q}_2}$ is isomorphic to $\bar \chi \oplus \bar \chi$ (where $\bar \chi$ is the reduction of $\chi$ mod $\mathfrak{p}$) which in turn is isomorphic to $(\theta \oplus \theta') \mid_{I_{\mathfrak{q}_2}}$. Thus, the conductor at $\mathfrak{q}_2$ of $\theta$ and $\theta'$ is $\mathcal{O}_K$.

Alternatively, we show the conductor at $\mathfrak{q}_2$ of $\theta$ and $\theta'$ is $\mathcal{O}_K$ without knowing that $\rho_{J,\mathfrak{p}} \mid_{I_{\mathfrak{q}_2}}$ is of special type. The conductor at $\mathfrak{q}_2$ of the semi-simplification of ${\bar{\rho}}_{J,\mathfrak{p}}$, which is isomorphic to $\theta \oplus \theta'$, divides the conductor at $\mathfrak{q}_2$ of the semi-simplification of $\rho_{J,\mathfrak{p}}$, which in turn divides the conductor at $\mathfrak{q}_2$ of $\rho_{J,\mathfrak{p}}$, namely, $\mathfrak{q}_2$. From above $\theta$ and $\theta'$ have the same conductor at $\mathfrak{q}_2$, it follows that the conductor of $\theta$ and $\theta'$ is $\mathcal{O}_K$.

From Proposition \ref{semistable_at_5_J_minus} we know that $\rho_{J^-,\p}(I_{\Fq_{r}})$ has order equal to $4$ or $20$, therefore  ${\bar{\rho}}_{J,\mathfrak{p}}(I_{\Fq_{r}})$ has order equal to $4$ or $20$, respectively. This holds because $\rho_{J,\mathfrak{p}}(I_{\Fq_{r}})$ does not intersect the kernel of reduction (which is a pro-$p$ group) since $p > 5$ and $\chi_0$ is unramified at $\Fq_{r}$. 

Since $\bar\rho_{J,\p} (I_{\Fq_{r}})$ has order coprime to $p > 5$ by Proposition~\ref{semistable_at_5_J_minus} and Maschke's Theorem, we conclude that ${\bar{\rho}}_{J,\mathfrak{p}} \mid_{I_{\Fq_{r}}} \cong \theta \oplus \theta' \mid_{I_{\Fq_{r}}}$. From Theorem \ref{thm:Serre_level}, we know that the conductor exponent at $\Fq_{r}$ of $\bar\rho_{J,\p}\mid_{I_{\Fq_{r}}}$ is $2,3$. As above we conclude that the conductor at $\Fq_{r}$ of $\theta$ and $\theta'$ is the same and divides $\Fq_{r}$. 

In summary, the conductor of $\theta$ and $\theta'$ away from $p$ divides $\Fq_{r}$. By Theorem \ref{thm:Serre_level}, the representation $\bar\rho_{J^-,\p}$ is finite at all primes $\mathfrak{p} \mid p$, and as $p$ is unramified in $K$, it follows from \cite[Corollaire 3.4.4]{Raynaud} that the restriction to $I_\mathfrak{p}$ of $\theta \oplus~\theta^\prime$ is isomorphic to 
\begin{equation}\label{eq:Theta_plus_semi_minus}
 \chi_p \oplus 1 \qquad \text{or} \qquad \psi_\mathfrak{p} \oplus \psi_\mathfrak{p}^p,
\end{equation}
where $\chi_p$ is the $p$-th cyclotomic character and $\psi_\mathfrak{p}$ is a fundamental character of level $2$.

Suppose that one of $\theta$, $\theta'$ is unramified at every prime dividing $p$. We can assume it is~$\theta$ (after relabeling if needed). It follows that $\theta$ corresponds to a character of the Ray class group of modulus $\Fq_{r} \infty_1\infty_2$ where $\infty_i$ denote the two places at infinity. The Ray class group is isomorphic to $\mathbb{Z}/2\mathbb{Z}$. From the above we have that $4\mid\#{\bar{\rho}}_{J,\mathfrak{p}}(I_{\Fq_{r}})$ and ${\bar{\rho}}_{J,\mathfrak{p}} \mid_{I_{\Fq_{r}}} \cong \theta \oplus \theta' \mid_{I_{\Fq_{r}}}$, hence $\theta\mid_{I_{\Fq_{r}}}$ has order divisible by $4$ which is a contradiction.

Suppose that both $\theta$ and $\theta^\prime$ ramify at some prime above $p$. Let $\epsilon_1$ be the
the fundamental unit in $K$. Applying Proposition~\ref{L:KrausAppendix} to either $\theta$ or $\theta^\prime$ implies that $p$ divides the norm 
of $u - 1$ by \eqref{eq:Theta_plus_semi_minus}, where $u = \epsilon_1^{n_1}$ and $n_1 = 4$ is the smallest positive integer
such that $u \equiv 1 \pmod{\Fq_{r}}$. This yields of bound of $p = 5$, contradicting $p > 5$.
\end{proof}




\section{Proof of Theorem~\ref{main-theorem}}

Let $(a,b,c) \in \mathbb{Z}^3$ be a non-trivial primitive solution to \eqref{main-equ}. It is enough to prove Theorem \ref{main-theorem} for the case $n=p$ an odd prime or $4$.  For the case $n=3$ this is a result by Kraus \cite{Kraus1}, the case $n=5$ is a special case of Fermat's Last Theorem (see for instance, \cite[Th\'eor\`eme IX]{Di28}) while the case $n=4$ has been proved in \cite[Theorem 1.1]{Bruin03}. The case $n = 7$ is treated in \cite{dahmen-siksek}.


For the rest of the proof, we may now assume that $n=p\geq 11$ is a prime. Let $S_2(\mathfrak{n})$ denote the space of Hilbert newforms over $K$ with parallel weight $2$, trivial character, and level $\mathfrak{n}$. We may assume without loss of generality in the second case that $2 \mid a$, $b \equiv c \equiv -1 \pmod 4$ by switching the roles of $a$ and $b$ and negating $(a,b,c)$, if necessary.

\subsection{Local comparison of traces}

In the elimination step of the modular method using a Frey abelian variety $J$, we typically show that an isomorphism
\begin{equation}
\label{rhobar-isom}
    {\bar{\rho}}_{J,\mathfrak{p}} \simeq {\bar{\rho}}_{g,\mathfrak{P}},
\end{equation}
where $\mathfrak{p}$ is prime of $K$ and $\mathfrak{P}$ is a prime of field of coefficient $K_g$ of a Hilbert newform $g$, cannot occur by exhibiting a prime $\mathfrak{q}$ such that
\begin{equation}
\label{trace-compare-naive}
    \text{tr } {\bar{\rho}}_{J,\mathfrak{p}}(\Frob_\mathfrak{q}) \not= \text{tr } {\bar{\rho}}_{g, \mathfrak{P}}(\Frob_\mathfrak{q}).
\end{equation}
However, a subtlety occurs because in the definition of the isomorphism \eqref{rhobar-isom} we mean
\begin{equation}
    {\bar{\rho}}_{J,\mathfrak{p}} \otimes \overline{\mathbb{F}}_p \simeq {\bar{\rho}}_{g,\mathfrak{P}} \otimes \overline{\mathbb{F}}_p.
\end{equation}
Hence, the comparison \eqref{trace-compare-naive} cannot be done until we have chosen an embedding of the residue fields of $K_\mathfrak{p}$ and $K_{g,\mathfrak{P}}$ into $\overline{\mathbb{F}}_p$. The correct condition to rule out an isomorphism as in \eqref{rhobar-isom} by a local comparison of traces is
\begin{equation}
    p \nmid N_{L/\mathbb{Q}}\left( \prod_{\sigma \in \Gal(K/\mathbb{Q})} (a_\mathfrak{q}(g) - a_\mathfrak{q}(J)^\sigma) \right),
\end{equation}
where $L$ is the compositum of $K$ and $K_g$ inside $\overline{\mathbb{Q}}$ (see \cite{BCDF2} for more details).

Finally, we remark that this does not affect the computational time for the elimination step, since in practice {\tt Magma} is only able to compute $a_\mathfrak{q}(J)$ up to Galois conjugation over $\mathbb{Q}$ in any case.


\subsection{Proof of Theorem~\ref{main-theorem} (I)}

We are under the assumption that $2 \nmid ab$ and $5 \mid ab$. By Theorems \ref{irreducible-plus} and \ref{modularity-plus}, we have that $\bar\rho_{J^+,\p}$ is irreducible and modular. Hence, by level lowering for Hilbert modular forms~\cite{Fuj,Jarv,Raj}, we have that 
\begin{equation}\label{elimination-plus}
  \bar\rho_{J^+,\p}\simeq {\bar{\rho}}_{g,\mathfrak{B}}
\end{equation}
where $g$ is a Hilbert newform of parallel weight $2$, trivial character over $K$ and level $\mathcal{O}_K$ or $\Fq_{r}$ by Theorem \ref{thm:Serre_level}, and $\mathfrak{B}$ is a prime above $p$ in the field of coefficients of $g$. However, both spaces of Hilbert newforms $S_2(1)$ and $S_2(\Fq_{r})$ are empty which gives a contradiction.




\subsection{Proof of Theorem~\ref{main-theorem} (II)}

As before, we may assume that $n=p\geq 11$ is a prime. We are under the assumption that $2 \mid a$, $b \equiv c \equiv -1 \pmod 4$, and $5 \nmid ab$. By Theorems \ref{irreducible-minus} and \ref{modularity-minus}, we have that $\bar\rho_{J^-,\p}$ is irreducible and modular. 




In what follows, we use the fact that
\begin{equation*}
    \rho_{J \otimes \chi, \mathfrak{p}} = \rho_{J, \mathfrak{p}} \otimes \chi,
\end{equation*}
for any character $\chi : G_K \rightarrow \left\{ \pm 1 \right\}$ of order dividing $2$, where $J \otimes \chi$ means the twist of $J$ by $\chi$, and $\chi$ twists by the automorphism $-1$ of $J$.

Let $J = J^- \otimes \chi_0$ where $\chi_0\in K(S_2, 2)^*$ where $S_2=\lbrace \mathfrak{q}_2\rbrace$. By level lowering for Hilbert modular forms as above, we have that
\begin{equation}\label{eq:elimination-minus}
  {\bar \rho}_{J,\mathfrak{p}} \simeq {\bar{\rho}}_{g,\mathfrak{B}}
\end{equation}
where $g$ is a Hilbert newform of parallel weight $2$, trivial character over $K$ and level $\mathfrak{q}_2 \Fq_{r}^t$ for $t = 2, 3$ (by Theorem \ref{thm:Serre_level}) and $\mathfrak{B}$ is a prime of $K$ above $p$ in the field of coefficients of $g$. Note in level lowering, we can level lower prime by prime and choose not to strip $\mathfrak{q}_2$ from the level of $\rho_{J,\mathfrak{p}}$ in case the Serre level of ${\bar \rho}_{J,\mathfrak{p}}$ is not divisible by $\mathfrak{q}_2$. 


Suppose $\mathfrak{q}\neq \mathfrak{p}$ is a prime of $K$ not above $2$ and $5$. Then we have that
\begin{align}
a_\mathfrak{q}(g) & \equiv a_{\mathfrak{q}}(J) \pmod{\mathfrak{p}}, &~\text{if }q\nmid ab,\\
a_\mathfrak{q}(g)^2 & \equiv (N(\mathfrak{q}) + 1)^2 \pmod{\mathfrak{p}}, &~\text{if } q\mid ab, 
\end{align}
where $a_{\mathfrak{q}}(J)=\text{tr}{\rho}_J(\Frob_\mathfrak{q})$ and $N(\mathfrak{q})$ is the norm of $\mathfrak{q}$. Thus, defining
$$
T(g,\mathfrak{q})= N(\mathfrak{q})\cdot \left(a_\mathfrak{q}(g)^2-(N(\mathfrak{q}) + 1)^2 \right)\cdot\prod_{a,b\in\mathbb{F}_q,ab\neq 0} N_{L/\mathbb{Q}} \left( \prod_{\sigma \in \Gal(K/\mathbb{Q})} (a_\mathfrak{q}(g) - a_{\mathfrak{q}}(J)^\sigma )\right),
$$
we have that $p\mid T(g,\mathfrak{q})$, where $L$ is the compositum of $K$ and $K_g$ inside ${\overline{\Q}}$. Taking the $\gcd$ of $T(g,\mathfrak{q})$ for a suitable choice of primes $\mathfrak{q}$ above $q$, we typically obtain a small finite set of possible primes $p$ (assuming one of the $T(g,\mathfrak{q})$ is non-zero). 

For all choices of $\chi_0$, using the auxiliary primes $q = 3, 7, 11$, we eliminate all newforms $g$ except for the prime exponents $p = 2, 3, 5, 7$, which proves the desired conclusion.



\begin{remark}
Working with all the $J^-\otimes \chi_0$ instead of the $J^-$ does have two important consequences. First of all, the level of the space of Hilbert newforms we have to compute is smaller. For $J^-$ we also have to compute the space of Hilbert newforms of level $\mathfrak{q}_2^4\mathfrak{q}_r^t$ with $t=2,3$ which have bigger dimension and thus make the computations slower. Secondly, the spaces of Hilbert newforms of level $\mathfrak{q}_2^4\mathfrak{q}_r^t$ with $t=2,3$ have forms with complex multiplication over $\mathbb{Q}(\zeta_5)$. The elimination step using standard comparison of traces of Frobenius does not work on these forms and requires additional elimination techniques to prove Theorem~\ref{main-theorem}.


\end{remark}














































































