{'fraction_non_alphanumeric': 0.07396291770958137, 'fraction_numerical': 0.017698905087842085, 'mean_word_length': 3.493842955381417, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 44, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Eisenstein series and quantum affine algebras

Let X be a smooth projectibe curve over a finite field. We consider the Hall algebra H whose basis is formed by isomorphism classes of coherent sheaves on X and whose typical structure constant is the number of subsheaves in a given sheaf belonging to a given isomorphism class and with given isomorphism class of quotient. We study this algebra in detail. It turns out that its structure is strikingly similar to that of quantum affine algebras in their loop realization of Drinfeld. In this analogy the set of simple roots of a semisimple Lie algebra g corresponds to the set of cusp forms on X, the entries of the Cartan matrix of g to the values of Rankin-Selberg L-functions associated to two cusp forms. For the simplest instances of both theories (the curve P^1, the Lie algebra g=sl_2) the analogy is in fact an identity.

(c,d)=1 y s/2 |cz + d| s , z = x + yi ∈ C, y > 0, s ∈ C. (1) It converges for Re(s) > 2 and analytically continues to a meromorphic function in s, which satisfies the functional equation where ζ * (s) = π −s/2 Γ(s/2)ζ(s) is the full zeta function of Spec(Z). This paper started from the observation that the simplest function field analog of (1), in which Z is replaced by the polynomial ring F q [x], is related to the quantum affine algebra U q ( sl 2 ). More precisely, the Eisenstein series in this case is naturally a function on Bun(P 1 ), the set of isomorphism classes of vector bundles on P 1 F q , and the space R of such functions has a natural algebra structure (Hall algebra, as modified by Ringel [R3]), given by the parabolic induction. The analog of E(z, s) is in fact the product E(t 1 )E(t 2 ) of two simpler elements of R, and the analog of (2) can be written as the commutation relation in R: where ζ P 1 (t) = 1/(1 − t)(1 − qt) is the zeta-function of P 1 F q . Relations like this are familiar in the theory of vertex operators [FLM] [FJ]. In particular, (3), being written in the polynomial form, turns out to be identical to one of the relations written by  for his "loop realization" of U q ( sl 2 ). So R is identified with the natural "pointwise uppertriangular" subalgebra U q ( n + ) ⊂ U q ( sl 2 ).
The main results of this paper (Theorems 3.3, 3.8.4 and 6.7) show that for an arbitrary smooth projective curve X over F q the structure of the algebra R formed by unramified automorphic forms and of its natural extensions, is strikingly similar to the structure of the quantum affine algebras U q ( g) for Kac-Moody algebras g and of their natural subalgebras. The role of the simple roots of g is played here by unramified cusp eigenforms, and the role of the Cartan matrix is played by the Rankin-Selberg convolution L-functions. Thus R is analogous to U q ( n + ) with functional equations of general Eisenstein series providing commutation relations among the generating functions.
These results can be viewed as "continual" analogs of results of Ringel [R1-3] and Lusztig [Lu 1-3] on realizing quantum Kac-Moody algebras by means of Hall algebras associated to the category of representations of a quiver, instead of the category of coherent sheaves on a curve. The two types of categories have very similar properties, in particular, they have homological dimension 1.
The Langlands conjectures bring cusp forms (i.e., simple roots of our generalized root system) in correspondence with irreducible representations of the geometric fundamental group of the curve X. This becomes therefore analogous to the well known McKay correspondence for finite subgroups in SL(2, C). These subgroups are in correspondence with affine Dynkin graphs of type A, D, E, and for a subgroup G the vertices of the corresponding graph correspond to irreducible representations of G. Including all coherent sheaves (and not just vector bundles) into the general framework of Hall algebras amounts to considering Hecke operators acting on unramified automorphic forms. It turns out that some natural generating functions for these Hecke operators are analogous to Drinfeld's generators for the pointwise-Cartan subalgebra U q (h[t]) ⊂ U q ( g).
One nice outcome of this analogy is that it finally provides some explanation of Drinfeld's construction, which since its publication 10 years ago, was reproduced and used many times, but without questioning its nature (i.e., asking why the formulas have exactly this form and not some other). From our point of view, each of these formulas has a clear conceptual meaning. Some of them express functional equations for Eisenstein series, others the fact that Eisenstein series are eigenfunctions of Hecke operators, still other express the commutativity of the unramified Hecke algebras and so on.
What seems more important, though, is the conclusion this analogy brings about the theory of automorphic forms. Namely, the algebra formed by all unramified automorphic forms (on all the GL n ) and by the Hecke operators, corresponds in our analogy, to just one half of U q ( g), namely the quantization of the subalgebra n + [t, t −1 ] ⊕ h [t]. It means that one should "double" the whole theory of automorphic forms by finding the automorphic analog of the missing subalgebra n − [t, t −1 ] ⊕ h[t −1 ]. In this paper we do this (in our unramified context) by applying Drinfeld's quantum double construction [CP] to the Hopf algebra structure given, essentially, by taking the constant terms of an automorphic form. Certainly, there should be a better and more conceptual definition of this double, and the author plans to address this in a future paper. However, the purely algebraic identification of the double given in Theorem 6.7, exhibits it as a self-contained quantum group-like structure involving all the automorphic L-functions at once, and one can begin to study its representation theory, which is of great interest because of the relation with L-functions. For instance, one can generalize Frenkel-Jing bosonization construction [FJ] to our automorphic case. This will be done elsewhere; here let us point out just one thing: the validity of the most non-trivial relation (6.7.5) for the bosonization operators is equivalent to the fact that the zeta-function ζ X (t) has only two "trivial" poles at t = 1, q −1 (and they produce the two summands in the RHS of (6.7.5)) and all the other L-functions associated with cusp forms have no poles.
There are two further contexts in which the described approach can be pursued. One is that of "geometric Langlands correspondence", in which we consider a curve X over the complex numbers rather than F q . Instead of functions on the discrete set Bun(X/F q ) one should consider here the cohomology of the moduli stack of all vector bundles (such stack-theoretic cohomology involves, for instance, the cohomology of classifying spaces of stabilizers of points, i.e., behaves like equivariant cohomology). Results of Grojnowski [Gro] on equivariant cohomology of the spaces of C-representations of quivers suggest that in our case we should get quantized double-affine algebras, as in [GKV].
Another direction concerns automorphic forms over number fields. The results of this paper make it clear that there should be a number-theoretic analog of the theory of quantum affine algebras in which curves over F q are replaced with spectra of the rings in number fields. For instance, the most immediate analog of U q ( sl 2 ) corresponds to (compactified) Spec(Z) instead of P 1 F q and is generated by values of operator fields E ± (s) (generating the analogs of U q ( n ± )) subject to relations like and similar other relations involving the Riemann zeta. The author hopes to be able to say more about these questions in the future.
Let us give a brief overview of the contents of the paper. In Section 1 we recall the general framework of Hall-Ringel algebras, including the recent result of Green [Gr] on the categorical description of the comultiplication in the case of homological dimension 1. In Green's formulation one gets, on the Ringel algebra, a structure of a bialgebra in a certain twisted sense (familiar from [Lu 1-2]). To get a bialgebra in the ordinary sense, we add the Cartan generators in the standard way. Our analysis is very similar to that of [X2].
Section 2 serves to fix the notation related to unramified automorphic forms on an algebraic curve X/F q (with respect to all the groups GL n ). The most important concept for us is that of the Rankin-Selberg convolution L-function associated to two cusp forms.
In Section 3 we formulate the main results about the Hopf algebra formed by the unramified automorphic forms on all the GL n together with all the Hecke operators. We introduce the appropriate generating functions and state the main result (Theorem 3.3) describing multiplication and comultiplication of these generating functions in a completely explicit way. We also prove (Theorem 3.8.4) that the coefficients of our generating functions generate the subalgebra formed by unramified automorphic forms.
Section 4 contains proofs of the results stated but left unproved in Section 3.
In Section 5 we compare the results of Section 3 with the structure of quantum affine algebras in the "new realization" of Drinfeld. We observe an analogy between two theories; we show also that in the simplest instances (curve P 1 , affine algebra sl 2 ) the analogy becomes the identity.
Finally in Section 6 we describe Drinfeld's quantum double of the Hopf algebra 3 constructed in Section 3. This seems to be a very important "semisimple" object naturally appear ing in the theory of automorphic forms. The main technical tool here is the use of Heisenberg doubles [AF] [ST] which are easier to handle. In particular, we get a very transparent formula for the multiplication in the Heisenberg double of the Ringel algebra in terms of long exact sequences. Then we find the relations in the Drinfeld double by using the recent work of Kashaev [Kas] who found an embedding of the Drinfeld double into the tensor product of two Heisenberg doubles.
I would like to thank A. Goncharov, G. Harder, Y. Soibelman and Y. Tschinkel for useful discussions. In particular, I owe to G. Harder a crucial suggestion for the proof of Theorem 3.8.4. This research was partially supported by an NSF grant and by A.P. Sloan Fellowship. The paper was written during my stay at Max-Planck-Institut für Mathematik in Bonn, whose hospitality and financial support are gratefully acknowledged. I am grateful to Mrs. M. Sarlette for typing the manuscript. §1. Hall algebras.
(1.1) The Euler form. We will say that an Abelian category A is of finite type, if for any objects A, B ∈ Ob(A) all the groups Ext i A (A, B) have finite cardinality and are zero for almost all i. If A is an abelian category of finite type, and A, B ∈ Ob(A), we denote For A ∈ A letĀ be the class of A in the Grothendieck group K 0 A. Clearly, the quantity A, B depends only onĀ andB and descends to a bilinear form (called the Euler form) still denoted by for a fixed object C, where g C AB is the number of subjects A ′ ⊂ C such that A ′ ≃ A and C/A ≃ B, or equivalently, the number of exact sequences taken modulo the (free) action of Aut(A) × Aut(B). This multiplication is well known to be associative, the coefficient at C in A 1 • . . . • A n being the number of filtrations of C with quotients A 1 , . . . , A n .
The modified multiplication is still associative. We will call the Ringel algebra of A and denote R(A) the same vector space as H(A) but with * as multiplication.
(1.2.3) Remark. It was C.M. Ringel [R3] who first drew attention to the twist (1.2.2). A little earlier and independently, G. Lusztig  considered several twistings by bilinear forms, withour specially distinguishing the Euler form (1.1.1). With a certain hindsight, precursors of (1.2.2) can be traced as far back as the relabelling of the principal series representations so as to make the intertwiners to act between representations whose weights differ exactly by permutation, see, e.g. [GN].
This point of view makes very natural the "orbifold" Hermitian scalar product on H(A) and R(A): (1.4) Green's comultiplication. Let A be an Abelian category of finite type, satisfying the following additional condition: every object of A has only finitely many subobjects. Let r : R(A) → R(A) ⊗ R(A) be the map, adjoint to the multiplication map m : R(A) ⊗ R(A) → R(A) with respect to the scalar product (1.3.2). It has the form or, in the functional language (1.3), for a function f : where Cone(ξ)[−1] is the middle term of the extension corresponding to ξ. For two objects A, B ∈ A set (1.4.3) (A|B) = A, B · B, A .
One easily verifies that the twisted multiplication on R(A) ⊗ R(A) given by is associative.

6
(1.5) Green's theorem. Suppose that A satisfies the conditions of (1.4), and, in addition, has homological dimension ≤ 1, i.e., Ext i A (A, B) = 0 for i ≥ 2 and all A, B. Then r : R(A) → R(A) ⊗ R(A) is an algebra homomorphism, if the multiplication on R(A) ⊗ R(A) is given by (1.4.4).
Note that because of the twist (1.4.4), the theorem does not mean that R(A) is a bialgebra in the ordinary sense; it can be interpreted, however, by saying that R(A) is a bialgebra in an appropriate braided monoidal category of K 0 A -graded vector spaces.
In [Gr], Green considered only the case when A consists of finite modules over an F q -algebra. The modification to the case of finite modules over any ring (of homological dimension 1) is trivial. The case of general A, as in (1.5), can be reduced to this by embedding finite pieces of A into the categories of modules over appropriate rings, as in Freyd's embedding theorem [Fr].
Sources of Green's result can be found in the works of Lusztig [Lu4] and Zelevinsky [Ze] and in more classical studies of the functors of parabolic induction and restriction in representation theory [BerZ], evaluation of constant terms of Eisenstein series [La3] and so on.
(1.6) Reformulation. As with A, B , the quantity (A|B) depends only onĀ,B ∈ K 0 A, giving rise to the form be the group algebra of K 0 A, with basis K α , α ∈ K 0 A and multiplication K α K β = K α+β . Let us extend the algebra R(A) by adding to it these symbols K α which we make commute with [A] ∈ R(A) by the rule Denote the resulting algebra B(A). So as a vector space B The next statement was obtained by Xiao [X2].
(1.6.3) Green's theorem (strengthened form). In the assumptions of (1.5), the map ∆ : makes B(A) into a bialgebra in the ordinary sense, i.e., ∆ is a homomorphism of algebras with respect to the standard (untwisted) multiplication in B(A) ⊗ B(A). Moreover, B(A) is a Hopf algebra with respect to the counit ǫ : B(A) → C given by and antipode S : B(A) → B(A) given by Proof. The fact that ∆ is a homomorphism of algebras, follows at once from Theorem 1.5 and from (1.6.2). To prove that ǫ is a counit, we must show that it is an algebra homomorphism and that the compositions are the identity maps. Both these statements are obvious from the nature of multiplication in H(A), R(A) and B(A). To prove that S is an antipode, we must show that the compositions is the embedding of the unit, and m is the multiplication in B(A). Let us show this for the first composition, the second one being similar. From (1.6.4) and (1.6.6), we find that where the first sum is over all subobjects A ′ ⊂ A. We can combine the first and third summations together and write the above quantity as where A 0 ⊂ . . . ⊂ A m = A runs over all chains of subobjects of length m, in which all the inclusions, except, maybe, A m−1 ⊂ A m , are strict. Therefore Now notice that for A = 0 each summand in this sum will appear twice: once for a strictly increasing filtration A 0 ⊂ . . . A m and once for the filtration A 0 ⊂ . . . ⊂ A m = A m−1 . These summands will enter with opposite signs and so will cancel each other, and the whole sum will be equal to 0 = i(ǫ(K α [A])). If A = 0, we get the sum of the empty set of summands, which is equal to 1 = i(ǫ(K α )). Theorem is proved.
(1.7) The bilinear form on B(A). Let us extend the Hermitian form (1.3.2-3) on the Ringel algebra R(A) to B(A) by putting In other words, we introduce the form on B(A) = C[K 0 A]⊗ C R(A) to be the tensor product of the old form on R(A) and the form on C[K 0 A] given by (K α , K β ) = (α|β).
(1.7.2) Proposition. With respect to the form ( , ) the multiplication and comultiplication in the Hopf algebra B(A) are adjoint to each other.
Proof. In other words, we need to prove the equality where on the right stands the Hermitian bilinear form on B(A) ⊗ B(A) given by tensoring ( , ) with itself. To prove (1.7.3), notice that the left hand side is while the right hand side of (1.7.3) is Notice now that in order that (A, C ′ ) = 0, we should have A ≃ C ′ , and under this assumption the corresponding summands in (1.7.4) and (1.7.5) coincide. Proposition is proved.
9 §2 Background material related to automorphic forms.
(2.1) Notations and conventions. Let X be a smooth projective algebraic curve over a finite field F q . In this paper we will be interested in the Hall algebra of A = Coh X , the category of all coherent sheaves on X. Let us start by introducing some notations and conventions, to be used throughout the rest of the paper. By g X we denote the genus of X. By a point of X we always mean a 0dimensional point x (notation: x ∈ X). For such a point x we denote by q x the cardinality of F q (x), the residue field of x, and by deg( Thus q x = q deg x . By Pic(X) we denote the Picard group of line bundles on X (defined over F q ). For L ∈ Pic(X) we denote by deg(L) ∈ Z the degree (first Chern class) of L. Thus for x ∈ X we have deg(x) = deg(O X (x)). For a vector bundle V on X of rank n we set deg(V ) = deg(Λ n V ). The kernel of the degree homomorphism Pic(X) → Z is denoted Pic 0 (X). It is a finite Abelian group.
As usual, we identify Pic(X) with the group of divisors modulo linear equivalence, by associating to a divisor D = n x · x the line bundle O(D). Thus deg D = deg(O(D)).
(2.2) The adelic language. Automorphic forms. Let Bun n (X) be the set of isomorphism classes of rank n vector bundles on X and Bun n,d (X) ⊂ Bun n (X) the set of isomorphism classes of bundles of degree d.
Let k = F q (X) be the field of rational functions on X, A its ring of adeles and O ⊂ A the ring of integer adeles. Then Let AF n (resp. AF n,d ) be the space of all complex valued functions on Bun n (X) (resp. Bun n,d (X)). By (2.2.1) we can regard such functions as GL n O -invariant automorphic forms on GL n A. A function f ∈ AF n is called a cusp form if for any vector bundles V ′ ∈ Bun n ′ (X), V ′′ ∈ Bun n ′′ (X), n ′ + n ′′ = n, n ′ , n ′′ > 0, we have where we view f , by (2.2.1), as a function on GL n A and U ⊂ GL n A is the unipotent radical of a minimal parabolic subgroup. Let AF cusp n ⊂ AF n , AF cusp n,d ⊂ AF n,d be the subspaces formed by cusp forms. The following fact is a well known consequence of the reduction theory of Harder [Ha2] [MW].
(2.2.4) Proposition. Every function from AF cusp n,d has finite support. The space AF cusp n,d is finite-dimensional.
(2.3) Hecke operators. Let Coh 0,X be the category of coherent sheaves on X with 0-dimensional support. By Coh ≤n 0 (X) we denote the set of isomorphism classes of such sheaves F which satisfy the additional property dim(F ⊗ O x ) ≤ n for all x ∈ X. We have an identification For F ∈ Coh 0,X and n > 0 we define the operator T F : AF n → AF n by where the sum is over coherent subsheaves V ′ in V ∈ Bun n (X) with quotient isomorphic to F . (Since V ′ is locally free, f (V ′ ) is defined.) Clearly, T F = 0 on AF n unless F ∈ Coh ≤n 0 (X). If F ∈ Coh ≤n 0 (X), one can describe T F in the adelic language as the operator taking a function f : GL n k \ GL n A/GL n O → C into T F f given by where 1 F is the characteristic function of the double coset corresponding to F by (2.3.1). For this reason, T F is called the Hecke operator. (dual to its right action on H(Coh X )) is given by the formula identical to (2.3.2), but in which V, V ′ are arbitrary sheaves. If we view AF n as a subspace in C[M] (consisting of functions vanishing outside Bun n (X)), then it is preserved by this action, so is an H(Coh 0,X ) -module as claimed.
To see that AF cusp n ⊂ AF n is a submodule, note that in the adelic language the condition for f ∈ AF n to the cuspidal involves left shifts of f , while the Hecke operators involve right shifts.
Let Coh x,X be the category of coherent sheaves on X supported at x (so each such sheaf has the form The following facts are well known. (2.3.5) Proposition. (a) For F , G ∈ Coh 0,X we have F , G = 1, so the multiplications •, * in H(Coh 0,X ) and R(Coh 0,X ) coincide. (b) H(Coh 0,X ) = x∈X H(Coh x,X ) (the restricted tensor product in which almost all factors in any decomposable tensor are required to be 1). (c) Each H(Coh 0,X ) is a commutative polynomial algebra in either of the following two sets of generators: . . , z n ] S n be the ring of symmetric functions, and define an isomorphism where e n is the elementary symmetric function. Then for any integer sequence µ = Proof. Part (a) is easily obtained by reduction by devissage to the case F = O x , G = O y . Part (b) is obvious, while (c) and (d) can be found in Macdonald [Mac].
(2.4) Cusp eigenforms. The sets Cusp n . Let Pic(X) be the group of all homomorphisms (characters) µ : Pic(X) → C * . There is an embedding (2.4.1) C * ֒→ Pic(X), t → t deg : L → t deg L whose cokernel is a finite group of characters of Pic 0 (X). Let us choose representatives µ 1 , . . . , µ h , one in each coset by the image of (2.4.1), which are unitary, i.e., |µ i (L)| = 1 for any L ∈ Pic(X). For any character µ : Pic(X) → C * we denote by AF n (µ) the space of functions (automorphic forms) f : Bun n (X) → C satisfying the property Let AF cusp n (µ) ⊂ AF n (µ) be the subspace formed by cusp forms. By (2.2.4) dim AF cusp n (µ) < ∞. The Hecke operators T F , F ∈ Coh 0 (X), preserve AF n (µ) and AF cusp n (µ). For any algebra homomorphism χ : H(Coh 0,X ) → C denote by AF cusp n (µ) χ the corresponding eigenspace, i.e., the space of f ∈ AF cusp n (µ) such that By the multiplicity one theorem for GL n , see [Sh], the space AF cusp n (µ) χ has dimension at most 1. Let X n (µ) be the set of χ such that dim AF cusp n (µ) χ = 1. If χ ∈ X n (µ), then for any x ∈ X we have (2.4.4) Choose a non-zero vector f χ in each summand in (2.4.5) (in virtue of (2.4.4), µ is determined by χ so it can be dropped from the notation). Let Cusp n be the set . . , µ h } are our unitary representatives (see above). Let also Cusp = n≥1 Cusp n .
(2.5) Rankin L-functions. For f = f χ ∈ Cusp n and x ∈ X introduce the numbers λ i,x (f ), i = 1, . . . , n defined up to permutation by the condition where e l is the elementary symmetric function. By (2.3.5) (d) we have, for any µ = (µ 1 ≥ . . . ≥ µ r ≥ 0): The L-function of f is defined by the product Our normalization of the λ i,x (f ) is chosen so as to make L(f, t) satisfy the functional equation exchanging t and 1/qt rather than t and 1/q n t, as is sometimes done in the theory of automorphic forms.
We will be interested, however, in a more general class of L-functions, which we call Rankin L-functions. Given two cusp eigenforms f ∈ Cusp n , g ∈ Cusp m , their Rankin L-function LHom(f, g, t) is defined by the product The notation LHom is explained as follows. The Langlands correspondence predicts that to any f ∈ Cusp n one can associate a local system L f on X. The function LHom(f, g, t) is the automorphic counterpart of the L-function of the local system Hom(L f , L g ).
The following result can be found in [JPS] (see [Bu] for a general survey of the Rankin-Selberg method).

13
(2.5.5) Theorem. The product (2.5.4) converges for |t| < q −1 and defines a rational function in t, still denoted LHom(f, g, t). If f = g, then LHom(f, g, t) is a polynomial of degree mn(2g X − 2). If f = g, then where P f,g is a polynomial of degree (2g X − 2)mn + 2. In any event, LHom(f, g, t) satisfies the functional equation for any rational differential form ω on X (this product is independent of ω, see [De]).
(2.6) Scalar products and dual Hecke operators. For two automorphic forms f, g ∈ AF n,d , of which at least one has finite support, put Thus (f, g) d is the degree d part of the orbifold scalar product (1.3.2). If f, g are automorphic forms defined on all Bun n (X), not just Bun n,d (X), we denote by (f, g) d the scalar product of their restrictions to Bun n,d (X). We also write (2.6.2) Note that cusp forms have finite support on each Bun n,d (X) by (2.2.4), so their scalar products are defined. We will be interested in the adjoints of the Hecke operators with respect to these scalar products. To describe them, we introduce the concept of an overbundle.
Let V be a vector bundle on X. By an overbundle of V we mean a vector bundle U of the same rank as V containing V as a coherent subsheaf. So the sheaf U/V lies in Coh 0,X . Its isomorphism class is called the cotype of the overbundle, and the isomorphism class of U is called its type. Two overbundles U, U ′ ⊃ V are called equivalent, if there is an isomorphism U → U ′ identical on V .
(2.6.3) Proposition. The number of equivalence classes of overbundles of V of type U and cotype F is equal to where the first sum is over equivalence classes of overbundles of V of cotype F , and the second sum is over all isomorphism classes of bundles. It is clear that (2.6.5) Proposition. For each d ∈ Z the operators Proof. This follows at once from Proposition 2.6.3 and the definition of the orbifold scalar product.
Let now f be a cusp eigenform, f ∈ Cusp n , and let χ f : H(Coh 0,X ) → C be the algebra homomorphism describing the action of Hecke operators on f : (2.6.8) Proposition. In the above assumptions the action of the dual Hecke operators on f is given by x ∈ X, be the sheaf whose sections are sections of V which are allowed a first order pole at x. Then each equivalence class of overbundles of V of x . This means that 15 (2.6.9) O n x and our statement follows from the definitions.
Note that it follows from (2.6.7) and (2.5.2) that (2.6.11) Proposition. Let f, g ∈ Cusp n . Then: for a line bundle L, and µ is a unitary character. Thus we conclude that for any F with h 0 (F ) divisible by n we indeed have the desired equality . However, any two characters of the Hall algebra coinciding an [F ] with h 0 (F ) ≡ 0(mod n) should be equal.
(b) Apply (a) and (2.6.12) with h now being arbitrary.
(c) If f = g then by the multiplicity one theorem for GL n , see [Sh], there is x ∈ X such that the set of the λ i,x (f ) (with multiplicities) is not equal to the set of the λ i,x (g). It follows that we can find F ∈ Coh 0,x (X) such that χ f ([F ]) = χ g ([F ]) and, in addition, h 0 (F ) ≡ 0(mod n). Thus (2.6.13) Remark. Part (a) of the above proposition means that for each x ∈ X the value of any symmetric function on λ 1,x (f ) −1 , . . . , λ n,x (f ) −1 is equal to its value on λ 1,x (f ), . . . , λ n,x (f ), in other words, that the set of the λ i,x (f ) −1 is equal to the set of the λ i,x (f ). This is not to be confused with the generalized Ramanujan-Petersson conjecture [FK] which, in our normalization, asserts that (2.6.14) Normalization convention. Recall (2.4.5) that the set Cusp n was obtained by choosing a nonzero vector f χ in each 1-dimensional vector space AF cusp n (µ) χ . By Proposition 2.6.11 (b) we can choose f χ so that f χ 2 d = 1 for any d. So in the sequel we will always assume that f 2 d = 1 for any f ∈ Cusp n , d ∈ Z.
(2.7) Dualization of bundles and conjugation of forms.
(2.7.1) Proposition. For any F ∈ Coh 0,X equivalence classes of overbundles of V of cotype F are in bijection with (locally free) subsheaves in the dual bundle V * , of the same cotype F .
Proof. Let an overbundle U be given. From the short exact sequence we get a long exact sequence for Ext • (−, O X ), a part of which has the form Since X is a curve and F ∈ Coh 0,X , the sheaf Ext 1 (F , O X ) is (non-canonically) isomorphic to F . So U * is a subsheaf in V * of the same cotype F . By applying th dualization twice, we find that our correspondence is a bijection.
(2.7.2) Corollary. If V, W ∈ Bun n (X) and F ∈ Coh 0,X , then For an automorphic form (2.7.3) Proposition. For any F ∈ Coh 0,X and f ∈ AF n we have Proof. This is an immediate consequence of (2.7.1) Proof. From (2.7.3), both f D andf are eigenforms of the Hecke algebra with the same character χ ∨ f =χ f . So by the multiplicity one theorem f D = ǫf for some constant ǫ = 0. Since the dualization and conjugation are involutive, ǫ 2 = 1. §3. The Hopf algebra of automorphic forms.
(3.1) The setup. We keep the notation of (2.1), and are going to apply the general formalism of Section 1 to the Abelian category A = Coh X . We denote H = H(A), R = R(A) and B = B(A) its Hall, Ringel and extended Ringel algebra (see Section 1). The where we view Pic(X) as the quotient of the group of divisors modulo principal divisors.
We denote the generator Note that eachŌ x lies in the kernel of the bilinear form (α|β) on K 0 (X). Thus each c x , c L is a central element in B. We have there fore a character of Pic(X) with values in the multiplicative group of B. As for the generator K, for any vector bundle V on X we have, by Riemann-Roch theorem Any coherent sheaf F on X can be written as a direct sum F = F tors ⊕ F lf , where F lf is locally free and F tors is a torsion sheaf (i.e., has 0-dimensional support). The isomorphism classes of F tors , F lf depend on F only. If F lf = 0, there are infinitely many subsheaves in F , so the formula (1.6.3) for the comultiplicaton in B produces an infinite sum, i.e., an element of a certain completion of B ⊗ B. More precisely, let B ⊗B be the space of possibly infinite sums satisfying the following condition: (3.1.4) For each d ∈ Z the number of i such that deg F ′ i,lf = d, is finite, and for d ≫ 0 this number is 0.
The following fact is easily proved by applying the main lemma of Green [Gr] plus the fact that the number of coherent subsheaves of given degree in a vector bundle is finite.
(3.1.5) Proposition. B ⊗B is an algebra, and ∆ : B → B ⊗B given by (1.6.3), is a homomorphism of algebras.
So we shall say that B is a topological Hopf algebra.
(3.2) Generating functions associated to cusp forms. Let f ∈ Cusp n be a cusp eigenform on Bun n (X), and χ = χ f : H(Coh 0,X ) → C be the algebra homomorphism giving the action of Hecke operators on f : Consider the following formal power series with coefficients in the Ringel algebra R: the sum over all isomorphism classes of rank n vector bundles on X. Note that the coefficients at each power of t in E f (t) is a finite sum by (2.2.4). More generally, for any quasi-character µ : Pic(X) → B * taking values in the multiplicative group of the center of B we can form the series The notation becomes unambigious once we agree to identify t itself with the quasicharacter L → t deg L of Pic(X). If µ takes values in C * ⊂ B * , then µ(L) = µ i (L)λ deg L for some λ ∈ C * and µ i ∈ {µ 1 , . . . , µ h }, our set of unitary representatives (2.4), so E f (µt) = E f ′ (λt) for some f ′ ∈ Cusp n and we don't get anything new. However, taking µ = c, the character defined by (3.1.2), we get new elements, to be used later in the formulas for comultiplication. Let also where the sum is over isomorphism classes of all sheaves with 0-dimensional support and h 0 (F ) = dim H 0 (X, F ). Thus ψ f is a generating function for Hecke operators. If W is any rank n vector bundle such that f (W ) = 0, we have, by (2.7.4): where the sum is over all subsheaves in W of full rank n, i.e., over "effective matrix divisors". As with E f (t), we will use the series Also, the use of generating functions is well-suited to the study of the topological Hopf algebra B ⊃ R. More precisely, we have the following theorem which is the main result of this section.
( 3.3) Theorem. Let f ∈ Cusp n , g ∈ Cusp m be the two cusp eigenforms. Then: (a) For each F ∈ Coh(X) the coefficient at the basis vector [F ] ∈ R in each of the products is a power series in t 1 , t 2 which converges for |t 1 | ≫ |t 2 | to a rational function.
(b) These rational functons satisfy the following relations: (c) In the topological Hopf algebra B ⊃ R we have the identities: In this section we will prove only the equality (3.3.1), relegating the rest to Section 4.
(3.4) Eisenstein series. Proof of (3.3.1). Let f ∈ Cusp n , g ∈ Cusp m . Let us write, for the product in the Hall algebra where V ′ runs over all subbundles (i.e., subsheaves which are locally direct summands) in V of rank n. This is nothing but the unramified Eisenstein series associated to cusp forms f, g, see [Ha1] [Mor] [MW]. We recall the following result.
The poles of the rational function E V (f, g, t 1 , t 2 ) are precisely the poles of the function LHom(f, g, qt 2 /t 1 ) LHom(f, g, t 2 /t 1 ) and the orders of poles are the same.
(b) Let us briefly recall the general framework of functional equations of Eisenstein series [MW] and show what it yields in our particular case. For a space S let Fun(S) denote the space of locally constant functions on S (we ignore the growth conditions in this formal reminder). Let Ξ n,m ⊂ GL n+m A be the subgroup The Eisenstein series construction defines a map GL m (when converges). In general, Eis n,m is defined by analytic continuation over auxiliary parameters. The functional equation, formally, has the form is defined by where dZ = dz ij and A/k dz ij = 1. Our case is obtained from here as follows.
. Then for f ∈ Cusp n , g ∈ Cusp m we have This can be established by using the fact that the representation of GL n A corresponding to f is, at every x ∈ X, a principal series representation, and same for g. Thus the operator M which has the form x∈X M x can be calculated by splitting each M x into mn 1-dimensional intertwiners, each evaluated by integration over k x . Each such intertwiner contributes a factor which, being all multiplied, give precisely (3.4.4), once we recall, that O dz = q 1−g X if the Haar measure dz on A is normalized by A/k dz = 1.
(c) This follows from (3.4.4) and the general fact about Eisenstein series of relative rank 1( [MW], § IV.3.10, Remark) which says that the singularities of Eisenstein series are in this case precisely the singularities of the intertwiner M .
Proposition 3.4.3 is proved. Now, part (a) of (3.4.3) can be written as an equality in the Hall algebra of the category Coh(X) : By using the definition of the Ringel product * and the Riemann-Roch theorem, we find whence the validity of (3.3.1).
We now proceed to find some algebraic relations among them by using the relations (3.3.1-2) for generating functions.
For two different cusp forms f ∈ Cusp n , g ∈ Cusp m let be the homogeneization of their Rankin L-function, and be the homogeneization of the numerator of LHom(f, f, t). The relations (3.3.1) can be written in the polynomial form: where the equality is understood in the same sense as in Theorem 3.3: as the equality of rational functions constituting the coefficients of the LHS and the RHS at any given [V ], V ∈ Bun n+m (X).
(3.5.6) Theorem. (a) For each i, j ∈ Z comparing the coefficients at t i 1 t j 2 in both sides of (3.5.4) or (3.5.5) gives a valid relation among the elements then we have an equality in B: Proof. (a) Consider, say, the equality (3.5.4), and let some V ∈ Bun n+m (X) be fixed. The coefficients at V of the two sides of (3.5.4) are power series in t 1 , t 2 converging to the same rational function, denote it ϕ V (t 1 , t 2 ), but in different regions: |t 1 | ≫ |t 2 | for the left hand side and |t 1 | ≪ |t 2 | for the right hand side. So the R ≫ r, while the coefficient at t i 1 t j 2 in the right hand side is similar integral, but taken over the torus |t 1 | = r, |t 2 | = R. However, Proposition 3.4.3 (c) shows that ϕ V (t 1 , t 2 ) has no singularities and thus is a Laurent polynomial in t 1 , t 2 . So the two integrals coincide, and comparing coefficients indeed gives a valid relation.
Moreover, the series a g (t 2 ) going only in one direction, the coefficients at each [V ] in both sides of (3.5.9) are Laurent polynomials in t 1 , t 2 , so we can proceed to comparing coefficients at each t i 1 t j 2 . This is done by applying the formula log (1 − z) = − d≥1 z d /d to (3.5.9) and (3.5.7) and yields the claimed answer (3.5.8).
(3.6) The Hermitian form on B(Coh X ). We now proceed to describe the values of the Hermitian form (1.7.1) on our generating functions ). This will automatically give us scalar products of any products of the generating functions because of the identities expressing the fact that the multiplication and the comultiplication in B(Coh X ) are conjugate to each other. In the following we will make use of the formal power series representing (in the sense of distribution theory) the Dirac δ-function at z = 1.
(3.6.3) Proposition. The scalar products of the generating functions E f (t), a f (t) ∈ B(Coh X ) are given by The proof will be given in § 4.
(3.7) More general scalar products. A general element of the subalgebra in R(Coh X ) generated by the coefficients E f,d , has the form where f = (f 1 , . . . , f r ), f i ∈ Cusp, is a sequence of cusp forms, and ϕ is a Laurent polynomial. In the standard terminology of the theory of automorphic forms, such elements are called theta-series [Go] or pseudo-Eisenstein series [MW]. The wellknown formula [La3] [MW] for the scalar product of two pseudo-Eisensetin seris can be easily deduced from Theorem 3.3, Proposition 3.6.5 and general properties of Hopf algebras. Let us recall this formula in our notation. LetB(Bun X ) be the quotient algebra of B(Coh X ), obtained by putting each [F ], where F is not a vector bundle, to be equal to 0, and each c L to be equal to 1, and let For any Hopf algebra A with comultiplication ∆ we denote ∆ (r) : A → A ⊗r the (r − 1) fold iteration of ∆, i.e., ∆ (2) = ∆ and ∆ (r+1) = Id A ⊗(r−1) ⊗ ∆. If a scalar product ( , ) on A satisfies the identity (3.6.1), then by iterating these identities we find, in particular, that For a sequence f = (f 1 , . . . , f r ), f i ∈ Cusp n i of cusp forms and a permutation σ ∈ S r let so that the functional equation for Eisenstein series yields The classical formula of Langlands for the constant term of a (pseudo) Eisenstein series has, in our notation, the form This formula follows at once from (3.3.2) and (3.3.4). By using (3.6.7) and (3.7.3), we deduce that for g = (g 1 , . . . , g r ′ ), g j ∈ Cusp m j , we have Then by integrating (3.7.7) against a Laurent polynomial ψ(t ′ 1 . . . t ′ r ) we find satifying (3.3.1) and (3.4.2). The problem of explicit determination of the ideal Ker(π B ) seems very interesting. Basically, elements of Ker(π B ) are some subtle relations between residues of Eisenstein series. As we will see in § 5, these elements should be thought of analogs of Serre relations in quantum affine algebras which makes it plausible that one can give a completely explicit description of the generators of the ideal. Here we will use an approach similar to one used by G. Lusztig [Lu1] for ordinary quantum groups.
Denote byR (resp.,R Bun ,R 0 ) the subalgebra inB generated only by theẼ f,d andã f,d (resp. only byẼ f,d , only byã f,d ) and by R (resp. R Bun , R 0 ) the image of R (resp.R Bun ,R 0 ) under π B .
Note that formulas (3.3.4-6) (modified by putting tildes over generating functions) makeB into a topological Hopf algebra, and π B into a Hopf homomorphism. Note also that formulas (3.6.6-10) define a Hermitian scalar product onB, with respect to which the multiplication and comultiplication are conjugate, i.e., (3.6.1) holds. Let N ⊂B be the kernel of this scalar product. Since (π B (x), π B (y)) = (x, y) for any x, y ∈B, we have Ker(π B ) ⊂ N .
Proof. This follows from the fact that the form ( , ) on R ⊂ R(Coh X ), being the restriction of a positive definite Hermitian form, is itself positive definite and hence non-degenerate. Thus (Ker π B ) ∩R = N ∩R, and we should only use the fact that bothB and B have the formB This proposition shows that the algebra B can be defined entirely in terms of the L-function data made explicit in Theorem 3.3 and Proposition 3.6.5. We want to finish this section by discussing the relationship between B, the "free" algebraB and the bigger algebra B(Coh X ) a little bit more closely.
Let R(Bun X ) ⊂ R(Coh X ) be the subalgebra generated by elements [V ] where V is a vector bundle. By restricting π B to the two subalgebras below and composing it with natural embeddings, we get homomorphisms π 0 :R 0 → R(Coh 0,X ), π Bun :R Bun → R(Bun X ).
In other words, any element [V ], V ∈ Bun n (X) can be expressed as a polynomial in the E f,d , i.e., in the form (3.7.1). This statement is similar to the spectral decomposition theorem [MW] but is different since here we consider the coefficients of the Laurent expansion of the rational functions E f 1 (t 1 )...E f r (t r ) in the domain of convergence of the series defining these functions (and these coefficients are automorphic forms with finite support on each Bun n,d (X)), while spectral decomposition theorem deals, in our notation, with the coefficients of Laurent expansions of the same functions but on the unit torus |t i | = 1 (and these coefficients are, in general, only square-integrable).
We will prove (3.8.4) a little later. As for the homomorphism π 0 , we would like to state the following conjecture.
Note that since F , G = 1 for any F , G ∈ Coh 0,X , the formula (1.4.1) makes R(Coh 0,X ) = H(Coh 0,X ) into a Hopf algebra (with comultiplication denoted by r). This is just the tensor product over all x ∈ X of the Hopf algebras studied by Zelevinsky [Ze]. With respect to r every ψ f (t) is group-like: , and the same is true for each a f,d . Now, primitive elements in a commutative and cocommutative Hopf C -algebra are algebraically dependent if and only if they are linearly dependent. By using (3.6.6), we get the following reformulation of the conjecture. Let Cusp ≤N = i≤N Cusp i .
(3.8.6) Reformulation. Let N be fixed, and ǫ be small enough. Consider the self-adjoint matrix integral operator on the circle |t| = ǫ whose matrix indices run over the set Cusp ≤N and whose kernel is given by , f ∈ Cusp n , g ∈ Cusp m , m, n ≤ N Then this operator is strictly positive definite.
This conjectural property can be regarded as a certain strengthening of the multiplicity one theorem for GL n .
(3.9) Proof of Theorem 3.8.4. We will proceed in three steps.
Step 1: Use of the reduction theory. We recall some basic facts about stable vector bundles, see [HN], [Stu] for more details. For any vector bundle V on X let µ(V ) = deg(V )/rk(V ) denote its "slope". A bundle V is called semistable, if for any subbundle V ′ ⊂ V we have µ(V ′ ) ≤ µ(V /V ′ ). An arbitrary bundle V possesses a canonical Harder-Narasimhan filtration with the properties that for each i the quotient gr i (V ) = V i /V i−1 is semistable and µ(gr i (V )) > µ(gr i+1 (V )). Thus V is semistable if and only if its Harder-Narasimhan filtration consists of only one layer.
Let λ ∈ Z be a positive integer. Let us say that a vector bundle V is λ-unstable, if it is not semistable and for at least one i we have µ(gr i (V )) + λ < µ(gr i−1 (V )). Denote by Bun >λ n,d the set of isomorphism classes of λ-unstable bundles on X of rank n and degree d, and by Bun ≤λ n,d = Bun n,d (X) − Bun >λ n,d its complement.
(3.9.1) Lemma. (a) For each λ > 0 the set Bun ≤λ n,d is finite. (b) For fixed n, d we can find λ > 0 such that whenever V ∈ Bun >λ n,d and i is such that µ(gr i (V )) + λ < µ(gr i−1 (V )), then in the Hall algebra we have the equality Proof of (3.9.1). (a) This is an easy consequence of the reduction theory, see, e.g., [Stu].
(b) If E is any vector bundle on X, then there is δ ∈ Z such that for any line bundle on X of degree ≥ δ we have H 1 (X, E ⊗L) = 0, H 0 (X, (E ⊗L) * ) = 0 (Serre's theorem). Moreover, if we have an algebraic family of bundles parametrized by a scheme S of finite type, we can find δ good for all the bundles in the family.
We apply this to the "universal" situation. Let Bun n,d (X) be the moduli space of semistable vector bundles over X of rank n and degree d. It is a projective algebraic variety defined over F q . Tensoring with a line bundle of degree 1 defines an isomorphism Bun n,d (X) → Bun n,n+d (X). We conclude therefore the following: (3.9.2) Lemma. For each m 1 , m 2 there exists a number δ m 1 ,m 2 > 0 with the following property: If W i , i = 1, 2, is a semistable bundle on X of rank m i and µ(W 1 ) + δ m 1 ,m 2 < µ(W 2 ), then Ext 1 X (W 2 , W 1 ) = Hom X (W 1 , W 2 ) = 0.
To return to the proof of (3.9.1), take λ greater than all the δ m 1 ,m 2 , m i ≤ n. If V satisfies the condition of (3.9.1), then by (3.9.2) we have Ext 1 (gr j (V ), gr k (V )) = Hom(gr k (V ), gr j (V )) = 0, j > i, k ≤ i from which we deduce that The vanishing of Ext 1 means that V ≃ V i ⊕ (V /V i ) and the vanishing of Hom means that there exists a unique subbundle in V i ⊕ (V /V i ) of type V i and cotype V /V i . Using the vanishing of Ext 1 one more time, we find that [ . Lemma (3.9.1) is proved.
Step 2: Representation of a function as an infinite sum of Eisenstein coefficients. Let R(Bun n,X ) be the subspace in R(Coh X ) spanned by basis vectors [V ] where V is a rank n vector bundle. We are going to use the formula for the scalar product of two Eisenstein series in order to represent an element h ∈ R(Bun n,X ) as a possibly infinite linear combination of coefficients of Eisenstein series.
Fix n > 0, fix some real numbers a 1 ≫ . . . ≫ a n > 0 (enough to take a i > qa i+1 ) and a total order ≤ on the set Cusp (3.9.3) Lemma. If h ∈ R(Bun n,X ) is orthogonal to each element E f (t), f = (f 1 , . . . , f r ) ∈ Cusp n , |t i | = a i , then h = 0.
Proof. The assumptions imply that (E f (t), h) = 0 identically as a rational function in t 1 . . . t r . Thus from the functional equations (3.7.5) we find that for any permutation σ ∈ S r and |t i | = a i the product E f σ(1) (t 1 ) . . . E f σ(r) (t r ) is orthogonal to h as well. This means that h is orthogonal to all pseudo-Eisenstein series and thus h = 0 by [MW], Th. II.11.2. Now, given h ∈ R(Bun n,X ), we can try to find an element h ′ = f ∈Cusp n E(f , ϕ f ) such that (E f (t), h − h ′ ) = 0 for any f ∈ Cusp n . For a given f we denote by S(f ) ⊂ S r the subgroup of permutations σ such that f σ(i) = f i , ∀i, and will look for ϕ f invariant under S(f ). By (3.7.9) the condition for ( . The function ϕ f (t) is indeed invariant under S(f ), but it is only a rational function, not a Laurent polynomial, because of the zeros of the denominator in Φ f (t). So in order to get a representation of h ′ as a sum of coefficients of Eisenstein series, we should first expand Φ f .
Fix f = (f 1 ≤ ... ≤ f r ) and consider the coordinate vector space R r with the standard basis e 1 , ..., e r . Let Γ f ⊂ R r be the convex cone with apex 0 generated by the vectors e j − e i for i < j such that f i = f j . For a Laurent series ω∈Z r a ω t ω in r variables we call the set of ω such that a ω = 0 the support of the series.
(3.9.6) Lemma. The function Φ f (t) can be expanded into a Laurent series whose support is contained in some translation of the cone Γ f .
Proof. First, the numerator (E f (t), h) is a finite linear combination of (E f (t), [V ]), V ∈ Bun n (X), i.e., of Eisenstein series E V (f 1 , ..., f r , t 1 , ..., t r ). The poles of any such series come from the poles of (3.9.7) M f σ (t) = i<j: σ(i)>σ(j) Each factor here is a series in non-negative powers of t j /t i , starting with 1. So each M f σ (t) has support in a translation of Γ f . Now, for the denominator M f σ (t) we have, by the same reason, an expansion ω∈Γ f ∩Z r c ω t ω with c 0 = 0. Thus its inverse admits the geometric series expansion which is a series supported in Γ f . Lemma 3.9.6 is proved.
Thus we can write h ′ as an infinite series (3.9.9) Lemma. For any λ > 0 all but finitely many terms of the series (3.9.8), regarded as functions on Bun n (X), vanish outside Bun ≤λ n,d . This implies, in particular, that the series converges, as a series of functions on Bun n (X).

Proof. It is enough to conisder one f at a time. In order that
then V must have a destabilizing flag with at least one gap in the slopes greater than λ, which implies that in the Harder-Narasimhan filtration at least one gap in the slopes will be greater than λ, i.e., that V ∈ Bun >λ n,d . It remains to notice that if f i = f j then, of course n i = n j so for all but finitely many integer points lying in a translation of Γ f , the condition (3.9.10) will be satisfied for some i. Lemma 3.9.10 is proved.
So h ′ is a well defined function on Bun n (X) and the scalar product (E f (t), h ′ ) is indeed defined for any f ∈ Cusp n by (3.7.9) and is equal to (E f (t), h) by construction. So we get the following fact.
(3.9.11) Lemma. The series in the right hand side of (3.9.8) converges to h.
Step 3: Completion of the proof. Fix n and assume, by induction, that any h ∈ R(Bun m,X ) with m < n lies in the image of π Bun . Fix d ∈ Z and a big enough λ ∈ Z. By Step 1, all [V ] with V ∈ Bun >λ n,d lie in Im(π Bun ). So we h to be equal to [V ], V ∈ Bun ≤λ n,d . By Lemmas 3.9.9 and 3.9.11, we can, by truncating the series (3.9.8), find a finite linear combination h ′′ of elements from Im(π Bun ) which coincides with h on Bun ≤λ n,d . But then h − h ′′ lies in Im(π Bun ) by Step 1. This proves the theorem. §4. Proof of Theorem 3.3 and Proposition 3.6.3.
Recall that the equality (3.3.1) has already been proved. So we first prove the rest of the assertions of Theorem 3.3.
(4.1) Proof of (3.3.2). LetĤ(Coh X ) be the completion of the Hall algebra H(Coh X ) consisting by all, possibly infinite, sums A∈Coh X f (A) [A]. Clearlŷ H(Coh X ) is a bimodule over the algebra H(Coh X ). We denote the bimodule structure by •.

Proof. The statement (a) follows from the equality [F ] • [V ] = [V ⊕ F ] holding
for any F ∈ Coh 0,X , V ∈ Bun n (X), because Ext 1 (V, F ) = Hom(F , V ) = 0. To see part (b), recall (1.2.1) the notation g C AB for the structure constants in the Hall algebra. Our statement follows from the next lemma about these constants.
(4.1.2) Lemma. Let V, W ∈ Bun n X and F , F ′ ∈ Coh 0,X . Then Indeed, supposing the lemma true, we have as claimed.
Proof of Lemma 4.1.2. If G is a finite group acting on a finite set S, we call the orbifold number of elements in S modulo G the quantity where {s} are all the G-orbits in S, with s ∈ {s} being a chosen representative and Stab(s) ⊂ G being its stabilizer. Now, let V, W, F ′ , F be given. The subsheaf F ′ ⊂ W ⊕ F ′ is defined intrinsically, as the maximal torsion subsheaf, so g W ⊕F ′ F ′ ,W = 1. It follows that where C is the orbifold number of diagrams ("crosses") modulo the product of the groups of automorphisms of all five objects. By elementary homological algebra, every cross can be completed to a 3 × 3 diagram with exact rows and columns, from which we want to retain the outer frame Here, for instance,F ′ = Im(βγ) etc. Notice that we have V ′ = 0 since it should be a torsion sheaf embedded in V . ThusF ′ ∼ = F and V ′′ ≃ V . For each F ′′ let C(F ′′ ) be the orbifold number of crosses giving frames with the upper right cornerF ′′ isomorphic to F ′′ , so that C = F ′′ C(F ′′ ). Let also F (F ′′ ) be the orbifold number of frames, i.e., arbitrary diagrams of the form (4.1.4) in which F ′′ = F ′′ ,F ′ = F ′ , V ′′ = V , (modulo the product of the groups of automorphisms of all 8 objects constituting the frame).
The main result of Green ([Gr], Theorem 2) says that C(F ′′ ) = F ′′ , V ′ 2 ·F (F ′′ ) which is equal to just F (F ′′ ) since V ′ = 0 and thus F ′′ , V ′ = 1. On the other hand, as it follows from the general fact that g C AB is the orbifold number of exact sequences Recalling our identifications, we find that Notice also that For the product in the Ringel algebra R we find from (4.1.1): Passing now from just one basis vector [F ] to the generating function we find, for f ∈ Cusp n : To find the product in the opposite order, we use (4.1.5b) together with the fact that f is a Hecke eigenform, and find where we have also replaced the summation over subsheaves F ′ ⊂ F by the summation over arbitrary pairs of isomorphism classes F ′ , F ′′ , with the factor g F F ′ F ′′ counting the number of subsheaves of type F ′ and cotype F ′′ . Sinceχ g is a character of the Hall algebra, and F g F , we can replace the RHS of (4.1.7) by (4.1.8) This can be written as the product of which the first factor is identical, up to renaming the summation arguments, with the RHS of (4.1.6), i.e., it is equal to ψ g (t 2 ) * E f (t 1 ). The second factor has the form Λ(t 2 /q n 2 t 1 ), where (4.1.10) Since every F ∈ Coh 0,X has a unique decomposition into the direct sum of sheaves of the form F x,µ (one for each x ∈ X), we can decompose Λ(t) into the Euler product: where |µ| = µ i . By (2.5.2) and (2.6.13), where P µ is the Hall-Littlewood polynomial. It is known ( [Mac], Ch. III, formula (4.4)) that and so (4.1.15) Since, as we already saw, we have proved the formula (3.3.2).
(4.3) Proof of (3.3.4). Let r 0 : AF n → i+j=n AF i ⊗ AF j be the linear map dual to the Hall multiplication AF 0 i ⊗ AF 0 j → AF 0 i+j (with respect to the orbifold scalar product (1.3.2) on each AF 0 i ). Thus for f ∈ AF n and vector bundles W ′ , W ′′ of ranks i, j we have and f is a cusp form if r 0 (f ) = 1 ⊗ f + f ⊗ 1. Let now f ∈ Cusp n be given. Then, by definition where U and G can be, a priori, any coherent sheaves on X. However, if g V UG = 0, U can be embedded as a subsheaf into V and so is locally free. The sheaf G may not be locally free, and we write it as G = W ⊕ F where W is a vector bundle, F is a torsion sheaf (their isomorphism classes are determined by G). Further, if we have an exact sequence we can consider the unqiue subbundle (i.e., subsheaf which is locally a direct summand)Ū ⊃ U, rk(Ū) = rk U . The sequence (4.3.3) gives thus two sequences and we conclude that Keeping these two formulas in mind and substituting G = W ⊕ F into (4.3.2), we find where, in addition, we have multiplied and divided by |Aut(Ū )|. In this sum, V ∈ Bun n (X), while U, W,Ū are isomorphism classes of vector bundles of arbitrary rank, and F ∈ Coh 0,X . By (4.3.1) we can write the result of summation over V in terms of r 0 , getting Since f is a cusp form, (r 0 f )(Ū , W ) = 0 unlessŪ = 0 or W = 0. Summation with U = 0 gives 1 ⊗ E f (t). If W = 0, the summation gives where we used Propositions (2.6.8) and 2.6.11 to identify the action of T V F . Now, the last expression in (4.3.8) factors into the product By using the equality K U = K n c det(U) we can rewrite this as thus proving (3.3.4).
(4.4) End of the proof of Theorem 3.3. It remains to prove the equalities (3.3.5) and (3.3.6) describing the counit and the antipode. Now, (3.3.5) is obvious from the definition (1.6.5) of ǫ. To see the first equality in (3.3.6), notice that By replacing the summation over F and then over flags of subsheaves F 0 ⊂ . . . ⊂ F m = F in a given F by the summation over (independent) isomorphism classes of ..G m (the number of filtrations on F with quotients G 0 , ..., G m ) and using the fact thatχ f is a character of the Hall algebra, we bring (4.6.1) to the form i.e., to the geometric series for ψ f (c −1 t) −1 , as claimed. To prove the second equality in (3.3.6), we write, for f ∈ Cusp n : Since f is a cusp form, the reasoning similar to that in (4.3), shows that only flags G 0 ⊂ . . . ⊂ G m = V with rk(G i ) = rk(V ), ∀i, contribute to the total sum. But when we restrict the summation to such flags (in which we thus have G i /G i−1 ∈ Coh 0,X for i > 0) we immediately get −E f (c −1 t)ψ f (q − n 2 t) −1 K −n by the same reason as above (summation of geometric series) plus the application of the Riemann-Roch theorem to account for G i /G i−1 , G i−1 . Theorem 3.3 is completely proved.
(4.5) Proof of Proposition 3.6.3. The equality (3.6.4) is obvious: non-isomorphic objects give orthogonal elements in the Hall algebra. To see (3.6.5) notice that cusp eigenforms with different eigenvalues of Hecke operators are orthogonal, by (2.6.11), so (E f (t 1 ), E g (t 2 )) = 0 for f = g. If f = g, the equality (3.6.5) follows at once from the definition and the assumption (2.6.14) that f 2 d = 1. So we concentrate on the proof of (3.6.6). Notice that ψ f (t) can be written as the Euler product where µ runs over all partitions µ 1 ≥ . . . ≥ µ n ≥ 0, with |µ| = µ i and F x,µ = O x /I µ i x having the same meaning as in (4.1), more precisely, after (4.1.10). Thus we have: and therefore ) .
We will evaluate each summand in this sum. Let be the isomorphism discussed in (2.3.5d).
In [Mac], Ch. III, formula (4.8), Macdonald defined a certain scalar product on Λ[t] with values in Q[t, t −1 ]. We denote by ( , ) M acd the Q -valued scalar product on Λ obtained from this Q[t, t −1 ] -valued scalar product by specializing to t = q −1 x . Let us, for the time being, abbreviate H(Coh x,X ) to simply H and introduce on the algebra H the grading H = d≥0 H d , where H d is linearly spanned by F x,µ , |µ| = d.
In this section we compare Hopf algebras formed by automorphic forms with quantum affine algebras. For our purposes it is convenient to treat the quantization parameter q as a constant rather than as an indeterminate variable.
(5.1) Drinfeld's realization of U q (Ĝ). Fix a nonzero complex number q. Let g be a finite-dimensional semisimple Lie algebra whose Cartan matrix A = a ij i,j=1,... ,r is symmetric and let g be the corresponding Kac-Moody algbera (central extension of g[t, t −1 ]). The quantization U q ( g) can be defined in two ways: the first (root realization) uses the system of simple roots for the affine root system of g and proceeds directly from the affine Cartan matrixÂ of g (of size (r + 1) × (r + 1)). The other, the so-called loop realization of Drinfeld [Dr1-2] (see also [CP]) is the C-algebra generated by the symbols . . , r, n ∈ Z, k ± i,n , i = 1, . . . , r, n ≥ 0 and the central element c. They are subject to some relations which are best written in terms of formal generating functions The relations have the form: where m = 1 − a ij and Sym stands for the sum over all the permutations of t 1 , . . . , t m . The relations (5.1.7) are the analogs of the Serre relations in finite-dimensional semisimple Lie algebras.
Let U q ( n + ), (resp. U q ( n − )) denote the subalgebra in U q ( g) generated by the elements x + i (n) (resp. x − i (n)) only, which are subject to relations (5.1.2), (5.1.7). Let also U q ( b + ) denote the subalgebra generated by the x + i (n), n ∈ Z and by the elements k + i (n), n ≥ 0 Similarly for U q ( b − ). They are the quantizations of the enveloping algebras of the Lie algebras where g = n + ⊕ h ⊕ n − is the standard decomposition of g into the nilpotent and Cartan subalgebras.
(5.2) The case g = sl 2 and sheaves on P 1 . Consider the simplest case g = sl 2 . In this case there is only one root, so we will denote the generators and generating functions as x ± (n), F ± (t) etc. The algebra U q ( b + ) is generated by c and by the coefficients of the two power series F + (t), ϕ + (t).
On the other hand, let us suppose that q is a prime power and specialize the theory of § 3 to the case of the simplest algebraic curve X, namely the projective line P 1 F q . Let B = B(Coh P 1 ) be the extended Ringel algebra of the category of coherent sheaves on P 1 . The group Pic(X) consists of sheaves O(n), n ∈ Z. Thus the algebra B is obtained from the algebra R(Coh P 1 ) by adding two elements K = K O and c = c O(1) . The set Cusp consists of one element: the trivial character 1 of Pic(P 1 ) = Z. Thus there are only two generating functions where Div + (P 1 ) is the set of effective divisors on P 1 and O D is the torsion sheaf Let R(Bun(P 1 )) ⊂ B be the subalgebra generated by elements [V ], where V is a vector bundle. Let B ⊂ B be the subalgebra generated by [V ] as above together with K, c and the coefficients of ψ(t).

44
Thus the functional equation for the Eisenstein series (3.3.1), when brought to the polynomial form (3.5.4) gives: which is identical to the defining relation (5.1.2) for U q (sl 2 ) (in which i = j = 1, a 11 = 2). Thus the correspondence x + i (n) → [O(n)] gives a homomoprhism γ : U q ( n + ) → R(Bun(P 1 )). To show that γ is an isomorphism, note that every vector bundle V on P 1 can be represented as V = i∈Z O(i) m i . Moreover, the filtration V j = i≥j O(i) m i is defined intrinsically (this is the Harder-Narasimhan filtration, already discussed in (3.9)). It follows that where {a, a + 1, . . . , b} is any interval in Z containing all i such that m i = 0. Note also that constitute a C-basis in R(Bun(P 1 )). On the other hand, the relations (5.2.3) (after passing to the coefficients) can be used to express any monomial as a linear combination of monomials (5.2.4). Since the latter monomials are linearly independent in R(Bun(P 1 )), there can be no further relations and so γ is an isomorphism.
Let us now turn to the algebra B. The commutation relation (3.3.2) reads in our case (again, use (5.2.2)) as follows: while in U q ( b + ) we have, by (5.1.3): (5.2.6) F + (t 1 )ϕ + (t 2 ) = q − c −1/2 t 2 /t 1 1 − q c −1/2 t 2 /t 1 ϕ + (t 2 )F + (t 1 ) Thus the correspondence It is surjective by the definition of B. Its injectivity follows from the injectivity of the homomorphism γ : U q ( n + ) → R(Bun(P 1 )) above and the fact that the coefficients of ψ(t) are algebraically independent over C. This latter fact is proved by the same argument as given in (3.8.5): the coefficients of log ψ(t), being linearly independent and primitve with respect to a Hopf algebra structure, are algebraically independent. Theorem (5.2.1) is proved.
(5.2.7) Remark. It is instructive to compare Theorem 5.2.1 with results of Ringel [R1-3] and Lusztig  on representations of quivers. Namely, let Γ be a quiver, i.e., a finite oriented graph without edges-loops. Let Γ − mod be the category of representations of Γ over F q , i.e., rules which associate to any vertex i ∈ Vert(Γ) a finite-dimensional F q -vector space V i , and to every oriented edge i e −→ j a linear map V e : V i → V j . This is an Abelian category satisfying our finiteness conditions (1.1), so its Ringel algebra R(Γ − mod) is defined. For i ∈ Vert(Γ) let V (i) be the representation assigning F q to the vertex i and 0 to other vertices. Let A = a ij i,j∈V ert(Γ) be the Cartan matrix associated to Γ, i.e., a ii = 2 and a ij is minus the number of edges (regardless of the orientation) joining i and j, if i = j. Let g Γ be the Kac-Moody Lie algebra with the Cartan matrix A and U q (g Γ ) be its q-quantization. This is (see, e.g., [Lu 1]) the algebra generated by symbols e ± i , K i (with K i being invertible) subject to the relations: Let U q (N Γ ) be the subalgebra generated by the e + i . Then the subalgebra in R(Γ − mod) generated by the [V (i)], is isomorphic to U q (N Γ ) so that [V (i)] corresponds to e + i . Now, sl 2 is the Kac-Moody algebra associated to the Cartan matrix 2 −2 −2 2 , and its Dynkin graph is A So the general results about representations of quivers are applicable to this case and realize U q (N A (1) 1 − mod). So we have realizations of two "nilpotent" subalgebras, U q ( n + ), U q (N ) ⊂ U q ( sl 2 ) in terms of Ringel algebras of two Abelian categories: Coh P 1 (sheaves on P 1 F q ) and A 1 − mod. One may wonder what these two categories have in common, and the answer is that their derived categories are equivalent. This is a particular case of a theorem of Beilinson [Be], as reformulated by Bondal [Bo] and Geigle-Lenzing [GL]. This is another indication of a deeper relation between derived categories and quantum group-like objects, see [X1].
(5.3) The case of a general curve X. Considering now the case of an arbitrary smooth projective curve X/F q we find, by comparing Theorem 3.5 with formulas of (5.1), that the algebra B(Coh X ) (or, rather, its subalgebra B defined in (3.8)) is analogous to the subalgebra U q ( b + ) ⊂ U q ( g) for a huge Kac-Moody algebra g. Let us sketch this analogy in the following table: Theory of quantum affine algebras

Theory of automorphic forms
The set of positive roots of g The set Cusp of cusp eigenforms The entries of the Cartan matrix of g The coeffcients of Rankin L-functions LHom(f, g, t)

Symmetry of Cartan matrix Functional equations of L-functions
Pointwise-uppertriangular subalgebra The algebra R(Bun(X)), i.e., the U q ( n + ) algebra of unramified forms  [W ] are joined by an edge if W enters into the decomposition of V ⊗ C 2 , where C 2 is the restriction of the standard representation of SL 2 (C).
On the right, we have the (conjectural) Langlands correspondence between irreducible representations of the unramified Galois group π 1 (X) and automorphic forms. Now, automorphic forms are, as we have seen, analogous to simple roots of a Lie algebra, i.e., vertices of some huge Dynkin diagram while the Galois group is analogous to a subgroup Γ ⊂ SL 2 (C). The role of the standard representation C 2 is played by the algebraic closure k where k is the global field of functions on X. Since the role of entries of the Cartan matrix (describing edges of the Dynkin diagram) is played in our situation by the L-functions, this suggests that one can get some information about them by studying how a Galois representation splits when tensor multiplied with the algebraic closure. As was pointed out to me by D. Kazhdan, such a situation appears in the theory of Hodge-Tate decompositions of p-adic Galois representations of p-adic fields.
We have also included in this table several concepts whose counterparts are not immediately clear. Thus, Serre relations should correspond to "extra" functional equations for Eisenstein series, i.e., elements of the kernel of the map π B :B → B in (3.8.2), which was described in (3.8) only implictly, by means of the kernel of a suitable quadratic form onB. Note that the presence of such relations does not contradict the spectral decomposition theorem for automorphic forms [MW] which, as we already pointed out (3.8.4), is only concerned with the values of the (analytically continued) products E f 1 (t 1 ) . . . E f r (t r ) for |t i | = 1, while the extra relations may look like distributions whose support does not meet the torus |t i | = 1 at all. This is exactly the case with Serre relations (5.1.7). Namely, if we allow ourselves to divide equalities involving generating functions by any polynomials in t 1 , . . . , t n , then (5.1.7) would "follow" from (5.1.2), as one can easily check by "bringing" the LHS of (5.1.7) to a normal form in which the factor F ± j (s) goes last in every monomial (of course, such a manipulation is illegal!). Moreover, in this particular case it is enough to divide by polynomials of the form (t i − q α t j ), α ∈ 1 2 Z − {0}, so the need for (5.1.7) cannot be observed after restriction to the torus |t i | = 1 where such polynomials do not vanish. However, there is no way to deduce (5.1.7) from the quadratic relations obtained by expanding (5.1.2). This just means that in the algebra defined by (5.1.2) alone the right hand side of (5.1.7) is a distribution with support of positive codimension.
The analog of the Selberg formula in the theory of affine Lie algebras is completely unclear at the moment. According to our analogy, it should be a statement about the trace of a Cartan element acting on the enveloping algebra of the uppertriangular subalgebra.
As for the analog of the U q ( g), we will construct such an analog in the next section by following Drinfeld's quantum double construction and using Green's comultiplication. §6. The quantum double of the algebra of automorphic forms.
(6.0) Motivation. Our aim in this section is to construct the automorphic analog of the full quantum affine algebra U q ( g) out of the Hopf algebra B(A) which should be, morally, just one half of it. This will be done by the Drinfeld double construction. For any Hopf algebra Ξ its Drinfeld double [Dr 3] [CP] is the tensor product Ξ ⊗ C Ξ * with certain twisted multiplication (see below). The reason for using this construction is that it is known to solve, in a certain sense, the following model problem: recover the quantum Kac-Moody algebra U q (g) from its Hopf subalgebra U q (b + ). Recall (5.2.7) that U q (g) is generated by symbols e ± i , K i . The subalgebra U q (b + ) is, by definition, generated by e + i and K i . The comultiplication in it has the form: However, the recovery of U q (g) from the U q (b + ) by this method is not so straightforward. To help motivate the constructions of this section, let us recall the principal features of (and subtleties involved in) this recovery. (6.0. 2) The subalgebras U q (n ± ) generated by the e ± i , are in natural duality, so adding (U q (n + )) * as a part of (U q (b + )) * supplies the missing subalgebra U q (n − ). (6.0.3) However, we get also the dual of the "Cartan" subalgebra U q (h) generated by the K i . So by formally applying the double construction to U q (b + ), we get an algebra bigger that U q (g) because of this dual. So in order to get U q (g), we need to impose certain identifications in the double. (The construction of the restricted double later in this section does just that, in the context of Hall algebras.) (6.0.4) In addition, the Hopf algebra U q (h) is not self-dual. It is the algebra of functions on T , the maximal torus in the Lie group corresponding to g, and the dual algebra will be algebra of functions on T (the lattice of characters of T ) with pointwise multiplication. Formal dualization of U q (h) with respect to the basis of monomials in the K i gives a basis of delta-functions on T , in particular, the unit element in the algebra of functions on T will be represented by an infinite sum of such delta-functions. If the Cartan matrix A is non-degenerate, one can realize elements of U q (h) by certain infinite sums in the completion of the algebra of functons on T . After this one can perform the identification mentioned in (6.0.3). (6.0.5) If the Cartan matrix is degenerate (as is the case with affine algebras), then one has to add to U q (h) some essentially new elements from U q (h) * which pair with the center (the kernel of the Cartan matrix) in a nondegenerate way. In the affine case the new element (which is essentially one) has important geometric meaning: it corresponds to the "rotation of the loop" and is responsible for the appearance of elliptic functions in the theory of representations of affine algebras.
The general problem of constructing the Drinfeld double for the Hall-Ringel algebra of a category of homological dimension 1 was studied in the recent paper of J. Xiao [X2]. In the analysis below we complement Xiao's approach by adding an intermediate step, the so-called Heisenberg double, introduced in [AF] [ST]. The use of the Heisenberg double allows one to split the calculations into two more manageable steps.
(6.1) Heisenberg and Drinfeld doubles: generalities. We start by recalling some basic properties of the doubles. Since Hall algebras come with a natural basis, we will use the coordinate-dependent approach, as in [Kas] (see [ST] for a more standard exposition). In this reminder we will ignore subtleties related to dualization of infinite-dimensional spaces, since we will pay due attention to them in the concrete situations in which we will use the doubles.
Let Ξ be a Hopf algebra over C, with comultiplication ∆, counit ǫ and antipode S. Let {e i }, i ∈ I, be a basis of Ξ and {e i } be the dual basis of Ξ * . Let us write the structure constants of Ξ with respect to our basis: As usual, ∆ makes Ξ * into an algebra by The Heisenberg double HD(Ξ) is, by definition, the algebra generated by the symbols Z i , Z i , i ∈ I, subject to the relations: Thus the map Ξ * ⊗ C Ξ → HD(Ξ) given by the multiplication, i.e., by e i ⊗e j → Z i Z j , is an isomorphism of vector spaces: any other product can be brought by (6.1.4) to the normal form in which the Z i stand on the left.
There is a certain asymmetry in the definition of the Heisenberg double: replacing Ξ with Ξ * gives a different algebra. We will denote HD(Ξ * ) byȞD(Ξ). Explicitly, it is generated by the symbolsŽ i ,Ž i , i ∈ I subject to the relations: By using the antipode one can transform (6.1.6) into a relation giving a kind of normal form for elements of DD(Ξ): This is the standard description [Dr 3] [CP] of the Drinfeld double. The algebra DD(Ξ) is a Hopf algebra with respect to the comultiplication given by (note the transposition in the second formula), the counit (6.1.9) ǫ(W k ) = ǫ k , ǫ(W k ) = ǫ k , and the antipode given by (6.1.10).
It is this embedding that makes the Heisenberg doubles important to us.
Proof. Let us first prove the existence of the homomorphism κ and then its injectivity. To prove the existence, we need to check that the relations (6.1.5-6) defining DD(Ξ) are satisfied for the proposed images of W i , W i . For (6.1.5) it is obvious since ∆ : Ξ → Ξ ⊗ Ξ and m * : Ξ * → Ξ * ⊗ Ξ * (the map dual to the multiplication) are algebra homomorphisms. To verify (6.1.6) denote by L and R its left and right hand sides. Then: which is the same as L up to renaming the summation indices. So we indeed have the claimed homomorphism κ. To see that κ is injective, note that ∆ : Ξ → Ξ ⊗ Ξ and m * : Ξ * → Ξ * ⊗ Ξ * are injective because of the unit and counit in Ξ. Since DD(Ξ) = Ξ ⊗ Ξ * as a vector space, and κ| Ξ = ∆ while κ| Ξ * is the composition of m * and the permutation, κ is injective.
( 6.2) The restricted Heisenberg doubles of the Ringel algebra. We now specialize to the case when Ξ = B(A) = C[K 0 A] ⊗ R(A) is the extended Ringel algebra of an Abelian category A satisfying the assumptions of (1.4) (we assume, in particular, that A has homological dimension 1). The bilinear form (α|β) on K 0 A may be degenerate, and we denote by I its kernel. Since Q * , the target of our form, has no torsion, I has the following property: if nα ∈ I for some n ∈ Z, α ∈ K 0 A, then α ∈ I. This implies that I has a complement, a subgroup J ⊂ K 0 A such that K 0 A = I ⊕ J. In the sequel we fix such a complement and denote π I , π J the projections to I or J along the other summand.
A natural basis of Ξ = B(A) is given by e αA = K α [A], α ∈ K 0 A, A ∈ A. In this basis, the multiplication and comlutiplication have the form: Thus the structure constants are given by This gives the multiplication of the dual generators in HD(Ξ) in the form In particular, the Z α0 are orthogonal idempotents. They form the algebra dual to the coalgebra C[K 0 A], i.e., the algebra of functions on K 0 A with pointwise multiplication. More precisely, Z α0 corresponds to the function equal to 1 at α and to 0 elsewhere. In particular, the unit element is represented by the infinite sum α Z α0 . This shows that we need to work with certain infinite sums lying in the completion of the algebra HD(B(A)) generated by the Z αA , Z αA . For A ∈ Ob(A) and a homomorphism χ : K 0 A → C * we introduce the elements We set also K α = Z α0 , Z + A = Z 0A . If α ∈ K 0 A, we let χ α : K 0 A → Q * be the character taking β to (α|β), and write K α for K χ α . Note that we have the following identities: which show that we have two copies of the Ringel algebra R(A) inside the completion of HD(B(A)).
(6.2.10) Proposition. The subspace in the completion of HD(B(A)) spanned by elements of the form Z − A K α K χ Z + B , is an algebra, i.e., the product of any two such elements is a linear combination of finitely many elements of this form.
We will call this algebra the algebraic Heisenberg double of B(A) and denote it HD alg (B(A)).
To prove (6.2.10), note that the identities (6.2.7-9) give an almost complete recipe for multiplying any In order to find this expression, denote, for any objects A, B, M, N of A, by g M N AB the orbifold number of exact sequences modulo automorphisms of A and B, i.e., (see the proof of Lemma 4.2) the total number of such sequences divided by |Aut(A)| · |Aut(B)|. Proposition 6.2.10 follows from the next fact which is also useful by itself.
(6.2.12) Proposition. In the completion of HD(B(A)) we have the identities: Proof. Let F M N AB be the set of all exact sequences (6.2.11). Also, for any three objects A, B, C let E C AB be the set of exact sequences Notice now that (6.2.13) with Aut(A) acting freely. This just means that any long exact sequence (6.2.10) can be split into two short sequences with L = Im(ϕ). From the cross-symmetry relations (6.1.4) in the Heisenberg double and the explicit form of the structure constants given above, we find: (6.2.14) where π J was defined in (6.1). Thus, in the case when the form (α|β) is nondegenerate, this identifies each K χ with some product of (complex) powers of the K α , while in the degenerate case we have also elements K χ for characters χ of K 0 A = I ⊕ J trivial on J, i.e., characters of I. These elements are analogs of the "rotation of the loop" generators in the (quantum) Kac-Moody algebras.
( 6.3) The restricted Drinfeld double of the Ringel algebra. As in the case of Heisenberg doubles, let W αA , W αA be the generators of DD(B(A)) corresponding to the basis vector e αA = K α [A]. Similarly to the above, we set We also write K α = K χ α , where χ α (β) = (α|β). We denote by DD alg (B(A)) the subspace in the completion of DD(B(A)) spanned by elements of the form ) is a Hopf algebra with respect to the comultiplication given on generators by the counit given by (6.3.5) ǫ(K α ) = 1, ǫ(W ± A ) = 0, ǫ(K χ ) = 1, and the antipode given by (c) The correspondence defines an algebra homomorphism κ : DD alg (B(A)) ֒→ HD alg (B(A)) ⊗ȞD alg (B(A)).
Proof. (a) This follows from (6.1.7) together with the identities which are verified in the same way as (6.2.7-9). The statements (b), (c) follow by a straightforward application of definitions, checking that they indeed make sense on the elements given by infinite sums we consider and applying the fact that, in general, DD(Ξ) is a Hopf algebra and the map κ from proposition 6.2.12 is a homomorphism.
We now define the restricted Drinfeld double U (A) by imposing in DD alg (B(A)) the relations K α = K −1 π J (α) . The notation is chosen to suggest the analogy with the quantum universal enveloping algebra U q (g) of a Lie algebra g. In fact, when A = Γ − mod is the category of F q -representations of a Dynkin quiver Γ, then U (A) = U q (g), where g is the semisimple Lie algebra corresponding to Γ.

56
The proof is straightforward, by checking the compatibility of the relations K α = K −1 π J (α) with the Hopf algebra structure and with κ.
(6.4) The Heisenberg double of the algebra of automorphic forms. We now further specialize to the case when A is the category of coherent sheaves on a curve X/F q and we keep the notations and assumptions of §2-3. Recall that we have the exact sequence (6.4.1) 0 → Pic(X) where rk is the generic rank homomorphism, and i(L) =L − 1. The image of i is precisely I, the kernel of the form (α|β). A natural splitting of the sequence (6.4.1) and thus a natural choice of a complement J to I, is provided by the maps det : K 0 (X) → Pic(X), ε : Z → K 0 (X) given by det(V ) = rk(V ) (V ), if V is a vector bundle, and by ε(1) =Ō. Thus the Cartan elements of the restricted Heisenberg double are: K = KŌ, c L = KL −Ō , L ∈ Pic(X), d χ = K χ(det) , χ : Pic(X) → C * .
For a cusp form f ∈ Cusp n we introduce the generating functions Let us prove (6.5.2). By Proposition 6.2.12, (6.5.9) Ψ + g (t 1 )E − f (t 2 ) = F∈Coh 0,X V ∈Bun n (X) In order that g W F ′′ FV = 0, i.e., that there exist at least one exact sequence (6.5.10) 0 → W → V ϕ → F → F ′′ → 0, F ′′ must lie in Coh 0,X , and W in Bun n (X). Therefore KF −F ′′ lies in the center and is the same as cF −F ′′ . Also, we have By using (6.2.13), we now write (introducing F ′ to be Im(ϕ) in (6.5.10)): cF′ q −nh 0 (F)/2 Z − W Z + F ′′ . We now use the fact that χ g is a character of the Hall algebra, together with the properties of the (dual) Hecke operators (4.3) to transform this sum into Since f is an eigenfunction of Hecke operators, this can be factored into the product   W,F ′′ = E − f (t 2 )Ψ + g (t 1 ) · Λ(t 1 c/t 2 q n/2 ), where Λ(t), given by (4.1.10), is equal to the ratio LHom f, g, q n+m 2 t LHom f, g, q n+m 2 −1 t , as we saw in (4.1.14). This proves the equality (6.5.2).
We now prove (6.5.3). By definition, where M, F run over all the isomorphism classes of coherent sheaves. However, since f and g are cusp forms, the reasoning similar to that in the proof of (3.3.4) (see (4.4)) shows that we can restrict the summation to M equal either W or 0, without changing the sum. The contribution from M = W gives E − g (t 2 )E + f (t 1 ), while computing the contribution from M = 0 we find (note that m = n because M = 0): c det(W ) .
If f = g, then for any d we have, by (2.6.11) and (2.7.4): (6.5.11) W ∈Bun n,d (X) f (W )g(W * ) |Aut(W )| = 0, and when f = g we get the formula (6.5.3), because of the assumptions (2.6.14) we made on the normalization of f ∈ Cusp n .
Finally, let us prove (6.5.4). Keeping f and g fixed, let l(t) = log LHom g, f, q m+n 2 −1 t LHom g, f, q where l x is the logarithm of the ratio of the Euler factors corresponding to x. By taking logarithm of (6.5.4) and using the notation (6.4.3), we find that it is enough to prove, for each x ∈ X, the equality a + f,x (t 1 ), a − g,x (t 2 ) = l x (ct 1 /t 2 ).
By introducing the Taylor coefficients of a ± f,x and l x : we can rewrite the desired equality as (6.5.13) This is a statement about the Heisenberg double of the Hopf subalgebra H x ⊂ B(Coh X ) generated by [F ], F ∈ Coh 0,x (X) and by the element c x . The function ψ f,x (t) taking values in this subalgebra, has the coproduct This is proved in the same way as (3.3.3). So for a f,x (t) = log(ψ f,x (t)) we have: ∆(a f,x (t)) = a f,x (t ⊗ c x ) + 1 ⊗ a f,x (t), or, in the coefficient language, So let us look at the following general situation. Let V be a Z-graded vector space. Consider the commutative Hopf algebra Ξ = S • (V )⊗C[c, c −1 ] with comultiplication For v ∈ V let Z + v be the corresponding element of HD(Ξ). For φ ∈ V * let Z − φ be the element of HD(Ξ) corresponding to the linear form Ξ → C which on each S • (V ) ⊗ c m is the derivation ∂/∂φ in the symmetric algebra. let alsoŽ + v ,Ž − φ be the similar elements of ofȞD(Ξ).
(6.5.14) Lemma. In the described situation we have, for homogeneous v ∈ V, φ ∈ V * , . The first formula in this lemma implies the equality (6.5.13) (we have added the second formula to give a hint of the proof of (6.5.8)). Indeed, take V to be the space of primitive elements of the commutative and cocommutative Hopf algebra H x /(c−x−1). It is graded by deg[F ] = h 0 (F )/ deg(x). The algebra Ξ defined above is just H x itself. Taking v = a f,x,d , we find that Z + v = a + f,x,d , while a − f,x,d = Z − φ where φ is the linear functional on V given by φ(w) = To deduce (6.5.13), it remains to recall the formula (4.5.7) for the scalar product of the a f,x (t).

61
As for Lemma 6.5.14, it immediately reduces to the particular case when dim(V ) = 1, i.e., Ξ = C[x, c, c −1 ] with ∆(x) = x ⊗ c d + 1 ⊗ x and ∆(c) = c ⊗ c. The treatment of this case is elementary and is left to the reader.
Theorem 6.5 is proved.
(6.6) The Drinfeld double of the algebra of automorphic forms. Let U = U (A) be the restricted Drinfeld double of the Hopf algebra B(A), A = Coh X , see (6.3). To make the formulas below more symmetric, we extend U by adding square roots of the central elements c L , L ∈ Pic(X). This means that we choose an identification Pic(X) ≃ Z⊕ Z/m i and embed Pic(X) into the group Pic(X)) = 1 2 Z ⊕ Z/2m i in an obvious way. We set U (c 1/2 ) = U ⊗ C[Pic(X)] C Pic(X)) .
Thus, for any L ∈ Pic(X) there is a central element c 1/2 L ∈ U (c 1/2 ). For a cusp for f ∈ Cusp n we introduce the following generating functions with coefficients in U (c 1/2 ): (6.6.1)