{'fraction_non_alphanumeric': 0.05440808201879241, 'fraction_numerical': 0.010038312536118662, 'mean_word_length': 3.472716829408386, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Grothendieck's trace map for arithmetic surfaces via residues and higher adeles

We establish the reciprocity law along a vertical curve for residues of differential forms on arithmetic surfaces, and describe Grothendieck's trace map of the surface as a sum of residues. Points at infinity are then incorporated into the theory and the reciprocity law is extended to all curves on the surface. Applications to adelic duality for the arithmetic surface are discussed.


Introduction
Grothendieck's trace map for a smooth, projective curve over a finite field can be expressed as a sum of residues over all closed points of the curve (see [5,III.7.14]). This result was generalized to algebraic surfaces by A. Parshin [18] using his theory of two-dimensional adeles and residues for two-dimensional local fields. The theory for arbitrary dimensional algebraic varieties is essentially contained in A. Beilinson's short paper on higher dimensional adeles [1], with considerable additional work by J. Lipman [10], V. Lomadze [13], D. Osipov [16], A. Yekutieli [21], et al. In all these existing cases one restricts to varieties over a field. The purpose of this and the author's earlier paper [15] is to provide the first extension of the theory to non-varieties, namely to arithmetic surfaces, even taking into account the points 'at infinity'.
In the standard approach to Grothendieck duality of algebraic varieties using residues, there are three key steps. Firstly one must define suitable local residue maps, either on spaces of differential forms or on local cohomology groups (the latter approach is followed by E. Kunz [9] using Grothendieck's residue symbol [4,III. §9]). Secondly, the local residue maps are used to define the dualizing sheaf, and finally the local residue maps must be patched together to define Grothendieck's trace map on the cohomology of the dualizing sheaf. In a previous paper, the author [15] carried out most of the first two steps for arithmetic surfaces, as we now explain.
Section 2 provides a detailed summary of the required results from [15], while also establishing several continuity and vanishing results which are required later. Briefly, given a two-dimensional local field F of characteristic zero and a fixed local field K ≤ F , we introduced (see section 2.1) a relative residue map Res F : Ω cts F/K → K, where Ω cts F/K is a suitable space of 'continuous' relative differential forms. In the case F ∼ = K((t)), this is the usual residue map; but if F is of mixed characteristic, then this residue map is new (though versions of it appear in I. Fesenko's two-dimensional adelic analysis [3, §27, Prop.] and in D. Osipov's geometric counterpart [16,Def. 5] to this paper). Then the reciprocity law for twodimensional local rings was proved, justifying our definition of the relative residue map for mixed characteristic fields. For example, suppose A is a characteristic zero, two-dimensional, normal, complete local ring with finite residue field, and fix the ring of integers of a local field O K ≤ A. To each height one prime y ⊂ A one associates the two-dimensional local field Frac A y and thus obtains Spec O K and X to include archimedean points in section 5, we indeed prove a reciprocity law for any horizonal curve y on X. Owing to the non-existence (at least naively) of Spec F 1 , this takes the form x s.t. x∈y ψ x,y (ω) = 1, where ψ x,y : Ω 1 K(X)/K → S 1 are absolute residue maps, i.e. additive characters, and ω ∈ Ω 1 K(X)/K . This provides detailed proofs of various claims made in [3, §27, §28] concerning the foundations of harmonic analysis and adelic duality for arithmetic surfaces, and extends Parshin's absolute reciprocity laws for algebraic surfaces to the arithmetic case. Essentially this yields a framework which encodes both arithmetic duality of K and Grothendieck duality of X → S, and which would be equivalent to Serre duality were X a geometric surface; a comparison of these results with Arakelov theory has yet to be carried out but there is likely an interesting connection.
Combined with [15], which should be seen as a companion to this article and which contains a much more extensive introduction to the subject, these results provide a theory of residues and explicit duality for arithmetic surfaces. The analogous theory for an algebraic surface fibred smoothly over a curve is due to Osipov [16], who proved, using Parshin's reciprocity laws for an algebraic surface, the analogues of our reciprocity laws around a point and along a vertical curve, and also showed that the sum of residues induces the trace map on cohomology.

Notation
When differential forms appear in this paper, they will be 1-forms; so we write Ω A/R in place of Ω 1 A/R to ease notation. Frac denotes the total ring of fractions; that is, if R is a commutative ring then Frac R = S −1 R, where S is the set of regular elements in R. The maximal ideal of a local ring A is usually denoted m A ; an exception to this rule is when A = O F is a discrete valuation ring with fraction field F , in which case we prefer the notation p F . When X is a scheme and n ≥ 0, we write X n for the set of codimension n points of X. X 0 denotes the closed points of X. X will typically be two-dimensional, in which case we will often identify any y ∈ X 1 with the corresponding irreducible subscheme {y}; moreover, 'x ∈ y' then more precisely means that x is a codimension 1 point of {y}. 'Curve' usually means 'irreducible curve'. Given z ∈ X, the maximal ideal of the local ring O X,z is written m X,z .
I ⊂ 1 A means that I is a height one ideal of the ring A.

Acknowledgements
I am thankful to I. Fesenko, A. Beilinson, and A. Yekutieli for discussions about this work. Parts of this research were funded by the Simons foundation and the EPSRC, and I am grateful to both organisations for their support. I heartily thank the referee for suggestions and for reading the article in considerable depth, bringing to my attention several important issues which would have otherwise escaped my notice.

Relative residue maps in dimension two
In [15], a theory of residues on arithmetic surfaces was developed; we repeat here the main definitions and properties, also verifying several new results which will be required later.

Two-dimensional local fields
Suppose first that F is a two-dimensional local field (i.e., a complete discrete valuation field whose residue field F is a local field 1 ) of characteristic zero, and that K ≤ F is a local field (this local field K will appear naturally in the geometric applications); write Ω cts F/K = Ω sep OF /OK ⊗ OF F (for a module over a local ring A, we write M sep = M/ n≥0 m n A M for the maximal separated quotient of M ). Let k F be the algebraic closure of K inside F ; this is a finite extension of K and hence is also a local field.
If F has equal characteristic then any choice of a uniformiser t ∈ F induces a unique k Fisomorphism F ∼ = k F ((t)), and Ω sep OF /OK = O F dt. The relative residue map, which does not depend on t, is the usual residue map which appears in the theory of curves over a field (e.g. [19,II.7]): where the notation means that f is to be expanded as a series in powers of t and the coefficient of t −1 is to be taken. If F is a mixed characteristic two-dimensional local field then F/k F is an infinite extension of complete discrete valuation fields, and F is called standard if and only if e(F/k F ) = 1. If F is standard then any choice of a first local parameter t ∈ O F (i.e., t is a uniformiser in the local field  [15,Prop. 2.19] not to depend on the choice of t. (The notation again means that f is to be expanded as a series in powers in t, but this time in the field k F {{t}}, and the coefficient of t −1 taken). If F is not necessarily standard, then choose a subfield M ≤ F which is a standard two-dimensional local field, such that F/M is a finite extension, and which satisfies k M = k F . The relative residue map in this case is defined by which was shown in [15,Lem. 2.21] not to depend on M . In both cases, it is also convenient to write Res F = Tr kF /K • res F : Ω cts F/K → K. Also note that res F is k F -linear, and that therefore Res F is K-linear. The expected functoriality result holds: Lemma 2.1. Let L be a finite extension of K. Then Ω cts L/K is naturally isomorphic to Ω cts F/K ⊗ F L, so that there is a trace map Tr L/F : Ω cts L/K → Ω cts F/K . If ω ∈ Ω cts L/K , then Proof. In the equal characteristic case this is classical; e.g., see [ The top horizontal arrow here makes sense by the previous lemma, and the lower horizontal arrow is the ramification degree e(F/K) times the residue map for the local field F of finite characteristic, which contains the finite field K.
is continuous with respect to the discrete valuation topologies on F and K; in fact, if F is equal characteristic, then it is even continuous with respect to the discrete topology on K.
Proof. After multiplying ω by a non-zero element of F , we may assume that ω is integral in the sense of the previous lemma. If F is equal characteristic then Ker(f → res F (f ω)) contains the open set O F , proving continuity with respect to the discrete topology on K. Now assume F has mixed characteristic and let π be a uniformiser of K; since F/K is an extension of complete discrete valuation fields, we may put e = e(F/K) = ν F (π) > 0. Then the previous lemma implies for all s ∈ Z, proving continuity with respect to the discrete valuation topologies.

Two-dimensional complete rings
Let A be a two-dimensional, normal, complete, local ring of characteristic zero, with a finite residue field of characteristic p; set F = Frac A. Then there is a unique ring homomorphism Z p → A and it is a closed embedding; let O K be a finite extension of Z p inside A; i.e., O K is the ring of integers of K, which is a finite extension of Q p . If y ⊂ A is a height one prime (we often write y ⊂ 1 A), then A y is a complete discrete valuation ring; its field of fractions F y := Frac A y is a two-dimensional local field containing K. Moreover, there is a natural isomorphism Ω sep A/OK ⊗ A A y ∼ = Ω sep Ay/K (see [15,Lem. 3.8]); so we define Res y : The definition of the residue maps is justified by the following reciprocity law: Let ω ∈ Ω sep A/OK ⊗ A F ; then for all but finitely many height one primes y ⊂ A the residue Res y ω is zero, and Proof. See [15,Thm. 3.10].
As is often the case, the residue law was reduced to a special case by taking advantage of functoriality: Lemma 2.6. Suppose that C is a finite extension of A which is also normal; set L = Frac C. Then for any ω ∈ Ω sep C/OK ⊗ C L and any height one prime y ⊂ A, we have where Y varies over the finitely many height one primes of C which sit over y.
The proof of the reciprocity theorem also required certain results on the continuity of the residues whose proofs were omitted in [15]; we shall require similar such results several times in this article and now is a convenient opportunity to establish them: Proof. We first consider the case when y = ρB is generated by an irreducible Weierstrass polynomial . Let K ′ be a sufficiently large finite extension of K such that ρ splits into linear factors in K ′ ; the decomposition has the form and M ′ = Frac B ′ . According to functoriality of residues (the previous lemma), we have Since multiplication by f ∈ B commutes with the trace map, it is now enough to prove that In other words, replacing K by K ′ and B by B ′ , we have reduced to the case when ρ(t) is a linear polynomial: ρ(t) = t − λ, with λ ∈ p K . After another reduction, we will prove the continuity claim in this case.
Let π be a uniformiser for K. It is well-known that Ω sep B/OK = B dt and that any element of M can be written as a finite sum of terms of the form with h ∈ O K [t] an irreducible Weierstrass polynomial, r > 0, n ∈ Z, and g ∈ B (a proof was given in [15,Lem. 3.4]). By continuity of addition K × K + − → K and of the multiplication maps B and so Res y (Bω) = 0 by lemma 2.2, which is certainly enough. Else h = ρ, which we now consider. To obtain more suggestive notation, we write t y := ρ(t) = t − λ; thus Let m ≥ 0; we claim that if n ≥ m + r then Res y (m n B ω) ⊆ p m K . Since λ is divisible by π, the maximal ideal of B is generated by π and t y : Therefore an arbitrary element of m n B is a sum of terms of the form π α t β y g, with g ∈ B, α, β ≥ 0, and α + β ≥ n, and so it is enough to consider such an element. Moreover, again since π divides λ, there is a unique continuous isomorphism and therefore g ∈ B may be written as with a j ∈ O K and g 1 ∈ B (we could extend this expansion to infinity, of course, but since we are trying to prove continuity, it is better not to risk confusion between 'formal series' and 'convergent series'). Then The second residue is zero by lemma 2.2 again since t β y g 1 ∈ B. If β ≥ r then the first residue is zero for the same reason; but if β < r then it follows that α > m, whence the first residue is π α a r−β−1 ∈ p α K ⊆ p m K . So in any case, ( †) belongs to p m K , completing the proof of our claim and thereby showing the desired continuity result for y = ρB.
Having treated the case of a prime y generated by a Weierstrass polynomial, we must secondly consider y = πB. By exactly the same argument as above, we may assume that ω = h −r dt, with h an irreducible Weierstrass polynomial. Then M y = K{{t}} and h −r ∈ B y ; hence h −r may be written as a series Let m ≥ 0 be fixed, and pick J > 2 such that a j ∈ p m K whenever j ≤ −J. We claim that if n ≥ J − 2 + m then Res y (m n B ω) ⊆ p m K . Since an arbitrary element of m n B is a sum of terms of the form π α t β g, with g ∈ B, α, β ≥ 0, and α + β ≥ n, it is enough it consider such an element; write g = ∞ i=0 b i t i . Then Res y (π α t β gω) = Res y (π α t β gh −r dt) But α + β ≥ J − 2 + m and so if it is not the case that β ≥ J − 2, then it follows that α ≥ m; so, regardless of which inequality holds, we obtain Res y (π α t β gω) ∈ p m K , as required. Now we extend the lemma to the general case of our two-dimensional, normal, complete, local ring A. This result is a significant strengthening of corollary 2.4, since the m A -adic topology on A is considerably finer than the y-adic topology, for any y ⊂ 1 A.
is continuous with respect to the m A -adic topology on A and the discrete valuation topology on K.
Proof. Firstly, it is enough to prove that the given map is continuous for any fixed y; the uniformity result then follows from the fact that, for almost all y ⊂ 1 A, ω belongs to Ω sep Ay/OK and y does not contain p K ; for such primes, Res y Aω = 0 by lemma 2.2.
By Cohen structure theory [2] (the details of the argument are in [15,Lem. 3 and such that A is a finitely-generated B-module; set M = Frac B. Write ω = gω 0 for some g ∈ F and ω 0 ∈ Ω sep B/OK ⊗ B M . Now we make some remarks on continuity of the trace map. Tr F/M (Ag) is a finitely generated B-module and so there exists g 0 ∈ M × such that Tr F/M (Ag) ⊆ Bg 0 . Moreover, since A/B is a finite extension of local rings, one has m s A ⊆ m B A for some s > 0. Hence Tr F/M (m ns A g) ⊆ m n B g 0 for all n ≥ 0, meaning that the restriction of the trace map to Ag → Bg 0 is continuous with respect to the m-adic topologies on each side. It immediately follows that is both well-defined and continuous.
Functoriality (lemma 2.6) implies that for any y ⊂ 1 B, Y |y where Y varies over the finitely many height one primes of A which sit over y. The right hand side may be rewritten as where g 0 ω 0 ∈ Ω sep B/OK ⊗ B M ; according to the previous lemma, this is a continuous function of f . In conclusion, is continuous, which we will now use to show that each map f → Res Y f ω is individually continuous, thereby completing the proof. Fix m ≥ 0. Let Y 1 , . . . , Y l be the height one primes of A sitting over y, and let ν 1 , . . . , ν l denote the corresponding discrete valuations of F . If l = 1 then there is nothing more to show, so assume l > 1. Since the map is continuous with respect to the discrete valuation topologies on each side (corollary 2.4), there exists S > 0 (which we may obviously assume is independent of i) such that Res According to the approximation theorem for discrete valuations, there exists an element e ∈ F which satisfies ν 1 (e − 1) ≥ S and ν i (e) ≥ S for i = 2, . . . , l. Now, since ( †) remains continuous if we replace ω by eω, there also exists Res Res Yi (f eω) belongs to p m K since ν 1 (f (1 − e)) ≥ S and ν i (f e) ≥ S for i = 2, . . . , l. That is, Res Y1 (m J A ω) ⊆ p m K , which proves the desired continuity result. Remark 2.9. The previous lemma can be reformulated as saying that the residue map Res Fy : Ω cts Fy/K → K is continuous with respect to the valuation topology on K and the vector space topology on Ω cts Fy/K , having equipped F y with its two-dimensional local field topology [14].
Finally, regarding vanishing of the residue of a differential form: A/OK , and let y ⊂ 1 A. Then Res y ω ∈ p K . If y does not contain p or if y is the only height one prime of A containing p, then Res y ω = 0.
Proof. If y does not contain p then F y is equal characteristic and we have already proved a stronger result in lemma 2.2: Res y vanishes on the image of Ω sep A/OK ⊗ A A y . If instead y is the only height one prime of A containing p, then the vanishing claim follows from the reciprocity law and the previous case.
Finally, suppose y contains p but do not assume that it is the only height one prime to do so. Using functoriality of differential forms and remark 2.3, we have a commutative diagram The residue map Res F y on the characteristic p local field F y vanishes on integral differential forms; since A/y belongs to the ring of integers of F y , it follows immediately from the diagram that Res y ω ∈ p K . where α is a root of f (X) = X 2 − T X − p, with field of fractions F . Since f (X) does not have a root in B/T B = Z p , it does not have a root in B, and so F/M is a degree two extension. Since A is a finitely generated B-module, it is also a two-dimensional, complete local ring, and we leave it to the reader to check that A is regular, hence normal. In A, p completely splits as p = α(T − α), and therefore, setting y = αA, the natural map is an isomorphism. Indeed, f (X) splits in the residue field B pB /pB pB = F p ((T )) into distinct factors and so Hensel's lemma implies that f (X) splits in B pB ; i.e., α ∈ B pB ⊂ M pB . One readily checks that α ≡ −pT −1 mod p 2 in B pB = A y , and therefore In particular, Res y (α dT ) = 0 even though α dT is integral.

Two-dimensional, finitely generated rings
Next suppose that O K is a Dedekind domain of characteristic zero and with finite residue fields, and that B is a two-dimensional, normal, local ring, which we assume is the localization of a twodimensional, finitely-generated O K -algebra. Set A = B mB and s = m B ∩ O K . Then A satisfies all the conditions introduced at the start of the previous subsection and contains O s := O K,s , which is the ring of integers of the local field K s := Frac O K,s . Moreover, there is a natural identification [15,Lem. 3.11]). For each height one prime y ⊂ B, we may therefore define Res y : Ω Frac B/K → K s to be the composition where y ′ varies over the finitely many primes of A, necessarily of height one, which sit over y.
The reciprocity law remains true in this setting: Let ω ∈ Ω Frac B/K ; then for all but finitely many height one primes y ⊂ B the residue Res y ω is zero, and Res y ω = 0.
Proof. [15,Thm. 3.13] The following vanishing identity will be useful: Lemma 2.13. Let y ⊂ 1 B and suppose that ω ∈ Ω Frac B/K belongs to the image of Ω By/OK . Then Res y ω ∈ O s ; in fact, if y is horizontal (i.e., y ∩ O K = 0) then Res y ω = 0. Secondly, suppose that there is only one height one prime y of B which is vertical (i.e., containing s) and that ω is in the image of Ω A/OK . Then Res y ω = 0.
Proof. The first claims follow from lemma 2.2, since y being horizontal is equivalent to the twodimensional local fields Frac A y ′ , with y ′ ⊂ A sitting over y, being equi-characteristic. The second claim follows from the previous reciprocity law since any prime is either vertical or horizontal.

Geometrisation
Continue to let O K be a Dedekind domain of characteristic zero and with finite residue fields. Let X be a two-dimensional, normal scheme, flat and of finite type over S = Spec O K , and let Ω X/S = Ω 1 X/S be the relative sheaf of one forms. Let x ∈ X 2 be a closed point sitting over a closed point s ∈ S 0 , and let y ⊂ X be an irreducible curve containing x. Identify y with its local equation (i.e., corresponding prime ideal) y ⊂ 1 O X,x and note that O X,x satisfies all the conditions which B did in the previous subsection. Define the residue map Res x,y : Ω K(X)/K → K s (= Frac O K,s ) to be Res y : Ω Frac OX,x/K −→ K s .
The reciprocity law now states that, for any fixed ω ∈ Ω K(X)/K , y⊂X s.t. y∋x Res x,y ω = 0 in K s , where the sum is taken over all curves in X which pass through x. For a few more details, see [15, §4].

Reciprocity along vertical curves
As explained in the introduction, residues on a surface should satisfy two reciprocity laws, one as we vary curves through a fixed point, and another as we vary points along a fixed curve. The first was explained immediately above and now we will prove the second.
Let O K be a Dedekind domain of characteristic zero and with finite residue fields; denote by K its field of fractions. Let X be an O K -curve; more precisely, X is a normal scheme, proper and flat over S = Spec O K , whose generic fibre is a smooth, geometrically connected curve.
The aim of this section is to establish the following reciprocity law for vertical curves on an arithmetic surface: Theorem 3.1. Let ω ∈ Ω K(X)/K , and let y ⊂ X be an irreducible component of a special fibre X s , where s ∈ S 0 . Then x∈y Res x,y ω = 0 in K s , where the sum is taken over all closed points x of y.
Here, as usual, O s = O K,s and K s = Frac O s . The proof will consist of several steps. We begin with a short proof of a standard adelic condition: Lemma 3.2. Let y ⊂ X be an irreducible curve, let f ∈ O X,y , and let r ≥ 1. Then f ∈ O X,x + m r X,y for all but finitely many closed points x ∈ y.
The result also holds after completion: if f ∈ O X,y , then f ∈ O X,x + m r X,y O X,y for almost all x. Proof. Let U = Spec A be an open affine neighbourhood of (the generic point of) y, let p ⊂ A be the prime ideal defining y, and set P = A ∩ p r A p , B = A/P . If b ∈ B is not a zero divisor, then B/bB is zero-dimensional and so has only finitely many primes; hence only finitely many primes of B contain b. Set f := f mod m r X,y ∈ A p /p r A p = Frac B; by what we have just proved, f belongs to B q for all but finitely many primes q ⊂ B, i.e. f ∈ O X,x + m r X,y for all but finitely many x ∈ y ∩ U . Since U contains all but finitely many points of y, we have finished.
The complete version now follows from the identity O X,y /m r X,y O X,y = O X,y /m r X,y . The lemma lets us prove that the theorem makes sense: Lemma 3.3. Let ω ∈ Ω K(X)/K , and let y ⊂ X be an irreducible component of a special fibre X s , where s ∈ S 0 . Then the sum x∈y Res x,y ω converges in the valuation topology on K s (we will see that only countably many terms are non-zero). Moreover, is continuous with respect to the topology on K(X) induced by the discrete valuation associated to y, and the s-adic topology on K s .
Proof. For any point z ∈ X, let Ω z denote the image of Ω OX,z /OK inside Ω K(X)/K . Let r ≥ 0. Let π ∈ O K be a uniformiser at s, fix ω ∈ Ω K(X)/K and pick a ≥ 0 such that π a ω ∈ Ω y . Then it easily follows from the previous lemma that, for any r ≥ 0, π a ω lies in Ω x + π r Ω y for almost all closed points x ∈ y. But lemma 2.13 implies that if x is any closed point of y then Res x,y (Ω y ) ⊆ O s , and moreover that if x does not lie on any other irreducible component of the fibre X s then Res x,y (Ω x ) = 0. We deduce that Res x,y π a ω ∈ π r O s for almost all closed points x ∈ y. So Res x,y ω ∈ π r−a O s for almost all x ∈ y; since this holds for all r ≥ 0 we see that x∈y Res x,y ω converges and also that x∈y Res x,y ω ∈ π −a O s .
If h ∈ K(X) satisfies ν(f ) ≥ b for some b ∈ Z, then we may write h = π b u for some u ∈ O X,y . This implies that π a−b hω ∈ Ω y and so, by what we have just shown, x∈y Res x,y hω ∈ π b−a O s . This proves that h → x∈y Res x,y hω is continuous.
Remark 3.4. The analogous vertical reciprocity law in the geometric setting is [16,Prop. 6], where Osipov gives an example to show that it really is possible for the sum of residues along the points of y ⊂ X s to contain infinitely many non-zero terms.
We aim to reduce the vertical reciprocity law to the case of O K being a complete discrete valuation ring by using several lemmas on the functoriality of residues.
Let s be a non-zero prime of O K , and set O s = O K,s , K s = Frac O s as usual. Set X = X × OK O s and let p : X → X be the natural map. Then p induces an isomorphism of the special fibres X s ∼ = X s and, for any point x ∈ X s , p induces an isomorphism of the completed local rings O X,p(x) ∼ = O X,x (see e.g. [12,Lem. 8.3.49]). From the excellence of X it follows that O X,x is normal for all x ∈ X s , and therefore X is normal. So X is a O s -curve, in the same sense as at the start of the section. Lemma 3.5. Let y ⊂ X be an irreducible curve and let x be a closed point of y. Then the following diagram commutes: where y ′ varies over the irreducible curves of X sitting over y and x ′ is the unique closed point sitting over x (i.e., p(x ′ ) = x). where y ′′ varies over the height one primes of B sitting over y. But we remarked above that there is a natural O s -isomorphism O X,x ′ ∼ = B, and this expression for the residues remains valid if B is replaced by O X,x ′ and y is replaced by some y ′ sitting over y. Therefore as required.
Corollary 3.6. Let y ⊂ X be an irreducible component of the special fibre X s and let x be a closed point of y; let x ′ = p −1 (x), y ′ = p −1 (y) be the corresponding point and curve on X s ∼ = X s . Then the following diagram commutes: Informally, this means that residues along the special fibre X s may be computed after completing O K .
Proof. The unique irreducible curve of X sitting over y is y ′ , so this follows from the previous lemma. Proof. This immediately follows from the previous corollary.
In the remainder of the section (except remark 3.9), we replace X by X and O K by O s , so that the base is a now a complete, discrete valuation ring (of characteristic zero, with finite residue field, with field of fractions K being a local field).
The horizontal curves on X are all of the form {z} for a uniquely determined closed point z of the generic fibre X η . Moreover, because our base ring is now complete, {z} meets the special fibre X s at a unique point r(z), which is necessarily closed and is called the reduction of z. where the left residue is the two-dimensional residue on X associated to the point and curve r(z) ∈ {z}, and the right residue is the usual residue for the K-curve X η at its closed point z.
Proof. This is a small exercise in chasing the definitions of the residue maps. Set B = O X,r(z) and let p be the local equation for {z} at r(z). For any n ≥ 0, B/p n is a finite O K -algebra, hence is complete. This implies that B/p B = B/p, whence p ′ = p B is prime in B, and also that Then F := Frac B p ′ is the two-dimensional local field used to define the residue at the flag r(z) ∈ {z}; it has equal characteristic, and we have just shown it is equal to Frac O Xη ,z . But the residue map on a two-dimensional local field of equal characteristic was exactly defined to be the familiar residue map for a curve.
Remark 3.9. If O K is not necessarily a complete, discrete valuation ring, as at the start of the section, then the above lemma remains valid when reformulated as follows: Let z be a closed point of the generic fibre, and X s a special fibre. For any ω ∈ Ω K(X)/K = Ω K(Xη )/K , x∈{z}∩Xs where the left is the sum of two-dimensional residues on X associated to the flags x ∈ {z} where x runs over the finitely many points in {z} ∩ X s , and the right residue is the usual residue at the closed point z on the curve X η . This may easily be deduced from the previous lemma using lemma 5.1 below.
Proof of theorem 3.1. We may now prove the vertical reciprocity law. Let y 1 (= y), y 2 , . . . , y l be the irreducible components of the fibre X s . Firstly, combining the usual reciprocity law for the curve X η with the previous lemma yields where the sum is taken over closed points of the generic fibre and only finitely many terms of the summation are non-zero. Since {z}, for z ∈ (X η ) 0 , are all the irreducible horizontal curves of X, we may rewrite this as Moreover, according to the reciprocity law around a point from subsection 2.4, if x ∈ X 0 is a closed point then where only finitely many terms in the summation are non-zero. We deduce that where the sum is now taken over the irreducible vertical curves in X. That is, where the rearrangement of the double summation is justified by lemma 3.3, which says that each internal sum of ( †) converges in K. If X s is irreducible, then this is exactly the sum over the closed points of y 1 = y and we have finished. Else we must proceed by a 'weighting' argument as in lemma 2.8. Let ν 1 , . . . , ν l be the discrete valuations on K(X) associated to y 1 , . . . , y l respectively. For m > 0, pick f m ∈ K(X) such that

Trace map via residues on higher adeles
We are now ready to adelically construct Grothendieck's trace map H 1 (X, ω) → O K as a sum of our residues, where π : X → Spec O K is an arithmetic surface and ω = ω π is its relative dualizing sheaf. The key idea is to use the reciprocity laws to show that sums of residues descend to cohomology.
Remark 4.1. Passing from local constructions to global or cohomological objects is always the purpose of reciprocity laws. Compare with the reciprocity law around a point in K. Kato and S. Saito's two-dimensional class field theory [8, §4]. Sadly, using reciprocity laws for the reciprocity map of two-dimensional local class field theory to construct two-dimensional global class field theory has not been written down in detail anywhere, but a sketch of how it should work in the geometric case was given by Parshin [17]. More details, which are also valid in the arithmetic case, can be found in [3, Chap. 2].

Adeles of a curve
We begin with a quick reminder of adeles for curves. Let C be a one-dimensional, Noetherian, integral scheme with generic point η; we will be interested in both the case when X is smooth over a field and when C is the spectrum of the ring of integers of a number field. If E is a coherent sheaf on C, then the adelic resolution of E is the following flasque resolution: is the corresponding skyscraper sheaf at x; the 'restricted product' term ′ is the sheaf whose sections on an open set U ⊆ X are The Zariski cohomology of E is therefore exactly the cohomology of the adelic complex A(X, E): These observations remain valid if we do not bother completing E at each point x, leading to the rational adelic complex a(X, E) (classically called repartitions, e.g. [19,II.5]): whose cohomology also equals the Zariski cohomology of E.

Rational adelic spaces for surfaces
The theory of adeles for curves was generalised to algebraic surfaces by A. Parshin, e.g. [18], and then to arbitrary Noetherian schemes by A. Beilinson [1]. The main source of proofs is A. Huber's paper [6]. We will describe the rational (i.e. no completions are involved) adelic spaces, defined in [6, §5.2], associated to a coherent sheaf E on a surface X. More precisely, X is any two-dimensional, Noetherian, integral scheme, with generic point η and function field F = K(X). The quasi-coherent sheaf which is constantly F will be denoted F .

Remark 4.2.
We choose to use the rational, rather than completed, adelic spaces to construct the trace map only for the sake of simplicity of notation. There is no substantial difficulty in extending the material of this section to the completed adeles, which becomes essential for the dualities discussed in remark 5.6. groups 0, 1, and 2 The first rational adelic groups are defined as follows:

Adelic
More generally, if E is a coherent sheaf on X, then we define

Adelic group 01
Next we have the 01 adelic group: where the limit is taken over all coherent submodules M of the constant sheaf F . This ring is commonly denoted using restricted product notation: a(01) = ′ y∈X 1 F . Again more generally, if E is an arbitrary coherent sheaf, we put where the limit is taken over all coherent submodules M of the constant sheaf associated to E η .

Adelic group 02
Next, where the limit is taken over all coherent submodules M of F . This ring is commonly denoted ′ x∈X 2 F . We leave it to the reader to write down the definition of a(02, E), for E an arbitrary coherent sheaf.

Adelic group 12
Remark 4.3. We first require some notation. If z ∈ X is any point and N is a O X,z module, then we write where j z : Spec O X,z ֒→ X is the natural morphism and N is the quasi-coherent sheaf on Spec O X,z induced by N . For example, We may now introduce where the limit is taken over all coherent submodules M of [O X,y ] y . Recall our convention that if y ∈ X 1 then 'x ∈ y' means that x is a codimension one point of the closure of y; more precisely, We again leave it to the reader to write down the definition of a(12, E) for an arbitrary coherent sheaf E (just replace O X,y by E y everywhere in the construction).
This is a convenient place to make one observation concerning an adelic condition which holds for a(12, E): Lemma 4.4. Let E be a coherent sheaf on X, fix y ∈ X 1 , r ≥ 0, and let (f x ) x∈y ∈ a y (12, E); then f x ∈ E x + m r X,y E y for all but finitely many x ∈ y.
Proof. There is a coherent submodule M ⊆ [E y ] y such that f x ∈ M x for all x ∈ y. Let U = Spec A be an affine open neighbourhood of y, and let q ⊂ A be the prime ideal corresponding to y. Then M (U ) is a finitely generated A-submodule of E q and therefore M (U ) ⊆ f E for some f ∈ A q . For any r ≥ 0, the argument of lemma 3.2 shows that f ∈ A m + q r A q for all but finitely many of the maximal ideals m of A sitting over q; for such maximal ideals, we have M m ⊆ E m + q r E q . Since U contains all but finitely many of the points of {y}, this is enough. (and we similarly define a(012, E) for any coherent E, by taking the limit over coherent submodules M of the constant sheaf E η ).

Simplicial structure and cohomology
Consider the following homomorphisms of rings: F v v n n n n n n n n n n n n n n n n ( ( P P P P P P P P P P P P P P P P where the three ascending arrows are the obvious inclusions and the remaining arrows are diagonal embeddings. These homomorphisms restrict to the rational adelic groups just defined to give a commutative diagram of ring homomorphisms: We reach the analogue for X of the rational adelic complex which we saw for a curve in subsection 4.1 above: Theorem 4.5. Let E be a coherent sheaf on X; then the Zariski cohomology of E is equal to the cohomology of the following complex (which is the total complex associated to the above simplicial group): (g 01 , g 02 , g 12 ) → ∂ 01 012 g 01 + ∂ 02 012 g 02 + ∂ 12 012 g 12 Proof. This is due to Parshin [18]; the general case of higher dimensional X is due to Beilinson [1] and Huber [6].

Construction of the trace map
Let O K be a Dedekind domain of characteristic zero with finite residue fields; its field of fractions is K. Let π : X → S = Spec O K be an O K -curve as at the start of section 3. According to the main result of [15], the relative dualising sheaf ω of π is explicitly given by, for open U ⊆ X, where x runs over all closed points of X inside U and y runs over all curves containing x.
As previously, closed points of S are denoted s, and we put O s = O K,s , K s = Frac O s . converges in K s , where the sum is taken over all points x and curves y in X for which x ∈ y ∩ X s . Moreover, Res s (ω) ∈ O s for all but finitely many s ∈ S 0 . If ω ∈ ∂ 12 Proof. Let E be a coherent submodule of the constant sheaf ω η = Ω K(X)/K such that ω ∈ a(12, E); then E and ω are equal at the generic point (replacing E by E + ω, if necessary), hence on an open set, and therefore E y = ω y for all but finitely many y ∈ X 1 . We call the remaining finitely many y bad.
If y is a horizontal curve which is not bad and x ∈ y, then ω x,y ∈ E y = ω y and so Res x,y ω x,y = 0 (indeed, if π ∈ O K,s is a uniformiser at s then π −1 ∈ O X,y and so the definition of ω implies that π −m Res x,y ω x,y ∈ O s for all m ≥ 0; this is only possible if Res x,y ω x,y = 0). Therefore, only finitely many horizontal curves contribute to the summation in ( ‡); so it is enough to prove that if y is an irreducible component of X s then x∈y Res x,y ω x,y converges. This is straightforward, using lemma 4.4 and arguing exactly as in lemma 3.3, and completes the proof that Res s (ω) is well-defined.
Secondly, for any curve y, each of ω y and E y are (non-zero) finitely generated O X,y submodules of Ω K(X)/K , and therefore there exists r ≥ 0 such that m r X,y E y ⊆ ω y ; clearly we may pick r so that this inclusion holds for all bad y. Then lemma 4.4 tells us that for all but finitely many x in any bad curve y, we have Next, if y 1 , y 2 are two horizontal curves, then y 1 and y 2 will have a common point of intersection on a vertical curve Y for only finitely many Y (for else y 1 ∩ y 2 would be infinite). It follows that there is an open set U ⊆ X consisting of fibres such that any x ∈ U satisfies one of the following conditions: (i) x sits on no bad curve; or (ii) x sits on exactly one bad curve y; y is horizontal and E y ⊆ E x + ω y .
Note that U contains all but finitely many of the fibres X s , for s ∈ S 0 , and to prove our second claim it is enough to show that for any closed point x on a fibre X s belonging to U , and curve y passing through x, one has Res x,y ω x,y ∈ O s . There are two cases to consider: (i) y is not bad. Then ω x,y ∈ E y = ω y , whence Res x,y ω x,y ∈ O s by ( †).
(ii) y is bad. Then y is horizontal by construction of U and so Res x,y ω y = 0 (as argued in the previous paragraph); therefore condition (ii) on U implies that Res x,y ω x,y = Res x,y ζ for some ζ ∈ E x . If Y is any curve through x apart from y then ζ ∈ E x ⊆ E Y = ω Y and so ( †) now implies that Res x,Y ζ ∈ O s . But the reciprocity law about a point from subsection 2.4 shows that where the sum is taken over all curves Y passing through x apart from y; therefore Res x,y ζ ∈ O s .
This completes the proof that Res s ω belongs to O s for all but finitely many s ∈ S 0 . Finally, if ω is in the image of the boundary map ∂ 12 012 then ω x,y ∈ ω y for all flags x ∈ y; so ( †) implies that Res x,y ω x,y ∈ O s . This proves the final claim. Let K s : a s ∈ O s for all but finitely many s} and A S (0) = s∈S0 O s be the rings of adeles and integral adeles of K respectively (we will incorporate archimedean information in the final section). The adelic complex for S, as discussed in 4.1, is Corollary 4.7. The map Res : a(012, ω) → A S , ω → (Res s (ω)) s∈S0 is well-defined, and restricts to Res •∂ 12 012 : a(12, ω) → A S (0).
Noting that H 0 of the adelic complex for S is simply O K and that H 1 of the adelic complex for X is H 1 (X, ω) (by theorem 4.5), the proposition implies that there is an induced map Our construction would be irrelevant without the final theorem: Res is equal to Grothendieck's trace map tr π .
Proof. There is a natural morphism from the rational adelic complex of X for the coherent sheaf ω to the rational adelic complex of X η for the coherent sheaf Ω Xη/K : a(01, ω) ⊕ a(02, ω) ⊕ a(12, ω) a(012, ω) commutes; but the vertical map on the right is the trace map for X η , by the familiar result (which we are generalising!) that the trace map of a smooth projective curve is represented by the sum of residues. This completes the proof that ( ) commutes. Finally, the diagram ( ) also commutes if Res is replaced by tr π , since trace maps commute with localization of the base ring. Therefore Res = tr π . Remark 4.10. Before complicating matters by incorporating archimedean data, this is a convenient opportunity to explain how the previous material should fit into a general framework.
A flag of points on a scheme X is a sequence of points ξ = (x 0 , . . . , x n ) such that x i−1 ∈ {x i } for i = 1, . . . , n. By a process of successive completions and localizations, the flag ξ yields a ring F ξ . More generally, to any quasi-coherent sheaf E, one obtains a module E ξ over F ξ ; for details, see [6, §3.2]. Now let f : X → Y be a morphism of S-schemes, where S is a Noetherian scheme (perhaps Cohen-Macaulay), and notice that we may push forward any flag from X to Y , resulting in an inclusion of rings F f * (ξ) ⊆ F ξ . Let ω X , ω Y denote the dualizing sheaves of X, Y over S. If f is proper (and probably Cohen-Macaulay) of fibre dimension d, then we expect there to exist a residue map which is the trace map when f is a finite morphism and which is transitive when given another proper, CM morphism Y → Z. Globally, taking sums of these residue maps will induce a morphism of degree −d on the adelic complexes The patching together of the local residue maps to induce a morphism of complexes is equivalent to a collection of reciprocity laws being satisfied. In turn, this induces maps on the cohomology which will be nothing other than Grothendieck's trace map.
When S is a field this framework more-or-less follows from [13] and [21], though it has not been written down carefully. This article and the author's previous [15] focus on the case Y = S = Spec O K and X = a surface.
The fully general case requires a rather careful development of relative residue maps in arbitrary dimensions, and becomes a technically difficult exercise quite quickly. The Hochschild homologytheoretic description of residue maps [7] [11] may be the key to a smoother approach.

Archimedean reciprocity along horizontal curves
We continue to study an O K -curve X in the sense introduced at the start of section 3, but we now assume that K is a number field and O K its ring of integers (with generic point η). If ∞ is an infinite place of K then we write X ∞ = X × OK K ∞ where K ∞ is the completion of K at ∞; so X ∞ is a smooth projective curve over R or C.
The natural morphism can send a closed point to the generic point; but there are only finitely many points over any closed point. Indeed, let z ∈ X η be a closed point; then the fibre over z is X ∞ × Xη k(z) = (K ∞ × K X η ) × Xη k(z) = Spec(K ∞ ⊗ K k(z)), which is a finite reduced scheme. If y is a horizontal curve on X then y = {z} for a unique closed point z ∈ X η . We say that a closed point x ∈ X ∞ sits on y if and only if ρ(x) = z. Hence there are only finitely many points on X ∞ which sit on y, and we will allow ourselves to denote this set of points by y ∩ X ∞ . Such points are the primes of K ∞ ⊗ K k(z) and therefore correspond to the infinite places of the number field k(z) extending the place ∞ on K. Note that each x ∈ X ∞ sits on at most one horizontal curve, which may seem strange at first.
In this situation, we define the archimedean residue map Res x,y : Ω K(X)/K → K ∞ to be where Res x is the usual one-dimensional residue map associated to the closed point x on the smooth curve X ∞ over K ∞ . The following easy lemma was used in remark 3.9; since we need it again, let's state it accurately: Lemma 5.1. Let C be a smooth, geometrically connected curve over a field K of characteristic zero, let L be an arbitrary extension of K, and let z be a closed point of C.
(i) Let x ∈ C L be a closed point sitting over z; then the following diagram commutes: (Notation: res x is the residue map Ω K(C)/K → k(x), and then Res x = Tr k(x)/K • res x ; similarly for other points.) (ii) With x now varying over all the closed points of C L sitting over z, the following diagram commutes: Proof. If t ∈ K(C) is a local parameter at z then it is also a local parameter at x, and the characteristic zero assumption implies that there are compatibile isomorphisms K(C L ) x ∼ = k(x)((t)), K(C) z ∼ = k(z)((t)); the first claim easily follows. Secondly k(z) ⊗ K L ∼ = x|z k(x), so that Tr k(z)/K = x|z Tr k(x)/L ; hence, for ω ∈ Ω K(C)/K , part (i) lets us use the usual argument: We obtain an analogue of remark 3.9: Corollary 5.2. Returning to the notation before the lemma, if ∞ and y = {z} are fixed, and ω ∈ Ω K(X)/K , then x∈y∩X∞ Res x,y ω = Res z ω. But remark 3.9 (for s ∈ S 0 ) and the previous corollary (for s infinite) imply that f is the global adele Res z ω ∈ K. As ψ was chosen to be trivial on global elements, the proof is complete.
Remark 5.5. The reciprocity law around a point x ∈ X 2 stated in section 2.4 obviously implies that the absolute residue maps satisfy a similar law: y⊂X s.t. y∋x ψ x,y (ω) = 1.
Therefore we have absolute reciprocity laws for all points and for all curves, which are analogues for an arithmetic surface of the reciprocity laws established by Parshin [18] for an algebraic surface.
Remark 5.6. Let F x,y be the finite direct sum of two-dimensional local fields attached to a flag x ∈ y; i.e. F x,y = Frac A p where A = O X,x , p = yO X,x , and y ⊂ O X,x also denotes the local equation for y at x; so F x,y = y ′ |y F x,y where y ′ varies over the finitely many height one primes of A over y, and F x,y ′ = Frac A y ′ .
By the local construction of the residue maps we see that ψ x,y is really the composition Ω K(X)/K −→ Ω K(X)/K ⊗ K(X) F x,y = y ′ |y Ω cts and each ψ s •Res F x,y ′ : F x,y ′ → S 1 is a continuous (with respect to the two-dimensional topology; see remark 2.9) character on the two-dimensional local field F x,y ′ . This character will induce self-duality of the topological group F x,y ′ , which in turn will induce various dualities on the (complete) adelic groups; for some results in this direction, see [3, §27, §28].
Remark 5.7. Taking S = Spec Z, it would be very satisfying to have an extension of the framework discussed in remark 4.10 to include archimedean points. The main existing problem is the lack at present of a good enough theory of adeles in arbitrary dimensions which include the points at infinity. The author is currently trying to develop such a theory and hopes that this will allow the dualities discussed in the previous remark to be stated more precisely and in greater generality (in all dimensions and including points at infinity).