In algebraic geometry, given a smooth projective curve X over a finite field and a smooth affine group scheme G over it, the moduli stack of principal bundles over X, denoted by , is an algebraic stack given by: for any -algebra R, the category of principal G-bundles over the relative curve . In particular, the category of -points of , that is, , is the category of G-bundles over X. Similarly, can also be defined when the curve X is over the field of complex numbers. Roughly, in the complex case, one can define as the quotient stack of the space of holomorphic connections on X by the gauge group. Replacing the quotient stack (which is not a topological space) by a homotopy quotient (which is a topological space) gives the homotopy type of . In the finite field case, it is not common to define the homotopy type of . But one can still define a (smooth) cohomology and homology of . Basic properties It is known that is a smooth stack of dimension where is the genus of X. It is not of finite type but locally of finite type; one thus usually uses a stratification by open substacks of finite type (cf. the Harder–Narasimhan stratification.) If G is a split reductive group, then the set of connected components is in a natural bijection with the fundamental group . The Atiyah–Bott formula Behrend's trace formula This is a (conjectural) version of the Lefschetz trace formula for when X is over a finite field, introduced by Behrend in 1993. It states: if G is a smooth affine group scheme with semisimple connected generic fiber, then where (see also Behrend's trace formula for the details) l is a prime number that is not p and the ring of l-adic integers is viewed as a subring of . is the geometric Frobenius. , the sum running over all isomorphism classes of G-bundles on X and convergent. for a graded vector space , provided the series on the right absolutely converges. A priori, neither left nor right side in the formula converges. Thus, the formula states that the two sides converge to finite numbers and that those numbers coincide. Notes References J. Heinloth, Lectures on the moduli stack of vector bundles on a curve, 2009 preliminary version J. Heinloth, A.H.W. Schmitt, The Cohomology Ring of Moduli Stacks of Principal Bundles over