<<

EXISTENCE OF COMPATIBLE SYSTEMS OF LISSE SHEAVES ON SCHEMES

KOJI SHIMIZU

Abstract. Deligne conjectured that a single `-adic lisse sheaf on a normal variety over a finite field can be embedded into a compatible system of `0-adic lisse sheaves with various `0. Drinfeld used Lafforgue’s result as an input and proved this conjecture when the variety is smooth. We consider an analogous existence problem for a regular flat scheme over Z and prove some cases using Lafforgue’s result and the work of Barnet-Lamb, Gee, Geraghty, and Taylor.

1. Introduction

In [Del1], Deligne conjectured that all the Q`-sheaves on a variety over a finite field are mixed. A standard argument reduces this conjecture to the following one. Conjecture 1.1 (Deligne). Let p and ` be distinct primes. Let X be a connected normal scheme of finite type over Fp and E an irreducible lisse Q`-sheaf whose determinant has finite order. Then the following properties hold: (i) E is pure of weight 0. (ii) There exists a number field E ⊂ Q` such that the polynomial det(1 − Frobx t, Ex¯) has coefficients in E for every x ∈ |X|. (iii) For every non-archimedean place λ of E prime to p, the roots of det(1 − Frobx t, Ex¯) are λ-adic units. (iv) For a sufficiently large E and for every non-archimedean place λ of E prime to p, there exists an Eλ-sheaf Eλ compatible with E, that is, det(1 − Frobx t, Ex¯) = det(1 − Frobx t, Eλ,x¯) for every x ∈ |X|. Here |X| denotes the set of closed points of X and x¯ is a geometric point above x. The conjecture for curves is proved by L. Lafforgue in [Laf]. He also deals with parts (i) and (iii) in general by reducing them to the case of curves (see also [Del3]). Deligne proves part (ii) in [Del3], and Drinfeld proves part (iv) for smooth varieties in [Dri]. They both use Lafforgue’s results. We can consider similar questions for arbitrary schemes of finite type over Z[`−1]. This paper focuses on part (iv), namely the problem of embedding a single lisse Q`-sheaf into a compatible system of lisse sheaves. We have the following folklore conjecture in this direction. Conjecture 1.2. Let ` be a rational prime. Let X be an irreducible regular scheme that is flat and of finite type over Z[`−1]. Let E be a finite extension of Q and λ a prime of E above `. Let E be an irreducible lisse Eλ-sheaf on X and ρ the corresponding representation of π1(X). Assume the following conditions:

(i) The polynomial det(1−Frobx t, Ex¯) has coefficients in E for every x ∈ |X|. (ii) E is de Rham at ` (see below for the definition). 1 Then for each rational prime `0 and each prime λ0 of E above `0 there exists a lisse 0−1 Eλ0 -sheaf on X[` ] which is compatible with E|X[`0−1]. The conjecture when dim X = 1 is usually rephrased in terms of Galois repre- sentations of a number field (see Conjecture 1.3 of [Tay] for example). When dim X > 1, a lisse sheaf E is called de Rham at ` if for every closed point ∗  y ∈ X ⊗ Q`, the representation iyρ of Gal k(y)/k(y) is de Rham, where iy is the morphism Spec k(y) → X. Ruochuan Liu and Xinwen Zhu have shown that this is equivalent to the condition that the lisse Eλ-sheaf E|X⊗Q` on X ⊗ Q` is a de Rham sheaf in the sense of relative p-adic Hodge theory (see [LZ] for details). Now we discuss our main results. They concern Conjecture 1.2 for schemes over the ring of integers of a totally real or CM field. Theorem 1.3. Let ` be a rational prime and K a totally real field which is unram- −1 ified at `. Let X be an irreducible smooth OK [` ]-scheme such that • the generic fiber is geometrically irreducible, • XK (R) 6= ∅ for every real place K,→ R, and • X extends to an irreducible smooth OK -scheme with nonempty fiber over each place of K above `. Let E be a finite extension of Q and λ a prime of E above `. Let E be a lisse Eλ-sheaf on X and ρ the corresponding representation of π1(X). Suppose that E satisfies the following assumptions:

(i) The polynomial det(1−Frobx t, Ex¯) has coefficients in E for every x ∈ |X|. (ii) For every totally real field L which is unramified at ` and every morphism ∗ α: Spec L → X, the Eλ-representation α ρ of Gal(L/L) is crystalline at each prime v of L above `, and for each τ : L,→ Eλ it has distinct τ-Hodge-Tate numbers in the range [0, ` − 2]. (iii) ρ can be equipped with symplectic (resp. orthogonal) structure with multi- × plier µ: π1(X) → Eλ such that µ|π1(XK ) admits a factorization

µK × µ|π1(XK ) : π1(XK ) −→ Gal(K/K) −→ Eλ

with a totally odd (resp. totally even) character µK (see below for the definitions).

(iv) The residual representation ρ|π1(X[ζ`]) is absolutely irreducible. Here ζ` is

a primitive `-th root of unity and X[ζ`] = X ⊗OK OK [ζ`]. (v) ` ≥ 2(rank E + 1). Then for each rational prime `0 and each prime λ0 of E above `0 there exists a lisse 0−1 Eλ0 -sheaf on X[` ] which is compatible with E|X[`0−1].

For an Eλ-representation ρ: π1(X) → GL(Vρ), a symplectic (resp. orthogonal) structure with multiplier is a pair (h , i, µ) consisting of a symplectic (resp. orthog- × onal) pairing h , i: Vρ × Vρ → Eλ and a continuous homomorphism µ: π1(X) → Eλ 0 0 0 satisfying hρ(g)v, ρ(g)v i = µ(g)hv, v i for any g ∈ π1(X) and v, v ∈ Vρ. We show a similar theorem without assuming that K is unramified at ` using the potential diagonalizability assumption. See Theorem 4.1 for this statement and Theorem 4.2 for the corresponding statement when K is CM. The proof of Theorem 1.3 uses Lafforgue’s work and the work of Barnet-Lamb, Gee, Geraghty, and Taylor (Theorem C of [BLGGT]). The latter work concerns Galois representations of a totally real field, and it can be regarded as a special 2 case of Conjecture 1.2 when dim X = 1. We remark that their theorem has several assumptions on Galois representations since they use potential automorphy. Hence Theorem 1.3 needs assumptions (ii)-(v) on lisse sheaves. The main part of this paper is devoted to constructing a compatible system of lisse sheaves on a scheme from those on curves. Our method is modeled after Drinfeld’s result in [Dri], which we explain now. For a given lisse sheaf on a scheme, one can obtain a lisse sheaf on each curve on the scheme by restriction. Conversely, Drinfeld proves that a collection of lisse sheaves on curves on a regular scheme defines a lisse sheaf on the scheme if it satisfies some compatibility and tameness conditions (Theorem 2.5 of [Dri]). See also a remark after Theorem 1.4. This method originates from the work of Wiesend on higher dimensional class field theory ([Wie], [KS]). Drinfeld uses this method to reduce part (iv) of Conjecture 1.1 for smooth vari- eties to the case when dim X = 1, where he can use Lafforgue’s result. Similarly, one can use his result to reduce Conjecture 1.2 to the case when dim X = 1. However, Drinfeld’s result cannot be used to reduce Theorem 1.3 to the results of Lafforgue and Barnet-Lamb, Gee, Geraghty, and Taylor since his theorem needs a lisse sheaf on every curve on the scheme as an input. On the other hand, the results of [Laf] and [BLGGT] only provide compatible systems of lisse sheaves on special types of curves on the scheme: curves over finite fields and totally real curves, that is, open subschemes of the spectrum of the ring of integers of a totally real field. Thus the goal of this paper is to deduce Theorem 1.3 using the existence of compatible systems of lisse sheaves on these types of curves. We now explain our method. Fix a prime ` and a finite extension Eλ of Q`. Fix a positive integer r. On a normal scheme X of finite type over Spec Z[`−1], each lisse Eλ-sheaf E of rank r defines a polynomial-valued map fE : |X| → Eλ[t] of degree r given by fE,x(t) = det(1 − Frobx t, Ex¯). Here we say that a polynomial-valued map is of degree r if its values are polynomials of degree r. Moreover, fE determines E up to semisimplifications by the Chebotarev density theorem. Conversely, we can ask whether a polynomial-valued map f : |X| → Eλ[t] of degree r arises from a lisse sheaf of rank r on X in this way. Let K be a totally real field. Let X be an irreducible smooth OK -scheme which has geometrically irreducible generic fiber and satisfies XK (R) 6= ∅ for every real place K,→ R. In this situation, we show the following theorem. Theorem 1.4. A polynomial-valued map f of degree r on |X| arises from a lisse sheaf on X if and only if it satisfies the following conditions: (i) The restriction of f to each totally real curve arises from a lisse sheaf. (ii) The restriction of f to each separated smooth curve over a finite field arises from a lisse sheaf. We prove a similar theorem when K is CM (Theorem 3.14). Drinfeld’s theorem involves a similar equivalence, which holds for arbitrary regu- lar schemes of finite type, although his condition (i) is required to hold for arbitrary regular curves and there is an additional tameness assumption in his condition (ii).1 If K and X satisfy the assumptions in Theorem 1.3, then we prove a variant of Theorem 1.4, where we require condition (i) to hold only for totally real curves

1We do not need tameness assumption in condition (ii) in Theorem 1.4. This was pointed out by Drinfeld. 3 which are unramified over ` (Remark 3.13). This variant, combined with the results by Lafforgue and Barnet-Lamb, Gee, Geraghty, and Taylor, implies Theorem 1.3. One of the main ingredients for the proof of these types of theorems is an ap- proximation theorem: One needs to find a curve passing through given points in given tangent directions and satisfying a technical condition coming from a given ´etalecovering. To prove this Drinfeld uses the Hilbert irreducibility theorem. In our case, we need to further require that such a curve be totally real or CM. For this we use a theorem of Moret-Bailly. We briefly mention a topic related to Conjecture 1.2. As conjectures on Galois representations suggest, the following stronger statement should hold. Conjecture 1.5. With the notation as in Conjecture 1.2, condition (ii) implies condition (i) after replacing E by a bigger number field inside Eλ. This is an analogue of Conjecture 1.1 (ii) and (iii). Even if we assume the conjectures for curves, that is, Galois representations of a number field, no method is known to prove Conjecture 1.5 in full generality. However in [Shi] we show the conjecture for smooth schemes assuming conjectures on Galois representations of a number field and the Generalized Riemann Hypothesis. Note that Deligne’s proof of Conjecture 1.1 (iii) ([Del3]) uses the Riemann Hypothesis for varieties over finite fields, or more precisely, the purity theorem of [Del1]. We now explain the organization of this paper. In Section 2, we review the theo- rem of Moret-Bailly and prove an approximation theorem for “schemes with enough totally real curves.” We show a similar theorem in the CM case. In Section 3, we prove Theorem 1.4 and its variants using the approximation theorems. Most ar- guments in Section 3 originate from Drinfeld’s paper [Dri]. Finally, we prove main theorems in Section 4. Notation. For a number field E and a place λ of E, we denote by Eλ a fixed algebraic closure of Eλ. For a scheme X, we denote by |X| the set of closed points of X. We equip finite subsets of |X| with the reduced scheme structure. We denote the residue field of a point x of X by k(x). An ´etalecovering over X means a scheme which is finite and ´etaleover X. For a number field K and an OK -scheme X, XK denotes the generic fiber of X regarded as a K-scheme. In particular, for a K-algebra R, XK (R) means

HomK (Spec R,XK ), not HomZ(Spec R,XK ). We also write X(R) instead of XK (R). For simplicity, we omit base points of fundamental groups and we often change base points implicitly in the paper. Acknowledgments. I would like to thank Takeshi Saito for introducing me to Drinfeld’s paper and Mark Kisin for suggesting this topic to me. This work owes a significant amount to the work of Drinfeld. He also gave me important suggestions on the manuscript, which simplified some of the main arguments. I would like to express my sincere admiration and gratitude to Drinfeld for his work and comments. Finally, it is my pleasure to thank George Boxer for a clear explanation of potential automorphy and many suggestions on the manuscript, and Yunqing Tang for a careful reading of the manuscript and many useful remarks.

2. Existence of totally real and CM curves via the theorem of Moret-Bailly First we recall the theorem of Moret-Bailly. 4 Theorem 2.1 (Moret-Bailly, [MB, II]). Let K be a number field. We consider a quadruple (XK , Σ, {Mv}v∈Σ, {Ωv}v∈Σ) consisting of

(i) a geometrically irreducible, smooth and separated K-scheme XK , (ii) a finite set Σ of places of K, (iii) a finite Galois extension Mv of Kv for every v ∈ Σ, and (iv) a nonempty Gal(Mv/Kv)-stable open subset Ωv of XK (Mv) with respect to Mv-topology.

Then there exist a finite extension L of K and an L-rational point x ∈ XK (L) satisfying the following two conditions: ∼ [L : K] • For every v ∈ Σ, L is Mv-split, that is, L ⊗K Mv = Mv . • The images of x in XK (Mv) induced from embeddings L,→ Mv lie in Ωv. Remark 2.2. Our formulation is slightly different from Moret-Bailly’s, but Theo- rem 2.1 is a simple consequence of Th´eor`eme1.3 of [MB, II]. Namely, we can always find an integral model f : X → B of XK → Spec K over a sufficiently small open subscheme B of Spec OK such that (X → B, Σ, {Mv}v∈Σ, {Ωv}v∈Σ) is an incom- plete Skolem datum (see D´efinition1.2 of [MB, II]). Then Theorem 2.1 follows from Th´eor`eme1.3 of [MB, II] applied to this incomplete Skolem datum. Since the set Σ can contain infinite places, the above theorem implies the exis- tence of totally real or CM valued points. Lemma 2.3.

(i) Let K be a totally real field and XK a geometrically irreducible smooth K-scheme such that XK (R) 6= ∅ for every real place K,→ R. For any dense open subscheme UK of XK , there exists a totally real extension L of K such that UK (L) 6= ∅. (ii) Let F be a CM field and ZF a geometrically irreducible smooth F -scheme. For any dense open subscheme VF of ZF , there exists a CM extension L of F such that VF (L) 6= ∅. Proof. In either setting, we may assume that the scheme is separated over the base field by replacing it by an open dense subscheme. First we prove (i). For every real place v : K,→ R, let Uv = UK ∩(XK ⊗K,v R)(R). It follows from the assumptions and the implicit function theorem that Uv is a nonempty open subset of (XK ⊗K,v R)(R) with respect to real topology.  We apply the theorem of Moret-Bailly to the datum XK , {v}, {R}v, {Uv}v to ∼ [L:K] find a finite extension L of K and a point x ∈ XK (L) such that L ⊗K R = R and the images of x induced from real embeddings L,→ R above v lie in Uv. Then L is totally real and x ∈ UK (L). Hence UK (L) 6= ∅. Next we prove (ii). Let F + be the maximal totally real subfield of F . Define + + ZF + (resp. VF + ) to be the Weil restriction ResF/F + ZF (resp. ResF/F + VF ). Denote + ∗ the nontrivial element of Gal(F/F ) by c and ZF ⊗F,c F by c ZF . Then we have + ∼ ∗ ZF + ⊗F + F = ZF ×F c ZF , and this scheme is geometrically irreducible over F . + + + Thus ZF + is a geometrically irreducible smooth F -scheme, and VF + is dense and + + open in ZF + . Moreover, for every real place F ,→ R, we can extend it to a complex ∼ + place F,→ C and get F ⊗F + R = C. Hence we have ZF + (R) = ZF (C) 6= ∅. + + + Therefore we can apply (i) to the triple (F ,ZF + ,VF + ) and find a totally real + + + + + + extension L of F such that VF (L ⊗F + F ) = VF + (L ) 6= ∅. Since L ⊗F + F is a CM extension of F , this completes the proof.  5 This lemma leads to the following definitions. Definition 2.4. A totally real curve is an open subscheme of the spectrum of the ring of integers of a totally real field. A CM curve is an open subscheme of the spectrum of the ring of integers of a CM field.

Definition 2.5. Let K be a totally real field and X an irreducible regular OK - scheme. We say that X is an OK -scheme with enough totally real curves if X is flat and of finite type over OK with geometrically irreducible generic fiber and XK (R) 6= ∅ for every real place K,→ R. Now we introduce some notation and state our approximation theorems. Definition 2.6. Let g : X → Y be a morphism of schemes. For x ∈ X, consider the 2  tangent space TxX = Homk(x) mx/mx, k(x) at x, where mx denotes the maximal  ideal of the local ring at x. This contains Tx(Xg(x)), where Xg(x) = X ⊗Y k g(x) . A one-dimensional subspace l of TxX is said to be horizontal (with respect to g) if l does not lie in the subspace Tx(Xg(x)). Definition 2.7. Let X be a connected scheme and Y a generically ´etale X-scheme. A point x ∈ X(L) with some field L is said to be inert in Y → X if for each irreducible component Yα of Y , (Spec L) ×x,X Yα is nonempty and connected. Theorem 2.8. Let K be a totally real field and X an irreducible smooth separated OK -scheme with enough totally real curves. Consider the following data:

(i) a flat OK -scheme Y which is generically ´etaleover X; (ii) a finite subset S ⊂ |X| such that S → Spec OK is injective; (iii) a one-dimensional subspace ls of TsX for every s ∈ S. Then there exist a totally real curve C with fraction field L, a morphism ϕ: C → X and a section σ : S → C of ϕ over S such that ϕ(Spec L) is inert in Y → X and Im(Tσ(s)C → TsX) = ls for every s ∈ S. Proof. We will use the theorem of Moret-Bailly to find the desired curve. Note that we can replace Y by any dominant ´etale Y -scheme. Let v denote the structure morphism X → Spec OK . Take an open subscheme U ⊂ X such that v(U) ∩ v(S) = ∅ and the morphism Y ×X U → U is finite and ´etale. Replacing each connected component of Y ×X U by its Galois closure, we may assume that each connected component of Y ×X U is Galois over U. Write ` Y ×X U = 1≤i≤k Wi as the disjoint union of connected components and denote by Gi the Galois group of the covering Wi → U. Let Hi1,...,Hiri be all the proper subgroups of Gi. We will choose a quadruple of the form  XK , {vij}i,j ∪ {v(s)}s∈S ∪ {v∞,i}i, {Kvij } ∪ {Ms} ∪ {R}, {Vij} ∪ {Vs} ∪ {V∞,i} .

First we choose vij and Vij (1 ≤ i ≤ k, 1 ≤ j ≤ ri) which control the inerting property.

Claim 1. There exist a finite set {vij}i,j of finite places of K and a nonempty open subset Vij of X(Kvij ) with respect to Kvij -topology for each (i, j) such that (i) for any finite extension L of K and any L-rational point x ∈ X(L), x is

inert in Y → X if L is Kvij -split and if all the images of x under the

induced maps X(L) → X(Kvij ) lie in Vij, and 6 (ii) vij are different from any element of v(S) regarded as a finite place of K.

Proof of Claim 1. For each i = 1, . . . , k and j = 1, . . . , ri, let πHij denote the induced morphism Wi/Hij → X and let Mij be the algebraic closure of K in the field of rational functions of Wi/Hij. Then we have a canonical factorization

Wi/Hij → Spec OMij → Spec OK . If Mij = K, then the generic fiber (Wi/Hij)K is geometrically integral over K. It follows from Proposition 3.5.2 of [Ser] that there are infinitely many finite  places v0 of K such that U(Kv0 ) \ πHij Wi/Hij(Kv0 ) is a nonempty open subset of U(Kv0 ). Thus choose such a finite place vij and put  Vij = U(Kvij ) \ πHij Wi/Hij(Kvij ) .

Next consider the case where Mij 6= K. The Lang-Weil theorem and the Chebotarev density theorem show that there are infinitely many finite places v0 of K such that U(Kv0 ) 6= ∅ and v0 does not split completely in Mij, that is, ∼ [Mij :K] Mij ⊗K Kv0 =6 Kv0 (see Propositions 3.5.1 and 3.6.1 of [Ser] for example). In this case, choose such a finite place vij and put

Vij = U(Kvij ).

It is obvious to see that we can choose vij satisfying condition (ii). We now show that these vij and Vij satisfy condition (i). Take L and x ∈ X(L) as in condition (i).  By the lemma below (Lemma 2.9), it suffices to prove that x 6∈ πHij Wi/Hij(L) for any Hij. When Mij = K, this is obvious because the images of x under the maps X(L) →  X(Kvij ) lie in Vij = U(Kvij ) \ πHij Wi/Hij(Kvij ) . When Mij 6= K, we know that Mij ⊗K Kvij is not Kvij -split. Since L is assumed to be Kvij -split, Mij cannot be embedded into L. On the other hand, we have a canonical factorization

Wi/Hij → Spec OMij . Therefore Wi/Hij(L) = ∅. Thus x is inert in Y → X in both cases. 

Next we choose a finite Galois extension Ms of Kv(s) and a Gal(Ms/Kv(s))- stable nonempty open subset Vs of X(Ms) with respect to Ms-topology to make a totally real curve pass through s in the tangent direction ls. Here Kv(s) denotes the completion of K with respect to the finite place v(s) of K. Let OˆX,s denote the completed local ring of X at s ∈ S. Since OˆX,s is regular, we can find a regular one-dimensional closed subscheme Spec Rs ⊂ Spec OˆX,s which is tangent to ls and satisfies Rs ⊗OK K 6= ∅ (see Lemma A.6 of [Dri]). It follows from the construction that Rs is a complete discrete valuation ring 0 which is finite and flat over OKv(s) and has residue field k(s). Let Ms be the fraction field of Rs. For each s ∈ S we first choose Ms and a local homomorphism

OX,s → OMs . There are two cases. 0 If ls is horizontal, then Rs is unramified over OKv(s) and hence Ms is Galois over 0 Kv(s). Put Ms := Ms in this case. Then we have a natural local homomorphism ˆ OX,s → OX,s → OMs . 0 If ls is not horizontal, then Rs is ramified over OKv(s) . Let Kv(s) be the maximal 0 0 unramified extension of Kv(s) in Ms and Ms the Galois closure of Ms over Kv(s). 0 Then both Kv(s) and Ms have the same residue field k(s). 7 ˆ We construct a local homomorphism OX,s → OMs in this setting. Since X is smooth over OK , the ring OˆX,s is isomorphic to the ring of formal power series O 0 [[t1, . . . , tm]] for some m and we identify these rings. Kv(s) Let ui ∈ OM 0 denote the image of ti under the homomorphism O 0 [[t1, . . . , tm]] = s Kv(s) Oˆ → R = O 0 . Let π (resp. $) be a uniformizer of O 0 (resp. O ) and X,s s Ms Ms Ms P∞ j consider π-adic expansion u = a π . Since Oˆ → O 0 is a local homo- i j=0 ij X,s Ms morphism, we have ai0 = 0 for each i. Consider the differential of Spec O 0 = Spec R → Spec Oˆ at the closed point. Ms s X,s ∂ Pm ∂ The tangent vector is sent to ai1 under this map, and the latter spans ∂π i=1 ∂ti the tangent line ls. ˆ P∞ j Define a local homomorphism OX,s → OMs by sending ti to j=1 aij$ . Then the image of the differential of the corresponding morphism Spec OMs → X at the closed point is ls by the same computation as above.

In either case, we have chosen Ms and a homomorphism OX,s → OMs . Let sˆ ∈ X(OMs ) be the point induced by the homomorphism. Note that X(OMs ) is an open subset of X(M ) by separatedness. Let α: X(O ) → X(O /m2 ) s Ms Ms Ms be the reduction map, where mMs denotes the maximal ideal of OMs . Define 0 −1  Vs = α α(ˆs) , which is a nonempty open subset of X(Ms), and put [ 0 Vs = σ(Vs ), σ where σ runs over all the elements of Gal(Ms/Kv(s)). Since Gal(Ms/Kv(s)) acts continuously on X(Ms), Vs is a nonempty Gal(Ms/Kv(s))-stable open subset of X(Ms). Finally, let v∞,1, . . . , v∞,n be the real places of K and put

V∞,i = X(R) for each i = 1, . . . , n. This is nonempty by our assumption. It follows from the theorem of Moret-Bailly (Theorem 2.1) that there exist a finite extension L of K and an L-rational point x ∈ X(L) satisfying the following properties:

(i) L⊗K Kvij is Kvij -split and x goes into Vij under any embedding L,→ Kvij . (ii) L ⊗K Ms is Ms-split and x goes into Vs under any embedding L,→ Ms. (iii) L is totally real. We can spread out the L-rational point x: Spec L → X to a morphism ϕ: C → X where C is a totally real curve with fraction field L. By property (ii), we can choose C and ϕ so that all the points of Spec OL above v(S) ⊂ Spec OK are contained in C. Claim 1 shows that x is inert in Y → X. Thus it remains to prove that there exists a section σ of ϕ over S such that Im(Tσ(s)C → TsX) = ls for every s ∈ S It follows from property (ii) and the definition of Vs that there exists an embed- ding L,→ Ms such that the image of x under the associated map X(L) → X(Ms) 0 0 lies in Vs . Let s ∈ Spec OL be the closed point corresponding to this embedding. 0 0 Then we have s ∈ C, k(s ) = k(s), and Im(Ts0 C → TsX) = ls. Hence we can define a desired section of ϕ over S.  Lemma 2.9. Let L be a field, U a locally noetherian connected scheme and π : W → U a Galois covering with Galois group G. For any subgroup H ⊂ G, let πH denote 8 the induced morphism W/H → U. An L-valued point of X is inert in π if and only S  if it lies in U(L) \ πH W/H(L) . H(G Proof. Let x denote the L-valued point. Choose a point of W above x and fix a geometric point above it. This also defines a geometric point above x and we have a homomorphism π1(x) → G, where π1(x) is the absolute Galois group of L. Let H0 denote the image of this homomorphism. Then x is inert in π if and only if the homomorphism is surjective, that is, H0 = G. On the other hand, for a subgroup  H ⊂ G, the point x lies in πH W/H(L) if and only if Spec L ×x,U W/H → Spec L has a section, which is equivalent to the condition that some conjugate of H contains H0. The lemma follows from these two observations.  For our applications, we need a stronger variant of the theorem. Corollary 2.10. Let K be a totally real field and X an irreducible smooth separated OK -scheme with enough totally real curves. Let U be a nonempty open subscheme of X. Suppose that we are given the following data:

(i) a flat OK -scheme Y which is generically ´etaleover X; (ii) a closed normal subgroup H ⊂ π1(U) such that π1(U)/H contains an open pro-` subgroup; (iii) a finite subset S ⊂ |X| such that S → Spec OK is injective; (iv) a one-dimensional subspace ls of TsX for every s ∈ S. Then there exist a totally real curve C with fraction field L, a morphism ϕ: C → X with ϕ−1(U) 6= ∅ and a section σ : S → C of ϕ over S such that • ϕ(Spec L) is inert in Y → X, −1  • π1 ϕ (U) → π1(U)/H is surjective, and • Im(Tσ(s)C → TsX) = ls for every s ∈ S. Proof. As is shown in the proof of Proposition 2.17 of [Dri], we can find an open normal subgroup G0 ⊂ π1(U)/H satisfying the following property: Every closed  subgroup G ⊂ π1(U)/H such that the map G → π1(U)/H /G0 is surjective equals π1(U)/H. 0 Let Y be the Galois covering of U corresponding to G0. Then we can apply 0  Theorem 2.8 to Y t Y , S, (ls)s∈S and get the desired triple (C, ϕ, σ).  We have a similar approximation theorem in the CM case. The proof uses the Weil restriction and is essentially similar to the totally real case, although one has to check that the conditions are preserved under the Weil restriction.

Theorem 2.11. Let F be a CM field and Z an irreducible smooth separated OF - scheme with geometrically irreducible generic fiber. Let U be a nonempty open subscheme of Z. Suppose that we are given the following data:

(i) a flat OF -scheme W which is generically ´etaleover Z; (ii) a closed normal subgroup H ⊂ π1(U) such that π1(U)/H contains an open pro-` subgroup; (iii) a finite subset S ⊂ |Z| such that S → Spec OF + is injective; (iv) a one-dimensional subspace ls of TsZ for every s ∈ S. Then there exist a CM curve C with fraction field L, a morphism ϕ: C → Z with ϕ−1(U) 6= ∅ and a section σ : S → C of ϕ over S such that • ϕ(Spec L) is inert in W → Z, 9 −1  • π1 ϕ (U) → π1(U)/H is surjective, and • Im(Tσ(s)C → TsZ) = ls for every s ∈ S. Proof. Let F + be the maximally totally real subfield of F . Let w (resp. v) denote the structure morphism Z → Spec OF (resp. Z → Spec OF + ). As in the proof of Corollary 2.10, we may omit the datum (ii) by replacing W by another flat, generically ´etale Z-scheme and prove the first and third properties of the triple (C, ϕ, σ). Define Z+ to be the Weil restriction Res Z. Then we have Z+⊗ O =∼ OF /OF + OF + F ∗ + ∗ Z ×OF c Z, where c denotes the nontrivial element of Gal(F/F ) and c Z denotes + + Z⊗OF ,c OF . It follows from the assumptions that Z is an irreducible smooth OF - scheme with enough totally real curves. We will apply the theorem of Moret-Bailly to Z+ with appropriate data. We may assume that each connected component of W is a Galois cover over its ∗ image in Z by replacing W if necessary. Put Y = W ×OF c W and regard it as ∗ + + an OF -scheme. Then Y → Z ×OF c Z → Z is flat and generically ´etale,and therefore satisfies the same assumptions as Y → X in Theorem 2.8 and the second paragraph of its proof. Hence, as in Claim 1 in the proof of Theorem 2.8, there exist + a finite set {vij}1≤i≤k,1≤j≤ri of finite places of F and a nonempty open subset Vij of Z+(F + ) for each (i, j) satisfying the following properties: vij (i) For any finite extension L+ of F + and any L+-rational point z+ ∈ Z+(L+), z+ is inert in Y → Z+ if L+ is F + -split and if z+ lands in V under any vij ij embedding L+ ,→ F + . vij (ii) vij are different from any element of v(S).

Next take any s ∈ S. We will choose a finite Galois extension Ms of Fw(s) and + + a Gal(Ms/Fv(s))-stable nonempty subset of Z (Ms) with respect to Ms-topology. + Here we regard w(s) (resp. v(s)) as a finite place of F (resp. F ). Then Ms is + + Galois over Fv(s) since w(s) lies above v(s) and [Fw(s) : Fv(s)] is either 1 or 2. As in the proof of Theorem 2.8, we can find a finite Galois extension Ms of Fw(s) with residue field k(s) and a homomorphism OZ,s → OMs such that the image of the differential of the corresponding morphism Spec OMs → Z at the closed point is ls. Denote bys ˆ ∈ Z(OMs ) ⊂ Z(Ms) the point corresponding to this morphism. Let α: Z(O ) → Z(O /m2 ) be the reduction map, where m denotes Ms Ms Ms Ms 0 −1  the maximal ideal of OMs . Define Vs = α α(ˆs) , which is a nonempty open 00 S 0 subset of Z(Ms), and put Vs = σ σ(Vs ) where σ runs over all the elements of Gal(Ms/Fw(s)). Denote by ι a natural embedding F,→ Fw(s) ,→ Ms. We have HomF + (F,Ms) = + {ι, ι ◦ c} and the F -homomorphism (ι, ι ◦ c): F → Ms × Ms induces an isomor- ∼  phism Ms ⊗F + F = Ms × Ms which sends a ⊗ b to aι(b), aι(c(b)) . Hence we get + ∗ identifications Z (Ms) = Z(Ms ⊗F + F ) = Z(Ms) × c Z(Ms). Here Z(Ms) denotes

HomOF (Spec Ms,Z) by regarding Spec Ms as an F -scheme via ι. Define 00 ∗ 00 ∗ + Vs := Vs × c Vs ⊂ Z(Ms) × c Z(Ms) = Z (Ms). + 00 This is a nonempty open subset of Z (Ms). Since Vs is Gal(Ms/Fw(s))-stable and + + Gal(F/F ) = {id, c}, Vs is Gal(Ms/Fv(s))-stable. + Let v∞,1, . . . , v∞,n be the real places of F . Then for each 1 ≤ i ≤ n put + V∞,i = Z (R) = Z(C) 10 ∼ via an isomorphism F ⊗F + R = C. This is a nonempty open set. We apply Theorem 2.1 to the quadruple

Z+ , {v } ∪ {v(s)} ∪ {v } , {F + } ∪ {M } ∪ { }, {V } ∪ {V } ∪ {V } F + ij i,j s∈S ∞,i i vij s R ij s ∞,i and find a totally real finite extension L+ of F + and an L+-rational point z+ ∈ Z+(L+) satisfying the following properties: (i) z+ is inert in Y → Z+. + + + (ii) L is Ms-split and z goes into Vs via any embedding L ,→ Ms. + Let L be the CM field L ⊗F + F and z ∈ Z(L) be the L-rational point corre- sponding to z+ ∈ Z+(L+). Then the morphism z is equal to the composite

+ + ∗ pr ◦(z ⊗ + F ): Spec L → Z ⊗ O = Z × c Z → Z. Z F OF + F OF We can spread out z : Spec L → Z to a morphism ϕ: C → Z for some CM curve C with fraction field L. We may assume that C contains all the points of Spec OL above w(S) ⊂ Spec OF . It follows from property (ii) and the definition of Vs that ϕ has a section σ over S such that Im(Tσ(s)C → TsX) = ls for every s ∈ S. It remains to prove that z = ϕ(Spec L) is inert in W → Z. Without loss of generality, we may assume that WF is connected, and thus it suffices to show that

Spec L ×z,Z W = Spec L ×z,ZF WF is connected. Define the schemes P and Q such that the squares in the following diagram are Cartesian:

P / Q / Spec L / Spec L+

+ + z ⊗F + F z   ∗  ∗  ∗ + WF ×F c WF / WF ×F c ZF / ZF ×F c ZF / ZF + pr ZF   WF / ZF .

∗ ∼ + ∼ Since WF ×F c WF = YF + , we have P = Spec L ×z+,Z+ YF + . As Q = F +

Spec L ×z,ZF WF , we need to show that Q is connected. ∗ ∗ Note that WF ×F c ZF is connected; this follows from the fact that c ZF is geometrically connected over F and WF is connected. Now take any connected ∗ ∗ ∗ component T of YF + = WF ×F c WF . Since WF ×F c WF → WF ×F c ZF is ∗ an ´etalecovering with connected base, T surjects onto WF ×F c ZF . At the same + + time, the subscheme Spec L ×z+,Z+ T ⊂ P is connected because z is inert in F + + + Y → Z . Since the connected scheme Spec L ×z+,Z+ T surjects onto Q, the F + latter is also connected. 

Remark 2.12. In Theorem 2.8, Corollary 2.10, and Theorem 2.11, we assume that the scheme in question is smooth and separated. If S = ∅, then we can replace these two assumptions by regularity. In fact, if S = ∅, we can replace the scheme by an open subscheme, and thus reduce to the separated case. Moreover, the regularity implies that the generic fiber of the scheme is smooth. So we can apply the theorem of Moret-Bailly to our scheme. Note that the smoothness assumption was used only when S 6= ∅ and ls is not horizontal for some s ∈ S. 11 3. Proofs of Theorem 1.4 and its variants In this section, we prove Theorem 1.4 and its variants following [Dri]. First we set up our notation. Fix a prime ` and a finite extension Eλ of Q`. Let O be the ring of integers of Eλ and m its maximal ideal. Fix a positive integer r. For a normal scheme X of finite type over Spec Z[`−1], Eλ LSr (X) denotes the set of equivalence classes of lisse Eλ-sheaves on X of rank Eλ r, and LSfr (X) denotes the set of maps from the set of closed points of X to r × the set of polynomials of the form 1 + c1t + ··· + crt with ci ∈ O and cr ∈ O . Here we say that two lisse Eλ-sheaves on X are equivalent if they have isomorphic semisimplifications. Since the coefficient field Eλ is fixed throughout this section, we simply write LSr(X) or LSfr(X). For an element f ∈ LSfr(X), we denote by fx(t) or f(x)(t) the value of f at x ∈ X; this is a polynomial in t. By the Chebotarev density theorem, we can regard LSr(X) as a subset of LSfr(X) by attaching to each equivalence class its Frobenius characteristic polynomials. For another scheme Y and a morphism α: Y → X, we ∗ have a canonical map α : LSfr(X) → LSfr(Y ) whose restriction to LSr(X) coincides ∗ with the pullback map of sheaves LSr(X) → LSr(Y ). We also denote α (f) by f|Y . Let C be a separated smooth curve over a finite field and C the smooth com- tame pactification of C. We define LSr (C) to be the subset of LSr(C) consisting of equivalence classes of lisse Eλ-sheaves on C which are tamely ramified at each point of C \ C. This condition does not depend on the choice of a lisse sheaf in the equiv- ∗ alence class. Let ϕ be a morphism C → X and f ∈ LSfr(X). When ϕ (f) ∈ LSr(C) ∗ tame (resp. ϕ (f) ∈ LSr (C)), we simply say that f arises from a lisse sheaf (resp. a tame lisse sheaf) over the curve C. To show Theorem 2.5 of [Dri], which is a prototype of Theorem 1.4, Drinfeld 0 considers a subset LSr(X) of LSfr(X) which contains LSr(X) and is characterized by a group-theoretic property. He then proves the following three statements for f ∈ LSfr(X), which imply Theorem 2.5 of [Dri]. • If the map f satisfies two conditions2 similar to those in Theorem 1.4, then 0 f|U ∈ LSr(U) for some dense open subscheme U ⊂ X. 0 • If U is regular, then LSr(U) = LSr(U). In particular, the restriction 0 f|U ∈ LSr(U) arises from a lisse sheaf. • If f|U arises from a lisse sheaf, then so does f under the assumptions that X is regular and that f|C arises from a lisse sheaf for every regular curve C. Following Drinfeld, we will introduce the group-theoretic notion of “having a kernel” and prove similar statements, Propositions 3.4, 3.10, and 3.11. Theorem 1.4 and its variants will be deduced from them at the end of the section. −1 Definition 3.1. Let X be a scheme of finite type over Z[` ] and f ∈ LSfr(X). For a nonzero ideal I ⊂ O, the map f is said to be trivial modulo I if it has the value congruent to (1 − t)r modulo I at every closed point of X. When X is connected, the map f is said to have a kernel if there exists a closed normal subgroup H ⊂ π1(X) satisfying the following conditions:

(i) π1(X)/H contains an open pro-` subgroup.

2One needs tameness assumption in the second condition (it is identical to condition (ii) of Propositions 3.4). 12 (ii) For every n ∈ N, there exists an open subgroup Hn ⊂ π1(X) containing H n such that the pullback of f to Xn is trivial modulo m . Here Xn denotes the covering of X corresponding to Hn. When X is disconnected, the map f is said to have a kernel if the restriction of f to each connected component of X has a kernel. Remark 3.2. If f arises from a lisse sheaf on X, it has a kernel. To see this, we may assume that X is connected. Then the kernel of the Eλ-representation of π1(X) corresponding to the lisse sheaf satisfies the conditions. 0 Remark 3.3. The set LSr(X) defined by Drinfeld consists of the maps f which have a kernel and arise from a lisse sheaf over every regular curve (Definition 2.11 of [Dri]). Proposition 3.4. Let K be a totally real field. Let X be an irreducible regular −1 OK [` ]-scheme with enough totally real curves and f ∈ LSfr(X). Assume that (i) f arises from a lisse sheaf over every totally real curve, and (ii) there exists a dominant ´etalemorphism X0 → X such that the pullback f|X0 arises from a tame lisse sheaf over every separated smooth curve over a finite field.

Then there exists a dense open subscheme U ⊂ X such that f|U has a kernel. We will first show two lemmas and then prove Proposition 3.4 by induction on the dimension of X. For this we use elementary fibrations, which we recall now. Definition 3.5. A morphism of schemes π : X → S is called an elementary fibration if there exist an S-scheme π : X → S and a factorization X → X →π S of π such that (i) the morphism X → X is an open immersion and X is fiberwise dense in π : X → S, (ii) π is a smooth and projective morphism whose geometric fibers are nonempty irreducible curves, and (iii) the reduced closed subscheme X \ X is finite and ´etaleover S. The next lemma, which is due to Drinfeld and Wiesend, is a key to our induction argument in the proof of Proposition 3.4.

−1 Lemma 3.6. Let X be a scheme of finite type over Z[` ] and f ∈ LSfr(X). Suppose that X admits an elementary fibration X → S with a section σ : S → X. Assume that (i) f arises from a tame lisse sheaf over every fiber of X → S, and ∗ (ii) there exists a dense open subscheme V ⊂ S such that σ (f)|V has a kernel.

Then there exists a dense open subscheme U ⊂ X such that f|U has a kernel. Proof. This is shown in the latter part of the proof of Lemma 3.1 of [Dri]. For convenience of the reader, we summarize the proof below. We may assume that X is connected and normal, and that V = S. For every n ∈ N, consider the functor which attaches to an S-scheme S0 the set of isomorphism n 0 0 classes of GLr(O/m )-torsors on X ×S S tamely ramified along (X \ X) ×S S 0 0 0 relative to S with trivialization over the section S ,→ X ×S S . Then this functor is representable by an ´etalescheme Tn of finite type over S and the morphism 13 Tn+1 → Tn is finite for each n. By shrinking S, we may assume that the morphism Tn → S is finite for each n. We will prove that f has a kernel in this situation. Since σ∗(f) has a kernel by assumption (ii), there exist connected ´etalecoverings Sn of S such that ∗ n • the pullback of σ (f) to Sn is trivial modulo m , and • for some (or any) geometric points ¯ of S, the quotient of the group π1(S, s¯) by the intersection of the kernels of its actions on the fibers (Sn)s¯ where n runs in N contains an open pro-` subgroup. n Let Tn be the universal tame GLr(O/m )-torsor over X ×S Tn. Define the X- scheme Yn to be the Weil restriction ResX×S Tn/X Tn and let Xn denote Yn ×S Sn. We thus have a diagram whose squares are Cartesian

Xn / X ×S Sn / Sn

  z  Yn / X / S and regard Xn as an ´etalecovering of X. Here the morphism Sn → X is the composite of Sn → S and the section σ : S → X. It suffices to prove the following two assertions: n (a) The pullback of f to Xn is trivial modulo m . (b) For some (or any) geometric pointx ¯ of X, the quotient of the group π1(X, x¯) by the intersection of the kernels of its actions on the fibers (Xn)x¯ where n runs in N contains an open pro-` subgroup. 0 In fact, if we take a Galois covering Xn of X splitting the (possibly disconnected) 0 covering Xn, the corresponding subgroup Hn := π(Xn, x¯) ⊂ π1(X, x¯) and the T intersection H := n Hn satisfy the conditions for the map f to have a kernel. First we prove assertion (a). Take an arbitrary closed point x ∈ Xn. Let s ∈ S denote the image of x and choose a geometric points ¯ above s ∈ S. By assumption

(i), the restriction f|Xs arises from a lisse Eλ-sheaf of rank r. Let F be a locally constant constructible sheaf of free (O/mn)-modules of rank r obtaining from the above lisse sheaf modulo mn. Consider the Xs¯-scheme (Yn)s¯. The scheme (X ×S Tn)s¯ is the disjoint union n of copies of Xs¯, and (Tn)s¯ is a disjoint union of the GLr(O/m )-torsors, each of which lies above a copy of Xs¯ in (X ×S Tn)s¯. Since the Weil restriction and the n base change commute, (Yn)s¯ is the fiber product of the tame GLr(O/m )-torsors over Xs¯. Hence F|(Yn)s¯ is constant, and so is F|(Xn)s¯. 0 Now let s ∈ Sn be the image of x. By the choice of Sn, we have ∗ 0 r n (σ (f))|Sn (s )(t) ≡ (1 − t) mod m . r Since we have shown that F|(Xn)s¯ is constant, it follows that f|Xn (x)(t) ≡ (1 − t) mod mn. Finally, we prove assertion (b). Let η be the generic point of S. Choose a geometric pointη ¯ above η ∈ S and letx ¯ denote the geometric point above σ(η) induced fromη ¯. Let H be the intersection of the kernels of actions of π1(X, x¯) on the fibers (Xn)x¯ where n runs in N. We need to show that π1(X, x¯)/H contains an open pro-` subgroup. tame Using the fact that the tame fundamental group π1 (Xη¯, x¯) is topologically finitely generated, one can prove that the quotient of the group π1(X, x¯) by the 14 intersection HY of the kernels of its actions on the fibers (Yn)x¯, n ∈ N contains an open pro-` subgroup (see the last part of the proof of Lemma 3.1 of [Dri]). 0 Let HS be the intersection of the kernels of actions of π1(S, η¯) on the fibers 0 (Sn)η¯ where n runs in N and let HS be the inverse image of HS with respect to the 0 homomorphism π1(X, x¯) → π1(S, η¯). By the choice of Sn, the group π1(S, η¯)/HS contains an open pro-` subgroup. Since we have a surjection

π1(X, x¯)/(HY ∩ HS) → π1(X, x¯)/H and an injection 0 π1(X, x¯)/(HY ∩ HS) → π1(X, x¯)/HY × π1(S, η¯)/HS, the group π1(X, x¯)/H also contains an open pro-` subgroup.  To use the above lemma, we show that there exists a chain of split fibrations ending with a totally real curve.

Definition 3.7. A sequence of schemes Xn → Xn−1 → · · · → X1 is called a chain of split fibrations if the morphism Xi+1 → Xi is an elementary fibration which admits a section Xi → Xi+1 for each i = 1, . . . , n − 1 . Lemma 3.8. Let K be a totally real field and X an n-dimensional irreducible regular OK -scheme with enough totally real curves. Then there exist an ´etale X- scheme Xn, a totally real curve X1 and a chain of split fibrations Xn → · · · → X1. Proof. We prove the lemma by induction on n = dim X. When dim X = 1, the lemma holds by assumption. Thus we assume dim X ≥ 2. By induction on dim X, it suffices to prove that after replacing K by a totally real field extension and X by a nonempty ´etale X-scheme, there exist an irreducible regular OK -scheme S with enough totally real curves and an elementary fibration X → S with a section S → X. It follows from Lemma 2.3 (i) that there exists a totally real extension L of K such that XK (L) 6= ∅. Replacing K by L and X by a nonempty open subscheme of X ⊗OK OL that is ´etaleover X, we may further assume that the generic fiber XK → Spec K has a section x: Spec K → XK . We also denote the image of x in XK by x. If dim X = 2, then XK is a smooth and geometrically connected curve over K. Take the smooth compactification XK of XK over K. Then the structure morphism XK → Spec K has the factorization XK ⊂ XK → Spec K and thus it is an elementary fibration with a section x. After shrinking X, we can spread it out into an elementary fibration X → S over an open subscheme S of Spec OK such that it admits a section S → X. Now assume dim X ≥ 3. We apply Artin’s theorem on elementary fibration (Proposition 3.3 in Expos´eXI of [SGA4-3]) to the pair (XK , x), and by shrinking X if necessary we get an elementary fibration π : XK → SK over K with a geomet- rically irreducible smooth K-scheme SK . Note that this theorem holds if the base field is perfect and infinite. Since XK is smooth over SK , there exist an open neighborhood VK of x in X and an ´etalemorphism α: V → 1 such that π| : V → S admits a K K ASK VK K K factorization V −→α 1 → S . K ASK K Take a section τ : S → 1 of the projection such that α(x) lies in τ(S ). K ASK K 15 0 Consider the connected component SK of SK ×τ, 1 VK that contains the K- ASK 0 rational point (π(x), x). This is ´etaleover SK and satisfies SK (K) 6= ∅. Moreover, 0 SK is geometrically integral over K since it is a connected regular K-scheme con- taining a K-rational point. 0 0 We replace SK by SK and XK by XK ×SK SK . By this replacement, the ele- mentary fibration π : XK → SK admits a section and SK (K) 6= ∅. After shrinking X, we can spread it out into an elementary fibration X → S with a section S → X, where S is an irreducible regular scheme which is flat and of finite type over OK with geometrically irreducible generic fiber and contains a K-rational point. The existence of a K-rational point implies that S has enough totally real curves. 

∗ Proof of Proposition 3.4. First note that if α (f)|U 00 has a kernel for a nonempty ´etale X-scheme α: X00 → X and a dense open subscheme U 00 ⊂ X00, then so does f|α(U 00). Let n denote the dimension of X. Replacing X by the image of X0 → X, we may assume that X0 → X is surjective. Take a chain of split fibrations Xn → Xn−1 → · · · → X1 with a totally real curve X1 as in Lemma 3.8. We regard X1 as an X-scheme via Xn → X and the 0 0 sections Xi → Xi+1. Put X1 = X ×X X1. This is a nonempty scheme. For 0 0 i = 2, . . . , n we put Xi = Xi ×X1 X1 via the morphism Xi → Xi−1 → · · · → X1. 0 0 0 Then Xn → Xn−1 → · · · → X1 is a chain of split fibrations. Since f| lies in LS (X ) by assumption (i), we have f| 0 = (f )| 0 ∈ X1 r 1 X1 X1 X1 0 0 LS (X ). Then we get the result for (X , f| 0 ) by Lemma 3.6. Repeating this r 1 2 X2 0 0 argument for the chain of split fibrations Xn → · · · → X2 we get the result for 0 0 (X , f| 0 ). Applying the remark at the beginning to the morphism X → X, we n Xn n get the result for (X, f). 

For the later use, we prove variants of Lemma 3.8. The proof given below is similar to that of Lemma 3.8, but instead of Lemma 2.3 we will use Corollary 2.10 and Theorem 2.11.

Lemma 3.9. (i) With the notation as in Lemma 3.8, suppose that we are given a connected ´etale covering Y → X. Then there exist an ´etale X-scheme Xn, a totally real curve X1, and a chain of split fibrations Xn → · · · → X1 such that X1 ×X Y is connected. Here X1 → X is the composite of sections Xi+1 → Xi and Xn → X. (ii) Let F be a CM field and Z an n-dimensional irreducible regular OF -scheme with geometrically irreducible generic fiber. Let Y → Z be a connected ´etale covering. Then there exist an ´etale Z-scheme Zn, a CM curve Z1, and a chain of split fibrations Zn → · · · → Z1 such that Z1 ×Z Y is connected. Here Z1 → Z is the composite of sections Zi+1 → Zi and Zn → Z. Proof. First we prove (i) by induction on n = dim X. Since the claim is obvious when dim X = 1, we assume dim X ≥ 2. By induction on dim X, it suffices to prove that after replacing K by a totally real field extension, X by a nonempty ´etale X-scheme, and the covering Y → X by its pullback, there exist an irreducible regular OK -scheme S with enough totally real curves and an elementary fibration X → S with a section S → X such that 16 S ×X Y is connected. The construction of such an S will be the same as that of Lemma 3.8. It follows from Corollary 2.10 and Remark 2.12 that there exist a totally real extension L of K and an L-rational point x ∈ X(L) such that Spec L ×x,X Y is connected. Note that Y ⊗OK OL is connected because Y ⊗OK OL → X ⊗OK OL is an ´etalecovering with connected base and

Spec L × (Y ⊗O OL) = Spec L ×x,X Y x,(X⊗OK OL) K is connected. Thus replacing K by L, X by a nonempty open subscheme of X ⊗OK OL that is ´etaleover X, and Y by its pullback, we may further assume that the generic fiber XK → Spec K has a section x: Spec K → XK such that Spec K×x,X Y is connected. We also denote the image of x in XK by x. If dim X = 2, the morphism XK → Spec K is an elementary fibration with a section x. After shrinking X, we can spread it out into an elementary fibration X → S over an open subscheme S of Spec OK such that it admits a section S → X. By construction, S ×X Y is connected. Now assume dim X ≥ 3. We apply Artin’s theorem on elementary fibration to the pair (XK , x), and by shrinking X if necessary we get an elementary fibration π : XK → SK over K with a geometrically irreducible smooth K-scheme SK . By smoothness, there exist an open neighborhood VK of x in XK and an ´etale morphism α: V → 1 such that π| : V → S admits a factorization V →α K ASK VK K K K 1 → S . Take a section τ : S → 1 of the projection such that α(x) lies in ASK K K ASK τ(SK ). 0 Consider the connected component SK of SK ×τ, 1 VK that contains the K- ASK 0 rational point (π(x), x). As is shown in Lemma 3.8, SK is ´etaleover SK and 0 geometrically integral over K, and SK (K) 6= ∅. 0 0 The section τ defines the morphism SK → XK ×SK SK → XK . The composite 0 of this morphism and (π(x), x): Spec K → SK coincides with x: Spec K → XK . 0 0 Since SK ×X Y → SK is an ´etalecovering with connected base and 0 Spec K × 0 (S × Y ) = Spec K × Y (π(x),x),SK K X x,X 0 is connected, it follows that SK ×X Y is connected. 0 0 0 We replace SK by SK , XK by XK ×SK SK and YK by YK ×SK SK . By this replacement, the elementary fibration π : XK → SK admits a section such that

SK (K) 6= ∅ and SK ×XK YK is connected. As is discussed in the last paragraph of the proof of Lemma 3.8, after shrinking X, we can spread out XK → SK and YK → SK into an elementary fibration X → S with a section S → X and a covering Y → X, where S is an irreducible regular OK -scheme with enough totally real curves. Since S ×X Y is connected by construction, this S works. For part (ii), it is easy to verify that the same argument works if we apply Theorem 2.11 instead of Corollary 2.10.  Next we show that if f has a kernel and arises from a lisse sheaf over every totally real curve then it actually arises from a lisse sheaf. Proposition 3.10. Let K be a totally real field and X an irreducible smooth sep- −1 arated OK [` ]-scheme with enough totally real curves. Suppose that f ∈ LSfr(X) satisfies the following conditions: (i) f arises from a lisse sheaf over every totally real curve. 17 (ii) f has a kernel.

Then f ∈ LSr(X). Proof. We follow Section 4 of [Dri]. Since f has a kernel, we take a closed subgroup H of π1(X) as in the definition of having a kernel. In particular, π1(X)/H contains an open pro-` subgroup. By Corollary 2.10, there exists a totally real curve C with a morphism ϕ: C → X such that ϕ∗ : π1(C) → π1(X)/H is surjective. By assumption (i), for any such pair ∗ (C, ϕ), the pullback ϕ (f) arises from a semisimple representation ρC : π1(C) → GLr(Eλ). Define  HC := Ker ϕ∗ : π1(C) → π1(X)/H . Then condition (ii) in the definition of having a kernel, together with the Cheb- otarev density theorem, shows that Ker ρC contains HC . See Lemma 4.1 of [Dri] for details. Thus we regard ρC as a representation

ρC : π1(X) → π1(X)/H → GLr(Eλ)

of π1(X). Note that ρC |π1(C) gives the original representation of π1(C). We will show that the lisse sheaf on X corresponding to this representation gives f. For this, we need to show that  det 1 − tρC (Frobx) = fx(t) for all closed points x ∈ X. We know that this equality holds for each closed point x ∈ ϕ(C) such that ϕ−1(x) contains a point whose residue field is equal to k(x). Take any closed point x ∈ X. We will first construct a curve C0 passing through x and some finitely many points on C specified below. We will then construct a lisse 0 sheaf on C whose Frobenius polynomial at x is fx(t), and prove that the lisse sheaf 0 on C extends over X and the corresponding representation of π1(X) coincides with ρC . We use a lemma by Faltings; define T0 to be the set of closed points of C which have the same image in Spec OK as that of x. By the theorem of Hermite, the Chebotarev density theorem, and the Brauer-Nesbitt theorem, there exists a finite set T ⊂ |C| \ T0 satisfying the following properties:

(i) T → Spec OK is injective. (ii) For any semisimple representations ρ1, ρ2 : π1(C) → GLr(Eλ), the equality ∼ tr ρ1(Froby) = tr ρ2(Froby) for all y ∈ T implies ρ1 = ρ2. See Satz 5 of [Fal] or Th´eor`eme3.1 of [Del2] for details. By Corollary 2.10 applied to S = ϕ(T ) ∪ {x}, there exists a totally real curve 0 0 0 0 0 C with a morphism ϕ : C → X such that the map ϕ∗ : π1(C ) → π1(X)/H is surjective and for each y ∈ ϕ(T ) ∪ {x} there exists a point in ϕ0−1(y) whose residue field is equal to k(y). As discussed before, this pair (C0, ϕ0) also defines a semisimple representation

ρC0 : π1(X) → π1(X)/H → GLr(Eλ)  such that det 1 − tρC0 (Froby) = fy(t) for each y ∈ ϕ(T ) ∪ {x}. Note that the 0 surjectivity of ϕ∗ implies that ρC |π1(C) is semisimple. 0 It follows from property (ii) of T that ρC |π1(C) and ρC |π1(C) are isomorphic as representations of π1(C). Since the map ϕ∗ : π1(C) → π1(X)/H is surjective, we 18 ∼ have ρC = ρC0 as representations of π1(X)/H and thus they are also isomorphic as representations of π1(X). In particular, we have   det 1 − tρC (Frobx) = det 1 − tρC0 (Frobx) = fx(t).

Hence f comes from the lisse sheaf on X corresponding to ρC .  We now prove the last proposition of our three key ingredients for Theorem 1.4. This concerns extendability of a lisse sheaf on a dense open subset to the whole scheme. In the proof we use the Zariski-Nagata purity theorem; thus the regularity assumption for X is crucial. We further need to assume that X is smooth as we use Corollary 2.10 to find a totally real curve passing through a given point in a given tangent direction. Proposition 3.11. Let K be a totally real field and X an irreducible smooth sep- −1 arated OK [` ]-scheme with enough totally real curves. Suppose that f ∈ LSfr(X) satisfies the following conditions: (i) f arises from a lisse sheaf over every totally real curve. (ii) There exists a dense open subscheme U ⊂ X such that f|U ∈ LSr(U).

Then f ∈ LSr(X).

Proof. We follow Section 5.2 of [Dri]. Let EU be the semisimple lisse Eλ-sheaf on U corresponding to f|U . First we show that EU extends to a lisse Eλ-sheaf on X. Suppose the contrary. Since X is regular, the Zariski-Nagata purity theorem implies that there exists an irreducible divisor D of X contained in X \ U such that EU is ramified along D. Then by a specialization argument (Corollary 5.2 of [Dri]), we can find a closed point x ∈ X \ U and a one-dimensional subspace l ⊂ TxX satisfying the following property: (∗) Consider a triple (C, c, ϕ) consisting of a regular curve C, a closed point c ∈ C, and a morphism ϕ: C → X such that ϕ(c) = x, ϕ−1(U) 6= ∅,  and Im TcC → TxX ⊗k(x) k(c) = l ⊗k(x) k(c). For any such triple, the −1 pullback of EU to ϕ (U) is ramified at c.

Let H be the kernel of the representation ρU : π1(U) → GLr(Eλ) corresponding ∼ to EU . The group π1(U)/H = Im ρU contains an open pro-` subgroup because Im ρU is a compact open subgroup of GLr(Eλ). Therefore by Corollary 2.10 we find a totally real curve C, a closed point c ∈ C, and a morphism ϕ: C → X such that • ϕ(c) = x and k(c) =∼ k(x), −1 −1  • ϕ (U) 6= ∅ and ϕ∗ : π1 ϕ (U) → π1(U)/H is surjective, and • Im(TcC → TxX) = l. −1  −1 Since ϕ∗ : π1 ϕ (U) → π1(U)/H is surjective, the pullback of EU to ϕ (U) is semisimple. Thus this lisse Eλ-sheaf has no ramification at c by assumption (i), which contradicts property (∗). Hence EU extends to a lisse Eλ-sheaf E on X. 0 0 Let f be the element of LSr(X) corresponding to E. We know f|U = f |U . Take any closed point x ∈ X. It suffices to show that f(x) = f 0(x). We can find a totally real curve C0, a closed point c0 ∈ C0, and a morphism ϕ0 : C0 → X such that ϕ0(c0) = x, k(c0) = k(x), and ϕ0−1(U) 6= ∅. Then 0∗ 0 0∗ 0 ϕ (f)|ϕ0−1(U) = (f|U )|ϕ0−1(U) = (f |U )|ϕ0−1(U) = ϕ (f )|ϕ0−1(U). 0−1 0−1  0 Since ϕ (U) 6= ∅, the homomorphism π1 ϕ (U) → π1(C ) is surjective and 0∗ 0∗ 0 0∗ 0 0∗ 0 0 0 thus ϕ (f) = ϕ (f ). In particular, f(x) = ϕ (f)(c ) = ϕ (f )(c ) = f (x).  19 Proof of Theorem 1.4. First note that a polynomial-valued map f of degree r in the theorem lies in LSfr(X). One direction of the equivalence is obvious, and thus it suffices to prove that if f satisfies conditions (i) and (ii), then f lies in LSr(X). First assume that X is separated. Let kλ be the residue field of Eλ and N be 0 −1 0 the cardinality of GLr(kλ). Put X := X ⊗Z Z[N ]. Then X → X is a dominant ´etalemorphism and satisfies the following property:

The pullback f|X0 arises from a tame lisse sheaf over every sepa- rated smooth curve over a finite field. Thus by Proposition 3.4, there exists an open dense subscheme U of X such that f|U has a kernel. Therefore f|U lies in LSr(U) by Proposition 3.10 and we have f ∈ LSr(X) by Proposition 3.11. S In the general case, we consider a covering X = i Ui by open separated sub- schemes. Then we can apply the above discussion to each f|Ui and obtain a lisse

Eλ-sheaf Ei on Ui that represents f|Ui . Since Ui is normal, we can replace Ei by its semisimplification and assume that each Ei is semisimple. T Put U = i Ui. This is nonempty, and the restrictions Ei|U are isomorphic to each other. Thus {Ei}i glues to a lisse Eλ-sheaf on X and this sheaf represents f.  We end this section with variants of Theorem 1.4. Condition (i) in Theorem 3.12 or Remark 3.13 is weaker than that of Theorem 1.4 since they concern only totally real curves with additional properties. This weaker condition is essential to use the result of [BLGGT] in the proof of our main theorems in the next section. Theorem 3.14 is a variant in the CM case. Theorem 3.12. Let K be a totally real field. Let X be an irreducible smooth −1 OK [` ]-scheme with enough totally real curves. An element f ∈ LSfr(X) belongs to LSr(X) if and only if it satisfies the following conditions: (i) There exists a connected ´etalecovering Y → X such that f arises from a lisse sheaf over every totally real curve C with the property that C ×X Y is connected. (ii) The restriction of f to each separated smooth curve over a finite field arises from a lisse sheaf. Proof. Recall that Theorem 1.4 is deduced from Propositions 3.4, 3.10, and 3.11 and that these propositions have the same condition (i) that f arises from a lisse sheaf over every totally real curve. Consider the variant statements of Propositions 3.4, 3.10, and 3.11 where we replace condition (i) by

(i’) f arises from a lisse sheaf over every totally real curve C such that C ×X Y is connected. It suffices to prove that these variants also hold; then the theorem is deduced from them in the same way as Theorem 1.4. The variant of Proposition 3.4 is proved in the same way as Proposition 3.4 if one uses Lemma 3.9 (i) instead of Lemma 3.8. For the variants of Propositions 3.10 and 3.11, the same proof works; observe that whenever one uses Corollary 2.10 in the proof to find a totally real curve C, one can impose the additional condition that C ×X Y is connected by adding the covering Y → X to the input of Corollary 2.10.  20 Remark 3.13. We need another variant of Theorem 1.4 to prove Theorem 1.3: With the notation as in Theorem 3.12, suppose further that • K is unramified at `, and 0 • X extends to an irreducible smooth OK -scheme X with nonempty fiber over each place of K above `. Then condition (i) in Theorem 3.12 can be replaced by (i’) There exists a connected ´etalecovering Y → X such that f arises from a lisse sheaf over every totally real curve C with the properties that • C ×X Y is connected and that • the fraction field of C is unramified at `. This statement is proved in the same way as Theorem 3.12; it suffices to prove variants of Propositions 3.4, 3.10, and 3.11 where condition (i) in these propositions is replaced by the following condition: The map f arises from a lisse sheaf over every totally real curve C such that C ×X Y is connected and the fraction field of C is unramified at `. For the proof of the variant of Proposition 3.4, we also need to consider the variant of Lemma 3.9 (i) where we further require that the fraction field of X1 is unramified at `. We now explain how to prove the variants of Lemma 3.9 (i) and Propositions 3.4, 3.10, and 3.11. By the additional condition on X, for each place v of K above `, 0 there exist a finite unramified extension L of Kv and a morphism Spec OL → X . We denote the image of the closed point of Spec OL by sv. Since L is unramified 0 over Kv, we can find a horizontal one-dimensional subspace lv of Tsv X with respect 0 to X → Spec OK . If we add {sv}v|` and lv to the input when we use Corollary 2.10, the fraction field of the resulting totally real curve is unramified over K at each v, hence unramified at `. Thus we can prove the variant of Lemma 3.9 (i) in the same way as Lemma 3.9 (i), and the arguments given in Theorem 3.12 work for the current variants of Propositions 3.4, 3.10, and 3.11. Hence the statement of this remark follows.

−1 Theorem 3.14. Let F be a CM field. Let Z be an irreducible smooth OF [` ]- scheme with geometrically irreducible generic fiber. An element f ∈ LSfr(Z) belongs to LSr(Z) if and only if it satisfies the following conditions: (i) There exists a connected ´etalecovering Y → Z such that f arises from a lisse sheaf over every CM curve C with the property that C ×Z Y is connected. (ii) The restriction of f to each separated smooth curve over a finite field arises from a lisse sheaf. Proof. We can prove variants of Propositions 3.4, 3.10, and 3.11 for the CM case using Theorem 2.11 and Lemma 3.9 (ii). Then the theorem is deduced from them in the same way as Theorems 1.4 and 3.12. 

4. Proofs of the main theorems In this section, we prove theorems on the existence of the compatible system of a lisse sheaf. Theorem 4.1 concerns the totally real case and Theorem 4.2 concerns the CM case. Theorem 1.3 in the introduction is proved after Theorem 4.1. Following 21 the discussion in the Subsection 2.3 of [Dri], we deduce these main theorems from Theorems 3.12, 3.14, and theorems in [Laf] and [BLGGT]. As we mentioned in the introduction, some of the assumptions in the main theorems come from the potential diagonalizability condition, which is introduced in [BLGGT]. We first review this notion. See Section 1.4 of [BLGGT] for details. Let L be a finite extension of Q`. Let Eλ be a finite extension of Q`. We say that an Eλ-representation ρ of Gal(L/L) is potentially diagonalizable if it is potentially 0 crystalline and there is a finite extension L of L such that ρ|Gal(L/L0) lies on the same irreducible component of the universal crystalline lifting ring of the residual representation ρ|Gal(L/L0) with fixed Hodge-Tate numbers as a sum of characters lifting ρ|Gal(L/L0). There are two important examples of this notion (see Lemma 1.4.3 of [BLGGT]): Ordinary representations are potentially diagonalizable. When L is unramified over Q`, a crystalline representation is potentially diagonalizable if for each τ : L,→ Eλ the τ-Hodge-Tate numbers lie in the range [aτ , aτ + ` − 2] for some integer aτ . We first prove our main theorem for the totally real case. Theorem 4.1. Let ` be a rational prime. Let K be a totally real field and X −1 an irreducible smooth OK [` ]-scheme with enough totally real curves. Let E be a finite extension of Q and λ a prime of E above `. Let E be a lisse Eλ-sheaf on X and ρ the corresponding representation of π1(X). Suppose that E satisfies the following assumptions:

(i) The polynomial det(1−Frobx t, Ex¯) has coefficients in E for every x ∈ |X|. (ii) For every totally real field L and every morphism α: Spec L → X, the ∗ Eλ-representation α ρ of Gal(L/L) is potentially diagonalizable at each prime v of L above ` and for each τ : L,→ Eλ it has distinct τ-Hodge-Tate numbers. (iii) ρ can be equipped with symplectic (resp. orthogonal) structure with multi- × plier µ: π1(X) → Eλ such that µ|π1(XK ) admits a factorization

µK × µ|π1(XK ) : π1(XK ) −→ Gal(K/K) −→ Eλ

with a totally odd (resp. totally even) character µK .

(iv) The residual representation ρ|π1(X[ζ`]) is absolutely irreducible. (v) ` ≥ 2(rank E + 1). Then for each rational prime `0 and each prime λ0 of E above `0 there exists a lisse 0−1 Eλ0 -sheaf on X[` ] which is compatible with E|X[`0−1].

0−1 0 Proof. Replacing X by X[` ], we may assume that ` is invertible in OX . Let r be the rank of E. Take an arbitrary extension M of Eλ0 of degree r!. By assumption M (i), we regard the map f : x 7→ det(1 − Frobx t, Ex¯) as an element of LSfr (X) via the embedding E,→ Eλ0 ,→ M. M 0 We will apply Theorem 3.12 to f ∈ LSfr (X). Here we use the prime ` and the field M (we used ` and Eλ in Section 3). First we show that the map f satisfies condition (i) in Theorem 3.12. Let Y be the connected ´etale covering Y → X[ζ`] that corresponds to Ker ρ|π1(X[ζ`]). We regard Y as a connected ´etalecovering over X via Y → X[ζ`] → X. We will prove that this Y → X satisfies condition (i). Take any totally real curve ϕ: C → X such that C ×X Y is connected. 22 To show that ϕ∗(f) arises from a lisse M-sheaf on C, it suffices to prove that ∗ there exists a lisse Eλ0 -sheaf on C which is compatible with ϕ E; this follows from 0 Lemma 2.7 of [Dri]. Namely, let ρC : π1(C) → GLr(Eλ0 ) denote the semisimplifica- 0  tion of the corresponding Eλ0 -representation. Since det 1 − tρC (Frobx) = fx(t) ∈ 0 Eλ0 [t] for every closed point x ∈ C, the character of ρC is defined over Eλ0 by the Chebotarev density theorem. It follows from [M : Eλ0 ] = r! that the Brauer 0 0 obstruction of ρC in the Brauer group Br(Eλ0 ) vanishes in Br(M) and ρC can be ∗ M defined over M. This means ϕ (f) ∈ LSr (C). ∗ We will construct a lisse Eλ0 -sheaf on C which is compatible with ϕ E. For this ∗ we will apply Theorem C of [BLGGT] to the Eλ-representation ϕLρ of Gal(L/L), where L denotes the fraction field of C and ϕL : Spec L → X denotes ϕ|Spec L. ∗ We need to see that the Galois representation ϕLρ satisfies the assumptions in Theorem C. By assumptions (ii) and (v) it remains to check that ∗ (a) ϕLρ can be equipped with symplectic (resp. orthogonal) structure with totally odd (resp. totally even) multiplier, and (b) the residual representation (ϕ∗ ρ)| is absolutely irreducible. L Gal(L/L(ζ`))

Assumption (a) follows from assumption (iii). To see (b), recall that C ×X Y is connected. Hence C ×X X[ζ`] is connected with fraction field L(ζ`), and C ×X Y → C ×X X[ζ`] is a connected ´etalecovering. It follows from the definition of Y that Im(ϕ∗ ρ)| coincides with Im ρ| , and thus (ϕ∗ ρ)| L Gal(L/L(ζ`)) π1(X[ζ`]) L Gal(L/L(ζ`)) is absolutely irreducible by assumption (iv). Hence by Theorem C of [BLGGT] we obtain an Eλ0 -representation of Gal(L/L). The proof of the theorem, which uses potential automorphy and Brauer’s theorem, shows that this representation is unramified at each closed point of C, and thus it ∗ gives rise to a lisse Eλ0 -sheaf on C which is compatible with ϕ E. Hence f satisfies condition (i) in Theorem 3.12. Next we show that f satisfies condition (ii) in Theorem 3.12. Let C be a sepa- rated smooth curve over Fp for some prime p and denote the structure morphism C → Spec Fp by α. Let ϕ: C → X be a morphism. Note that p is different from ` and `0. ∗ L ⊕ri We write the semisimplification of ϕ E as i Ei , where Ei are distinct irre- ducible lisse Eλ-sheaves on C. Then there exist an irreducible lisse Eλ-sheaf Fi on C and a lisse Eλ-sheaf Gi of rank 1 on Spec Fp such that Fi has determinant of ∼ ∗ finite order and Ei = Fi ⊗ α Gi (see Section I.3 of [Del1] or Section 0.4 of [Del3] for example). By Th´eor`emVII.6 of [Laf], for each closed point x ∈ C, the roots of det(1 − 0 Frobx t, Fi,x¯) are algebraic numbers that are λ -adic units. Moreover, there exists 0 an irreducible lisse Eλ0 -sheaf Fi on C which is compatible with Fi. 0 We will show that there exists a lisse Eλ0 -sheaf Gi on Spec Fp which is compatible with Gi. Note that the lisse Eλ-sheaf Gi is determined by the value of the corre- sponding character of Gal(Fp/Fp) at the geometric Frobenius. Denote this value by × 0 βi ∈ Eλ . It suffices to prove that βi is an algebraic number that is a λ -adic unit. Since the roots of det(1 − Frobx t, Ex¯) and det(1 − Frobx t, Fi,x¯) are all algebraic numbers, so is βi. 0 We prove that βi is a λ -adic unit. To see this, take a closed point x of C. Then by Corollary 2.10 we can find a totally real curve C0 and a morphism ϕ0 : C0 → X 0 0 0 such that ϕ(x) ∈ ϕ (C ) and C ×X Y is connected. As discussed before, Theorem 23 0 C of [BLGGT] implies that there exists a lisse Eλ0 -sheaf on C whose Frobenius characteristic polynomial map is ϕ0∗(f). Thus for each closed point y ∈ C0 the roots of ϕ0∗(f)(y) are algebraic numbers that are λ0-adic units. Considering a point 0−1 0 y ∈ ϕ (ϕ(x)), we conclude that some power of βi is a λ -adic unit and thus so is 0 βi. Hence there exists a lisse Eλ0 -sheaf Gi on Spec Fp which is compatible with Gi. The Frobenius characteristic polynomial map associated with the semisimple L 0 ∗ 0 ⊕ri ∗ lisse Eλ0 -sheaf i(Fi ⊗ α Gi) is ϕ (f). As discussed before, this sheaf can be defined over M. Thus f satisfies condition (ii) in Theorem 3.12. Therefore by Theorem 3.12 there exists a lisse M-sheaf on X which is compatible with E.  Proof of Theorem 1.3. All the discussions in the proof of Theorem 4.1 also work in this setting by using Remark 3.13 instead of Theorem 3.12.  We also have a theorem for the CM case.

Theorem 4.2. Let ` be a rational prime, E a finite extension of Q, and λ a prime of −1 E above `. Let F be a CM field with ζ` 6∈ F and Z an irreducible smooth OF [` ]- scheme with geometrically irreducible generic fiber. Let E be a lisse Eλ-sheaf on X and ρ the corresponding representation of π1(Z). Suppose that E satisfies the following assumptions:

(i) The polynomial det(1−Frobx t, Ex¯) has coefficients in E for every x ∈ |X|. (ii) For any CM field L with ζ` 6∈ L and any morphism α: Spec L → Z, the ∗ Eλ-representation α ρ of Gal(L/L) satisfies the following two conditions: (a) α∗ρ is potentially diagonalizable at each prime v of L above ` and for each τ : L,→ Eλ it has distinct τ-Hodge-Tate numbers. (b) α∗ρ is totally odd and polarizable in the sense of Section 2.1 of [BLGGT].

(iii) The residual representation ρ|π1(Z[ζ`]) is absolutely irreducible. (iv) ` ≥ 2(rank E + 1). Then for each rational prime `0 and each prime λ0 of E above `0 there exists a lisse 0−1 Eλ0 -sheaf on Z[` ] which is compatible with E|Z[`0−1]. Proof. In the same way as Theorem 4.1, the theorem is deduced from Theorem 3.14, Theorem 5.5.1 of [BLGGT], Th´eor`emVII.6 of [Laf], and the following remark: If Y → Z[ζ ] denotes the connected ´etalecovering defined by Ker ρ and ` π1(Z[ζ`]) C is a CM curve with a morphism to Z such that C ×Z Y is connected, then

C ×Z Z[ζ`] = C ⊗OF OF (ζ`) is connected. In particular, the fraction field of C does not contain ζ`.  References [BLGGT] Thomas Barnet-Lamb, Toby Gee, David Geraghty, and Richard Taylor, Potential au- tomorphy and change of weight, Ann. of Math. (2) 179 (2014), no. 2, 501–609. [Del1] , La conjecture de Weil. II, Inst. Hautes Etudes´ Sci. Publ. Math. (1980), no. 52, 137–252. [Del2] , Preuve des conjectures de Tate et de Shafarevitch (d’apr`esG. Faltings), Ast´erisque (1985), no. 121-122, 25–41, Seminar Bourbaki, Vol. 1983/84. [Del3] , Finitude de l’extension de Q engendr´eepar des traces de Frobenius, en car- act´eristiquefinie, Mosc. Math. J. 12 (2012), no. 3, 497–514, 668. [Dri] , On a conjecture of Deligne, Mosc. Math. J. 12 (2012), no. 3, 515–542, 668. [Fal] G. Faltings, Endlichkeitss¨atzef¨urabelsche Variet¨aten¨uber Zahlk¨orpern, Invent. Math. 73 (1983), no. 3, 349–366. 24 [KS] Moritz Kerz and Alexander Schmidt, Covering data and higher dimensional global class field theory, J. 129 (2009), no. 10, 2569–2599. [Laf] Laurent Lafforgue, Chtoucas de Drinfeld et correspondance de Langlands, Invent. Math. 147 (2002), no. 1, 1–241. [LZ] Ruochuan Liu and Xinwen Zhu, Rigidity and Riemann-Hilbert correspondence for de Rham local systems, arXiv:1602.06282. [MB] Laurent Moret-Bailly, Groupes de Picard et probl`emesde Skolem. I, II, Ann. Sci. Ecole´ Norm. Sup. (4) 22 (1989), no. 2, 161–179, 181–194. [Ser] Jean-Pierre Serre, Topics in Galois theory, second ed., Research Notes in , vol. 1, A K Peters, Ltd., Wellesley, MA, 2008. [SGA4-3] Michael Artin, Alexandre Grothendieck, and Jean-Louis Verdier, Th´eoriedes topos et cohomologie ´etaledes sch´emas.Tome 3, Lecture Notes in Mathematics, Vol. 305, Springer- Verlag, Berlin-New York, 1973. [Shi] Koji Shimizu, Finiteness of Frobenius traces of a sheaf on a flat arithmetic scheme, preprint, available at http://www.math.harvard.edu/~shimizu/fin_Frob_traces.pdf. [Tay] R. Taylor, Galois representations, Proceedings of the International Congress of Mathemati- cians, Vol. I (Beijing, 2002), Higher Ed. Press, Beijing, 2002, pp. 449–474. [Wie] G¨otzWiesend, A construction of covers of arithmetic schemes, J. Number Theory 121 (2006), no. 1, 118–131.

Harvard University, Department of Mathematics, Cambridge, MA 02138 E-mail address: [email protected]

25