Some cases of Serre’s uniformity problem

We show that if E/Q\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$E/\mathbb {Q}$$\end{document} is an elliptic curve without complex multiplication and for which there is a prime q such that the image of ρ¯E,q\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\bar{\rho }_{E,q}$$\end{document} is contained in the normaliser of a split Cartan subgroup of GL2(Fq)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathrm{GL}}}_2(\mathbb {F}_q)$$\end{document}, then ρ¯E,p\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\bar{\rho }_{E,p}$$\end{document} surjects onto GL2(Fp)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathrm{GL}}}_2(\mathbb {F}_p)$$\end{document} for every prime p>37\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p>37$$\end{document}. This result complements a previous result by the author. We also prove analogue results for certain families of Q\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbb {Q}$$\end{document}-curves, building on results of Ellenberg (Am J Math 126(4):763–787, 2004) and Le Fourn (Math Ann 365(1–2):173–214, 2016).

any two elliptic curves with the same j-invariant are related to each other by a quadratic twist as long as their j-invariant is not 0 nor 1728, surjectivity only depends on the j-invariant, and so our problem is reduced to computing the largest non-surjective prime for a finite set of elliptic curves.
The second part of this paper is devoted to Q-curves. Let us just recall a few definitions before proceeding. Let E be an elliptic curve defined over a Galois number field K . Given an element σ ∈ Gal(K /Q), we will denote by σ E the Galois conjugate of E by σ . Recall that E is said to be a Q-curve if, for each σ ∈ Gal(K /Q), there exists an isogeny μ σ : σ E → E. If E/K is a Q-curve, we shall say that it is completely defined over K if all of the isogenies μ σ can be chosen in such a way that they are all defined over K . The main results of this paper make reference to some representations attached to Q-curves that, following the notation introduced by Ellenberg [7,8], we will denote by Pρ E, p . Despite the notation, these are not, in general, simply the projectivisations ofρ E, p (the projectivisation ofρ E, p is, by definition, the composition ofρ E, p with the canonical projection GL 2 (F p ) → PGL 2 (F p )); in fact, Pρ E, p is defined on the whole of G Q , and not only on G K , where K is the number field over which E is defined. However, there is a close relation between Pρ E, p andρ E, p : if Pρ E, p stands for the projectivisation ofρ E, p , then Pρ E, p is isomorphic to Pρ E, p | G K . For a brief review of the definition of Pρ E, p , we refer the reader to Sect. 2. When K is a quadratic field, we say that a Q-curve completely defined over K is of degree d if there exists an isogeny μ σ : σ E → E defined over K and of degree d and there exists no other isogeny between σ E and E of smaller degree, where σ ∈ Gal(K /Q) is the non-trivial element.
The main objective of the second part of the paper is to prove the following results (which are analogues of Theorems 1.3 and 1.4). Theorem 1.6 Let K be a quadratic field and let d be a square-free integer. There exists a constant C K ,d satisfying the following property. If E is a Q-curve completely defined over K , of degree d, without complex multiplication and for which there exists a prime q d such that the image of Pρ E,q is contained in a Borel subgroup of PGL 2 (F q ), then Pρ E, p surjects onto PGL 2 (F p ) for every p > C K ,d . Theorem 1.7 Let K be a quadratic field and let d / ∈ {2, 3, 5, 7, 13} be a square-free integer. There exists a constant C K ,d satisfying the following property. If E is a Q-curve completely defined over K , of degree d, without complex multiplication and for which there exists a prime q d such that the image of Pρ E,q is contained in the normaliser of a split Cartan subgroup of PGL 2 (F q ), then Pρ E, p surjects onto PGL 2 (F p ) for every p > C K ,d .
Most of the proof of these two theorems will use arguments of the same type of those used to prove Theorem 1.4 and described above. In particular, borrowing some ideas of Ellenberg [8], we will show the following. Proposition 1.8 Let K be a quadratic number field and let d be a square-free positive integer. Let E be a Q-curve completely defined over K , of degree d and without complex multiplication. Suppose that p and q are distinct primes not dividing d such that the image of Pρ E, p is contained in the normaliser of a non-split Cartan subgroup of PGL 2 (F p ) and that the image of Pρ E,q is contained in a Borel subgroup of PGL 2 (F q ). Suppose, moreover, that p ≥ 11.

Then the j-invariant of E is in O K , where O K stands for the ring of integers of K .
We remark that if q ≥ 11 and q = 13, 17, 41, a much stronger result has been proven by Le Fourn [9,Proposition 3.3]. For the proof of Theorem 1.7, we will actually use the following result from [9]. Proposition 1.9 ([9, Proposition 3.6]) Let K be a quadratic field and let p = 11 or p > 13 be a prime. Suppose that E is a Q-curve of square-free degree d coprime to p such that the image of Pρ E, p is contained in the normaliser of a split Cartan subgroup. Then j(E) ∈ O K .
Finally, we would like to mention a theorem that will be used as an auxiliary result in the proof of Theorem 1.6, but which is interesting in its own right. Theorem 1.10 Let K be a quadratic number field and d a positive square-free integer. There exists a constant C K ,d satisfying the following property. Let E/K be a Q-curve completely defined over K , of degree d and without complex multiplication. If p d is a prime for which the image of Pρ E, p is contained in a Borel subgroup of PGL 2 (F p ), then p ≤ C K ,d . Moreover, if we restrict ourselves to the case where p ≡ 1 (mod 4), then the constant C K ,d can be chosen to be where c is the narrow class number of K and f is the residual degree of a prime of K lying above 2 (which is independent of the prime above 2 chosen). In particular, when p ≡ 1 (mod 4), the constant C K ,d is actually independent from d.
The reader is referred to the paper of Le Fourn [9], where results of a similar nature are proven. Specifically, in [9, Corollary 5.1], Le Fourn gives a bound for such primes that depends not only on the quadratic number field K , but also on the elliptic curve itself. However, by restricting himself to the cases where K is imaginary quadratic, he is able to give the absolute bound of 2 · 10 13 for the size of such primes (this is [9,Theorem 5.4]). In comparison, Theorem 1.10 shows the existence of a bound depending only on the quadratic number field K and on d, regardless of whether K is real or imaginary.
As a final remark, we would like, once again, to draw the reader's attention to the papers of Ellenberg [8] and Le Fourn [9]. In [8], Ellenberg shows that if K is an imaginary quadratic field and d ≥ 2 is a square-free integer, then there exists a constant C K ,d such that, given a Q-curve E completely defined over K , of degree d and without complex multiplication, either Pρ E, p surjects onto PGL 2 (F p ) for every prime p > C K ,d , or E has potentially godd reduction at every prime of K of characteristic not dividing 6. The arguments appearing in the Q-curve section of this paper will be based on some of his ideas. In [9], Le Fourn improves on the results of Ellenberg and gives an upper bound depending only on the discriminant of K (still assumed to be imaginary quadratic) and on the degree of the Q-curve for the largest non-surjective prime associated to E. One peculiarity of their results is that they need the degree of the Q-curve to be ≥ 2, i.e., they do not prove anything for elliptic curves defined over Q. In this paper, we will start by proving Theorem 1.4, which is the analogue of Theorem 1.7 for elliptic curves defined over Q, i.e., Q-curves of degree 1.

Galois representations of Q-curves
We follow the approach of Ellenberg [7]. For a more conceptual and complete treatment of the material in this section, the reader is referred to [15]. However, the description given here will suffice for the most part of the present article. Results from [15] will only be used in the proof of Theorem 1.10.
Let K be a Galois number field. Let E be a Q-curve defined (but not necessarily completely defined) over K . Assume, moreover, that E does not have complex multiplication. For each σ ∈ Gal(Q/Q), choose an isogeny μ σ : σ E → E. Note that if the restriction of σ to K is the trivial automorphism, then σ E = E, and, in this case, we can choose μ σ to be the identity. We will always assume that we make this choice and that, moreover, if two elements σ, τ ∈ Gal(Q/Q) restrict to the same automorphism of K , then μ σ = μ τ . Since E does not have complex multiplication, we have EndQ(E) ⊗ Q = Q. Therefore, given σ, τ ∈ Gal(Q/Q), the element whereμ σ τ stands for the dual isogeny of μ σ τ , can be regarded as an element of Q × . Given, a prime number p, let T p (E) be the p-adic Tate module of E. Define the function (which, in general, is not a homomorphism) E, p : G Q → GL(T p (E)) ∼ = GL 2 (Q p ) in the following manner: given P ∈ T p (E) and σ ∈ G Q , we impose that E, p (σ )(P) = μ σ ( σ P).
Remark Note that σ P ∈ σ E(K ). So, if σ does not restrict to the trivial automorphism of K , we may have σ P / ∈ E(K ).
It is straightforward to check that the action of Thus, E, p gives rise to a well-defined homomorphism Pρ E, p : G Q → PGL 2 (Q p ). If p does not divide the degree of any μ σ , the construction of Pρ E, p is identical to this.

The case of elliptic curves over Q
The aim of this section is to prove Proposition 1.5 and Theorem 1.4. But before starting to prove the aforementioned results, let us introduce some notation and terminology that will be used throughout the paper. Table 2 contains a summary of facts and notation that we will need.
Recall that a subgroup of SL 2 (Z) is called a congruence subgroup if there exists a positive integer N such that it contains In Table 1 we list some of the congruence subgroups that will appear more frequently during the course of this paper. In this table, N stands for a positive integer, p for an odd prime number, and r p for the natural reduction map SL 2 (Z) → SL 2 (F p ). Moreover, given an odd Table 1 Some congruence subgroups of SL 2 (Z) prime number p, we fix a non-split Cartan subgroup C ns ( p) of GL 2 (F p ) and write C + ns ( p) for its normaliser.
We will work with modular curves obtained as quotients of the extended upper half plane H * by one of the congruence subgroups above or by some intersections of them. In fact, for any congruence subgroup that we will work with, it can be shown that the Riemann surface \H * descends to an algebraic curve defined over Q. The point on this curve corresponding to i∞ will be known as the cusp at infinity and will be denoted by ∞. In the following table we set up some terminology and summarise some of the facts concerning to these modular curves that will reveal to be useful later.
With the notation set up, we are now ready to prove the results we will need. We start by noting that if E is an elliptic curve defined over Q and without complex multiplication, then the values of q for which the image ofρ E,q is contained in the normaliser of a split Cartan subgroup of GL 2 (F q ) are very restricted. In fact, we have the following result. Theorem 3.1 (Bilu-Parent-Rebolledo [3]) Let E/Q be an elliptic curve without complex multiplication. Then, if q is a prime such that q = 11 or q ≥ 17, the image ofρ E,q cannot be contained in the normaliser of a split Cartan subgroup of GL 2 (F q ).
Recently, Balakrishnan, Dogra, Müller, Tuitman and Vonk [1] showed that the only Qrational points of X + sp (13) are its cusps, thus proving the following theorem. Therefore, we are reduced to considering the cases where q ∈ {2, 3, 5, 7}, i.e., the cases where the genus of X + sp (q) is 0. However, further ahead, we will need some of the results in this section to hold in the case q = 13 as well. In fact, Theorem 3.2 will only be used in the proof of Theorem 1.4 in order to obtain the explicit bound of 37 (see Theorem 1.4 below); up until then, we will always assume that q ∈ {2, 3, 5, 7, 13}. We remark that these are precisely the primes q for which X 0 (q) has genus 0, a fact that plays an important role in the proof of Proposition 3.6.
The following is a more general version of [10, Proposition 2.2]. We will need this general form later. Proposition 3.3 (cf. [10, Proposition 2.2]) Let K be a number field of degree n and let E be an elliptic curve defined over K . Let p be a prime such that the image ofρ E, p is contained in the normaliser of a non-split Cartan subgroup of GL 2 (F p ). If E has potentially multiplicative reduction at a prime λ not dividing p, then N K /Q (λ) 2 ≡ 1 (mod p). Moreover, if p > 2n+1, then E has potentially good reduction at every prime of K dividing p.
Proof Given a prime λ of K , write K λ for the completion of K at λ. LetK andK λ be algebraic closures of K and K λ , respectively. Fix an embeddingK →K λ . This induces an embedding of absolute Galois groups G K λ → G K , which amounts to a choice of a decomposition subgroup of G K over λ. Now, suppose that E has potentially multiplicative reduction at λ. Then we know that E /K λ is a twist of a Tate curve E q , q ∈ K × λ . Let ψ be the character associated to this twist. It is well-known that ψ is either trivial or quadratic. Therefore, we haveρ where χ p : G K λ → F × p stands for the mod p cyclotomic character. As a Cartan subgroup of GL 2 (F p ) is an index 2 subgroup of its normaliser,ρ E, p (σ ) 2 is an element of a non-split Cartan subgroup of GL 2 (F p ) for every σ ∈ G K p . Moreover, since ψ is at most quadratic, the eigenvalues ofρ E, p (σ ) 2 are χ p (σ ) 2 and 1. However, the eigenvalues of an element of a non-split Cartan subgroup are F p -conjugate. This means that χ p (σ ) 2 = 1 for every σ ∈ G K λ .
If λ does not divide p, then this means that N K /Q (λ) 2 ≡ 1 (mod p), as the statement of the proposition predicts.
In order to simplify notation, we will write X −,+ sp,ns (q, p) for the curve X sp (q)× X (1) X + ns ( p), X +,+ sp,ns (q, p) for the curve X + sp (q) × X (1) X + ns ( p), and X + 0,ns (N , p) for the curve X 0 (N ) × X (1) X + ns ( p), where N is a positive integer. These three curves correspond to certain quotients of the extended upper half plane: there is an analytic isomorphism between X −,+ sp,ns (q, p)(C) and the quotient of H * by sp (q) ∩ + ns ( p), another one between X +,+ sp,ns (q, p)(C) and the quotient of H * by + sp (q) ∩ + ns ( p), and another between X + 0,ns (N , p)(C) and the quotient of H * by 0 (N ) ∩ + ns ( p). In what follows, we will write w q 2 for the involution of X + 0,ns (q 2 , p) arising from the Atkin-Lehner involution of X 0 (q 2 ) (recall that the moduli intepretation of the Atkin-Lehner involution of X 0 (q 2 ) is as follows: a point of X 0 (q 2 ) represented by (E, ϕ)-where E is an elliptic curve and ϕ : E → E is an isogeny of degree q 2 -is mapped to (E ,φ), whereφ stands for the dual isogeny of ϕ).
Remark Even though there exists an isomorphism between X 0 (q 2 ) and X sp (q), this is not enough to conclude Lemma 3.4, because this isomorphism does not preserve j-invariants.
Proof Even though the existence of an isomorphism between X −,+ sp,ns (q, p) and X + 0,ns (q 2 , p) cannot be directly proven by appealing to the isomorphism between X 0 (q 2 ) and X sp (q), the proofs of the existence of these two isomorphisms are essentially the same. Indeed, start by identifying The map \H * → Q Q −1 \H * given by z → qz is an isomorphism. Note that Q Q −1 = where C 2 is a subgroup of GL 2 (F p ) conjugate to C 1 . The Riemann surface Q Q −1 \H * corresponds to the C-points of an algebraic curve X 2 . The isomorphism between X + 0,ns (q, p)(C) and X 2 (C) just defined can be seen to descend to an isomorphism defined over Q. Therefore, we have a Q-isomorphism between X + 0,ns (q, p) and X 2 . Now, we can define an isomorphism between X 2 and X −,+ sp,ns (q, p) by a simple F p -base change. In a more formal way, we note that if g ∈ GL 2 (F p ) is such that gC 2 g −1 = C 1 , and if X ( p) denotes the modular curve parametrising elliptic curves with full p-torsion, then the automorphism of X ( p) defined by multiplication by g induces a Q- there is a Q-isomorphism from X 2 to X −,+ sp,ns (q, p). The isomorphism θ is obtained by composing this isomorphism with the isomorphism from X + 0,ns (q, p) to X 2 defined above. The statement relating the involutions of X −,+ sp,ns (q, p) and X + 0,ns (q, p) with the isomorphism θ can be achieved by looking at the moduli interpretation of θ .

Remark
The moduli intepretation of the isomorphism θ is given as follows. A C-point in where ϕ 1 : E → E 1 and ϕ 2 : E → E 2 are two independent isogenies of degree q and n is a necklace (for the definition of a necklace, see [14]). The image of this point under θ is represented by the tuple (E 1 , ϕ 2 •φ 1 , ϕ 1 (n)), whereφ 1 stands for the dual isogeny of ϕ 1 , and ϕ 1 (n) is the necklace in E 1 obtained as the image of the necklace n via ϕ 1 .
The curve X + 0,ns (q 2 , p) comes equipped with two "degeneracy maps" coming from the degeneracy maps from X 0 (q 2 ) to X 0 (q). Let us briefly recall that the moduli interpretations of these degeneracy maps from X 0 (q 2 ) to X 0 (q) are as follows: a point in X 0 (q 2 ) represented by (E, C)-where E is an elliptic curve and C is a cyclic subgroup of E(C) of order q 2 -is mapped by one of the degeneracy maps to (E, C[q]), and by the other ). The maps d 1 and d 2 satisfy the relations where w q is the involution X 0,ns (q, p) coming from the Atkin-Lehner involution of X 0 (q). Let J + 0,ns (q, p) stand for the Jacobian of X + 0,ns (q, p). Adapting to our case a morphism from X + 0 (q 2 ) to J 0 (q) that appears in Sect. 3 of [12] and in [13], we define by mapping a point P to the class of d 1 (P) − d 2 (P). By abuse of notation, we shall denote by w q the involution of J + 0,ns (q, p) induced by the involution w q of X + 0,ns (q, p). Equation (3.1) give us the following equality: Consider the abelian subvariety B of J + 0,ns (q, p) defined by B := (1 + w q )J + 0,ns (q, p). Define J := J + 0,ns (q, p)/B and let π be the canonical projection from J + 0,ns (q, p) to J . From Eq. (3.2) and Lemma 3.4, we conclude that π • g factors through X +,+ sp,ns (q, p). Thus, we have the following commutative diagram:  Table 2). Note that π • g(∞) = 0.

Proposition 3.5
There exists a non-trivial optimal quotient A of J + 0,ns (q, p) such that A(Q) is finite and the kernel of the canonical projection π : J + 0,ns (q, p) → A is stable under the Hecke operators T , prime = p. Moreover, π factors through π.

Proof
The first part of the proposition has been proved in [6, Proposition 7.1] (even though this is only stated for the case where q = 2, 3, it is not hard to see that the same argument shows that the result holds for q ∈ {2, 3, 5, 7, 13}). In order to see that π factors through π, note that A is defined to be the winding quotient of the new part of J + 0,ns (q, p) (see [6]). Since 1 + w q is an element of the winding ideal, it follows from the definition of J and π that π factors through π.
Let h denote the composition of π • g with the natural projection from J to A. Now, let O be the ring of integers of Q(ζ p ) + and define R : Given a curve X defined over Q, we shall write X /R for the minimal regular model of X over R. Similarly, given an abelian variety B, we shall write B /R for the Néron model of B over R. With this notation, the morphism h extends to a morphism X + 0,ns (q 2 , p) /R → A /R . By abuse of notation, we shall refer to this morphism by h as well.
Before stating our next result, let us recall the definition of formal immersion. Let S 1 and S 2 be two schemes and let f : S 1 → S 2 be a morphism. Let x be a point in S 1 and define y := f (x). WriteÔ S 1 ,x andÔ S 2 ,y for the formal completions of the local rings of S 1 and S 2 at x and y, respectively. We say that f is a formal immersion at x if the induced morphism f x :Ô S 2 ,y →Ô S 1 ,x is surjective. Now, let A be a Dedekind domain and suppose that S 1 and S 2 are schemes over Spec(A). Let x be a section (over A) of S 1 , and let y be the section of S 2 which corresponds to the image of x. We will say that f is a formal immersion at x if f is a formal immersion at x p for every non-zero prime ideal p of A, where x p stands for the special fibre of x at p. Proposition 3. 6 The morphism h is a formal immersion at ∞ /R , where ∞ /R stands for the section over R defined by ∞.

Proof
The proof of this result is standard (see, for example, [12]). Indeed, let λ be a prime of K := Q(ζ p ) + not dividing 2qp. Let F λ denote the residue field at λ of Q(ζ p ) + . Write In a similar manner, write Cot(J + 0,ns (q, p) /F λ ) for the cotangent space of J + 0,ns (q, p) /F λ at 0 /F λ , and the same thing goes for Cot(A). Showing that h is a formal immersion at ∞ /F λ is equivalent to showing that the map Cot( Therefore, f is the reduction modulo λ of a cusp form in S 2 ( 0 (q)). However, since q ∈ {2, 3, 5, 7, 13}, this vector space is trivial, which is a contradiction.

Corollary 3.7 The morphism X
Proof of Proposition 1.5 Once again, the argument is standard. We start by noting that, given a Q-rational point P of X +,+ sp,ns (q, p), its image Q in A is torsion, because the morphisms are defined over Q and A has finite Mordell-Weil group. Let be a prime congruent to ±1 mod p (as p ≥ 11, Proposition 3.3 asserts that these are the only primes we have to worry about). Since p ≥ 11, we have > 2. Note that, since ≡ ±1 (mod p), is inert in Q(ζ p ) + . LetÃ stand for the special fibre of the Néron model of A over Z . It is well-known that the reduction map gives us an injection Tors(A(Q)) →Ã(F ). Therefore, writingQ for the reduction of Q modulo , we haveQ = 0 inÃ(F ) if, and only if, Q = 0.
Suppose that E has potentially multiplicative reduction at . Then it gives rise to a Qrational point P in X +,+ sp,ns (q, p) which meets one of the cusps at the fibre at . By choosing appropriate bases for GL 2 (F q ) and GL 2 (F p ), we may assume that this cusp is ∞. Therefore, writing, as above, Q for the image of P in A, we find thatQ = 0. Hence, by the observation of the previous paragraph, Q = 0. Since the morphism X +,+ sp,ns (q, p) /R → A /R is a formal immersion at ∞ /R in characteristic , and as P meets ∞ at the fibre of , we must have P = ∞, which is a contradiction.
We are finally ready to prove Theorem 1.4.
Proof of Theorem 1. 4 We will make use of Proposition 1.5. The argument used here is analogous to the one used in the proof of [ q ∈ {2, 3, 5, 7}. Moreover, as the normalisers of non-split Cartan subgroups of GL 2 (F 2 ) are precisely its Borel subgroups, and as the case of Borel subgroups has already been treated by Theorem 1.3, we can assume that q ∈ {3, 5, 7}. Suppose that there exists a prime p > 37 for whichρ E, p is not surjective. Then the image ofρ E, p must be contained in the normaliser of a non-split Cartan subgroup of GL 2 (F p ). Proposition 1.5 now yields that the j-invariant of E must be integral. Therefore, the elliptic curve E gives rise to a Q-rational point in X + sp (q) with integral j-invariant. By an appropriate choice of uniformisers, the j-invariant map j : X + sp (q) → P 1 can be explicitly described by one of the equations of Table 3 (the source of these equations is [5, p. 68]).
An example of an elliptic curve with j-invariant −5000 is the one given by the equation and an example of an elliptic curve with j-invariant −1728 is the one given by Upon consultation on the LMFDB database [19]-where information about the image of mod p Galois representations of elliptic curves was obtained using a method of Sutherland [18]-, we can observe that, if p > 37, the representationsρ E 1 , p andρ E 2 , p are both surjective.
Recalling that any two elliptic curves without complex multiplication and sharing the same j-invariant are quadratic twists of each other, we conclude thatρ E, p is surjective for every prime p > 37, yielding a contradiction.
It is worth highlighting that Theorem 3.2 is only needed here to obtain an explicit upper bound for the non-surjective primes (which turns out to be 37). If we were only interested in showing that there exists a constant C such thatρ E, p is surjective for every prime p > C and every elliptic curve E satisfying the conditions of Theorem 1.4, then this could be achieved via Siegel's theorem as follows. Since the j-invariant map j : X + sp (13) → P 1 has more than two distinct points mapping to the point at infinity of P 1 , Siegel's theorem asserts that there are only finitely many points in X + sp (13)(Q) whose j-invariant is integral. Therefore, even without assuming that all the Q-rational points of X + sp (13) are cuspidal or CM-points, we are still able to conclude that there are only finitely many isomorphism classes of elliptic curves satisfying the conditions of Theorem 1.4 and admitting a prime p > 37 for which the Galois representationρ E, p is not surjective (recall that, under these conditions, the j-invariant of such an elliptic curve must be integral). We can now use Theorem 1.1 and the fact that, for elliptic curves without complex multiplication, the surjectivity of the Galois representation only depends on its isomorphism class to conclude the existence of our constant C.

The case of Q-curves
We start by proving Theorem 1.10. Let us just remark that if K is a quadratic field and E/K is an elliptic curve completely defined over K and of degree 1, then E is defined over Q. But Theorems 1.6, 1.7 and 1.10 are already known to hold when E is defined over Q (Theorem 1.7 for elliptic curves over Q is simply Theorem 1.4, which we have just proved). Therefore, in everything that follows, whenever we speak of a Q-curve, we will mean a Q-curve that is not defined over Q. In the terminology of [9], these are known as strict Q-curves.

Proof of Theorem 1.10
In order to obtain Theorem 1.10 from the proposition above, we will use the following result of Le Fourn. The proof will be essentially an adaptation of an argument due to Mazur that can be found in Sects. 5, 6 and 7 of [12].
From now to the end of this section, K will be a quadratic number field, E/K will be a Q-curve completely defined over K , of square-free degree d ≥ 2 and without complex multiplication, and p ≥ 13 will be a prime number such that p d and for which the image of Pρ E, p is contained in a Borel subgroup of PGL 2 (F p ). We will assume that p does not ramify in K . Consider the Galois representationρ E, p : G K → GL 2 (F p ). As the image of Pρ E, p is contained in a Borel subgroup of PGL 2 (F p ), we can choose a basis P, Q of E[ p](K ) such that P is a cyclic subgroup of E(K ) defined over K (i.e., τ ( P ) = P for every τ ∈ G K ). With respect to this basis, the representationρ E, p : G K → GL 2 (F p ) has the shape where φ and ϕ are two characters G K → F × p .

Lemma 4.2
Let p be a prime of K dividing p. Then there exists a unique element k ∈ Z/( p − 1)Z and a character α : G K → F × p unramified at p such that φ = αχ k p , where χ p stands for the mod p cyclotomic character.
Proof Let G p be a decomposition subgroup of G K associated to p and let O p denote the ring of integers of K p , the completion of K at p. Let p be a prime of K lying above p. We now know thatρ E, p has the shape where α is some character unramified at p. If p remains prime in K , then, trivially, α is unramified at every prime of K lying above p. The next lemma asserts that this is also true even if p splits.

Lemma 4.3 Using the above notation, α is unramified at every prime of K lying above p.
Proof This is only true because we are assuming that the image of Pρ E, p is contained in a Borel subgroup of PGL 2 (F p ). Let us start by recalling the notation introduced in Sect. 2. For each element τ ∈ G Q , we have a K -isogeny μ τ : τ E → E satisfying the following conditions: if the restriction of τ to K is the trivial automorphism of K , then μ τ is the identity; if, on the other hand, the restriction of τ to K is the non-trivial automorphism of K , then μ τ has degree d and, moreover, if τ ∈ G Q is another element restricting to the non-trivial automorphism of K , then μ τ = μ τ . Note that as the image of Pρ E, p is contained in a Borel subgroup of PGL 2 (F p ), we have μ τ ( τ P) ∈ P for every τ ∈ G Q . As the result trivially holds when p remains prime in K , and as we are assuming that p does not ramify in K , we will assume that p splits in K . If this is the case, let q be the other prime of K lying above p. Let σ ∈ G Q be an element which restricts to the non-trivial automorphism of K . If D p is a decomposition subgroup of G K over p, then D q := σ D p σ −1 is a decomposition subgroup of G K over q. Moreover, if I p and I q denote the corresponding inertia subgroups, we have I q = σ I p σ −1 . Therefore, every element of I q can be uniquely written in the form σ τ σ −1 with τ ∈ I p . Let τ ∈ I p . As any τ ∈ I p acts as χ p (τ ) k on P , and as μ σ ( σ P) ∈ P , we get But then σ τ σ −1 P = χ p (τ ) k P for every τ ∈ I p . Therefore, the restriction of φ to I q is χ k p , proving that φ = αχ k p for some character α : G K → F × p unramified at every prime dividing p.
Lemma 4.4 Using the above notation, there are integers e | 12 and a, b ∈ {0, . . . , e} such that ek ≡ a (mod p − 1) and Proof We know that E has potentially good reduction at p. Therefore, after taking a field extension L of K p with ramification degree dividing 12, but at most 6, the curve E acquires good reduction at p. Let e denote the absolute ramification degree of L. As we are assuming that p does not ramify in K , the integer e is the ramification degree of L over K p . Let I p and I L denote the inertia subgroups of G K p and G L , respectively, and let I t p and I t L denote 752 P. Lemos the respective tame inertia groups. Of course, φ and ϕ factor through I t p . Let θ denote the fundamental character of level 1 for I L . We have χ p = θ e . Therefore, φ| I L = θ ek and ϕ| I L = θ e(1−k) . By a theorem of Raynaud, there are integers a, b ∈ {0, . . . , e} such that ek ≡ a (mod p − 1) and e(1 − k) ≡ b (mod p − 1).
The only properties of the covering X 2 ( p) /S → X 0 ( p) /S that we are going to use are the following: it is a finite étale morphism of smooth S-schemes and its Galois group is isomorphic to the cyclic group Z/nZ, where n := num(( p − 1)/12). This yields that the degree of As all the coverings are cyclic, there exists a finite abelian extension L/K for which there is a point y = [(E , P )] ∈ X 1 ( p)(L) mapping to x. Moreover, as X 2 ( p) /S → X 0 ( p) /S is finite étale, the ramification degree of L/K at any prime of characteristic different from p divides t, and so it also divides 6. Now, as y maps to x, there is an L-isomorphism f : E → E mapping C p to P . The L-isomorphism f is associated to an element of H 1 (Gal(L/K ), Aut L (E)). However, Aut L (E) = {±1}, as E does not have complex multiplication. Therefore, given a prime λ of K of characteristic different from p, we find that α t | I λ is a quadratic character, yielding that α 2t is unramified at λ. As we already know that α is unramified at any prime of characteristic p, we get the result.
Let us just review what we have so far. The mod p Galois representationρ E, p has the shape αχ k where χ p is the mod p cyclotomic character, α is a character such that α 2t is unramified everywhere, and k satisfies the properties listed in Lemma 4.4. Let λ be a prime of K of characteristic different from p. Write G λ for a decomposition subgroup of G K over λ. Let α λ denote the restriction of the character α to G λ . As in Sect. 6 of [12], we are going to split it in its ramified and unramified part. From local class field theory, we have a (non-unique) decomposition where O λ denotes the ring of integers of K λ . Sticking to the notation of Mazur, we write α λ = γ λ · b λ , where the character γ λ factors through O × λ in the decomposition above and b λ is unramified. Lemma 4.5 implies that γ λ has order dividing 2t. Let L denote the splitting field of γ λ . This is a totally ramified extension of K λ of degree dividing 2t.
Lemma 4.6 Using the above notation, the elliptic curve E has good reduction over L.
Proof Suppose, for the sake of contradiction, that E does not have good reduction over L.
Let F q denote the residue field of K (q being its size) andẼ/F q denote the special fibre of the Néron model of E over O L (as L is totally ramified, the residue field of L is that of K ). Note that we haveρ Let F be the splitting field of b λ χ k p . Then F is an unramified extension of L and E(F) has a p-torsion point. Moreover, as Néron models are stable under étale base change, the special fibre of the Néron model of E over O F isẼ /F F , where O F is the ring of integers of F and F F is its residuel field. We conclude that there is a p-torsion point inẼ(F F ), which is clearly impossible when E has bad reduction at L. Therefore, E acquires good reduction at L.
As a consequence,ρ E, p | Gal(L/L) factors through Gal(L unr /L). The Galois group Gal(L unr /L) is generated by the Frobenius automorphism Frob λ .

Lemma 4.7 Let c denote the narrow class number of K . Then
, where q is the size of the residue field of K λ and Tr(Frob λ ) ∈ Z is the trace of the action of the Frobenius element of Gal(L unr /L) on the p-adic Tate module of E.
Proof of Theorem 1.10 for p ≡ 1 (mod 4) Let λ be a prime of K dividing 2 and let f denote the residual degree of λ. From Lemma 4.7, we get where q = 2 f . Using the notation and results of Lemma 4.4, we have e | 12 and e ≤ 6. Therefore, we can write 12 = re for some integer 2 ≤ r ≤ 12. So, where a, b are as in Lemma 4.4. Now, by the Hasse-Weil bounds, We are now going to show that if p ≡ 1 (mod 4), then 2 · q 6c < q rca + q rcb . Suppose, for the sake of contradiction, that we have 2 · q 6 ≥ q rca + q rcb . If ra > 6 (and so rb = 12 − ra < 6), then it is easy to see that 2 · q 6c < q rca + q rcb . By symmetry, we cannot have ra < 6 either, nor rb < 6, nor rb > 6. Therefore, ra = rb = 6, yielding one of the following cases: (1) r = 2, e = 6 and a = b = 3; (2) r = 3, e = 4 and a = b = 2; or (3) r = 6, e = 2 and a = b = 1.
Case (1) yields 6k ≡ 3 (mod p − 1), which is not possible, as p is odd. For similar reasons, we cannot have case (3): here we would be forced to have 2k ≡ 1 (mod p − 1). We are only left with case (2). In this case, we obtain the congruence 4k ≡ 2 (mod p − 1). If p ≡ 1 (mod 4), this is not possible. Thus, in this case, we must have 2 · q 6c < q rca + q rcb .
Let us now turn to the case where p ≡ 3 (mod 4). As we have seen in the proof above, if we are not in any of the cases (1), (2) or (3), then we obtain the bound 2 6 f c+1 (2 6 f c + 1). We therefore assume we are in one of these cases. Again, (1) and (3) cannot occur, so let us assume we are in case (2). In other words, we are going to assume, from now on, that r = 3, e = 4 and a = b = 2. As observed above, this yields 2k ≡ 1 (mod m) (where, recall, m was defined to be ( p − 1)/2), and, moreover, t = 1 or t = 3. Analogously to what is done in [12], the aim of what follows is to show that every prime 5 ≤ < p/4 unramified in K and such that d satisfies After this has been proven, an application of Minkowski's bound for the norm of ideals in a class of the ideal class group will yield the theorem (cf. Sect. 7 of [12]).
Before proceeding, let us make a remark that will be useful later on. Note that, as a consequence of E not having complex multiplication, we have μ σ • σ μ σ = d or −d, where σ ∈ G Q restricts to the non-trivial automorphism of K .

Lemma 4.8 Let K be a quadratic extension of K . Let E be a K -twist of E, and let g :
Then μ σ := g • μ σ • σ g −1 is a K -isogeny from σ E to E for every σ ∈ G Q . In particular, E is a Q-curve completely defined over K and of degree d. Moreover, μ σ • σ μ σ = μ σ • σ μ σ .
Proof All of these statements are easy to prove. If E is a trivial twist (i.e., if it is Kisomorphic to E), then the result is trivial. Suppose then that this is not the case. Consider the map τ → g −1 ( τ g), τ ∈ Gal(K /K ). This is a 1-cocycle Gal(K /K ) → Aut K (E K ). As E does not have complex multiplication, Aut K (E K ) = {±1}, and so Thus, τ → g −1 ( τ g) is a quadratic character Gal(K /K ) → {±1}. As we are assuming that E is not a trivial twist, we conclude that τ g = −g if τ ∈ Gal(K /K ) is the non-trivial element. Similarly, τ ( σ g) = − σ g for every σ ∈ G Q . Therefore, meaning that μ σ is defined over K . It is clear that μ σ has degree d. Finally, as we wanted.
As a consequence of this lemma, we may assume, after taking an appropriate quadratic twist if needed, that E satisfies one of the following statements: (A) μ σ • σ μ σ = d and b λ (Frob λ ) = −1 for every prime λ of K of residual degree 2 and of odd characteristic < p/4; (B) μ σ • σ μ σ = −d and b λ (Frob λ ) = 1 for every prime λ of K of residual degree 2 and of odd characteristic < p/4.
In order to treat the case where p ≡ 3 (mod 4), we will resort to some general theory that can be consulted in [15].
Let A/Q be the abelian surface defined by A := Res K /Q (E). This is a Q-simple abelian variety of GL 2 -type.
, depending on whether μ σ • σ μ σ = d or −d, respectively (see Sect. 7 of [15]). Let q be a prime of F over p. If we denote by ρ E, p the Galois representation of E obtained by the Galois action on the Tate module V p (E) := T p (E) ⊗ Q p , then we have where ρ A,q stands for the Galois representation obtained from the Galois action on is free of rank 2 over F ⊗ Q p ). The reduction of ρ A,q modulo q is well-defined up to semi-simplification, so we are going to denote bȳ this semi-simplified reduction. If we writeρ ss E, p for the semi-simplification ofρ E, p , then ρ A,q | G K is isomorphic toρ ss E, p . It can be easily verified that the condition that the image of Pρ E, p is contained in a Borel subgroup of PGL 2 (F p ) implies that the image ofρ A,q is contained in a Borel subgroup of GL 2 (F q ), and so is contained in a split Cartan, asρ A,q is semi-simple (see Sect. 6 of [15] and, in particular, [15,Lemma 6.4]).
Let us just mention a standard lemma that will be useful later. This is just a special case of [4, Chapitre III, 9.4, Proposition 6], but it suffices for our purposes.
As p is unramified in K , and asρ A,q | G K is isomorphic toρ ss E, p , we find that for some character β : G Q → F × q unramified at p such that β| G K = α, and where θ : G Q → GL 2 (F q ) is a quadratic character defined as follows: if σ ∈ G Q restricts to the non-trivial automorphism of K , then otherwise, the image is 1 (see Sect. 7 of [15]). In particular, if μ σ • σ μ σ = d, then F is real and θ = 1.
Notation In order to simplify exposition, from here on, given a rational prime , we are going to assume we have fixed an embeddingQ →Q . This amounts to choosing a decomposition subgroup G of G Q over . Moreover, every number field L will be regarded as subfields ofQ, so that, given a prime λ of L dividing , we have an embedding of the decomposition subgroup G λ of L over λ into G . Similarly, algebraic extensions of Q will be regarded as subfields ofQ .
In what follows, λ will be a prime of K and will be the rational prime lying below λ. We will further assume that 5 ≤ < p/4, d and that does not ramify in K . Moreover, we will assume that p is large enough so that it does not ramifiy in F. Write β for the restriction of β to G . As we did before, we can resort to class field theory to (non-uniquely) decompose G ab as G ab ∼ = Z × ×Ẑ, and we obtain a decomposition β = η ·δ , where η factors through Z × and δ is unramified. Let L be the splitting field of η . It is a totally ramified extension of Q . Moreover, if we keep writing L for the splitting field of γ λ over K λ in the decomposition of G ab λ , it can be easily checked that L is an unramified extension of L of degree equal to that of K λ /Q . Therefore, the degree of L /Q is the same as the degree of L/K λ . In particular, it divides 2t.
Proof Recall that β| G K = α, and that α 2t is unramified at every prime of K (see Lemma 4.5). We claim that β 4t is unramified everywhere.
As β 4t is a character defined on G Q , it follows that it is trivial, which proves the first part of the lemma.

Lemma 4.11 Using the above notation, A acquires good reduction over L .
Proof Denoting the absolute Galois group of L by G L , what we have to show is that ρ A, p | G L is unramified, where ρ A, p is the Galois representation of the Tate module V p (A) of A. As L is unramified over L , it is enough to show that ρ A, p | G L is unramified. Since A is the Weil restriction of E from K to Q, and noting that K ⊆ L, we see that ρ A, p | G L is the direct sum of the Galois representations (restricted to G L ) associated to V p (E) and V p ( σ E), where σ ∈ Gal(K /Q) is non-trivial. As these two representations are isomorphic, it is therefore enough to show that ρ E, p | G L is unramified. But we already know from Lemma 4.6 that E has good reduction over L, which yields that ρ E, p | G L is unramified, finishing the proof of the lemma.
As a consequence, ρ A,q | G L factors through Gal((L ) unr /L ). Writing Frob for the Frobenius element of Gal((L ) unr /L ), we obtain a result analogous to Lemma 4.7: where a ∈ O F stands for the trace of ρ A,q (Frob ). If we denote by P (T ) the characteristic polynomial of ρ A,q (Frob ) (which has coefficients in F), then Lemma 4.9 asserts that N F/Q (P (T )) is precisely the characteristic polynomial of ρ A, p (Frob ). As all the roots of the characteristic polynomial of ρ A, p (Frob ) have complex size √ (independently of the embedding into C chosen), we conclude that |a | ≤ 2 √ for every embedding of F into C.
Taking norms from F to Q, and recalling that 2k ≡ (mod p), we get As |a | ≤ 2 √ for every embedding of F in C and as < p/4, we conclude that we must have = N F/Q (a ) or 4 = N F/Q (a ). In any case, v (N F/Q (a )) = 1, which is only possible if ramifies in F. However, , and is an odd prime not dividing d, so we obtain a contradiction. Therefore, if 3 ≤ < p/4, d and if splits in K , then is not a quadratic residue modulo p.
Suppose now that remains prime in K . Assume that (A) holds. In this case, we have θ(Frob ) = 1, because μ σ • σ μ σ = d. We obtain the congruence Also, from Lemma 4.10, we know that δ 4t = 1, so either δ (Frob ) 2 is a 3rd root of unity, or −δ (Frob ) 2 is. As, from (A), b λ (Frob λ ) = −1, and as b λ (Frob λ ) = δ (Frob ) 2 , we see that b λ (Frob λ ) is either 1, a primitive third root of unity or the negative of a primitive third root of unity. In the first case, we get δ (Frob ) = ±1, which leads to If, on the other hand, b λ (Frob λ ) is a primitive third root of unity, then, in particular, δ (Frob ) 6 = 1, which means that δ (Frob ) 3 is a square root of 1. The situation where δ (Frob ) = ±1 takes us to the situation above, so we may assume that either δ (Frob ) is a primitive third root of unity, or −δ (Frob ) is. This leads to ± k ≡ a (mod q).
Finally, if −b λ (Frob λ ) is a primitive third root of unity, then δ (Frob ) 6 = −1, which means that δ (Frob ) / ∈ F × p , as p ≡ 3 (mod 4). In particular, p remains prime in F. Moreover, as δ (Frob ) 2 ∈ F × p , we see that the Galois conjugate of δ (Frob ) is −δ (Frob ). Thus, taking norms from F q to F p , we get Recalling that 2k ≡ (mod p), and after taking norms from F to Q in the appropriate cases, the three cases above give Using the same kind of arguments we used above, we conclude that v (N F/Q (a )) = 1, implying that ramifies in F (recall that we are assuming that > 3), which it does not. We omit the proof of the case where remains prime in K and (B) holds, as it is treated in a similar manner to the case where (A) holds, except that now we have θ(Frob ) = −1.
We conclude that if is a prime satisfying 5 ≤ < p/4, d and if does not ramify in K , then is not a quadratic residue modulo p. In other words, remains prime in Q( √ − p).
If m d is the number of prime divisors of d and m K is the number of rational primes that ramify in K , then the number of primes < p/4 which do not remain prime in Q(

The Borel case
The aim of this section is to provide a proof of Proposition 1.8 and Theorem 1.6. The arguments used to prove Proposition 1.8 follow closely those of Ellenberg [8].
Let p and q be as in the statement of Proposition 1.8. Define As in [8], we are going to consider a suitable quadratic twist of Z d,0 (q, p) whose Q-rational points will correspond to Q-curves completely defined over K , of degree d, without complex multiplication and with level structures at q and p corresponding to the curve X + 0,ns (q, p) (i.e., Q-curves satisfying the conditions of Proposition 1.8).
Define the homomorphism ψ : 0 (q, p)) by mapping σ , the non-trivial element of Gal(K /Q), to w d , the involution of Z d,0 (q, p) induced by the Atkin-Lehner operator associated to X 0 (d). Let Z ψ d,0 (q, p) be a quadratic twist associated to ψ. By definition, Z ψ d,0 (q, p) is a curve defined over Q for which there exists a K -isomorphism ϕ : Z d,0 (q, p) /K → Z ψ d,0 (q, p) /K such that ϕ • w d = σ ϕ. This isomorphism yields a bijection between the sets Z ψ d,0 (q, p)(Q) and {P ∈ Z d,0 (q, p)(K ) : w d P = σ P}. By Proof This argument was used in the proof of [6,Lemma 8.3]. Let τ ∈ G Q . It is easy to check that τ (h(P))−h(P) is a cuspidal divisor. Therefore, by the theorem of Manin-Drinfeld, there exists a positive integer m such that m( τ (h(P))) = mh(P).
This means that mh(P) is defined over Q. As A(Q) is finite, we conclude that mh(P) is torsion, and so is h(P).
Proof of Proposition 1.8 Note that if q ≥ 11 is a prime different from 13, then [8, Proposition 3.2] yields that E has potentially good reduction at every prime of characteristic > 3. As the image of Pρ E, p is contained in the normaliser of a non-split Cartan subgroup of PGL 2 (F p ), Proposition 3.3 yields that E cannot have potentially multiplicative reduction at primes above 2 and 3 either. Therefore, E has potentially good reduction everywhere. In other words, the j-invariant of E lies in O K .
We are reduced to proving the cases where q ∈ {2, 3, 5, 7, 13}. As noted above, a Q-curve as in the statement of the Proposition 1.8 gives rise to a Q-rational point P in Z ψ d,0 (q, p). If λ is a non-archimedean prime of K such that N K /Q (λ) 2 ≡ 1 (mod p), then Proposition 3.3 asserts that E has potentially good reduction at λ, as p ≥ 11. Suppose that N K /Q (λ) 2 ≡ 1 (mod p). Note that under this condition λ remains a prime in L. As p ≥ 11, the prime λ does not divide 6. Suppose, for the sake of contradiction, that E has potentially multiplicative reduction at λ. Then the section of Z /R corresponding to P meets a cusp in the fibre above λ. By changing bases if needed, we may assume that this cusp is ∞. Now, we know that h(P) ∈ Tors(A(L)). Moreover, the torsion subgroup of A(L) injects, via reduction modulo λ, into A(F λ ). But h(P) meets h(∞) in the special fibre above λ. Therefore, h(P) = h(∞). Since h is a formal immersion at ∞ /F λ , we conclude that P = ∞, which is absurd.
Proof of Theorem 1.6 By Theorem 1.10, the prime q belongs to a finite list. For each one of these primes, we obtain a K -rational point in X 0 (d) × X (1) X 0 (q), which is a modular curve with at least three cusps. By an argument due to Serre (see [17,Lemme 18]), we know that there exists a constant C K , depending only on the number field K , such that, for p > C K , the image of Pρ E, p is not exceptional. By Theorem 1.10, there is another constant C K ,d such that, for p > C K ,d , it is also not contained in a Borel subgroup. Therefore, if p > C K ,d , the image of Pρ E, p is contained in the normaliser of a Cartan subgroup (split or non-split). If it is contained in the normaliser of a split Cartan subgroup, then we can use the result of Le Fourn that we stated as Proposittion 1.9 to conclude that j(E) ∈ O K . In the case where the image of Pρ E, p is contained in the normaliser of a non-split Cartan, we use Proposition 1.8 that we have just proven in order to, once again, conclude that j(E) ∈ O K . In any case, there is a constant C K ,d such that, if p is a prime > C K ,d , then either Pρ E, p is surjective, or j(E) is integral. As the modular curve X 0 (d) × X (1) X 0 (q) has at least three cusps, Siegel's theorem asserts that there are only finitely many points in X 0 (d) × X (1) X 0 (q)(K ) whose j-invariants are in O K . As q is in a finite list of primes, we obtain a finite list of j-invariants of Q-curves satisfying the conditions of the theorem and for which there exists a prime p > C K ,d withρ E, p nonsurjective. Noting that surjectiveness only depends on the j-invariant if j(E) = 0, 1728 (as any two elliptic curves with the same j-invariant are quadratic twists of each other as long as j = 0, 1728), we can now use the theorem of Serre that we presented in the introduction as Theorem 1.1 for each one of these finitely many j-invariants, and we obtain the result.

The normaliser of a split Cartan case
The proof of Theorem 1.7 is a simple exercise using Le Fourn's Proposition 1.9.
Proof of Theorem 1. 7 We may assume that d ≥ 2, as the case d = 1 is precisely the one treated by Theorem 1.4. The aim is to show that, for each d as in the statement of the theorem, there are only finitely many points in X 0 (d)(K ) with j-invariant in O K . The result follows, as, by the same arguments employed in the proof of Theorem 1.6, there exists a constant C K ,d (keeping up with the notation used in the proof of Theorem 1.6) such that, if p is a prime > C K ,d and E/K is a curve satisfying the conditions of the theorem, then either Pρ E, p is surjective, or j(E) ∈ O K , and then we only have to use Serre's Theorem 1.1 for each of the finitely many points of X 0 (d)(K ) in the same way we used it in the proof of Theorem 1.6.
If the genus of X 0 (d) is ≥ 2, then a theorem of Faltings asserts that the set X 0 (d)(K ) is finite, and we are done. If the genus of X 0 (d) is 1, then the finiteness of the number of points in X 0 (d)(K ) with integral j-invariant comes from a theorem of Siegel. Finally, if the genus X 0 (d) is 0, then, as we require d to be square-free and not in the set {2, 3, 5, 7, 13}, we conclude that d is a product of two distinct primes. Therefore, X 0 (d) has at least three cusps, and we can use Siegel's theorem in order to conclude the finiteness of the number of points in X 0 (d)(K ) with integral j-invariant.