COUNTING RANK TWO LOCAL SYSTEMS WITH AT MOST ONE, UNIPOTENT, MONODROMY

By YUVAL Z. FLICKER

Abstract. The number of rank two Qℓ-local systems, or Qℓ-smooth sheaves, on (X u ) F, −{ } ⊗Fq where X is a smooth projective absolutely irreducible curve over Fq, F an algebraic closure of Fq and u is a closed point of X,withprincipalunipotentmonodromyatu,andfixedbyGal(F/Fq),is computed. It is expressed as the trace of the Frobenius on the virtual Qℓ-smooth sheaf found in the author’s work with Deligne on the moduli stack of curves withetale ´ divisors of degree M 1. This ≥ completes the work with Deligne in rank two. This number is the same as that of representations of the fundamental group π1((X u ) F) invariant under the Frobenius Frq with principal −{ } ⊗Fq unipotent monodromy at u,orcuspidalrepresentationsofGL(2) over the function field F = Fq(X) of X over Fq with Steinberg component twistedbyanunramifiedcharacteratu and unramified elsewhere, trivial at the fixed id`ele α of degree 1. This number is computed in Theorem 4.1 using the trace formula evaluated at f χ ,withanIwahoricomponentf = χ / I ,hencealso u v=u Kv u Iu | u| the pseudo-coefficient χ / I ̸ 2χ of the Steinberg representation twisted by any unramified Iu | u!|− Ku character, at u.Theorem2.1recordsthetraceformulaforGL(2) over the function field F .Theproof of the trace formula of Theorem 2.1 recently appeared elsewhere. Theorem 3.1 computes, following Drinfeld, the number of Qℓ-local systems, or Qℓ-smooth sheaves, on X F,fixedbyFrq,namely ⊗Fq Qℓ-representations of the absolute fundamental group π(X F) invariant under the Frobenius, by ⊗Fq counting the nowhere ramified cuspidal representations of GL(2) trivial at a fixed id`ele α of degree 1. This number is expressed as the trace of the Frobenius of a virtual Qℓ-smooth sheaf on a moduli stack. This number is obtained on evaluating the trace formula at the characteristic function v χKv of the maximal compact subgroup, with volume normalized by K = 1. Section 5, based on a letter | v| ! of P. Deligne to the author dated August 8, 2012, computes the number of such objects with any unipotent monodromy, principal or trivial, in our rank two case. Surprisingly, this number depends only on X and deg(S),andnotonthedegreesofthepointsinS1.

1. Introduction. Let X (denoted by X1 in [DF13]) be a smooth projective absolutely irreducible curve over the finite field Fq of cardinality q and character- istic p.Fixaprimeℓ = p. ̸ Drinfeld [D81] computed the number of isomorphism classes of two di- mensional irreducible ℓ-adic representations of the absolute fundamental group

π1(X q F) which are invariant under Gal(F/Fq) in terms of the zeta function of ⊗F the curve X. To understand this, we computed in [DF13] the number isomorphism classes of n-dimensional irreducible ℓ-adic representations of the geometric fundamen- tal group π1((X S) q F) which are Gal(F/Fq)-invariant and with a principal − ⊗F unipotent (rank n)monodromyateachpointofS.HereS is anetale ´ divisor of X,

Manuscript received December 26, 2012; revised March 14, 2014. Research supported in part by a Simons Foundation grant (#267097 to Yuval Flicker). American Journal of Mathematics 137 (2015), 739–763. c 2015 by Johns Hopkins University Press. ⃝ 739 740 Y. Z . F L I C K E R consisting of N>1closedpoints,andZ n>1. In [DF13], N, S are denoted by ∋ N1, S1. When n = 2theresultof[DF13]assertsthatthenumberofisomorphism classes of the irreducible rank two Qℓ-local systems (= Qℓ-smooth sheaves) on

(X S) q F,invariantundertheFrobenius,withunipotentmonodromyateach − ⊗F point of S,whereN = S > 1, is equal to the trace of the Frobenius Fr on the | | q virtual Qℓ-smooth sheaf

i j+2k i j ( 1) ( 1) Q( j) c . − H ⊗ ⎛ − − H ⎞ ! $ 0 "i # "j> "k>0 # ⎝ ⎠

1 1 j Here c is the local system of H (X S), of H (X),andQ( j)=Q( 1) , H c − H − − where Q( 1) is the Tate local system, on the moduli stack g;[M ,M ] over Z of − M 1 2 triples (X;S1,S2) consisting of a curve X of genus g and disjoint sets S1, S2 of M1, M2 > 0geometricpointsonX, S = S1 S2.RecallthatM = deg(S ) is ∪ i i v S deg(v),wheredeg(v) is the residual exponent of v.IfF = Fq(X) is the ∈ i function field of X over Fq, Fv is its completion at v,theresiduefieldFqv has ) deg(v) cardinality qv = q . The first aim of this work is to extend this result from the covering Mg;[M1,M2] to the moduli stack g;[M] over Z of pairs (X;S) consisting of a curve X of M genus g and anetale ´ divisor S of M 1geometricpointsonX.Thusweshow ≥ that the number T of the isomorphism classes of the two-dimensional irreducible

ℓ-adic representations ρ of π1((X S) q F),thegeometricfundamentalgroup − ⊗F of the affine curve X S,invariantundertheFrobenius,thatisunderGal(F/Fq), − 01 with a single Jordan block (of rank two, namely 00 )monodromyateachplace of S [equivalently: the number of isomorphism classes of -smooth irreducible * + Qℓ sheaves of rank two on (X S) q F with principal unipotent local monodromy − ⊗F at each place of S and fixed by the Frobenius, or equivalently: the number of Qℓ- smooth irreducible sheaves of rank two on X S,withprincipalunipotentlocal − monodromy at each place of S,uptoisomorphismandtwistingbyacharacterof Gal(F/Fq)], is equal to the trace of the Frobenius on the virtual Qℓ-smooth sheaf displayed above, on the moduli stack g;[M] over Z. M The new case, compared with [DF13] where the case N>1(denotedbyN1 in [DF13]) is dealt with, is that of N = 1. Here N is the number of Frq-orbits in S,namelythenumberofclosedpointsinS.InthiscaseS consists of a single closed point u of degree d = du = deg(u).Ourresultinthiscase,recordedas Theorem 4.1 below, is expressed in terms of the ζ-function of the curve X.Recall 1 deg(v) that ζ(X,t)= v X (1 tv)− , tv = t , X denotes the set of closed points in ∈| | − | | h1(t) i X,andζ(X,t)=, (1 q)(1 qt) where h1(t)= 0 i 2g ait , ai Z, g = genus(X). ≤ ≤ ∈ The result is T = h −b ,where− h = a = h (1) and 1 u 1 i i )1 ) COUNTING RANK TWO LOCAL SYSTEMS 741

j j b = h1(q) [(d 1 j)/2]q +[d/2] a q 1 + 1 u − − i ⎛ − ⎞ 0 j d 3 0 i 2g 0 j

As is clear from [F14], the trace formula is a heavy analytic machine. The point of [DF13] is that considering objects with suitable ramification at least at two points, and we take at [DF13] principal unipotent ramification, one can transfer the question to an anisotropic form of the group, where the compact quotient trace formula is easy to compute. It will of course be of much interest to compute the trace formula for GL(n) and a test function fu v=ufv, fv = χKv for all v = u ⊗⊗ ̸ ̸ and fu pseudo coefficient of the Steinberg representation twisted by any unramified character, and extend Theorem 4.1 to all n 2. More demanding is the case of ≥ the test function f with f = χ for all v,whichwouldpermitextending ⊗v v v Kv Drinfeld’s nowhere ramified case of Theorem 3.1 to all n 2. ≥ Section 5, based on a letter of P. Deligne to the author dated August 8, 2012, computes the number of such objects with any unipotent monodromy, principal or trivial, in our rank two case. It concludes the surprising fact that this number depends only on the geometric X and deg(S),notonthenumberofpointsinthe rational divisor S1,noronthedegreesofthepointsinS1 (notations as in [DF13]). Only the total degree (cardinality of S)isrelevant.Thisdoesnotholdwhenwe consider in [DF13] only principal unipotent local monodromy. That the position of the points does not matter is interesting too, but found already in [DF13]. Our terminology follows that of [DF13], where detailed definitions are given, except that X, S, N, M of our (rational) Sections 1–4 are denoted by X1, S1, N1, N in [DF13] and in Section 5 below (where X, S, N signify the absolute avatars).

Acknowledgments. The author is deeply grateful to for his permission to include Section 3, to for his suggestion to include Section 5, and to , Takayuki Oda, Dipendra Prasad, Elmar Große- Kl¨onne, and Thomas Zink for invitations to discuss this work at the Hebrew Univer- sity, , TIFR, Humboldt Universit¨at zu Berlin, and Universit¨at Bielefeld.

2. Statement of the trace formula. Let us write the trace formula for GL(2) over a function field F of a smooth projective geometrically connected ∞ curve X over a finite field Fq,andatestfunctionf in Cc (GL(2,A)) (subscript c for “compactly supported”, superscript ∞ for “locally constant”, A denotes the ring of ad`eles of F ). Fix an id`ele α of degree 1. Let r0 be the representation of GL(2,A) Z by right translation on the space A0,α of cusp forms on α GL(2,F) GL(2,A), · \ and r0(f)= f(g)r0(g)dg (g GL(2,A)) the convolution operator; dg = vdgv ∈ ⊗ is a Haar measure. 0 Acuspformisafunctionφ :GL(2,F) GL(2,A) E (E is a fixed alge- \ → braically closed subfield of C)whichisinvariantontherightbysomeopencom- pact subgroup of GL(2, ),and φ(nx)dn = 0forallx in GL(2, ). A N(F ) N(A) A Here N denotes the unipotent upper triangular\ subgroup of GL(2).Wealsowrite 0 A for the diagonal subgroup, and A = A Z where Z is the center of GL(2). ′ − COUNTING RANK TWO LOCAL SYSTEMS 743

∞ THEOREM 2.1. For any f C (GL(2,A)) we have trr0(f)= Si(f). ∈ c 1 i 8 Here ≤ ≤ ) Z S1(f)= α GL(2,F) GL(2,A) f(γ), · \ 1 1 γ αZ F × 1 1 ∈"· 1 1 S2(f)= S2,F2 (f), "F2 1 1 S2,F2 (f)= AutF F2 − f(xγx− )dx. | | Z GL(2,A)/α F2× γ αZ(F2 F ) 2 · ∈ "−

Here F2 ranges over the set of isomorphism classes of quadratic extensions of the field F .ForeachF2 we fix an embedding F2 ) M(2,F) into the ring of 2 2 → × matrices over F .

1 S3(f)= f(x− γx)v(x)dx. A(A) GL(2,A) γ αZ A (F ) 2 \ ∈ "· ′

Any x GL(2,A) can be written in the form ank, a A(A), k GL(2,OA), 1∈b ∈ ∈ n = , b is determined uniquely by x up to b ub + w, u O× , w O .Put 01 ,→ ∈ A ∈ A v(x)= log (max(1, b )). * + v q | v|v ) 1 S (f)= θ˜ (1), θ˜ (t)= (θ (t)+θ (t 1)), 4 a,f a,f 2 a,f a,f − a F αZ ∈"× 1 aa ht+(x) θa,f (t)= f x− ( 0 a )x t dx, F αZN(F ) GL(2,A) 2 × \ * + + + ac ht :GL(2,A) Z is defined by ht (( 0 b )k)=dega degb (k GL(2,O ); → − ∈ A a,b A× ; c A). ∈ ∈

1 m′(µ1/µ2,z) S5(f)= − trI(µ1νz,µ2ν 1 ,f) 2zdz. 4πi z− m(µ /µ ,z) µ ,µ z =1 1 2 "1 2 3| |

Here m(µ,z)=L(µ,z)/L(µ,z/q).Theµ1, µ2 range over the set of characters of Z deg(x) A× /F × α , νz(x)=z .AlsoI(µ1,µ2) is the space of right locally constant · functions φ on GL(2,A) with

ac 1/2 φ(( 0 b )x)= a/b µ1(a)µ2(b)φ(x)(x GL(2,A); a,b A× ; c A). | | ∈ ∈ ∈

It is a GL(2, )-module by right translation, and trI(µ ν ,µ ν 1 ,f) is the trace A 1 z 2 z− of the indicated convolution operator.

1 1 d S6(f)= − tr I(µ1νz,µ2ν 1 ,f) R(µ1,µ2,z)− R(µ1,µ2,z) dz. 4πi z− · dz µ ,µ z =1 "1 2 3| | 4 5 744 Y. Z . F L I C K E R

Notations are as in S (f),andR(µ ,µ ,z) : I(µ ν ,µ ν 1 ) I(µ ν 1 ,µ ν ) is 5 1 2 1 z 2 z− 2 z− 1 z → deg(v) an operator, rational in z,definedasaproduct R(µ1 ,µ2 ,z ), z = z .The ⊗v v v v v product is well defined as the local operator maps the function in the source whose restriction to GL(2,Ov) is 1 to such function in the target. Further, R(µ1v,µ2v,z) 2 2 is defined to be [L(µ1v/µ2v,z /qv)/L(µ1v/µ2v,z )]M(µ1v,µ2v,z).Theoperator M(µ ,µ ,z)=M(µ ν ,µ ν 1 ) is defined first by an integral 1v 2v 1v z 2v z−

0 1 1 y 2 φ φ − x dy if (µ1v/µ2v)(πv)z < 1, ,→ 10 01 | | 2 66 76 7 7 then by analytic continuation, as it is a rational function in z.Infacttheoperators I(µ ν ,µ ν 1 ,f) and R(µ ,µ ,z) are considered as operators on 1 z 2 z− 1 2

∞ ac I0(µ1,µ2)= φ C (GL(2,O )); φ x = µ1(a)µ2(b)φ(x); ∈ A 0 b 8 66 7 7

x GL(2,OA), a,b O× ; c OA , ∈ ∈ A ∈ 9 1 S7(f)= trI(µ,µ,f),S8(f)= f(x)µ(detx)dx. 4 − µ µ GL(2,A) " "2 2Z Both sums range over all characters µ of A× /F × α .ThesumofS8 is over all · automorphic one dimensional representations of αZ GL(2,A).Theintegralthere \ represents the trace of the convolution operator associated with f.

The terms S1(f) and S2(f) are finite by [F14, Propositions 3.5, 3.6, and 3.9]. The argument used in the proof of that Proposition 3.9 shows that for any γ Z 1 ∈ α (A(F ) Z(F )) the function x f(x− γx) on A(A) GL(2,A) has compact − ,→ \ support, hence the integral in S3(f) converges. By [F14, Proposition 3.11] the function θa,f (t) is rational and may have at ˜ t = 1apoleoforderatmost1,foreacha A× .Henceθa,f (t) is regular at t = 1. ∈ From [F14, Proposition 3.5] it follows that the sums in S3(f) and S4(f) are finite, so these terms are well defined. ∞ For any f = fv in C (GL(2,A)),theoperatorI(µ1,µ2,f) is zero unless µi ⊗ c are unramified at each v where fv is GL(2,Ov ) biinvariant. This implies that the sums in Si(f) (5 i 8) are finite, for a given f.ToseethatS5(f) and S6(f) are ≤ ≤ 1 well defined, note that the rational functions m(µ,t), R(µ1,µ2,t), R(µ1,µ2,t)− Z are regular on t = 1forallcharactersµ, µ1, µ2 of A× /F × α .Form(µ,t) this | | 1 · follows from [F14, Proposition 4.11], for R and R− from [F14, Corollary 4.28]. ∞ The distributions [linear forms on Cc (GL(2,A))] f trr0(f), Si(f) (i = ,→ h 1 1,2,5,7,8) are invariant, namely take the same value at f and f (x)=f(h− xh), h h GL(2,A).Fori = 3,4,6wehaveSi(f )=Si(f) if h GL(2,O ),butSi is ∈ ∈ A not invariant. COUNTING RANK TWO LOCAL SYSTEMS 745

∞ If f C (GL(2,A)) takes values in Q then trr0(f) Q,sincetherepresenta- ∈ c ∈ tion r0 is defined over Q.Fori = 1,2,3,4,8itisclearthatSi(f) Q.Fori = 7the ∈ integrand contains the factor µ(ab) a/b 1/2 which involves √q.Howeverthesum | | includes with µ also µε, ε(α)= 1, and so the sum of the terms indexed by µ and − µε can be written as an integral over the domain where a/b is in q2Z. 1 | | To see that S5(f) is rational, we put a(µ1,µ2)= 2πi t =1 f(µ1,µ2,t)dt where | | : d 2 f(µ1,µ2,t)=trI(µ1νt,µ2ν 1 ,f) lnm(µ1/µ2,t ), t− · dt σ σ and claim that for any σ Gal(Q/Q) one has σ(a(µ1,µ2)) = a( µ1, µ2).Note ∈ Z that Gal(Q/Q) acts on the group of characters on A× /F × α as they are all Q- · valued. Now a(µ1,µ2) is the sum of the residues of f(µ1,µ2,t) at the points of σ σ σ the unit disc. We have that σ(f(µ1,µ2,t)) = f( µ1, µ2,ε(σ) t) with ε(σ)= · σ(√q)/√q.However,iff(µ1,µ2,t) has a pole at t = t0 and t0 < 1, then by [F14, | | Proposition 4.11], σ(t0) < 1foranyσ Gal(Q/Q).HenceS5(f) Q. | | ∈ ∈ To see that S6(f) Q one proceeds similarly, using the results of [F14, Corol- ∈ 1 lary 4.28] on the poles of R(µ1,µ2,t) and R(µ1,µ2,t)− .

3. Unramified representations. Let Y be the set of isomorphism classes of two dimensional irreducible ℓ-adic representations of π1(X q F).Ouraimis ⊗F to compute the number u(X) of Gal(F/Fq)-invariant elements in Y in terms of 1 deg(v) the ζ-function of the curve X.Recallthatζ(X,t)= v X (1 tv)− , tv = t , ∈| | − h1(t) i and ζ(X,t)= (1 q)(1 qt) where h1(t)= 0 i 2g ai,t , ai Z, g = genus(X). − − ≤ ≤ ∈

THEOREM 3.1. We have u(X)=bh1)with h1 = i ai and

j j b = a q [(i j 1)/2]+ a (g i) ) q +(1 g)h1 1. i − − i − − − 0 j

It is equal to the trace of the Frobenius on the virtual Qℓ-smooth sheaf ( 1)i i tensored with i − H ) - i i ( 1) [(i j 1)/2]Q( j) − H⊗ − − − 0 i 2g .0 j i 3 ≤"≤ # ≤"≤ − +(g i) Q( j)+(1 i)Q Q − − − − 0

1 π1(X q F) π1(X) Gal(F/Fq) 1. −→ ⊗F −→ −→ ; −→ 746 Y. Z . F L I C K E R

W Recall that α is a fixed id`ele of degree 1. An ℓ-adic representation ρ of π1 (X) is called normalized if (det ρ)(α)=1. 0 W ab Put h = #Pic (X)( m ).RecallthatPic(X)( )=π (X) = /F O . m Fq Fq 1 A× × A× Let V denote the space of right-GL(2,OA) invariant automorphic cusp forms on GL(2,A)/αZ.ToproveTheorem3.1,wefirstproveLemmas3.2–3.9. 1 1 LEMMA 3.2. We have u(X)= dim V + (h1 h2).Hereh2 = 2 Qℓ 4 0 − #Pic (X)(Fq2 ). Proof. Denote by Z the set of isomorphism classes of two dimensional irre- W ducible ℓ-adic representations of π1 (X) which are normalized. Denote by Z1 the set of elements of Z whose restriction to π1(X q F) is irreducible. Put Z2 = Z ⊗F − Z1.Bytheautomorphic-Galoisreciprocitylaw,#Z = dim V .Thenaturalmap Qℓ Z1 Y is onto, its fibers consist of two elements each, obtained from each other → W W by twisting by the nontrivial character of π1 (X)/π1 (X Fq Fq2 ).Henceu(X)= 1 1 ⊗ 2 #Z1.Itremainstoshowthat#Z2 = 2 (h2 h1).Forthatwenotethefollowing: − W (1) An irreducible two dimensional ℓ-adic representation ρ of π1 (X) be- comes reducible upon restriction to the subgroup π1(X Fq F) iff ρ is induced W ⊗ from a character χ of π (X q Fq2 );wewriteρ = Ind(χ) in this case, and note 1 ⊗F that χ is determined uniquely by ρ up to replacement with σχ,whereσ is the nontrivial automorphism of Fq2 over Fq. W σ (2) The representation Ind(χ) of π1 (X) is irreducible iff χ = χ. W ab ̸ (3) If ρ = Ind(χ) then detρ is a character of π1 (X) ,withdetρ =(χ t)ω. W W ◦ Here ω is the nontrivial character of π1 (X) whose restriction to π1 (X Fq Fq2 ) W ab W ab ⊗ is trivial, and t : π (X) π (X q Fq2 ) is the transfer homomor- 1 → 1 ⊗F phism, which by class field theory coincides with the natural embedding W ab W ab PicX(Fq)=π1 (X) π1 (X Fq Fq2 ) = PicX(Fq2 ). → ⊗ 1 It follows from (1)–(3) that #Z2 is 2 (x y),wherex denotes the number 0 − σ of characters χ of Pic (X)(Fq2 ),andy is the number of those χ with χ = χ. σ Then x = h2 and y = h1,as χ = χ implies that χ = η t, η being a character of 0 ◦ Pic (X)(Fq). !

Now dim V = trr0(f) where r0 is the representation of GL(2, ) in A0,α Qℓ A ∞ and f denotes the characteristic function of GL(2,O) in Cc (GL(2,A)), O = OA. We work with the measure on GL(2,A) which is normalized by GL(2,O) = 1. | | By the trace formula dim V = 1 i 8 Si(f).Wethencomputetheseterms. Qℓ ≤ ≤ 2 LEMMA 3.3. We have S1(f)=2)h1h1(q)/(q 1)(q 1). − − Z Proof. Recall that S1(f)= α GL(2,F) GL(2,A) Z f(γ). | · \ | γ α F × Z ∈ · For any γ in α F × we have f(γ)=0unlessγ F× ,wheref(γ)=1. Then · ∈ q) f(γ)=q 1. Also GL(2,A)/αZ GL(2,F) is γ − | · | ) 2Z Z SL(2,A)/SL(2,F) A× /F × α = 2 SL(2,A)/SL(2,F) A× /F × α . | |·| · | | |·| · | COUNTING RANK TWO LOCAL SYSTEMS 747

We normalize the Haar measures on SL(2,A) and A× by SL(2,O) = 1, O× = 1. | | | | The exact sequence

Z 0 1 F× O× A× /α F × (PicX)/J(= Pic X) 1 −→ q −→ −→ · −→ −→ Z shows that A× /F × α = h1 O× /(q 1).Itremainstoshowthat | · | ·| | − SL(2,A)/SL(2,F) = ζ(X,q). | | The definition of the Tamagawa measure on an algebraic group G of dimension n over F requires a nonzero invariant n-form ω on G.Foranyclosedpointv X ∈| | fix the Haar measure dx on F so that dx = 1. The form ω and the v v A/F v v measure dx determine canonically a Haar measure µ on G(F ) for each v X . v 0 , v v ∈| | The group G is the generic fiber of a group scheme G over X Fin, where Fin is ′ − afinitesetinX.Henceforalmostallv X ,thegroupsG = G (O ) G(F ) ∈| | v′ ′ v ⊂ v are defined. Of course replacing G′ by a different group scheme with generic fiber G leads to changing at most finitely many of the Gv′ .Assumethattheproduct µv converges. Then the measure µT = µv on G( ) is well defined. It v Gv′ v A is named the Tamagawa measure. It depends neither on the choice of the measures , 0 , dxv nor on the choice of the form ω,bytheproductformula. The Tamagawa volume of SL(2,A)/SL(2,F) is well known to be 1. So it re- 1 mains to show that the Tamagawa volume volT SL(2,O) of SL(2,O) is ζ(X,q)− , as

volT (SL(2,A)/SL(2,F))/volT SL(2,O)= SL(2,A)/SL(2,F) / SL(2,O) . | | | |

With the Haar measure dxv on Fv as above, put av = Ov .Then v av = 1 g | | O / A/F = q − (see the end of proof of [F14, Proposition 3.11]). The form ω | | | | , on SL(2) can be chosen to be defined over the subfield Fq F .Then SL(2,Ov ) = 3 3 2 ⊂ |3 2 | (av/qv) SL(2,Fq) = av(1 qv− ).HencevolT SL(2,O)= v av(1 qv− )= 3 3g | 2 1 | − g 1 2g 2 − q − ζ(X,q− )− .Usingthefunctionalequationζ(X,t)=q − t − ζ(X,1/qt) 1 , one deduces that volT SL(2,O)=ζ(X,q)− ,asrequired. !

LEMMA 3.4. We have S2(f)=qh2/2(q + 1).

Proof. Recall that ,where range over a set of repre- S2(f)= F2 S2,F2 (f) F2 sentatives for the isomorphism classes of quadratic extensions of F ,embeddedin ) M(2,F),and

1 1 S2,F2 (f)= AutF F2 − f(xγx− )dx. | | GL(2,A)/αZ F × γ αZ(F2 F ) 2 · 2 ∈ "− Z 1 m If γ α (F2 F ) and f(xγx− ) = 0, then trγ O,detγ O× .Ifγ = α γ′, m ∈ − 2m ̸ ∈ ∈ ∈ Z, γ′ F2 F ,thenα detγ′ O× ,hencem = 0, so γ F2 F ,trγ O F = ∈ − ∈ ∈ − ∈ ∩ Fq,detγ O× F × = F× .Henceγ Fq2 Fq, F2 = F q Fq2 , AutF F2 = 2. ∈ ∩ q ∈ − ⊗F | | 748 Y. Z . F L I C K E R

1 For such γ we have xγx− GL(2,O) iff x GL(2,O) (A Fq Fq2 )× .Hence 1 ∈ 1 2 ∈ · ⊗ S2(f)= Fq2 Fq vol(Z)= (q q)vol Z,where 2 | − | 2 − Z Z = AB/C, A = GL(2,O),B=(A q Fq2 )× C =(F q Fq2 )× α . ⊗F ⊃ ⊗F ·

As A = 1andA B =(O q Fq2 )× ,usingA/A C B/C A B ∼ AB/C | | ∩ ⊗F ∩ × · ∩ → we get

Z B/A B C (A q Fq2 )× /(O q Fq2 )× (F q Fq2 )× α vol Z = | ∩ · | = | ⊗F ⊗F · ⊗F · | Z A C (F q Fq2 )× α (O q Fq2 )× | ∩ | | ⊗F · ∩ ⊗F | 0 #Pic (X)(Fq2 ) h2 = = 2 . ! #F× 2 q 1 q −

LEMMA 3.5. We have S3(f)=0.

Proof. Recall that S (f) is the sum of f(x 1γx)v(x)dx over 3 A(A) GL(2,A) − \ γ in αZ A (F ),whereA is the diagonal subgroup of GL(2) and A is the set · ′ 0 ′ of diag(a,b) with a = b.Thefunctionv :GL(2,A) Z takes the value 0 on ̸ 1 Z → A(A)GL(2,O).Nowf(x− γx) = 0forγ in α A′(F ) and x GL(2,A) implies, ̸ · ∈ 1 b as in the proof of the previous Lemma, that γ A′(Fq).Writingx = nk, n = , ∈ 01 k GL(2,O),andmultiplyingγ 1n 1γn,weconcludefromf(x 1γx) = 0that ∈ − − − ̸ * + x GL(2,O),hencev(x)=0. ∈ !

LEMMA 3.6. We have S4(f)=h1w,

1 2g 2 2 2g w = lim t − ζ(X,1/t)+t − ζ(X,t) 2 t 1 → 1 < h (t)t2 2g h (t 1)t2=g 2 = lim 1 − + 1 − − t 1 2 (1 t)(1 qt) (1 t 1)(1 q/t) → 4 − − − − − 5 1 h1′ (1) 2g 2 1 = h1 − + . q 1 − q 1 (q 1)2 − . − − / Z Proof. Recall that S4(f) is the sum over a F × α of the value at t = 1of 1 1 ∈ · 2 (θa,f (t)+θa,f (t− )),where

aa + θ (t)= f x 1 x tht (x)dx. a,f − 0 a αZ F × N(F ) GL(2,A) 2 · \ 6 6 7 7

We have θa,f (t)=0ifa/Fq× ,andθa,f (t)=θ1,f (t) if a Fq× .By[F14,Proposition ∈ g 1 ∈ 3.11] we have θ1,f (t)=h1q − ζ(X,t/q)/(q 1).Thenthefunctionalequation g 1 2g 2 − q − ζ(X,t/q)=t − ζ(X,1/t) gives the first expression for w in the lemma. Us- ing ζ(X,t)=h1(t)/(1 t)(1 qt),whereh1(t) is a polynomial of degree 2g with − − integral coefficients, we get the 2nd, while the 3rd and last follows from l’Hˆopital’s rule. ! COUNTING RANK TWO LOCAL SYSTEMS 749

2 LEMMA 3.7. We have S5(f)= h (2g 2) h1. − 1 − − Z Proof. Recall that S5(f) is the sum over the characters µ1, µ2 of α F × A× , · \ of

1 d 2 trI(µ ν ,µ ν 1 ,f) lnm(µ /µ ,t )dt, − 1 t 2 t− 1 2 4πi t =1 dt 3| | where m(µ,t)=L(µ,t)/L(µ,t/q).ThecardinalityofthesetU of characters of Z A× /F × α O× is h1,andtrI(µ1νt,µ2ν 1 ,f) is 1 if µ1, µ2 are in U,and0ifnot. · · t− Hence S5(f) is

1 d 2 h1 d 2 − lnm(µ1/µ2,t )dt = − lnm(µ,t )dt 4πi t =1 dt 4πi t =1 dt µ1,µ2 U 3 µ U 3 "∈ | | "∈ | | h1 d = − lnm(µ,t)dt 2πi dt µ U t =1 "∈ 3| | = h1 (Z′ P ′ ), − µ − µ µ U "∈ where Z is the number of zeroes of m(µ,t) in t < 1, and P the number of poles. µ′ | | µ′ Now (see [F14, Proposition 4.11]), L(µ,t/q) has neither zeroes nor poles in t < 1. Hence Z P = P Z ,whereZ is the number of zeroes of L(µ,t) on | | µ′ − µ′ µ − µ µ t 1, and P the number of poles. From the functional equation for L(µ,t), | |≥ µ the order of pole of L(µ,t) at t = ∞ is 2g 2. If µ = 1, the function L(µ,t) − ̸ has no poles in 1 t < ∞.Ifµ = 1theninthisdomainL(µ,t) has only one ≤|| pole, at t = 1, of order one. The function L(µ,t) has no zeroes in 1 t < ∞. ≤|| Hence P Z equals 2g 2ifµ = 1, and 2g 1ifµ = 1. All-in-all we get µ − µ − ̸ − h1((h1 1)(2g 2)+(2g 1)). − − − − !

LEMMA 3.8. We have S6(f)=0.

1 Proof. Recall: S6(f) is 4−πi times the sum over the characters µ1, µ2 of Z A× /F × α ,of ·

1 d trI(µ ν ,µ ν 1 ,f) R(µ ,µ ,t) R(µ ,µ ,t)dt. 1 t 2 t− 1 2 − 1 2 t =1 · · dt 3| |

Note that the restriction of the operator R(µ1,µ2,t) to the space of GL(2,O)- fixed vectors in I(µ ν ,µ ν 1 ) does not depend on t,inthesensethatif 1 t 2 t− ϕ I(µ ν ,µ ν 1 ) and ψ I(µ ν 1 ,µ ν ) are functions whose restrictions 1 t 2 t− 2 t− 1 t ∈ ∈ d to GL(2,O) is 1 then R(µ1,µ2,t)ϕ = ψ.Hence dt R = 0. !

LEMMA 3.9. We have S7(f)=h1/2 and S8(f)= 2h1. − This is clear. 750 Y. Z . F L I C K E R

Proof of Theorem 3.1. By Lemmas 3.2-3.9, u(X) is equal to

h1 h2 1 qh2 2 h1 − + 2h1ζ(X,q)+ + h1w h (2g 2) h1 + 2h1 4 2 2(q + 1) − 1 − − 2 − 4 5 h2 h1 2 = h1 + h1ζ(X,q)+ w h (g 1) − − 4(q + 1) 2 − 1 −

0 0 with h1 = #Pic (X)(Fq), h2 = #Pic (X)(Fq2 ), w as in S4(f) above. m Note that h2 = h1(1)h1( 1),sinceh (t)= (1 tλ ).Thusu(X)=bh1 − m i − i and , 1 h1(q) h1( 1) h1′ (1) g 4 1 b= − + h1(1) g 1+ − + 1, (q 1)(q2 1)− 4(q + 1) 2(q 1) − − q 1 2(q 1)2 − − − − ! − − $ but it is not clear from this expression that u(X) is integral. i g 2g Recall that h1(t)= 0 i 2g ait .Fromh1(1/qt)=q− t− h1(t) we have g i ≤ ≤ a2g i = q − ai and h1 = i ai.Toexpressb in terms of the ai note that the coef- − ) 2 2 ficient of h1(q) in b is 1/2(q 1) 1/4(q 1)+1/4(q + 1)=1/(q 1)(q 1). ) − − − − − Thus b can be expressed as the sum of

h1(q) h1(1) h1′ (1)(q 1) h1(q) h1(1) h1(q) h1( 1) b1 = − − − − + − − 2(q 1)2 − 4(q 1) 4(q + 1) − − and

h1′ (1) gh1(1) b2 = − +(1 g)h1(1) 1. q 1 − − − 1 The first expression in b1 is the sum over i (0 i 2g)of a times ≤ ≤ 2 i qi 1 i(q 1) qi 1 + qi 2 + + q +(1 i) − − − = − − ··· − (q 1)2 q 1 − − i 2 i 3 i 4 i k 1 = q − + 2q − + 3q − + + kq − − + +(i 1). ··· ··· − The next two, multiplied by 2, are

h1(q) h1(1) h1(q) h1( 1) i 2 i 4 i 6 − + − − = a (q − + q − + q − + ...). − 2(q 1) 2(q + 1) − i 0 i 2g − ≤"≤ Then

i 3 i 4 i 5 i 6 j b1 = a (q − + q − + 2q − + 2q − + )= a q [(i j 1)/2]. i ··· i − − 0 i 2g 0 j

g i From the relation a2g i = q − ai it follows that −

h1′ (1) gh1(1) i g i g g i − = − ai = − ai + − a2g i q 1 q 1 q 1 q 1 − 0 i 2g 0 i g 1 6 7 − ≤"≤ − ≤"≤ − − − qg i 1 = (g i) − − a . − q 1 i 0 i 2g ≤"≤ − Since b = b1 + b2,Theorem3.1follows. !

4. Single Steinberg component. Let u be a closed point of X,thusafixed i place of F ,ofdegreed = du = deg(u).Recallthath1(t)= 0 i 2g ait , ai Z. ≤ ≤ ∈ THEOREM 4.1. The number of the isomorphism classes of) the two-dimensional u irreducible ℓ-adic representations ρ of π1(X q F),thegeometricfundamental ⊗F group of the affine curve Xu = X u ,invariantundertheFrobenius,thatisun- −{ } 01 der Gal(F/Fq),withasingleJordanblock(of rank two, namely 00 ) monodromy at u [equivalently: the number of isomorphism classes of Qℓ-smooth irreducible u * + sheaves of rank two on X q F with principal unipotent local monodromy at u ⊗F and fixed by the Frobenius, or equivalently: the number of Qℓ-smooth irreducible sheaves of rank two on Xu,withprincipalunipotentlocalmonodromyatu,upto isomorphism and twisting by a character of Gal(F/Fq)],isT = h1bu,where

j j b = h1(q) [(d 1 j)/2]q +[d/2] a q 1 + 1 u − − i ⎛ − ⎞ 0 j d 3 0 i 2g 0 j

i j+2k i j ( 1) ( 1) Q( j) c , − H ⊗ ⎛ − − H ⎞ ! $ 0 "i # "j> "k>0 # ⎝ ⎠ 1 1 j where c is the local system of H (X u ), of H (X),andQ( j)=Q( 1) , H c −{ } H − − where Q( 1) is the Tate local system, on the moduli stack g;d over Z of pairs − M (X,S) consisting of a curve X of genus g and an etale´ divisor S consisting of d points on X.

u u Proof. Arepresentationρ of π1 = π1(X q F)=Gal(F /F q F),the ⊗F ⊗F geometric fundamental group, is invariant under the Frobenius precisely when it u extends to a representation, say ρ,ofthearithmeticfundamentalgroupπ1(X ). See [DF13, Lemma 1.9]. Here F u denotes the maximal extension of F in a fixed 752 Y. Z . F L I C K E R

W u ab algebraic closure F which is unramified outside u.Foranyα in π1 (X ) = u ab W (F /F ) A× /F × O× u which corresponds by CFT to a fixed id`ele of degree ≃ A 1in /F O u , ρ can be chosen to have det ρ(α)=1. If ρ is irreducible, so is ρ. A× × A× Conversely, if ρ is irreducible, ρ is too, by the condition that we put at u.Anyother representation which restricts to ρ is of the form ρ χ, χ acharacterofGal(F/Fq), ⊗ and ρ χ ρ iff χ = 1. ⊗ ≃ The number of ρ stated in the theorem is the number of equivalence classes of u irreducible representations ρ of π1(X ),withdetρ(α)=1andofdimension2,with principal unipotent monodromy at u,uptotwistingbyacharacterofGal(F/Fq)= u 2 2 π1(X )/π1.Ifdetρ(α)=1, and 1 = det(ρ χ)(α)=χ(α) detρ(α)=χ(α) , ⊗ there are two possibilities for the unramified χ.Thenumberofρ not up to twisting is twice that of the theorem. By the automorphic-Galois reciprocity law we translate the question of the the- orem, to compute T ,tothequestionofcountingcuspidalautomorphicrepresenta- tions of GL(2,A) which are unramified at all places except at u,whosecomponent at u is Steinberg (= special) up to a twist by an unramified character. This number, Ta = 2T ,wecountusingthetraceformula,asfollows. Write K(u) for Iu v=u Kv where Iu is the standard Iwahori subgroup of ̸ Ku = GL(2,Ou).LetV(u) denote the space of right-K(u) invariant automorphic , Z cusp forms on GL(2,A)/α .Wehavedim V(u) = trr0(f(u)) where f(u) = fv, Qℓ ⊗ f being the characteristic function χ of K = GL(2,O ) in GL(2,F ) if v = u, v Kv v v v ̸ and fu is the quotient χIu / Iu of the characteristic function χIu of Iu by the | | 1 s 0 1 volume Iu of Iu.NotethatKu = Iu s Ou/πu 01 wIu, w = 10− ,thus | | ∪∪ ∈ [K : I ]=1 + q ,so I = 1/(1 + q ) and f =(q + 1)χ .Bythetracefor- u u u | u| u u *u + Iu * + mula, dim V = Si(f ). Qℓ (u) 1 i 8 (u) We shall compute S≤(≤f ) in Lemmas 4.2–4.9 below. ) i (u) To compute the number of cuspidal representations of GL(2,A) whose com- ponents at each v = u are unramified, while their component at u is an unramified ̸ twist of the Steinberg representation, with central character trivial at α,wecom- pute the trace formula at the global function f = f ,wheref = χ for all [u] ⊗v v v Kv v = u,andf = χ / I 2χ =(q + 1)χ 2χ .WeworkwiththeHaar ̸ u Iu | u|− Ku u Iu − Ku measure normalized by K = 1forallv.Indeed,thefunctionf has the property | v| u that for every irreducible representation πu of GL(2,Fu) the trace trπu(fu) is 0, except if πu is an unramified twist of the Steinberg representation of GL(2,Fu), where the value is 1, or πu is an unramified one dimensional representation, where the value is 1. But no cuspidal representation of GL(2,A) has a one dimensional − component. Thus we compute the number presented by the sum of the numbers in Lemmas 4.2–4.9 below, minus twice that of Lemmas 3.3–3.9. Write Su,i for 2 2 duh1 Si(f[u]).ThenSu,i = 0fori = 3, 5, 7; Su,8 = 2h1, Su,6 = duh1 and Su,4 = q 1 2 2g 1 − − − t − h1(t)(tu− 1) duh1 2h1h1(q)(qu 1) since limt 1 (1 t)(1 tq−) is 1 q .NowSu,1 = (q 1)(q2 −1) ,andSu,2 is 0 if 2 → − − − − − COUNTING RANK TWO LOCAL SYSTEMS 753

qh1 h1( 1) divides deg(u),anditis · − if (2,deg(u)) = 1. Then T = S (f ) is − q+1 a i i [u]

2 ) 2h1h1(q)(qu 1) qh1 h1( 1) duh1 2 − (d 2[d /2]) · − d h + 2h1. (q 1)(q2 1) − u − u q + 1 − q 1 − u 1 − − −

We claim that Ta has the form 2h1bu,wherebu Z.Recallthath1(1)=h1 i ∈ and h1(t)= 0 i 2g ait . When d = d≤ =≤ deg(u)=2r is even, T is then 2h times ) u a 1 2(r 1) 2 h1(q)(q − + + q + 1) rh1 ··· − rh1 + 1 q 1 − −2i q 1 r(h1(q) h1) = h1(q) − + − rh1 + 1 q 1 q 1 − 0 i

j j j+1 Note that 0 i r 1 0 j<2i q = 0 j 2r 3 cjq with cj = i; 2 i r 1 ≤ ≤ j− d≤ 1 j j+≤1≤ − j |{ ≤ ≤ − }| equal to r 1 [ ]=[ − − ] as i< iff i [ ]. )− − 2 ) 2 ) 2 ≤ 2 When d = 2r + 1isodd,Ta/h1 is

d 1 2h1(q)(q − + + q + 1) qh1( 1) dh1 ··· − dh1 + 2. (q 1)(q + 1) − q + 1 − q 1 − − − This is 2A + B,where

q2i 1 q2i 1 d 1 j A = h (q) − + q − = h (q) − − qj 1 q2 1 q2 1 1 2 !0 i r 0 i

2h1(q)(r + 1 + qr) qh1( 1) dh1 B = − dh1 + 2. q2 1 − q + 1 − q 1 − − −

Then B is the sum of 2r(h1(q) h1)/(q 1),2 2rh1,and − − −

2h1(q) qh1( 1) h1 − h1 q2 1 − q + 1 − q 1 − − − h1(q) h1 h1(q)+qh1( 1) = − − h1 q 1 − q + 1 − − qi 1 qi +( 1)iq = a − a − a i q 1 − i q + 1 − i 0 i 2g 0 i 2g 0 i 2g ≤"≤ − ≤"≤ ≤"≤ 754 Y. Z . F L I C K E R

j i j = a q + q( 1) ( q) 1 2a0 i ⎡ − − − ⎤ − 1 i 2g 0 j i 1 0 j i 2 ≤"≤ ≤"≤ − ≤"≤ − ⎣ i 1 2j ⎦ = 2 ai q − − 2a0, i 1 − 1 i 2g 0 j< − ≤"≤ ≤" 2 and the claim that Ta = 2h1bu follows, subject to Lemmas 4.2–4.9 below. To verify the last claim of the theorem we note that it is proven in [DF13] when the d geometric points u make at least two Frobenius Frq orbits. It remains to deal with the case that u makes a single Frq orbit. As in [DF13], denote the multiset (set with multiplicities, unordered sequence) of eigenvalues of the Frobenius on H1(X u ) by β .Itconsistsoftheeigenvaluesλ (1 i 2g)oftheFrobe- c −{ } { } i ≤ ≤ nius on H1(X) and the d 1 dth roots of 1 other than 1, η = 1. Thus we claim − ̸ i i that Ta/2h1 (h1 is clearly the trace of the Frobenius on i( 1) ), namely j − H ( q) Ω 2 ,where j>0 − k>0 j+ k ) - ) ) 2 d 1 Ω = β ...β ,β (λ1,...,λ2 ,η,η ,...,η − ), m i1 im i ∈ g 1 i1<

d h1(q)(1 q ) q(q 1) dh1q(q + 1) − (1 + η) − h1( 1) + 1. (q2 1)(1 q) − · 2(q2 1) − − 2(q2 1) η=1 − − B̸ − − The last expression is

1 q(q 1) (1 λq) (1 ηq) (1 + λ) (1 + η) − q2 1 − · − − · · 2 . λ η=1 λ η=1 − B B̸ B B̸ q(q + 1) (1 λ) (1 η) + 1. − − · − · 2 λ η=1 / B B̸ This is

1 q(q 1) q(q + 1) (1 βq) (1 + β) − (1 β) + 1. q2 1 ⎡ − − · 2 − − · 2 ⎤ − Bβ Bβ Bβ ⎣ ⎦ Now

(1 + β)= Ω , (1 β)= ( 1)mΩ . m − − m β 0 m<2g+d β 0 m<2g+d B ≤ " B ≤ " COUNTING RANK TWO LOCAL SYSTEMS 755

q2 q m q2+q Note that 0 m<2g+d 2− +( 1) 2 Ωm is ≤ − ) < 2 = q if 2 m and q if 2 ! m Ωm. | − 0 m<2g+d ≤ " C D As (1 βq)= ( q)mΩ − − m β 0 m<2g+d B ≤ " our expression is

q2ℓ q2 q2ℓ+1 q − Ω − Ω + 1 q2 1 m − q2 1 m 0 m<2g+d,2 m=2ℓ 0

LEMMA 4.2. We have S1(f(u))=2h1(qu + 1)ζ(X,q). Proof. This is the same as Lemma 3.3 except that f (γ) is q + 1forγ O , u u ∈ u× and not 1 as there. !

LEMMA 4.3. We have S2(f(u))=0 if deg(u) is odd, S2(f(u))=qh2/(q + 1) if deg(u) is even.

Proof. Since supp(f ) K ,weargueasinLemma3.4toseethatthesum u ⊂ u in each S2,F2 (f(u)) ranges over γ F 2 Fq,andF2 = F (γ) is unique. When ∈ q − deg(u) is odd, F2,u = Fu(γ)=Fu q Fq2 is a quadratic extension of Fu,henceno ⊗F conjugate of γ lies in the support of f .Ifdeg(u) is even, F2 = F F ,andwe u ,u u × u may conjugate γ in Gu = GL(2,Fu) to assume γ = diag(a,b).Forsuchγ,wehave to find the x G with xγx 1 I .Inparticularxγx 1 K ,thusx K A /A . ∈ u − ∈ u − ∈ u ∈ u u u But 1 s Ku = Iu s O /π Iuw ∪∪ ∈ u u 01 6 7 so 1 s a 0 1 s b 0 w w 1 = 01 0 b 01− − s(a b) a 6 76 76 7 6 − 7 756 Y. Z . F L I C K E R

1 lies in Iu iff s = 0inOu/πu.Thusxγx− Iu iff x Iu or Iuw,hence 1 ∈ ∈ fu(xγx− )dx = 2(as Iu/Iu A(Ou) = Iu since O× = 1). We get the Gu/Au | ∩ | | | | u | result of Lemma 3.3 multiplied by 2. 0 !

LEMMA 4.4. We have S3(f(u))=0.

Proof. Since supp(f ) K ,theproofofLemma3.5applies. u ⊂ u ! deg(u) LEMMA 4.5. We have S4(f(u))=h1wu,where(tu = t and )

1 2g 2 2 2g wu = lim t − ζ(X,1/t)(tu + 1)+t − ζ(X,t)(1 + 1/tu) . 2 t 1 → < = Proof. We argue as in Lemma 3.6. We are led to [F14, Proposition 3.11], which computes θ1,f(u) (t) as the product of the local integrals θ1,fv (tv)= n,where n Z τn(fv)(tv/qv) ∈ ) 1 πn τ (f )= f y v y 1 dy. n v v 01 − 2GL(2,Ov) 6 6 7 7 1 When fv = χKv , θ1,fv (tv)=(1 tv/qv)− .Atv = u,withourfu =(qu + 1)χIu , − 1 s we use y Ku = Iu s Ou/πu Iuw 01 to see that when n = 0, y Iu if fu = 0, ∈ ∪∪1 s∈ 1 πn 1 s 1 10 ∈ ̸ while if n 1thenw u w = n lies in I ,soθ (t )= 01 01 01− − πu 1 u 1,fu u ≥ * + − τ (f )(t /q )n = 1+(q +1) (t /q )n =(1+t )/(1 t /q ).This n Z n u u u * +* u +* +n 1 u *u + u − u u is why∈ ζ(X,1/t) of Lemma 1.6 gets multiplied≥ by 1 + t . ) ) u ! 2 LEMMA 4.6. We have S5(f )= 2(h (2g 2)+h1). (u) − 1 −

Proof. The only difference from Lemma 3.7 is that trI(µ ν ,µ ν 1 ,f ) is 1u tu 2u tu− u 2here,not1asthere. !

2 LEMMA 4.7. We have S6(f )= d h ,whered = deg(u). (u) − u 1 u 1 Z Proof. S6(f(u)) is − times the sum over the characters µ1, µ2 of A× /F × α , 4πi · of

1 d trI(µ ν ,µ ν 1 ,f ) R(µ ,µ ,t) R(µ ,µ ,t)dt. 1 t 2 t− (u) 1 2 − 1 2 t =1 · · dt 3| | d We write R(µ1,µ2,t) as a product vR(µ1v,µ2v,tv).Applying dt we ob- 1 ⊗d tain a sum over v of R(µ1 ,µ2 ,t ) R(µ1 ,µ2 ,t ) in the integral. Since v v v − · dt v v v f is the characteristic function of K ,theoperatorI(µ ν ,µ ν 1 ,f ) acts v v 1v tv 2v tv− v as the projection to the space of GL(2,O )-fixed vectors in I(µ ν ,µ ν 1 ), v 1v tv 2v tv− aonedimensionalspaceindependentoft.HenceR(µ1v,µ2v,tv) is independent of t,asexplainedintheproofofLemma3.8,anditsderivativeis0.Therere- mains in the integrand then only the summand indexed by u,andthesumranges COUNTING RANK TWO LOCAL SYSTEMS 757

Z over the characters µ1, µ2 of A× /F × O× α .Sincefu is χIu / Iu ,theoperator · · | | I(µ ν ,µ ν 1 ,f ) acts as the projection to the space of I -invariant vectors in 1u tu 2u tu− u u valu(a) deg(u) J = I(µ ν ,µ ν 1 ).Recallthatν (a)=t , t = t .Thevectorsφ in 1u tu 2u tu− tu u u J satisfy

1/2 a a valu(a) valu(b) φ(( 0 ∗b )k)=µ1u(a)µ2u(b) tu − φ(k), b u 1 1 1 1 1 s 1 1 Iu so from Ku = Iu s Ou/πu 01 wIu we see that the space J of right Iu- ∪∪ ∈ invariant φ is spanned by the basis φ , φ ,whereφ is supported on B I nor- * + 1 w 1 u u malized by φ1(1)=1, and φw is supported on BuwIu,normalizedbyφw(w)=1. We now study the action of R = Ru = R(µ1u,µ2u,tu) on the basis φ1, φw. Here 2 L(tu/qu,µ1u/µ2u) R(µ1u,µ2u,tu)= 2 M(µ1u,µ2u,tu) L(tu,µ1u/µ2u) where L(t,µ )=1/(1 µ (π )t) and M = M = M(µ1 ,µ2 ,t ) is the operator u − u u u u u u from I(µ ν ,µ ν 1 ) to I(µ ν 1 ,µ ν ) defined by 1u tu 2u tu− 2u tu− 1u tu

1 y (Mφ)(x)= φ w 01 x dy. 2N * * + + I To compute M on J u we compute the a, b, c, d in Mφ1 = aφ1 + cφw, Mφw = bφ1 + dφw.Putµu = µ1u/µ2u and µ = µu(πu).Then

0 1 µ2u(y) 2valu(y) dy (Mφ1)(1)= φ1 − dy = t−u 1 y y >1 µ1u(y) y u 2 66 77 2| | | | 2 1 2 n 1 µtu =(1 q− ) (µt ) =(1 q− ) ; − u u − u 1 µt2 n 1 u "≥ − 1 y 10 1 (Mφ1)(w)= φ1 w w = φ1 dy = dy = qu− ; 01 y 1 y <1 2 6 6 7 7 2 66 77 2| | 1 y (Mφw)(1)= φw w dy = φw(w)dy = 1; 01 y 1 2 6 6 77 2| |≤ 1 y (Mφ )(w)= φ (w w)dy w w 01 2 6 7 1 11/y y− 0 11/y = φw w dy y 1 01 0 y 01 2| |≥ 66 76 7 6 77 1 1 2 n 1 qu− =(1 q− ) (µt ) = − . − u u 1 µt2 n 0 u "≥ − 758 Y. Z . F L I C K E R

We conclude that

2 1 µtu (1 q− ) 1 L(t2 /q ,µ ) − u 1 µt2 R = u u u ⎛ u ⎞ 2 − 1 L(tu,µu) 1 q− ⎜ q 1 − u ⎟ ⎜ u− 1 µt2 ⎟ ⎜ − u ⎟ ⎝ ⎠ (1 q 1)µt2 1 µt2 − u− u − u 1 µt2 /q 1 µt2 /q ⎛ u u u u ⎞ = − 2 − 1 . 1 µt 1 q− ⎜q 1 − u − u ⎟ ⎜ u− 1 µt2 /q 1 µt2 /q ⎟ ⎜ − u u − u u ⎟ ⎝ ⎠ Then detR = q 1(1 q µt2 )/(1 µt2 /q ) and, recalling that R = R(t ), − u− − u u − u u u 1 2 q 1 qu− (1 µtu) R 1 = u − − − − − 2 1 2 1 2 1 quµtu ! q− (1 µt )(1 q− )µt $ − − u − u − u u and

2 1 1 1 1 d du 1 tuµ( qu− ) R = dut − 2− 2 1 − 1 . dt (1 µt /qu) q q − u !− u− u− $ So

du 1 1 1 2tudut − quµ(1 qu− ) 1 1 R− R′ = − 2 −2 1 − 1 (1 quµt )(1 µt /qu) q q − u − u !− u− u− $

du 1 2 1 2tudut − quµ(1 qu− ) and trJ(fu)R− R′ = −(1 q µt2 )(1 µt2 −/q ) .Weneedtointegratethisagainst − u u − u u dt over t = 1, multiplied by 1/2πi.Wechangevariables:y = tdu .Then d| | 1 dy = dut u− dt.Ast goes over the circle t = 1once,y goes du times around it. 2y 1 1 2 | | Using y2 ρ2 = y ρ + y+ρ with ρ = 1/quµ,weget − − d µq (1 q 2)2ydy 2d q (1 q 2) u − u − u− = − u u − u− = 2d , 2 2 1 2 qu 1 qu u 2πi y =1 µ (y )(y ) µ( ) 2| | − quµ − µ quµ − µ 2 so S6(f )= d h . (u) − u 1 !

LEMMA 4.8. We have S7(f(u))=h1.

1 Proof. Recall that S7(f) is the sum of 4 trI(µ,µ,f) over the characters µ of 2Z A× /F × α .Forourf = f(u),thecharacterµ contributes 0 unless it is over · 2Z A× /F × O× α .Thecardinalityofthesetoftheseµ is 2h1,andtrI(µ,µ,f(u))= · · trI(µ ,µ ,f )=2sincetrI(µ ,µ ,f )=1forourf (v = u). u u u v v v v ̸ !

LEMMA 4.9. We have S8(f )= 2h1. (u) − COUNTING RANK TWO LOCAL SYSTEMS 759

2Z Proof. Again we have a sum over µ on A× /F × α ,whichreducestoasum 2Z · over A× /F × O× α in view of our choice of f(u),andforeachsuchµ,byour · · choice of f the integral f (x)µ(det x)dx is equal to 1. (u) GL(2,A) (u) ! 0 5. Counting in rank two and any unipotent monodromy. This section consists of a slight rewording of a letter from P. Deligne to the author, dated August 8, 2012. Let X be a connected smooth projective curve over C.LetS X be a finite ⊂ set of points. If M is the moduli space of irreducible rank n complex local systems on X S,withprincipalunipotentlocalmonodromyateachs S,itisnatu- − ∈ ral to complete M into the moduli space M0 of irreducible rank n complex local systems, with unipotent local monodromy at each s S.Itwouldbeevenmore ∈ natural to complete M into M2 where “irreducible” is dropped, replaced by “up to semi-simplification”, but we shall stay with M0.ThespaceM0 is singular, with singularities looking like those of (product of nilpotent cones) affine space. × Let X1 be a geometrically connected smooth projective curve over Fq,witha reduced divisor S1.Notationisasin[DF13].ThesearedenotedbyX and S in Sections 1–4 of this paper, to simplify the notation. Dropping the index 1 indicates here—as in [DF13]—extension of scalars to an algebraic closure F of Fq.The complex case suggests to try to count the rank n smooth Ql-sheaves on X1 S1, − with unipotent local monodromy at each s1 S1 (trivial local monodromy is in ∈ particular allowed; for n = 2, it is the only new possibility at each s1 S1). More ∈ precisely, we want to count up to Fq-twists those which remain irreducible over X. On the automorphic side, this means counting the cuspidal automorphic rep- resentations which remain cuspidal after base change given by an extension of the field Fq of constants, are unramified outside of S1,andwhoseLanglandsparame- ter at each s1 S1 is an unramified representation of the Weil group, together with ∈ any allowed nilpotent. In purely representation theoretic language: the component at each s1 S1 has a nonzero Iwahori fixed vector, namely it is tame. The count is ∈ of course modulo twists by a character of Z. For n = 2, we can make the computation thanks to what is in [DF13], plus the computation for S1 reduced to one closed point (Theorem 4.1 in this paper, mentioned also at [DF13] after 6.29), plus Drinfeld [D81] (Theorem 3.1 in this paper) for empty S1.

Surprise. For n = 2, the count depends only on X1 and deg(S1).Itdoesnot depend on the degrees of the points in S1,norontheircardinality.Onlythetotal degree (cardinality of S)isrelevant.Thisdoesnotholdwhenweconsideronly principal unipotent local monodromy in [DF13]. That the position of the points does not matter is interesting too, but something we already had in [DF13]. We use the following notation: N := deg(S1)= S ; [x] := greatest integer | | x; [x]+ := max(0,[x]):itis[x] for x 0, 0 for x<1. ≤ ≥ 760 Y. Z . F L I C K E R

It is easier to first explain the case of P1,becauseforP1, H1 = 0andthecount is 0 for N 3(sothatwedonotneedDrinfeld[D81],orTheorem3.1ofthis ≤ paper).

1 THEOREM 5.1. If X1 = P ,thenumberofrank2 irreducible smooth Ql- sheaves on X1 S1,whichateachs1 S1 are unramified or have principal unipo- − ∈ tent local monodromy, taken up to Fq-twists, is

N 3 N 4 N 5 N 6 + N 1 k (5.1.1) q − +q − +2q − +2q − + +[(N 2)/2]q = [k/2] q − − . ··· − k N 2 ≤"− If one counts only the sheaves as above which at each s1 S1 have principal ∈ unipotent local monodromy, the answer is given by the formula (6.26.2) of [DF13]. It has the form

N 3 − k (5.1.2)S ck(S)q "k=1 with ck(S) given by the action of Frobenius on S:ifε(S) is the signature of the Frobenius permutation,

k+2j N+k+1 S (5.1.3) ck(S)=( 1) ε(S) Tr(Frob, Λ (Q /Q)). − j 1 "≥ As (5.1.3) vanishes for k>N 3, we may in (5.1.2) sum over all k 1. − S ≥ The sign ε(S) is the action of Frob on det(QS) det(QS/Q). S ≃ As the representation Q /Q of the symmetric group SS of S is self dual,

k+2j N 1 k 2j S S − − − S det(Q /Q) Λ (Q /Q) Λ (Q /Q), ⊗ ≃ and (5.1.3) can be rewritten as

N 1 k 2j N+k+1 − − − S (5.1.4) ck(S)=( 1) Tr(Frob, Λ (Q /Q)). − j 1 "≥ LEMMA 5.2. As a virtual representation of SS,

a a i S i S Λ(Q /Q)= ( 1) Λ− (Q ). − i 0 "≥ Proof. From QS (QS/Q) Q,onegets ≃ ⊕ a a a 1 a a a 1 S S S S S S Λ(Q ) Λ(Q /Q) Λ− (Q /Q) hence Λ(Q /Q)=Λ(Q ) Λ− (Q /Q), ≃ ⊕ − from which the lemma follows by induction on a.Weusetheconventionthat a Λ V = 0whena<0. ! COUNTING RANK TWO LOCAL SYSTEMS 761

N+k+1 By Lemma 5.2, ck(S) is ( 1) times the sum of the traces of Frobenius N 1 k a S − on the Λ − − − (Q ), a 2, with multiplicity # a = i + 2j; j 1,i 0 = ≥ { ≥ ≥ } max(0,[j + i/2]) = [a/2]+.Putb = N 1 k a.Then − − −

b b + S (5.2.1) ck(S)= ( 1) [(N k 1 b)/2] Tr(Frob,Λ(Q )). − − − − "b Our aim is to compute the sum over T S stable by Frobenius of the ⊂ (5.1.2)S T ,thatis −

(5.2.2) qk c (S T ). k − k 1 T stable "≥ "

In (5.2.2), the coefficient of qk is

b b + S T (5.2.3)k ( 1) [( S T k 1 b)/2] Tr(Frob,Λ(Q − )). − | − |− − − stable T" "b

In (5.2.3)k ,letusconsiderthesubsumcorrespondingtoagivenvalueM of T and a given b.Itis( 1)b[(N M k 1 b)/2]+ times | | − − − − −

b S T (5.2.4) Tr ⎛Frob, Λ Q − ⎞. T stable ⎜ G * +⎟ ⎜ T =M ⎟ ⎝ | | ⎠ b S T The sum over all T S such that T = M of the Λ (Q − ) is a representation ⊂ | | of SS denoted R(M,b).Itistheinducedrepresentation,fromSM SN M ,ofthe × − representation

b N M trivial Λ Q − . ⊗ * + The trace Tr(Frob,R(M,b)) is equal to (5.2.4). Indeed, Frobenius permutes the summands and maps each new direct summand to a different new direct summand. This gives a new expression for the coefficient of qk in (5.2.2):

( 1)b[(N M k 1 b)/2]+ Tr(Frob,R(M,b)) − − − − − "M,b (5.2.5)k = [(N k 1 a)/2]+ Tr Frob, ( 1)bR(M,b) . − − − ⎛ − ⎞ a M,b;M+b=a " { " } ⎝ ⎠ 762 Y. Z . F L I C K E R

LEMMA 5.3. If a>0,thevirtualrepresentation

( 1)bR(M,b) − M"+b=a of SS is zero.

Proof. Consider the algebraic de Rham complex of Q[(Xs)s S].Itisares- ∈ olution of Q.Thepartofdegreea and of degree 1ineachvariableisadi- ≤ rect summand. It is the direct sum, over A S with a elements, of the part of ⊂ degree 1 in each X ,fors A,andofdegree0intheothers.Fora>0, it s ∈ is acyclic. In cohomological degree b,andforM = a b,itisspannedbythe − Xs(1) ...Xs(M)dXs(M+1) ...dXs(a) with the s(i) all distinct: as a representation of S ,itisR(a b,b).Thelemmafollows. S − ! Proof of Theorem 5.1. In (5.2.5)k,wemaythereforecancelallthetermsex- cept those with M = b = 0, for which R(M,b) is the trivial representation. We get

(5.3.1) (5.2.5) =[(N k 1)/2]+, k k − − proving Theorem 5.1. !

5.4. When X1 is of genus g. Here is how to modify the arguments when X1 is of genus g.ForS1 = 0,/ (6.26.2) of [DF13] tells that the count, when principal ̸ unipotent monodromy is imposed at each s1 S1,istheproductof ∈ a 0 a 1 (5.4.1) (Pic (X1))(Fq) = ( 1) Tr(Frob,ΛH (X)) | | − with "

k (5.4.2) ck(X1,S1)q k 1 "≥ where

(5.4.3)k k+2j N+k+1 1 S ck(X1,S1)=( 1) ε(S) Tr Frob, Λ (H (X) (Q /Ql)) − ⊕ l j 1 "≥ * + a b N+k+1 1 S =( 1) ε(S) Tr Frob,Λ(H (X)) Λ(Q /Ql) − ⊗ l j 1 a+b=k+2j "≥ " a * + = ( 1)a Tr Frob,Λ(H1(X)) − a " * + k+2j a N+a+k+1 − S ( 1) ε(S) Tr Frob, Λ (Q /Q) . · − j 1 "≥ * + COUNTING RANK TWO LOCAL SYSTEMS 763

As before, the coefficient of ( 1)a Tr(Frob,Λa H1(X)) is − N+a 1 k 2j N+a+k+1 − − − S ( 1) Tr Frob, Λ (Q /Q) − j 1 (5.4.4)k,a !≥ " # b b + S = ( 1) [(N + a k 1 b)/2] Tr Frob,Λ(Q ) . − − − − b ! " # All terms indexed by b = 0arezeroasintheproofofTheorem5.1. ̸ If S1 is empty, thus N = 0, Drinfeld’s formula is similar, but there is a term added to the sum a qk( 1)a Tr(Frob,ΛH1(X)) [(a k 1)/2]+. − · − − a ! This term is

g 1 a g a − a 1 q − 1 0 (5.4.5) (g a)( 1) Tr(Frob,ΛH ) − + Pic (Fq) (1 g) 1. − − q 1 | | − − 0 !a= − We will leave alone this additional term (5.4.5). Except for it, we have the same cancelation as before and we get only the term b = 0in(5.4.4)k,a:

THEOREM 5.4. Our number is the product of ( 1)a Tr(Frob,Λa H1(X)) by − a $ ( 1)aqk Tr Frob,ΛH1(X) [(N + a k 1)/2]+ +(5.4.5). − · − − k 1 a !≥ ! " # As claimed, it depends only on X1 and N = deg(S1).

UNIVERSITY OF ARIEL,ARIEL 4070000,

THE ,COLUMBUS,OH43210 E-mail: yzfl[email protected]

REFERENCES

[DF13] P. Deligne and Y. Z. Flicker, Counting local systems with principal unipotent local monodromy, Ann. of Math. (2) 178 (2013), no. 3, 921–982. [D81] V. G. Drinfeld, Number of two-dimensional irreducible representations of the fundamental group of a curve over a finite field, Funct. Anal. Appl. 15 (1981), 294–295. [F14] Y. Z. Flicker, Eisenstein series and the trace formula for GL(2) over a function field, Doc. Math. 19 (2014), 1–62.