1 Introduction

The modular method for solving Diophantine equations was pioneered by Frey, Serre, Ribet, and Wiles with the famous proof of Fermat’s Last Theorem in 1995 [33, 36]. Since then, various generalizations of Fermat’s Last Theorem have been considered, studying equations of the shape

$$\begin{aligned} Ax^p+By^q=Cz^r \text { with } 1/p+1/q+1/r<1 \end{aligned}$$
(1)

for fixed integers AB and C. We call (pqr) the signature of the Eq. (1). We call a solution (xyz) primitive if \(\gcd (x,y,z)=1\). Note that if \(A=B=C=1\), this is equivalent to xyz being pairwise coprime. A non-trivial solution (xyz) is a solution where \(xyz \ne 0\). The so-called Generalized Fermat equation (1) is the subject to the following conjecture, which is known to be a consequence of the ABC-conjecture.

Conjecture 1

Fix \(A,B,C\in \mathbb {Z}\) pairwise coprime. Then, there exist only finitely many non-trivial, primitive triples with \((x,y,z)\in \mathbb {Z}^3\) and pqr primes such that (1) holds (here solutions where one of xyz equals 1 are counted only once, e.g. \(2^3 +1^q = 3^2\) for all q counts as one solution).

A partial result towards this conjecture due to Darmon–Granville [11] asserts the following.

Theorem 2

(Darmon–Granville) For ABC fixed as above and a fixed signature (pqr) there exist only finitely many non-trivial, primitive integer solutions to (1).

The proof involves Faltings Theorem on the finiteness of rational points on curves of genus at least 2. Theorem 2 can be easily generalized for equations with solutions in the ring of integers of any number field K, and a suitable version of Conjecture 1 is expected to hold. In this setting, we say a solution (xyz) is primitive if \(x\mathcal {O}_K+y\mathcal {O}_K+z\mathcal {O}_K=\mathcal {O}_K \).

Furthermore, Conjecture 1 has been established for many families of signatures (both over \(\mathbb {Q}\) and over totally real number fields) using variants of the modular approach. Some examples of signatures that have been (partially) solved using the modular method can be found in Table 1.

Table 1 Solved signatures using the modular method

Footnote 1

The modular method is a strategy of attacking Diophantine Equations (usually parameterised by a varying prime exponent p) which can be summarised in three steps.

  • Step 1. Constructing a Frey elliptic curve. Attach to a putative solution (of some Diophantine equation) an elliptic curve E/K, for K an appropriately chosen totally real number field. We require E to have the minimal discriminant \(\Delta =CD^p\), where C is a constant.

  • Step 2. Modularity/Level lowering. Prove modularity of E/K and irreducibility of the residual Galois representations \(\bar{\rho }_{E,p}\) attached to E, to conclude (via level lowering results), that \(\bar{\rho }_{E,p} \sim \bar{\rho }_{\mathfrak {f},p}\) where \(\mathfrak {f}\) is a Hilbert newform with rational Hecke eigenvalues and level \(\mathcal {N}_p\), depending only on C.

  • Step 3. Contradiction. Prove that among the finitely many Hilbert newforms predicted above, none of them corresponds to \(\bar{\rho }_{E,p}\).

In Sects. 2 and 3, we carefully explain these steps and present the theoretical background needed for this variant of the modular approach to work.

Let us focus on signature (rrp). Usually, the equation considered is

$$\begin{aligned} x^r+y^r=dz^p, \end{aligned}$$
(2)

where rp are rational primes, d is a positive integer, with r and d fixed. In this paper, we will follow the recipes described by Freitas [16] to construct the desired Frey curve. Freitas describes a framework for attacking (2), by constructing the so-called multi-Frey family of curves. However, we will only work with one elliptic curve belonging to this family, as described in Sect. 2.

Using the multi-Frey approach, Freitas shows in [16] that for \(p>(1+3^{18})^2\), there are no non-trivial, primitive integer solutions to the (7, 7, p) equation when \(d=3\). Later on, the same author together with Billerey, Chen, Dieulfait gives an optimal bound for the same result together with a resolution to (7, 7, p) with \(d=1\) conditional on local constraints [6]. The same authors together with Dembele prove that for all p there are no non-trivial primitive solutions for signatures (5, 5, p) and (13, 13, p) when \(d=3\) in [4, 7]. Moreover, by assuming local conditions on the putative solution, a partial result is given for (5, 5, p) when \(d \in \{ 1,2\}\).

Another popular direction of attacking this problem originated in Darmon’s program and involves using Frey abelian varieties of higher dimensions (in place of Frey elliptic curves). In a recent paper, Billerey et al. [5] use some of the additional structure of the Frey abelian varieties to get asymptotic resolutions for (11, 11, p) with \(d=1\) for solutions locally away from \(xy=0\). In order to accomplish this, the authors had to build on the progress surrounding the modular method by generalizing the theoretical machinery involved in Step 2 to this setting.

An even more recent result by Freitas and Najman [18] gives the following.

Theorem 3

Let rp and d as in (2) with \(r,p\not \mid d\). Moreover assume d is an odd positive integer, not an rth power, and p large compared to r. Then, for a set of primes p with positive density, the equation (2) has no non-trivial, primitive integer solutions (xyz) with \(2|(x+y)\) or \(r|(x+y)\).

We say the asymptotic Fermat holds for signature (rrp) if there exists a constant \(B_r\) such that, there are no non-trivial, primitive integer solutions (respecting certain local conditions) to the equation \(x^r+y^r=z^p\) for \(p>B_r\).

Moreover, we examine the Eq. (2) over a totally real number field K, and give computable criteria of testing if the asymptotic Fermat for signature (rrp) with non-trivial, primitive solutions in \(\mathcal {O}_K\) (respecting certain local conditions) holds. The argument is pioneered by Freitas and Siksek [20] and involves modularity of elliptic curves over totally real fields, an “Eichler–Shimura”-type result, image of inertia comparison, and the study of S-unit equations.

1.1 Our results

Let K be a number field. For any rational prime p we denote by

$$S_{K,p}:=\{\mathfrak {P}\, : \mathfrak {P} \text { is a prime of } K \text { above } p\}.$$

Moreover, for a fixed prime r, we denote by \(K^+_{r}:=K(\zeta _r+\zeta _r^{-1})\), where \(\zeta _r\) is a primitive \(r{\text {th}}\) root of unity. If the prime r is understood from the context, we will omit the subscript r in \(K^+_{r}\).

We would like to study the solutions of \(x^r+y^r=z^p\) over a totally real field K via the modular approach. The first step is to construct a Frey elliptic curve E. One way to realize this is by defining \(E/K_r^+\) as described in Sect. 2. Therefore, it makes sense to view our equation over \(K^+_r\) first. Note that if K is totally real, then \(K^+_{r}\) stays totally real. Given any number field F, we denote by \(h_F^+\) the narrow class number of F. Let \(H_F^+\) be the narrow Hilbert class field of F (i.e. the maximal field extension of F which is abelian and unramified at all finite primes). By standard class field theoretic results, \(h_F^+=[H_F^+:F]\).

Theorem 4

Let \(r\ge 5\) be a rational prime and K a totally real number field. Define \(K^+:=K(\zeta _r+\zeta _r^{-1})\) and \(S_{K^+}:=S_{K^+,2}\cup S_{K^+,r}\). Suppose that there exists a prime \( {\mathfrak {P}} \in S_{K^+,2},\) such that every solution \((\lambda , \mu ) \in \mathcal {O}_{S_{K^+}}^* \times \mathcal {O}_{S_{K^+}}^*\) to the \(S_{K^+}\)-unit equation

$$\begin{aligned} \lambda +\mu = 1 \end{aligned}$$

satisfies \(\max (|v_{ {\mathfrak {P}}}(\lambda )|,|v_{ {\mathfrak {P}}}(\mu )|)\le 4v_{ {\mathfrak {P}}}(2)\). Then, there is a constant \(B_{K,r}\) (depending only on K) such that for each rational prime \(p>B_{K,r},\) the equation \(x^r+y^r=z^p\) has no non-trivial, primitive solutions \((x,y,z) \in \mathcal {O}_{K^+}^3\) with \( {{\mathfrak {P}}}|z\).

In particular, by considering \(\mathfrak {Q}\) to be the prime in \(S_{K,2}\) below \( \mathfrak {P},\) the equation \(x^r+y^r=z^p\) with \(p>B_{K,r}\) has no non-trivial, primitive solutions \((x,y,z) \in \mathcal {O}_{K}^3\) with \(\mathfrak {Q}|z\).

Remark 5

  • If we assume modularity of elliptic curves over totally real number fields, the constant \(B_{K,r}\) is effectively computable.

  • By Siegel [31], S-unit equations have finitely many solutions over number fields. Moreover, they are effectively computable, for example, an S-unit solver has been implemented in the free open-source mathematics software, Sage by Alvarado et al. [1].

Theorem 6

Let \(r\ge 5\) a rational prime, K be a totally real number field and \(K^+:=K(\zeta _r+\zeta _r^{-1})\). Denote by \(\pi _r:= \zeta _r+ \zeta _r^{-1} -2\). Assume that

  1. (i)

    r is inert in K

  2. (ii)

    there is a unique prime \(\mathfrak {P}\) above 2 in \(K^+\) which has ramification index \(e:=e(\mathfrak {P}/2);\)

  3. (iii)

    \(2 \not \mid h_{K^+}^+;\)

  4. (iv)

    the congruence \(\pi _r \equiv \nu ^2 \mod \mathfrak {P}^{(4e+1)}\) has no solutions in \(\nu \in \mathcal {O}_{K^+}/\mathfrak {P}^{(4e+1)}\).

Then, there is a constant \(B:=B_{K,r}\) (depending only on r and K) such that for each rational prime \(p>B,\) the equation \(x^r+y^r=z^p\) has no non-trivial, primitive solutions \((x,y,z)\in \mathcal {O}_{K^+}\) with \(\mathfrak {P}|z\).

Corollary 7

Fix \(r \ge 5 \) a rational prime such that \(r \not \equiv 1 \mod 8 \). Let \(\mathbb {Q}^+_r:=\mathbb {Q}(\zeta _r+\zeta _r^{-1}),\) suppose that 2 is inert in \(\mathbb {Q}^+\) and \(2 \not \mid h_{\mathbb {Q}^+}^+\). Then, there is a constant \(B_r\) (depending only on r) such that for each rational prime \(p>B_r,\) the equation \(x^r+y^r=z^p\) has no non-trivial, primitive, integer solutions with 2|z.

Corollary 8

There are no non-trivial, primitive, integer solutions to

$$\begin{aligned} x^r+y^r=z^p \end{aligned}$$

with 2|z for \(r \in \{5,7,11,13,19,23,37,47,53,59,61,67,71,79,83,101,103,107,\) \(131,139,149\}\) and \(p>B_r,\) where \(B_r\) is a constant depending on r.

Let’s now study \(x^r+y^r=z^p\) over quadratic fields of the form \(K(\sqrt{d})\) for d square-free.

Corollary 9

Fix \(r \ge 5\) a rational prime and let \(K:=\mathbb {Q}(\sqrt{d})\) with d a square-free, positive integer and \(K^+:=K(\zeta _r+\zeta _r^{-1})\).

Assume that

  1. (i)

    r is inert in K and \(r \not \equiv 1,d \mod 8;\)

  2. (ii)

    there is a unique prime \(\mathfrak {P}\) above 2 in \(K^+\) and we denote the unique prime of K below it by \(\mathfrak {Q};\)

  3. (iii)

    \(2 \not \mid h_{K^+}^+\).

Then, there is a constant \(B_{K,r}\) (depending only on r and K) such that for each rational prime \(p>B_{K,r},\) the equation \(x^r+y^r=z^p\) has no non-trivial, primitive solutions \((x,y,z) \in \mathcal {O}_K^3\) with \(\mathfrak {Q}|z\).

Example 10

One can check the conditions in the hypothesis (for example by using Magma) to get the following.

  • When \(K=\mathbb {Q}(\sqrt{2})\) and \(\mathfrak {P}=(\sqrt{2})\mathcal {O}_K\), there are no non-trivial, primitive solutions \((x,y,z)\in \mathcal {O}_K^3\) with \(\mathfrak {P}|z\) for signatures:

    $$\begin{aligned} (5,5,p),(11,11,p),(13,13,p) \end{aligned}$$

    and sufficiently large p.

  • When \(K=\mathbb {Q}(\sqrt{5})\) and \(\mathfrak {P}=(2)\mathcal {O}_K\), there are no non-trivial, primitive solutions \((x,y,z)\in \mathcal {O}_K^3\) with \(\mathfrak {P}|z\) for signature (7, 7, p) and sufficiently large p.

1.2 Notational conventions

Let K be a totally real field and E/K be an elliptic curve of conductor \(\mathcal {N}_E\). Let p be a rational prime. Define the following quantities:

$$\begin{aligned} \mathcal {M}_p=\prod _{\begin{array}{c} \mathfrak {q}||\mathcal {N}_E \\ p|v_{\mathfrak {q}}(\Delta _\mathfrak {q}) \end{array}}\mathfrak {q}, \quad \mathcal {N}_p=\frac{\mathcal {N}_E}{\mathcal {M}_p}, \end{aligned}$$
(3)

where \(\Delta _{\mathfrak {q}}\) is the discriminant of a local minimal model for E at \(\mathfrak {q}\).

Let \(G_K=\text {Gal}(\bar{K}/K)\), where \(\bar{K}\) is the algebraic closure of the number field K. For an elliptic curve E/K, we write

$$\begin{aligned} \overline{\rho }_{E,p}: G_K \rightarrow \text {Aut}(E[p])\simeq \text {GL}_2(\mathbb {F}_p) \end{aligned}$$

for the representation of \(G_K\) on the p-torsion of E.

For a Hilbert eigenform \(\mathfrak {f}\) over K, we let \(\mathbb {Q}_{\mathfrak {f}}\) denote the field generated by its eigenvalues. A comprehensive definition of Hilbert modular forms and their associated representation can be found, for example in Wiles’ [37].

Let \(\mathcal {O}_K\) be the ring of integers of K, and S a finite set of prime ideals in \(\mathcal {O}_K\). We denote by

$$\mathcal {O}_S:=\{ \alpha \in K : v_{\mathfrak {p}}(\alpha ) \ge 0 \text { for all }\mathfrak {p}\notin S\}$$

the S-integers of K. Moreover, \(\mathcal {O}_S^*\) will be its unit group. An ideal I of \(\mathcal {O}_K\) is called a prime-to-S-ideal if its prime decomposition contains no primes in S.

2 Constructing Frey elliptic curves

2.1 Diophantine equations related to \(x^r+y^r=z^p\)

Let \(r\ge 5\) be a fixed rational prime and K a totally real number field. Consider the equation

$$\begin{aligned} x^r+y^r=z^p \end{aligned}$$
(4)

viewed over \(K^+:=K(\zeta _r+\zeta _r^{-1})\) which, as we noted, is totally real. Recall the notation \(S_{K,p}:=\{\mathfrak {P}\, : \mathfrak {P} \text { is a prime of } K \text { above } p\}.\)

In this section, we follow Freitas’ ideas in [16, Sect. 2] to relate the primitive solutions of (4) to primitive solutions of several homogeneous Diophantine equations defined over \(K^+\). We note that in this case (xyz) primitive solution implies that xyz are pairwise coprime. We write

$$\begin{aligned} \phi _r(x,y) := \frac{x^r+y^r}{x+y} = \sum _{i=1}^{r-1}(-1)^ix^{r-1-i}y^i. \end{aligned}$$
(5)

Over the field \(L:=K(\zeta _r)\) one gets the factorization

$$\begin{aligned} \phi _r(x,y)= \prod _{i=1}^{r-1}(x+\zeta _r^iy). \end{aligned}$$
(6)

Proposition 11

Suppose that (xyz) is a primitive, non-trivial solution of (4) in \(\mathcal {O}_{L}^3\). Then, any two factors \(x+\zeta _r^iy\) and \(x+\zeta _r^jy\) with \(0\le i<j \le r-1\) are coprime outside \(S_{L,r}\).

Proof

Let \(\mathfrak {p}\notin S_{L,r}\) be a prime of L. Suppose by a contradiction that \(\mathfrak {p}| (x+ \zeta _r^iy)\) and \(\mathfrak {p}| (x+ \zeta _r^jy)\) for \(0\le i<j \le r-1\). Then

$$\begin{aligned} \mathfrak {p}| (x+ \zeta _r^iy)-(x+ \zeta _r^jy)=\zeta _r^i(1-\zeta _r^{j-i})y. \end{aligned}$$

As \(\zeta _r^i(1-\zeta _r^{j-1})\) is an \(S_{L,r}\)-unit and \(\mathfrak {p}\notin S_{L,r}\), it follows that \(\mathfrak {p}|y\). This and the fact that \(\mathfrak {p}| (x+ \zeta _r^iy)\), implies that \(\mathfrak {p}|x\) contradicting the fact that x and y are coprime. \(\square \)

Since \(r \ge 5\) is a prime, \(r-1\ge 4\) is even and \(\phi _r\) factors over \(K^+\) into degree two factors of the form

$$\begin{aligned} f_k(x,y):= x^2+(\zeta _r^k+\zeta _r^{-k})xy+y^2, \quad 1\le k \le \frac{r-1}{2}. \end{aligned}$$
(7)

Moreover, we consider \(f_0(x,y)=(x+y)^2\).

Proposition 12

Suppose that (xyz) is a primitive, non-trivial solution of (4) in \(\mathcal {O}_{K^+}^3\). Then the factors \(f_i(x,y)\) and \(f_j(x,y)\) are coprime outside \(S_{K^+,r}\) for \(0\le i<j \le \frac{r-1}{2}\) and each can be factorized as follows

$$\begin{aligned} (f_k(x,y))\mathcal {O}_{K^+}= (\mathcal {Z}_k)^p \prod _{\begin{array}{c} \mathfrak {p}_r\in S_{K^+,r} \end{array}}\mathfrak {p}_r^{e_{k,\mathfrak {p}_r}} ,\quad 0\le k \le \frac{r-1}{2}, \end{aligned}$$
(8)

where \(\mathcal {Z}_k\) are prime-to-\(S_{K^+,r}\)-ideals with \(\mathcal {Z}_k|(z)\mathcal {O}_{K^+}\) and \(e_{k,\mathfrak {p}_r}\ge 0\) for all \(0\le k \le \frac{r-1}{2}\).

Proof

Firstly we note that

$$f_k(x,y)=(x+\zeta _r^ky)(x+\zeta _r^{r-k}y)$$

for \(0\le k \le \frac{r-1}{2}\), so by Lemma 11\(f_k(x,y)\) are coprime outside \(S_{L,r}\). Thus, they are coprime outside \(S_{K^+r}\). Moreover,

$$\begin{aligned} (x+y)\prod _{k=1}^{(r-1)/2}f_k(x,y)=z^p. \end{aligned}$$
(9)

Putting these together, and the fact that \(f_0(x,y)=(x+y)^2\) we get the conclusion. \(\square \)

We will now define a Frey elliptic curve by generalizing to a totally number field the recipes described in [16].

2.2 Frey elliptic curve

We consider a non-trivial, primitive solution \((x,y,z)\in \mathcal {O}_{K^+}^3\) to (4) where \( {\mathfrak {P}}|z\) for a fixed \( {\mathfrak {P}}\in S_{K^+,2}\). By combining (4) and (5) we get that

$$\begin{aligned} (x+y)\phi _r(x,y)=z^p. \end{aligned}$$

By Proposition 11 it follows that either \( {\mathfrak {P}} | (x+y)\) or \( {\mathfrak {P}} | \phi _r(x,y)\). Therefore by Proposition 12 there exists a \(k_1\) such that \(0\le k_1 \le \frac{r-1}{2}\) such that \(\mathfrak {P}|f_{k_1}(x,y)\) and \(\mathfrak {P}\not \mid f_k(x,y)\) for \(k \ne k_1\).

Since \(\frac{r-1}{2}\ge 2\) we can fix two more subscripts \(0\le k_2, k_3\le \frac{r-1}{2}\) such that \(k_1,k_2,k_3\) are distinct and consider

$$\begin{aligned} f_{k_1}= & {} x^2+(\zeta _r^{k_1}+\zeta _r^{-k_1})xy+y^2,\quad f_{k_2}= x^2+(\zeta _r^{k_2}+\zeta _r^{-k_2})xy+y^2, \quad f_{k_3}\\= & {} x^2+(\zeta _r^{k_3}+\zeta _r^{-k_3})xy+y^2 . \end{aligned}$$

We want to find \((\alpha , \beta , \gamma )\) such that

$$\begin{aligned} \alpha f_{k_1}+\beta f_{k_2}+\gamma f_{k_3} =0. \end{aligned}$$

In particular, we can take

$$\begin{aligned} {\left\{ \begin{array}{ll} \alpha = \zeta _r^{k_3} +\zeta _r^{-k_3}-\zeta _r^{k_2}-\zeta _r^{k_2}, \\ \beta =\zeta _r^{k_1} +\zeta _r^{-k_1}-\zeta _r^{k_3}-\zeta _r^{k_3}, \\ \gamma = \zeta _r^{k_2} +\zeta _r^{-k_2}-\zeta _r^{k_1}-\zeta _r^{k_1}. \end{array}\right. } \end{aligned}$$
(10)

Write \(A_{(x,y)}:=\alpha f_{k_1}(x,y), B_{(x,y)}:=\beta f_{k_2}(x,y), C_{(x,y)}:=\gamma f_{k_3}(x,y) \) and define

$$\begin{aligned} E_{(x,y)}: Y^2=X(X-A_{(x,y)})(X+B_{(x,y)}). \end{aligned}$$
(11)

Denote \(E_{(x,y)}\) by E. Note that E is defined over \(K^+\). Recall that \(S_{K^+}:=S_{K^+,2}\cup S_{K^+,r}\).

Lemma 13

The numbers ABC factorize in \(\mathcal {O}_{K^+}\) is as follows

$$\begin{aligned} A = (\mathcal {Z}_A)^p \prod _{\begin{array}{c} \mathfrak {p}_r\in S_{K^+,r} \end{array}}\mathfrak {p}_r^{a_{\mathfrak {p}_r}}, \quad B= (\mathcal {Z}_B)^p \prod _{\begin{array}{c} \mathfrak {p}_r\in S_{K^+,r} \end{array}}\mathfrak {p}_r^{b_{\mathfrak {p}_r}},\quad C= (\mathcal {Z}_C)^p \prod _{\begin{array}{c} \mathfrak {p}_r\in S_{K^+,r} \end{array}}\mathfrak {p}_r^{c_{\mathfrak {p}_r}}, \end{aligned}$$
(12)

where \(\mathcal {Z}_A,\mathcal {Z}_B,\mathcal {Z}_C\) are pairwise coprime prime-to-\(S_{K^+,r}\)-ideals dividing \((z)\mathcal {O}_{K^+},\) \(\mathfrak {P}|\mathcal {Z}_A\) with exponents \(a_{\mathfrak {p}_r},b_{\mathfrak {p}_r},c_{\mathfrak {p}_r}\ge 0\) as given in Proposition 12.

Proof

First note that \(\alpha , \beta , \gamma \) can be written in the form \(\pm \zeta _r(1-\zeta _r^t)(1-\zeta _r^u)\), where neither t nor u are multiples of r, which means that the only primes dividing \(\alpha \beta \gamma \) are the ones in \(S_{K^+,r}\). The result then follows from the definition of ABC and Proposition 12. \(\square \)

Remark 14

We note that the Frey elliptic curve E depends on the prime p as the coefficients AB and C do.

2.3 Arithmetic invariants

It is a standard result that an elliptic curve E/K defined as

$$\begin{aligned} E: Y^2=X(X-A)(X+B) \end{aligned}$$

with \(A+B+C=0\) has the corresponding arithmetic invariants

$$\begin{aligned} \Delta _E=2^4(ABC)^2, \quad c_4= 2^4(AB+BC+AC), \quad j_E= -2^8 \frac{(AB+BC+AC)^3}{(ABC)^2}. \end{aligned}$$
(13)

Recall \(S_{K^+}:=S_{K^+,r}\cup S_{K^+,2}\) where for a rational prime p, we have

$$\begin{aligned} S_{K^+,p}:=\{\mathfrak {P}\, : \mathfrak {P} \text { is a prime of } K \text { above } p\}. \end{aligned}$$

Proposition 15

Let (xyz) be a primitive non-trivial solution to (4). Then, the conductor of E is

$$\begin{aligned} \mathcal {N}_E = \displaystyle \prod _{\mathfrak {P}\in S_{K^+,2}}\mathfrak {P}^{e_{\mathfrak {P}}} \prod _{\begin{array}{c} \mathfrak {q}\in S_{K^+,r} \end{array}}\mathfrak {q}^{f_{\mathfrak {q}}} \prod _{\begin{array}{c} \mathfrak {p}| ABC \\ \mathfrak {p}\notin S_{K^+} \end{array}}\mathfrak {p}. \end{aligned}$$

Then, for all primes \(\mathfrak {p}\notin S_{K^+},\) the model E is minimal, semistable and satisfies \(p|v_{\mathfrak {p}}(\Delta _E)\). Moreover

$$\begin{aligned} \mathcal {N}_p = \displaystyle \prod _{\mathfrak {P}\in S_{K^+,2}}\mathfrak {P}^{e_{\mathfrak {P}}'} \prod _{\begin{array}{c} \mathfrak {q}\in S_{K^+,r} \end{array}}\mathfrak {q}^{f_{\mathfrak {q}}'}, \end{aligned}$$

where \(0\le e_{\mathfrak {P}}'\le e_{\mathfrak {P}}\le 2+6v_{\mathfrak {P}}(2)\) and \(0\le f_{\mathfrak {q}}'\le f_{\mathfrak {q}} \le 2\) and \( \mathcal {N}_E, \mathcal {N}_p\) are as in (3).

Proof

For each \(\mathfrak {p}\in S_{K^+}\), the bounds on the exponents follow from [32, Theorem IV.10.4]. Hence, it is enough to show that for \(\mathfrak {p}\notin S_{K^+}\) the following holds

  1. (i)

    if \(\mathfrak {p}\not \mid ABC\), the model E is minimal and has good reduction at \(\mathfrak {p}\);

  2. (ii)

    if \(\mathfrak {p}| ABC\) the model E is minimal and has multiplicative reduction at \(\mathfrak {p}\) and moreover \(p|v_{\mathfrak {p}}(\Delta _E)\).

Then, the result will follow from the definitions of \(\mathcal {N}_E\) and \(\mathcal {N}_p\) given in (3).

In order to prove (i) and (ii) we note that a prime \(\mathfrak {p}\notin S_{K^+}\) we have that

$$\begin{aligned} v_{\mathfrak {p}}(\Delta _E)=2v_{\mathfrak {p}}(ABC)=2pv_{\mathfrak {p}}(\mathcal {Z}_A\mathcal {Z}_B\mathcal {Z}_C). \end{aligned}$$
(14)

If \(\mathfrak {p}\not \mid ABC\), then \(v_{\mathfrak {p}}(\Delta _E)=0\). Thus, the model is minimal and E has good reduction at \(\mathfrak {p}\). If \(\mathfrak {p}| ABC\), then \(\mathfrak {p}\) divides precisely one of A, B and C as they are pairwise coprime outside \(S_{K^+,r} \subset S_{K^+}\). Hence, \(v_{\mathfrak {p}}(c_4)=0\), giving a minimal model for E with multiplicative reduction at \(\mathfrak {p}\). By (14) we see that \(p|v_{\mathfrak {p}}(\Delta _E)\). \(\square \)

3 Theoretical background

3.1 Modularity

Let K be a totally real field and E an elliptic curve over K, we say that E is modular if there exists a Hilbert cuspidal eigenform \(\mathfrak {f}\) over K of parallel weight 2, with rational Hecke eigenvalues, such that the Hasse–Weil L-function of E is equal to the Hecke L-function of \(\mathfrak {f}\). In particular, this implies that the mod p Galois representations are isomorphic, which we denote by \(\overline{\rho }_{E,p} \sim \overline{\rho }_{\mathfrak {f},p}\).

We will use the following modularity theorem proved by Freitas et al. [17]:

Theorem 16

Let K be a totally real field. There are at most finitely many \(\bar{K}\)-isomorphism classes of non-modular elliptic curves E over K. Moreover, if K is real quadratic, then all elliptic curves over K are modular.

Furthermore, Derickx, Najman, and Siksek have recently proved in [14]:

Theorem 17

Let K be a totally real cubic number field and E be an elliptic curve over K. Then E is modular.

Corollary 18

Let \(E_p\) be the Frey curve defined by (11) (which has a dependency on p as noted in 14). By construction, \(E_p\) is defined over a totally real field which we denote by K. Then, there is some constant \(A_K\) depending only on K,  such that \(E_p\) is modular whenever \(p>A_K\).

Proof

By Theorem 16, there are at most finitely many possible \(\bar{K}\)-isomorphism classes of elliptic curves over K which are not modular. Let E be the elliptic curve defined in (11). Let \(j_1, j_2, \dots , j_n \in K\) be the j-invariants of these classes. Define \(\lambda := -B/A\). The j-invariant of E is

$$\begin{aligned} j(\lambda )=2^8(\lambda ^2-\lambda +1)^3\lambda ^{-2}(\lambda -1)^{-2} . \end{aligned}$$

Each equation \(j(\lambda )=j_i\) has at most six solutions \(\lambda \in K\). Thus there are values \(\lambda _1,\dots ,\lambda _m \in K\, (\text {where }m\le 6n)\) such that if \(\lambda \ne \lambda _k\) for all k, then the elliptic curve E with j-invariant \(j(\lambda )\) is modular.

If \(\lambda = \lambda _k\) then \(-B/A = \lambda _k\). Hence, as ideals

$$\begin{aligned} (-B/A)\mathcal {O}_{K^+} = (\lambda _k) \mathcal {O}_{K^+}. \end{aligned}$$
(15)

By (12) we get that

$$\begin{aligned} (-B/A)\mathcal {O}_{K^+} = (\mathcal {Z})^p \prod _{\begin{array}{c} \mathfrak {p}_r\in S_{K^+,r} \end{array}}\mathfrak {p}_r^{l_{\mathfrak {p}_r}}, \end{aligned}$$
(16)

where \(\mathcal {Z}\) is a prime-to-\(S_{K^+,r}\)-ideal, with \(\mathfrak {P}|\mathcal {Z}\) and integer exponents \(l_{\mathfrak {p}_r}:=b_{\mathfrak {p}_r}-a_{\mathfrak {p}_r}\). Then by (15) and (16), \(v_{\mathfrak {P}}(\lambda _k)=pv_{\mathfrak {P}}(\mathcal {Z})>0.\) Thus \(p|v_{\mathfrak {P}}(\lambda _k)\). As \(\lambda _k\) is fixed, it gives an upper bound on p for each k, and by taking the maximum of these bounds we get \(A_K\). \(\square \)

Remark 19

The constant \(A_K\) is ineffective as the finiteness of Theorem 16 relies on Falting’s Theorem (which is ineffective). See [17] for more details. Note that if K is quadratic or cubic we get \(A_K=0\) (by the last part of Theorems 16 and 17).

3.2 Irreducibility of\(\mod p\) representations of elliptic curves

We need the following theorem in the level lowering step of our proof. This was proved in [19, Theorem 2] and it is derived from the work of David [13] and Momose [27] who in turn built on Merel’s Uniform Boundedness Theorem [25].

Theorem 20

Let K be a Galois totally real field. There is an effective constant \(C_K,\) depending only on K,  such that the following holds. If \(p>C_K\) is prime, and E is an elliptic curve over K which has semistable reduction at all \(\mathfrak {q}|p,\) then \(\overline{\rho }_{E,p}\) is irreducible.

Remark 21

The above theorem is also true for any totally real field by replacing K by its Galois closure.

3.3 Level lowering

We present a level lowering result proved by Freitas and Siksek [20] derived from the work of Fujiwara [24], Jarvis [23], and Rajaei [29].

Theorem 22

Let K be a totally real field and E/K be an elliptic curve of conductor \(\mathcal {N}_E,\) suppose the following statements hold:

  1. (i)

    \(p \ge 5,\) the ramification index \(e(\mathfrak {q}/p)<p-1\) for all \(\mathfrak {q}|p,\) and \(\mathbb {Q}(\zeta _p)^+\nsubseteq K,\)

  2. (ii)

    E is modular,

  3. (iii)

    \(\overline{\rho }_{E,p}\) is irreducible,

  4. (iv)

    E is semistable at all \(\mathfrak {q}|p,\)

  5. (v)

    \(p|v_{\mathfrak {q}}(\Delta _{\mathfrak {q}}) \) for all \(\mathfrak {q}|p\).

Then, there is a Hilbert eigenform \(\mathfrak {f}\) of parallel weight 2 that is new at level \(\mathcal {N}_p\) (as defined in 3) and some prime \(\varpi \) of \(\mathbb {Q}_{\mathfrak {f}}\) such that \(\varpi |p\) and \(\overline{\rho }_{E,p} \sim \overline{\rho }_{\mathfrak {f},\varpi }\).

Proof

See [20, Corollary 2.2]. \(\square \)

3.4 Image of inertia

We gather information about the images of inertia \(\overline{\rho }_{E,p}(I_{\mathfrak {q}})\). This is a crucial step in controlling the behaviour at the primes in \(S_{K^+}\) of the newform obtained by level lowering.

Lemma 23

Let E be an elliptic curve over K with j-invariant \(j_E\). Let \(p\ge 5\) and let \(\mathfrak {q} \not \mid p\) be a prime of K. Then \(p | \# \overline{\rho }_{E,p}(I_{\mathfrak {q}})\) if and only if E has potentially multiplicative reduction at \(\mathfrak {q}\) (i.e. \(v_{\mathfrak {q}}(j_E)<0)\) and \(p \not \mid v_{\mathfrak {q}}(j_E)\).

Proof

See [20, Lemma 3.4]. \(\square \)

For the rest of this section let \((x,y,z)\in \mathcal {O}_{K^+}^3\) be a non-trivial, primitive solution to (4) and \({\mathfrak {P}} \in S_{K^+,2}\) with \(\mathfrak {P}|z\). We define the Frey curve E as in (11).

Lemma 24

Let E,  (xyz) and \({\mathfrak {P}} \) as above. Then

$$\begin{aligned} v_{\mathfrak {P}}(j_E)= 8v_{\mathfrak {P}}(2)-2pv_{\mathfrak {P}}(z). \end{aligned}$$

Proof

Firstly, note that \(\alpha , \beta , \gamma \in \mathcal {O}_{S_{K^+,r}}^*\), i.e. their factorisation contains only primes above r. Moreover, ABC are pairwise coprime outside \(S_{K^+,r}\) (by Propositions 11 and 12). By the definition of A, we see that \(\mathfrak {P}|A\), hence \(\mathfrak {P}\not \mid B,C\). Thus, by (13) \( v_{\mathfrak {P}}(j_E)= 8v_{\mathfrak {P}}(2)-2v_{\mathfrak {P}}(A)\). We note that \(v_{\mathfrak {P}}(A)=v_{\mathfrak {P}}(f_{k_1}(x,y))=pv_{\mathfrak {P}}(z)\), hence completing the proof. \(\square \)

Lemma 25

Let E,  (xyz) and \({\mathfrak {P}} \) as above and the prime exponent \(p>4v_{\mathfrak {P}}(2)\). Then E has potentially multiplicative reduction at \({\mathfrak {P}}\) and \(p | \# \overline{\rho }_{E,p}(I_{\mathfrak {P}})\).

Proof

Assume that \(\mathfrak {P} \in S_{K^+,2}\) with \(v_{\mathfrak {P}}(z)=k\). By Lemma 24 and the fact that \(p>4 v_{\mathfrak {P}}(2)\), it follows that \(v_{\mathfrak {P}}(j)<0\) and clearly \(p\not \mid v_{\mathfrak {P}}(j_E)\). This implies that E has potentially multiplicative reduction at \(\mathfrak {P}\) and by Lemma 23 we get \(p | \# \overline{\rho }_{E,p}(I_{\mathfrak {P}})\). \(\square \)

3.5 Eichler–Shimura

For totally real fields, modularity reads as follows.

Conjecture 26

(Eichler–Shimura) Let K be a totally real field. Let \(\mathfrak {f}\) be a Hilbert newform of level \(\mathcal {N}\) and parallel weight 2,  with rational eigenvalues. Then there is an elliptic curve \(E_{\mathfrak {f}}/K\) with conductor \(\mathcal {N}\) having the same L-function as \(\mathfrak {f}\).

Freitas and Siksek [20] obtained the following theorem from the works of Blasius [8], Darmon [10] and Zhang [38].

Theorem 27

Let E be an elliptic curve over a totally real field K,  and p be an odd prime. Suppose that \(\overline{\rho }_{E,p}\) is irreducible, and \(\overline{\rho }_{E,p} \sim \overline{\rho }_{\mathfrak {f},p}\) for some Hilbert newform \(\mathfrak {f}\) over K of level \(\mathcal {N}\) and parallel weight 2 which satisfies \(\mathbb {Q}_{\mathfrak {f}} = \mathbb {Q}\). Let \(\mathfrak {q}\not \mid p\) be a prime ideal of \(\mathcal {O}_K\) such that:

  1. (i)

    E has potentially multiplicative reduction at \(\mathfrak {q},\)

  2. (ii)

    \(p| \# \overline{\rho }_{E,p}(I_{\mathfrak {q}}),\)

  3. (iii)

    \(p \not \mid (\text {Norm}_{K/\mathbb {Q}}(\mathfrak {q})\pm 1) \).

Then there is an elliptic curve \(E_{\mathfrak {f}}/K\) of conductor \(\mathcal {N}\) with the same L-function as \(\mathfrak {f}\).

Proof

See [20, Corollary 2.2]. \(\square \)

4 Proof of Theorem 4

Firstly, we put together the first steps of the modular approach to get the following. Recall \(S_{K^+}:=S_{K^+,r}\cup S_{K^+,2}\) where for a rational prime p, we have

$$\begin{aligned} S_{K^+,p}:=\{\mathfrak {P}\, : \mathfrak {P} \text { is a prime of } K \text { above } p\}. \end{aligned}$$

Theorem 28

(Level Lowering and Eichler–Shimura)

Fix \(r \ge 5\) a rational prime. Let K be a totally real number field and define \(K^+:=K(\zeta _r+\zeta _r^{-1})\). Suppose there exists a prime \( {\mathfrak {P}} \in S_{K^+,2}\). Then there is a constant \(B_{K,r}\) depending only on K such that the following hold. Suppose \((x,y,z) \in \mathcal {O}_{K^+}^3\) is a non-trivial, primitive solution to \(x^r+y^r=z^p\) with prime exponent \(p>B_{K,r}\) such that \( {\mathfrak {P}}|z\). Write E for the Frey curve (11). Then, there exists an elliptic curve \(E'\) over \(K^+\) such that

  1. (i)

    the elliptic curve \(E'\) has good reduction outside \(S_{K^+};\)

  2. (ii)

    \(\overline{\rho }_{E,p}\sim \overline{\rho }_{E',p};\)

  3. (iii)

    \(\# E'(K^+)[2]=4;\)

  4. (iv)

    \(E'\) has potentially multiplicative reduction at \( \mathfrak {P}\) \((v_{ {\mathfrak {P}}}(j_E)<0)\).

The proof follows precisely as the one of Theorem 9 in [20]. It is included for completion in Appendix A. Now we are ready to prove the Theorem 4.

Proof of Theorem 4

The proof follows precisely as the one of Theorem 3 in [20]. The idea consists in associating to each non-trivial, primitive solution \((x,y,z)\in \mathcal {O}_{K^+}^3\) with \(\mathfrak {P}|z\) a Frey elliptic curve as described in Theorem 28, which we denote by E. Let \(p>B_{K,r}\) as given in Theorem 28, then E gives rise to an elliptic curve \(E'/K^+\) with full two torsion, \(j_{E'} \in \mathcal {O}_{S_{K^+}}\) and \(v_{\mathfrak {P}}(j_{E'}) < 0\).

The condition on the \(S_{K^+}\)-units in our hypothesis gives \(v_{\mathfrak {P}}(j_{E'}) \ge 0\), a contradiction. This is proven by Freitas and Siksek [20, Theorem 3] by parametrizing all of the curves \(E'\) with the above properties. In particular, the last line follows by the fact that any non-trivial, primitive solution \((x,y,z)\in \mathcal {O}_{K}^3\) with \(\mathfrak {Q}|z\) gives rise to a solution \((x,y,z)\in \mathcal {O}_{K^+}^3\) with \(\mathfrak {P}|z\). \(\square \)

Remark 29

We note that even though this theorem resembles Theorem 3 in [20] we need extra assumptions to make the proof work.

  • As the equation \(x^r+y^r=z^p\) is not homogeneous (as opposed to \(x^p+y^p=z^p\)), we need the extra condition \(\mathfrak {P}|z\) in order to get the desired potentially multiplicative reduction of E (and hence of \(E'\)) at the prime \(\mathfrak {P}\).

  • The set \(S_{K^+}\) contains primes above 2 as long as primes above r (in [20, Theorem 3] the corresponding set had only primes above 2). This is because, the Frey curve E resulting from signature (rrp) might have bad reduction at primes above r, which is inherited by \(E'\) (after level lowering and Eichler–Shimura).

5 Proof of Theorem 6

Suppose that K is a totally real number field and \(r\ge 5\) is a fixed rational prime. By (i) r is inert in K. Denote \(K^+:=K(\zeta _r+\zeta _r^{-1})\) and let

$$\begin{aligned} \pi _r:=\zeta _r+\zeta _r^{-1}-2=-(1-\zeta _r)(1-\zeta _r^{-1}). \end{aligned}$$
(17)

Note that \(\pi _r\) is the uniformizer of the unique prime above r in \(K^+\). By (ii) there is a unique prime \(\mathfrak {P}\in S_{K^+,2}\) of ramification index \(e:=e(\mathfrak {P}/2)\) and by (iii) \(2 \not \mid h_{K^+}^+\). Moreover, we have that the congruence \(\pi _r \equiv \nu ^2 \mod \mathfrak {P}^{(4e+1)}\) has no solutions in \(\nu \in \mathcal {O}_{K^+}/\mathfrak {P}^{(4e+1)}\) by (iv).

We will show that these assumptions guarantee that any solution to an \(S_{K^+}\)-unit equation satisfies the hypothesis in Theorem 4, giving the desired conclusion.

Lemma 30

Fix \(r \ge 5 \) and K a totally real number field satisfying (i)–(iv) as described above. Consider the natural homomorphism

$$\begin{aligned} \varphi :\mathcal {O}_{S_{K^+,r}}^* \rightarrow (\mathcal {O}_{K^+}/\mathfrak {P}^{4e+1})^*. \end{aligned}$$

Then, \(\text {Ker}({\varphi }) \subseteq \mathcal ({O}_{S_{K^+,r}}^*)^2\).

Proof

Let \(\mu \in \text {Ker}({\varphi })\), so \(\mu \equiv 1 \mod \mathfrak {P}^{4e+1}\). We want to show that \(\mu \) is a square. Consider \(\pi _r\) as described in (17), a uniformizer for the unique prime above r in \(K^+\). Thus, \(\mu \in \mathcal {O}_{S_{K^+,r}}^*\), implies that \(\mu = \epsilon \pi _r^t\), where \(\epsilon \in \mathcal {O}_{K^+}^*\). We first show that \(\epsilon \) must be a square. Note that

$$\begin{aligned} (\zeta _r^{\frac{r-1}{2}} + \zeta _r^{-\frac{r-1}{2}})^2 = \pi _r + 4 . \end{aligned}$$

Thus, \(\pi _r \equiv \alpha ^2 \mod 4\) where we denoted \(\alpha :=\left( \zeta _r^{\frac{r-1}{2}} + \zeta _r^{-\frac{r-1}{2}}\right) \). As \(\mathfrak {P}\) is the unique prime above 2, we get that \( (4)\mathcal {O}_{K^+}=\mathfrak {P}^{2e}\) and hence

$$\begin{aligned} \pi _r \equiv \alpha ^2 \mod \mathfrak {P}^{2e}. \end{aligned}$$

This and \(\mu \equiv 1 \mod \mathfrak {P}^{4e+1}\) imply that \(\epsilon \equiv \beta ^2 \mod \mathfrak {P}^{2e}\), where \(\beta :=\alpha ^{-t}\). As \(\alpha \) is a unit, and t an integer, it follows that \(\beta \in \mathcal {O}_{K^+}\). Moreover, the above-mentioned congruence gives \((\beta ^2-\epsilon )/4\in \mathcal {O}_{K^+}\). Suppose that \(\epsilon \) is not a square. Consider the field extension \(L=K^+(\sqrt{\epsilon })\). We will show that L is unramified at all finite places hence contradicting \(2 \not \mid h_{K^+}^+\). Consider the element \(\delta :=\frac{\beta +\sqrt{\epsilon }}{2}\). Its minimal polynomial is

$$\begin{aligned} m_{\delta }(X) = X^2-\beta X+ \frac{\beta ^2-\epsilon }{4}. \end{aligned}$$

This belongs to \(\mathcal {O}_{K^+}[X]\) and has discriminant \(\Delta = \epsilon \in \mathcal {O}_{K^+}^*\), proving that L is unramified at all the finite places, contradicting \(2 \not \mid h_{K^+}^+\). Thus, we must have \(\epsilon := \gamma ^2\) for some \(\gamma \in \mathcal {O}_{K^+}^*\). Putting everything together

$$\begin{aligned} \mu = \epsilon \pi _r^t = \gamma ^2 \pi _r^t. \end{aligned}$$

In order to show that \(\mu \) is a square, it is enough to show that t is even. So, let’s suppose that t is odd, i.e. \(t = 2k+1\) for some integer k. Hence \(\mu = (\gamma \pi _r^{k})^2 \pi _r\). As we assumed \(\mu \equiv 1 \mod \mathfrak {P}^{4e+1}\), it must be that case that

$$\begin{aligned} \pi _r \equiv \nu ^2 \mod \mathfrak {P}^{4e+1} \end{aligned}$$

for some \(\nu \in \mathcal {O}_{K^+}\), contradicting assumption (iv). In conclusion t must be even and so \(\mu \in \mathcal ({O}_{S_{K^+,r}}^*)^2\) \(\square \)

Proof of Theorem 6

This is an application of Theorem 4. We first note that by using the notation at the beginning of this section we can consider \(\mathfrak {P}_r:=(\pi _r)\mathcal {O}_{K^+}\) to be the unique prime above r in \(K^+\) and \(\mathfrak {P}\) to be the unique prime above 2 in \(K^+\) where we denote by \(e:=e(\mathfrak {P}/2)\) the ramification index of \(\mathfrak {P}\). Hence \(S_{K^+,r}=\{\mathfrak {P}_r\}\) and \(S_{K^+,2}=\{\mathfrak {P}\}\) giving \(S_{K^+}=\{\mathfrak {P},\mathfrak {P}_r\}\).

We prove that the hypothesis of Theorem 4 holds. More precisely, we want to show that every solution \((\lambda , \mu ) \in \mathcal {O}_{S_K^+}^* \times \mathcal {O}_{S_K^+}^*\) to the equation

$$\begin{aligned} \lambda +\mu = 1 \end{aligned}$$
(18)

satisfies \(\max (|v_{ {\mathfrak {P}}}(\lambda )|,|v_{ {\mathfrak {P}}}(\mu )|)\le 4e\).

Suppose by a contradiction we have an \(S_{K^+}\)-unit solution \((\lambda , \mu )\) with \(|v_{ {\mathfrak {P}}}(\lambda )|>4e\). Without loss of generality, we may assume \(v_{ {\mathfrak {P}}}(\lambda )>4e\). Otherwise, one can consider \(\left( \frac{1}{\lambda }, -\frac{\mu }{\lambda }\right) \) instead, which is also a solution to the equation. By the properties of non-Archimedean valuations applied to (18) it follows that \(v_{ {\mathfrak {P}}}(\mu )=0\). Thus, we deduce that \(\mu \equiv 1 \text { mod } \mathfrak {P}^{4e+1}\). Hence \(\mu \) lies in the kernel of the natural homomorphism

$$\begin{aligned} \varphi :\mathcal {O}_{S_{K^+,r}}^* \rightarrow (\mathcal {O}_{K^+}/\mathfrak {P}^{4e+1})^*. \end{aligned}$$

By Lemma 30, \(\text {Ker}{\varphi } \subseteq \mathcal ({O}_{S_{K^+,r}}^*)^2\).

Thus, for each solution of the \(S_{K^+}\)-unit equation (18) with

$$\begin{aligned} v_{ {\mathfrak {P}}}(\lambda )>4e, \quad v_{ {\mathfrak {P}}}(\mu )=0 \end{aligned}$$
(19)

we get that \(\mu = \tau ^2\) with \(\tau \in \mathcal {O}^*_{S_{K^+},r}\). As there are only finitely many solutions to the S-unit equation, we may suppose that \((\lambda , \mu )\) satisfies (19) with the value of \(v_{ {\mathfrak {P}}}(\lambda )\) as large as possible.

We can rewrite (18) as

$$\begin{aligned} \lambda = (1-\tau )(1+\tau ). \end{aligned}$$
(20)

Denote by \(\lambda _1:= 1-\tau \) and \(\lambda _2:=1+\tau \) and by \(t_i:=v_{ {\mathfrak {P}}}(\lambda _i)\) for \(i=1,2\). By assumption \(t:=v_{ {\mathfrak {P}}}(\lambda )>4e\), giving \(t=t_1+t_2>4e\). By noting that

$$\lambda _1+\lambda _2 = 2$$

we can only have that \(t_1=e\) or \(t_2=e\). By changing the sign of \(\tau \) if necessary, we may assume that \(t_2=e\) and hence \(t_1=t-e\). Now, note that by rearranging we get the following \(S_{K^+}\)-unit relation:

$$\begin{aligned} \frac{\lambda _2^2}{4\tau }+\frac{-\lambda _1^2}{4\tau }=1. \end{aligned}$$

We compute \(v_{ {\mathfrak {P}}}\left( \frac{\lambda _2^2}{4\tau }\right) =2t_2-2e=0\) and \(v_{ {\mathfrak {P}}}\left( \frac{-\lambda _1^2}{4\tau }\right) =2t_1-2e=2t-4e=t+(t-4e)>t\) as \(t>4e\) by assumption. So we found a new solution \((\lambda ',\mu ')=\left( \frac{-\lambda _1^2}{4\tau },\frac{\lambda _2^2}{4\tau }\right) \) to (18) with valuations \(v_{ {\mathfrak {P}}}(\lambda ')> t,v_{ {\mathfrak {P}}}(\mu )=0\). This contradicts the maximality of \(v_{ {\mathfrak {P}}}(\lambda )\) and completes the proof. \(\square \)

6 Proof of Corollaries 7, 8 and 9

We will now show how to apply Theorem 6 in the cases where \(K=\mathbb {Q}\) or K is a real quadratic field. Firstly, we need the following lemma.

Lemma 31

Let \(\mathfrak {P}\) be the only prime above 2 in \(K^+\) and \(\lambda \in \mathcal {O}_{K^+}\). Suppose that \(\lambda \equiv \nu ^2 \mod \mathfrak {P}^n\) where \(\nu \in \mathcal {O}_{K^+}\). Then

$$\begin{aligned} \text {Norm}_{K^+/K}(\lambda ) \equiv v^2 \mod \mathfrak {Q}^{\lceil n/e' \rceil }, \end{aligned}$$

where \(\mathfrak {Q}\) is the unique prime above 2 in K and \(e'\) is the ramification index \(e':=e(\mathfrak {P}/\mathfrak {Q})\) and \(v\in \mathcal {O}_{K}.\)

Proof

By noting that the congruence \(\lambda \equiv \nu ^2 \mod \mathfrak {P}^n\) is preserved by taking Galois conjugates (which fix the prime \(\mathfrak {P}\)), we can take norms to get

$$\begin{aligned} \text {Norm}_{K^+/K}(\lambda ) \equiv \text {Norm}_{K^+/K}(\nu )^2\mod \mathfrak {P}^n. \end{aligned}$$

As \(\lambda , \nu \in \mathcal {O}_{K^+}\), it follows that \(\text {Norm}_{K^+/K}(\lambda ),\text {Norm}_{K^+/K}(\nu ) \in \mathcal {O}_K\) and so \(\text {Norm}_{K^+/K}(\lambda ) \equiv v^2\mod \mathfrak {Q}^{\lceil n/e' \rceil }\) where \(v:=\text {Norm}_{K^+/K}(\nu ) \in \mathcal {O}_{K}.\) \(\square \)

Now, we fix a prime \(r\ge 5\) and K a totally real number field. We let \(K^+:=K(\zeta _r+\zeta _r^{-1})\). Then, as in the statement of Theorem 6 we assume r is inert in K, and \(\mathfrak {P}\) is the unique prime above 2 in \(K^+\) with ramification index \(e:=e(\mathfrak {P}/2)\) and we denote by \(\pi _r:=\zeta _r+\zeta _r^{-1}-2\).

Proof of Corollary 7

Using the above notation with \(K:=\mathbb {Q}\). We will show that \(r \not \equiv 1 \mod 8\) implies that \(\pi _r \not \equiv \nu ^2 \mod \mathfrak {P}^{4e+1}\) with \(\nu \in \mathcal {O}_{\mathbb {Q}^+}\) and then, the result follows from Theorem 6.

Suppose by a contradiction \(\pi _r \equiv \nu ^2 \mod \mathfrak {P}^{4e+1}\). By Lemma 31 with \(K=\mathbb {Q}\), \(n=4e+1\) and \(e'=e\) we get that \(r \equiv v^2 \mod 2^5\). However the odd squares modulo 32 are \(\{1,9,17,25\}\) contradicting \(r \not \equiv 1 \mod 8\). \(\square \)

Proof of Corollary 8

We will check the assumptions in Corollary 7 hold. Note that in order to check that \(2 \not \mid h_{\mathbb {Q}^+}^+\), it is sufficient to check that \( 2 \not \mid h_{\mathbb {Q}(\zeta _r)}\) as \(h_{\mathbb {Q}^+}^+|h_{\mathbb {Q}(\zeta _r)}\). This follows by noting that \(\mathbb {Q}(\zeta _r)/\mathbb {Q}^+\) is totally ramified at r. Thus, if we take H to be the narrow Hilbert class field of \(\mathbb {Q}^+\), then \(H(\zeta _r)\) will be a subfield of the Hilbert class field of \(\mathbb {Q}(\zeta _r)\). By Hasse’s Theorem ([21], Theorem 3.45) one gets that \(h_{\mathbb {Q}(\zeta _r)}\) is odd if and only if the relative class number \(h_r^{-}\)Footnote 2 is odd. One can check the tables computed in [35, p. 412] to see that for the above values of r the associated relative class number \(h_r^{-}\) is odd, so indeed \(2 \not \mid h_{\mathbb {Q}^+}^+\). The rest of the conditions in the hypothesis can be easily checked (for example by using Magma). \(\square \)

Proof of Corollary 9

Using the above notation with \(K:=\mathbb {Q}(\sqrt{d})\), we will show that the conditions on (i) and (ii) imply that \(\pi _r \not \equiv \nu ^2 \mod \mathfrak {P}^{4e+1}\) with \(\nu \in \mathcal {O}_{K^+}\) and then the result follows from Theorem 6. Note that as there is a unique prime above 2 in K we have the following two cases.

Case 1: Suppose that \(d \equiv 5 \mod 8\) and so \(\mathcal {O}_{K}=\mathbb {Z}\left[ {\frac{\sqrt{d}+1}{2}}\right] \). In this case 2 is inert in K giving \(e=e'=e(\mathfrak {P}/2)\). Suppose by a contradiction that \(\pi _r \equiv \nu ^2 \mod \mathfrak {P}^{4e+1}\) with \(\nu \in \mathcal {O}_K\). By Lemma 31 it follows that \(r\equiv v^2 \mod 2^5\) for \(v=a+b\frac{1+\sqrt{d}}{2}\in \mathcal {O}_K\). Hence

$$\begin{aligned} r \equiv \left( a+b\frac{1+\sqrt{d}}{2}\right) ^2\equiv \left( a^2+b^2\frac{d-1}{4}\right) +\left( b^2+2ab\right) \frac{1+\sqrt{d}}{2} \mod 32. \end{aligned}$$

As \(\mathcal {O}_K/32\mathcal {O}_K\cong (\mathbb {Z}/32\mathbb {Z})\left[ \frac{1+\sqrt{d}}{2}\right] \) it follows that

$$\begin{aligned} {\left\{ \begin{array}{ll} (b^2+2ab)\equiv 0 \mod 32,\\ \left( a^2+b^2\frac{d-1}{4}\right) \equiv r \mod 32. \end{array}\right. } \end{aligned}$$

The first equation implies that b is even. If a would be even too, it would imply that r is even which is a contradiction. Note that this implies that \(a^2 \equiv 1 \mod 8\) and \(b^2 \equiv 0, 4 \mod 8 \). Thus, using the second equation we get either \(r \equiv 1 \mod 8\) or \(r \equiv d \mod 8\), contradicting the hypothesis.

Case 2: Suppose that \(d\equiv 2,3 \mod 4\) and so \(\mathcal {O}_K=\mathbb {Z}[\sqrt{d}]\). In this case, 2 is totally ramified in K and we denote by \(\mathfrak {Q}\) the unique prime above 2 in K. Hence \(\mathfrak {Q}^2=(2)\mathcal {O}_K\) and \(e:=e(\mathfrak {P}/2)=2e(\mathfrak {P}/\mathfrak {Q})=2e'\). Suppose by a contradiction that \(\pi _r \equiv \nu ^2 \mod \mathfrak {P}^{4e+1}\) with \(\nu \in \mathcal {O}_K\). By Lemma 31 it follows (in particular) that \(r\equiv v^2 \mod \mathfrak {Q}^{4e/e'}\), giving \(r\equiv v^2 \mod 16\) for \(v=a+b\sqrt{d}\in \mathcal {O}_K\). It follows that

$$\begin{aligned} r \equiv \left( a+b\sqrt{d}\right) ^2\equiv \left( a^2+b^2d\right) +2ab\sqrt{d} \mod 16. \end{aligned}$$

As \(\mathcal {O}_K/16\mathcal {O}_K\cong (\mathbb {Z}/16\mathbb {Z})[\sqrt{d}]\) it follows that

$$\begin{aligned} {\left\{ \begin{array}{ll} 2ab\equiv 0 \mod 16,\\ \left( a^2+b^2d\right) \equiv r \mod 16. \end{array}\right. } \end{aligned}$$

The first equation implies that 8|ab. As before, a and b cannot be simultaneously even, so we have two cases.

  • Case 1. If 8|b (and a is odd) then the second equation gives \(a^2 \equiv r \mod 16\) contradicting the assumption that \(r \not \equiv 1 \mod 8\).

  • Case 2. If 8|a (and b is odd) then the second equation gives \(b^2d \equiv r \mod 16\). In particular, \(b^2d \equiv r \mod 8\) and the only odd square modulo 8 is 1, thus it implies \(d \equiv r \mod 8\) contradicting the assumption that \(r \not \equiv d \mod 8\).

Hence, both (i) and (ii) imply that \(\pi _r \not \equiv \nu ^2 \mod \mathfrak {P}^{4e+1}\) with \(\nu \in \mathcal {O}_{K^+}\), so we can conclude the proof by Theorem 6. \(\square \)