Stack (mathematics)
In mathematics a stack or 2-sheaf is, roughly speaking, a sheaf that takes values in categories rather than sets. Stacks are used to formalise some of the main constructions of descent theory, and to construct fine moduli stacks when fine moduli spaces do not exist. Descent theory is concerned with generalisations of situations where isomorphic, compatible geometrical objects (such as vector bundles on topological spaces) can be "glued together" within a restriction of the topological basis. In a more general set-up the restrictions are replaced with pullbacks; fibred categories then make a good framework to discuss the possibility of such gluing. The intuitive meaning of a stack is that it is a fibred category such that "all possible gluings work". The specification of gluings requires a definition of coverings with regard to which the gluings can be considered. It turns out that the general language for describing these coverings is that of a Grothendieck topology. Thus a stack is formally given as a fibred category over another base category, where the base has a Grothendieck topology and where the fibred category satisfies a few axioms that ensure existence and uniqueness of certain gluings with respect to the Grothendieck topology. Overview
Stacks are the underlying structure of algebraic stacks (also called Artin stacks) and Deligne–Mumford stacks, which generalize schemes and algebraic spaces and which are particularly useful in studying moduli spaces. There are inclusions: schemes ⊆ algebraic spaces ⊆ Deligne–Mumford stacks ⊆ algebraic stacks (Artin stacks) ⊆ stacks. and  give a brief introductory accounts of stacks, ,  and  give more detailed introductions, and  describes the more advanced theory. Motivation and history

The concept of stacks has its origin in the definition of effective descent data in . In a 1959 letter to Serre, Grothendieck observed that a fundamental  obstruction to constructing good moduli spaces is the existence of automorphisms. A major motivation for stacks is that if a moduli space for some problem does not exist because of the existence of automorphisms, it may still be possible to construct a moduli stack. studied the Picard group of the moduli stack of elliptic curves, before stacks had been defined. Stacks were first defined by  , and the term "stack" was introduced by  for the original French term "champ" meaning "field". In this paper they also introduced Deligne–Mumford stacks, which they called algebraic stacks, though the term "algebraic stack" now usually refers to the more general Artin stacks introduced by . When defining quotients of schemes by group actions, it is often impossible for the quotient to be a scheme and still satisfy desirable properties for a quotient. For example, if a few points have non-trivial stabilisers, then the categorical quotient will not exist among schemes, but it will exist as a stack. In the same way, moduli spaces of curves, vector bundles, or other geometric objects are often best defined as stacks instead of schemes. Constructions of moduli spaces often proceed by first constructing a larger space parametrizing the objects in question, and then quotienting by group action to account for objects with automorphisms which have been overcounted. Definitions

Abstract stacks 
A category  with a functor to a category  is called a fibered category over  if for any morphism  in  and any object  of  with image  (under the functor), there is a pullback  of  by . This means a morphism with image  such that any morphism  with image  can be factored as  by a unique morphism  in  such that the functor maps  to . The element  is called the pullback of  along  and is unique up to canonical isomorphism. The category c is called a prestack over a category C with a Grothendieck topology if it is fibered over C and for any object U of C and objects x, y of c with image U, the functor from the over category C/U to sets taking F:V→U to Hom(F*x,F*y) is a sheaf. This terminology is not consistent with the terminology for sheaves: prestacks are the analogues of separated presheaves rather than presheaves. Some authors require this as a property of stacks, rather than of prestacks. The category c is called a stack over the category C with a Grothendieck topology if it is a prestack over C and every descent datum is effective. A descent datum consists roughly of a covering of an object V of C by a family Vi, elements xi in the fiber over Vi, and morphisms fji between the restrictions of xi and xj to Vij=Vi×VVj satisfying the compatibility condition fki = fkjfji. The descent datum is called effective if the elements xi are essentially the pullbacks of an element x with image V.

A stack is called a stack in groupoids or a (2,1)-sheaf if it is also fibered in groupoids, meaning that its fibers (the inverse images of objects of C) are groupoids. Some authors use the word "stack" to refer to the more restrictive notion of a stack in groupoids. Algebraic stacks 

An algebraic stack or Artin stack is a stack in groupoids X over the fppf site such that the diagonal map of X is representable and there exists a smooth surjection from (the stack associated to) a scheme to X. A morphism Y X of stacks is representable if, for every morphism S  X from (the stack associated to) a scheme to X, the fiber product Y ×X S is isomorphic to (the stack associated to) an algebraic space. The fiber product of stacks is defined using the usual universal property, and changing the requirement that diagrams commute to the requirement that they 2-commute. See also morphism of algebraic stacks for further information. The motivation behind the representability of the diagonal is the following: the diagonal morphism  is representable if and only if for any pair of morphisms of algebraic spaces , their fiber product  is representable. A Deligne–Mumford stack is an algebraic stack X such that there is an étale surjection  from a scheme to X. Roughly speaking, Deligne–Mumford stacks can be thought of as algebraic stacks whose objects have no infinitesimal automorphisms. Local structure of algebraic stacks 
Since the inception of algebraic stacks it was expected that they are locally quotient stacks of the form  where  is a linearly reductive algebraic group. This was recently proved to be the case: given a quasi-separated algebraic stack  locally of finite type over an algebraically closed field  whose stabilizers are affine, and  a smooth and closed point with linearly reductive stabilizer group , there exists an etale cover of the GIT quotient , where , such that the diagramis cartesian, and there exists an etale morphisminducing an isomorphism of the stabilizer groups at  and . Examples

Elementary examples 
Every sheaf  from a category  with a Grothendieck topology can canonically be turned into a stack. For an object , instead of a set  there is a groupoid whose objects are the elements of  and the arrows are the identity morphism. More concretely, let  be a contravariant  functor

Then, this functor determines the following category 
 an object is a pair  consisting of a scheme  in  and an element 
 a morphism  consists of a morphism  in  such that . Via the forgetful functor , the category  is a category fibered over . For example, if  is a scheme in , then it determines the contravariant functor  and the corresponding fibered category is the . Stacks (or prestacks) can be constructed as a variant of this construction. In fact, any scheme  with a quasi-compact diagonal is an algebraic stack associated to the scheme . Stacks of objects 
A Group-stack. The moduli stack of vector bundles: the category of vector bundles V→S is a stack over the category of  topological spaces S. A morphism from V→S to W→T consists of continuous maps from S to T and from V to W (linear on fibers) such that the obvious square commutes. The condition that this is a fibered category follows because one can take pullbacks of vector bundles over continuous maps of topological spaces, and the condition that a descent datum is effective follows because one can construct a vector bundle over a space by gluing together vector bundles on elements of an open cover. The stack of quasi-coherent sheaves on schemes (with respect to the fpqc-topology and weaker topologies)
The stack of affine schemes on a base scheme (again with respect to the fpqc topology or a weaker one)

Constructions with stacks

Stack quotients 
If  is a scheme  and  is a smooth affine group scheme acting on , then there is a quotient algebraic stack , taking a scheme  to the groupoid of -torsors over the -scheme  with -equivariant maps to . Explicitly, given a space  with a -action, form the stack  which (intuitively speaking) sends a space  to the groupoid of pullback diagramswhere  is a -equivariant morphism of spaces and is a principal -bundle. The morphisms in this category are just morphisms of diagrams where the arrows on the right-hand side are equal and the arrows on the left-hand side are morphisms of principal -bundles. Classifying stacks 
A special case of this when X is a point gives the classifying stack BG of a smooth affine group scheme G:  It is named so since the category , the fiber over Y, is precisely the category  of principal -bundles over . Note that  itself can be considered as a stack, the moduli stack of principal G-bundles on Y. An important subexample from this construction is  which is the moduli stack of principal -bundles. Since the data of a principal -bundle is equivalent to the data of a rank  vector bundle, this is isomorphic to the moduli stack of rank  vector bundles . Moduli stack of line bundles 
The moduli stack of line bundles is  since every line bundle is canonically isomorphic to a principal -bundle. Indeed, given a line bundle  over a scheme , the relative specgives a geometric line bundle. By removing the image of the zero section, one obtains a principal -bundle. Conversely, from the representation , the associated line bundle can be reconstructed. Gerbes 
A gerbe is a stack in groupoids which always has a nonempty category. for example the trivial gerbe  that assigns to each scheme the groupoid of principal -bundles over the scheme, for some group . Relative spec and proj 
If A is a quasi-coherent sheaf of algebras in an algebraic stack X over a scheme S, then there is a stack Spec(A) generalizing the construction of the spectrum Spec(A) of a commutative ring A. An object of Spec(A) is given by an S-scheme T, an object x of X(T), and a morphism of sheaves of algebras from x*(A) to the coordinate ring O(T) of T.

If A is a quasi-coherent sheaf of graded algebras in an algebraic stack X over a scheme S, then there is a stack Proj(A) generalizing the construction of the projective scheme Proj(A) of a graded ring A.

Moduli stacks

Moduli of curves 
 studied the moduli stack M1,1 of elliptic curves, and showed that its Picard group is cyclic of order 12. For elliptic curves over the complex numbers the corresponding stack is similar to a quotient  of the upper half-plane by the action of the modular group. The moduli space of algebraic curves  defined as a universal family of smooth curves of given genus  does not exist as an algebraic variety because in particular there are curves admitting nontrivial automorphisms. However there is a moduli stack   which is a good substitute for the non-existent fine moduli space of smooth genus  curves. More generally there is a moduli stack  of genus  curves with  marked points. In general this is an algebraic stack, and is a Deligne–Mumford stack for  or   or  (in other words when the automorphism groups of the curves are finite). This moduli stack has a completion consisting of the moduli stack of stable curves (for given  and ) which is proper over Spec Z. For example,  is the classifying stack  of the projective general linear group. (There is a subtlety in defining , as one has to use algebraic spaces rather than schemes to construct it.) Kontsevich moduli spaces 
Another widely studied class of moduli spaces are the Kontsevich moduli spaces parameterizing the space of stable maps between curves of a fixed genus to a fixed space  whose image represents a fixed cohomology class. These moduli spaces are denotedand can have wild behavior, such as being reducible stacks whose components are non-equal dimension. For example, the moduli stack has smooth curves parametrized by an open subset . On the boundary of the moduli space, where curves may degenerate to reducible curves, there is a substack parametrizing reducible curves with a genus  component and a genus  component intersecting at one point, and the map sends the genus  curve to a point. Since all such genus  curves are parametrized by , and there is an additional  dimensional choice of where these curves intersect on the genus  curve, the boundary component has dimension . Other moduli stacks 
 A Picard stack generalizes a Picard variety. The moduli stack of formal group laws classifies formal group laws. An ind-scheme such as an infinite projective space and a formal scheme is a stack. A moduli stack of shtukas is used in geometric Langlands program. (See also shtukas.) Geometric stacks

Weighted projective stacks 
Constructing weighted projective spaces involves taking the quotient variety of some  by a -action. In particular, the action sends a tupleand the quotient of this action gives the weighted projective space . Since this can instead be taken as a stack quotient, the weighted projective stack pg 30 isTaking the vanishing locus of a weighted polynomial in a line bundle  gives a stacky weighted projective variety. Stacky curves 
Stacky curves, or orbicurves, can be constructed by taking the stack quotient of a morphism of curves by the monodromy group of the cover over the generic points. For example, take a projective morphismwhich is generically etale. The stack quotient of the domain by  gives a stacky  with stacky points that have stabilizer group  at the fifth roots of unity in the -chart. This is because these are the points where the cover ramifies. Non-affine stack 
An example of a non-affine stack is given by the half-line with two stacky origins. This can be constructed as the colimit of two inclusion of . Quasi-coherent sheaves on algebraic stacks

On an algebraic stack one can construct a category of quasi-coherent sheaves similar to the category of quasi-coherent sheaves over a scheme. A quasi-coherent sheaf is roughly one that looks locally like the sheaf of a module over a ring. The first problem is to decide what one means by "locally": this involves the choice of a Grothendieck topology, and there are many possible choices for this, all of which have some problems and none of which seem completely satisfactory. The Grothendieck topology should be strong enough so that the stack is locally affine in this topology: schemes are locally affine in the Zariski topology so this is a good choice for schemes as Serre discovered,  algebraic spaces and Deligne–Mumford stacks are locally affine in the etale topology so one usually uses the etale topology for these, while algebraic stacks are locally affine in the smooth topology so one can use the smooth topology in this case. For general algebraic stacks the etale topology does not have enough open sets: for example, if G is a smooth connected group then the only etale covers of the classifying stack BG are unions of copies of BG, which are not enough to give the right theory of quasicoherent sheaves. Instead of using the smooth topology for algebraic stacks one often uses a modification of it called the Lis-Et topology (short for Lisse-Etale: lisse is the French term for smooth), which has the same open sets as the smooth topology but the open covers are given by etale rather than smooth maps. This usually seems to lead to an equivalent category of quasi-coherent sheaves, but is easier to use: for example it is easier to compare with the etale topology on algebraic spaces. The Lis-Et topology has a subtle technical problem: a morphism between stacks does not in general give a morphism between the corresponding topoi. (The problem is that while one can construct a pair of adjoint functors f*, f*, as needed for a geometric morphism of topoi, the functor f* is not left exact in general. This problem is notorious for having caused some errors in published papers and books.) This means that constructing the pullback of a quasicoherent sheaf under a morphism of stacks requires some extra effort. It is also possible to use finer topologies. Most reasonable "sufficiently large" Grothendieck topologies seem to lead to equivalent categories of quasi-coherent sheaves, but the larger a topology is the harder it is to handle, so one generally prefers to use smaller topologies as long as they have enough open sets. For example, the big fppf topology leads to essentially the same category of quasi-coherent sheaves as the Lis-Et topology, but has a subtle problem: the natural embedding of quasi-coherent sheaves into OX modules in this topology is not exact (it does not preserve kernels in general). Other types of stack

Differentiable stacks and topological stacks are defined in a way similar to algebraic stacks, except that the underlying category of affine schemes is replaced by the category of smooth manifolds or topological spaces. More generally one can define the notion of an n-sheaf or n–1 stack, which is roughly a sort of sheaf taking values in n–1 categories. There are several inequivalent ways of doing this. 1-sheaves are the same as sheaves, and 2-sheaves are the same as stacks. They are called higher stacks. A very similar and analogous extension is to develop the stack theory on non-discrete objects (i.e., a space is really a spectrum in algebraic topology). The resulting stacky objects are called derived stacks (or spectral stacks). Jacob Lurie's under-construction book Spectral Algebraic Geometry studies a generalization which he calls a spectral Deligne–Mumford stack. By definition, it is a ringed ∞-topos that is étale-locally the étale spectrum of an E∞-ring (this notion subsumes that of a derived scheme, at least in characteristic zero.) Set-theoretical problems

There are some minor set theoretical problems with the usual foundation of the theory of stacks, because stacks are often defined as certain functors to the category of sets and are therefore not sets. There are several ways to deal with this problem:

One can work with Grothendieck universes: a stack is then a functor between classes of some fixed Grothendieck universe, so these classes and the stacks are sets in a larger Grothendieck universe. The drawback of this approach is that one has to assume the existence of enough Grothendieck universes, which is essentially a large cardinal axiom. One can define stacks as functors to the set of sets of sufficiently large rank, and keep careful track of the ranks of the various sets one uses. The problem with this is that it involves some additional rather tiresome bookkeeping. One can use reflection principles from set theory stating that one can find set models of any finite fragment of the axioms of ZFC to show that one can automatically find sets that are sufficiently close approximations to the universe of all sets. One can simply ignore the problem. This is the approach taken by many authors. See also
Algebraic stack
Chow group of a stack
Deligne–Mumford stack
Glossary of algebraic geometry
Pursuing Stacks
Quotient space of an algebraic stack
Ring of modular forms
Simplicial presheaf
Stacks Project
Toric stack

Notes

References

Pedagogical

 is an expository article describing the basics of stacks with examples. Guides to the literature
 https://maths-people.anu.edu.au/~alperj/papers/stacks-guide.pdf
 http://stacks.math.columbia.edu/tag/03B0

References

 Unfortunately this book uses the incorrect assertion  that morphisms of algebraic stacks induce morphisms of lisse-étale topoi. Some of these errors were fixed by . Further reading

External links
 
 
 
 
 
 "Good introductory references on algebraic stacks?" Algebraic geometry
Category theory