# Algebraic stack

In mathematics, an algebraic stack is a vast generalization of algebraic spaces, or schemes, which are foundational for studying moduli theory. Many moduli spaces are constructed using techniques specific to algebraic stacks, such as Artin's representability theorem, which is used to construct the moduli space of pointed algebraic curves ${\mathcal {M}}_{g,n}$ and the moduli stack of elliptic curves. Originally, they were introduced by Alexander Grothendieck to keep track of automorphisms on moduli spaces, a technique which allows for treating these moduli spaces as if their underlying schemes or algebraic spaces are smooth. After Grothendieck developed the general theory of descent, and Giraud the general theory of stacks, the notion of algebraic stacks was defined by Michael Artin.

## Definition
### Motivation

One of the motivating examples of an algebraic stack is to consider a groupoid scheme $(R,U,s,t,m)$ over a fixed scheme $S$. For example, if $R=\mu _{n}\times _{S}\mathbb {A} _{S}^{n}$ (where $\mu _{n}$ is the group scheme of roots of unity), $U=\mathbb {A} _{S}^{n}$, $s={\text{pr}}_{U}$ is the projection map, $t$ is the group action
   $\zeta _{n}\cdot (x_{1},\ldots ,x_{n})=(\zeta _{n}x_{1},\ldots ,\zeta _{n}x_{n})$
and $m$ is the multiplication map
   $m:(\mu _{n}\times _{S}\mathbb {A} _{S}^{n})\times _{\mu _{n}\times _{S}\mathbb {A} _{S}^{n}}(\mu _{n}\times _{S}\mathbb {A} _{S}^{n})\to \mu _{n}\times _{S}\mathbb {A} _{S}^{n}$
on $\mu _{n}$. Then, given an $S$-scheme $\pi :X\to S$, the groupoid scheme $(R(X),U(X),s,t,m)$ forms a groupoid (where $R,U$ are their associated functors). Moreover, this construction is functorial on $(\mathrm {Sch} /S)$ forming a contravariant 2-functor
   $(R(-),U(-),s,t,m):(\mathrm {Sch} /S)^{\mathrm {op} }\to {\text{Cat}}$
where ${\text{Cat}}$ is the 2-category of small categories. Another way to view this is as a fibred category $[U/R]\to (\mathrm {Sch} /S)$ through the Grothendieck construction. Getting the correct technical conditions, such as the Grothendieck topology on $(\mathrm {Sch} /S)$, gives the definition of an algebraic stack. For instance, in the associated groupoid of $k$-points for a field $k$, over the origin object $0\in \mathbb {A} _{S}^{n}(k)$ there is the groupoid of automorphisms $\mu _{n}(k)$. However, in order to get an algebraic stack from $[U/R]$, and not just a stack, there are additional technical hypotheses required for $[U/R]$.

### Algebraic stacks

It turns out using the fppf-topology (faithfully flat and locally of finite presentation) on $(\mathrm {Sch} /S)$, denoted $(\mathrm {Sch} /S)_{fppf}$, forms the basis for defining algebraic stacks. Then, an algebraic stack is a fibered category
   $p:{\mathcal {X}}\to (\mathrm {Sch} /S)_{fppf}$
such that
* ${\mathcal {X}}$ is a category fibered in groupoids, meaning the overcategory for some $\pi :X\to S$ is a groupoid
* The diagonal map $\Delta :{\mathcal {X}}\to {\mathcal {X}}\times _{S}{\mathcal {X}}$ of fibered categories is representable as algebraic spaces
* There exists an $fppf$ scheme $U\to S$ and an associated 1-morphism of fibered categories ${\mathcal {U}}\to {\mathcal {X}}$ which is surjective and smooth called an atlas.

#### Explanation of technical conditions
##### Using the fppf topology

First of all, the fppf-topology is used because it behaves well with respect to descent. For example, if there are schemes $X,Y\in \operatorname {Ob} (\mathrm {Sch} /S)$ and $X\to Y$can be refined to an fppf-cover of $Y$, if $X$ is flat, locally finite type, or locally of finite presentation, then $Y$ has this property. this kind of idea can be extended further by considering properties local either on the target or the source of a morphism $f:X\to Y$. For a cover $\{X_{i}\to X\}_{i\in I}$ we say a property ${\mathcal {P}}$ is local on the source if
   $f:X\to Y$ has ${\mathcal {P}}$ if and only if each $X_{i}\to Y$ has ${\mathcal {P}}$.
There is an analogous notion on the target called local on the target. This means given a cover $\{Y_{i}\to Y\}_{i\in I}$
   $f:X\to Y$ has ${\mathcal {P}}$ if and only if each $X\times _{Y}Y_{i}\to Y_{i}$ has ${\mathcal {P}}$.
For the fppf topology, having an immersion is local on the target. In addition to the previous properties local on the source for the fppf topology, $f$ being universally open is also local on the source. Also, being locally Noetherian and Jacobson are local on the source and target for the fppf topology. This does not hold in the fpqc topology, making it not as "nice" in terms of technical properties. Even though this is true, using algebraic stacks over the fpqc topology still has its use, such as in chromatic homotopy theory. This is because the Moduli stack of formal group laws ${\mathcal {M}}_{fg}$ is an fpqc-algebraic stack$^{pg40}$.

##### Representable diagonal

By definition, a 1-morphism $f:{\mathcal {X}}\to {\mathcal {Y}}$ of categories fibered in groupoids is representable by algebraic spaces if for any fppf morphism $U\to S$ of schemes and any 1-morphism $y:(Sch/U)_{fppf}\to {\mathcal {Y}}$, the associated category fibered in groupoids
   $(Sch/U)_{fppf}\times _{\mathcal {Y}}{\mathcal {X}}$
is representable as an algebraic space, meaning there exists an algebraic space
   $F:(Sch/S)_{fppf}^{op}\to Sets$
such that the associated fibered category ${\mathcal {S}}_{F}\to (Sch/S)_{fppf}$ is equivalent to $(Sch/U)_{fppf}\times _{\mathcal {Y}}{\mathcal {X}}$. There are a number of equivalent conditions for representability of the diagonal which help give intuition for this technical condition, but one of main motivations is the following: for a scheme $U$ and objects $x,y\in \operatorname {Ob} ({\mathcal {X}}_{U})$ the sheaf $\operatorname {Isom} (x,y)$ is representable as an algebraic space. In particular, the stabilizer group for any point on the stack $x:\operatorname {Spec} (k)\to {\mathcal {X}}_{\operatorname {Spec} (k)}$ is representable as an algebraic space.
Another important equivalence of having a representable diagonal is the technical condition that the intersection of any two algebraic spaces in an algebraic stack is an algebraic space. Reformulated using fiber products
   ${\begin{matrix}Y\times _{\mathcal {X}}Z&\to &Y\\\downarrow &&\downarrow \\Z&\to &{\mathcal {X}}\end{matrix}}$
the representability of the diagonal is equivalent to $Y\to {\mathcal {X}}$ being representable for an algebraic space $Y$. This is because given morphisms $Y\to {\mathcal {X}},Z\to {\mathcal {X}}$ from algebraic spaces, they extend to maps ${\mathcal {X}}\times {\mathcal {X}}$ from the diagonal map. There is an analogous statement for algebraic spaces which gives representability of a sheaf on $(F/S)_{fppf}$ as an algebraic space.
Note that an analogous condition of representability of the diagonal holds for some formulations of higher stacks where the fiber product is an $(n-1)$-stack for an $n$-stack ${\mathcal {X}}$.

#### Surjective and smooth atlas
##### 2-Yoneda lemma

The existence of an $fppf$ scheme $U\to S$ and a 1-morphism of fibered categories ${\mathcal {U}}\to {\mathcal {X}}$ which is surjective and smooth depends on defining a smooth and surjective morphisms of fibered categories. Here ${\mathcal {U}}$ is the algebraic stack from the representable functor $h_{U}$ on $h_{U}:(Sch/S)_{fppf}^{op}\to Sets$ upgraded to a category fibered in groupoids where the categories only have trivial morphisms. This means the set
   $h_{U}(T)={\text{Hom}}_{(Sch/S)_{fppf}}(T,U)$
is considered as a category, denoted $h_{\mathcal {U}}(T)$, with objects in $h_{U}(T)$ as $fppf$ morphisms
   $f:T\to U$
and morphisms are the identity morphism. Hence
   $h_{\mathcal {U}}:(Sch/S)_{fppf}^{op}\to Groupoids$
is a 2-functor of groupoids. Showing this 2-functor is a sheaf is the content of the 2-Yoneda lemma. Using the Grothendieck construction, there is an associated category fibered in groupoids denoted ${\mathcal {U}}\to {\mathcal {X}}$.

##### Representable morphisms of categories fibered in groupoids

To say this morphism ${\mathcal {U}}\to {\mathcal {X}}$ is smooth or surjective, we have to introduce representable morphisms. A morphism $p:{\mathcal {X}}\to {\mathcal {Y}}$ of categories fibered in groupoids over $(Sch/S)_{fppf}$ is said to be representable if given an object $T\to S$ in $(Sch/S)_{fppf}$ and an object $t\in {\text{Ob}}({\mathcal {Y}}_{T})$ the 2-fibered product
   $(Sch/T)_{fppf}\times _{t,{\mathcal {Y}}}{\mathcal {X}}_{T}$
is representable by a scheme. Then, we can say the morphism of categories fibered in groupoids $p$ is smooth and surjective if the associated morphism
   $(Sch/T)_{fppf}\times _{t,{\mathcal {Y}}}{\mathcal {X}}_{T}\to (Sch/T)_{fppf}$
of schemes is smooth and surjective.

### Deligne–Mumford stacks

Algebraic stacks, also known as Artin stacks, are by definition equipped with a smooth surjective atlas ${\mathcal {U}}\to {\mathcal {X}}$, where ${\mathcal {U}}$ is the stack associated to some scheme $U\to S$. If the atlas ${\mathcal {U}}\to {\mathcal {X}}$ is moreover étale, then ${\mathcal {X}}$ is said to be a Deligne–Mumford stack. The subclass of Deligne-Mumford stacks is useful because it provides the correct setting for many natural stacks considered, such as the moduli stack of algebraic curves. In addition, they are strict enough that object represented by points in Deligne-Mumford stacks do not have infinitesimal automorphisms. This is very important because infinitesimal automorphisms make studying the deformation theory of Artin stacks very difficult. For example, the deformation theory of the Artin stack $BGL_{n}=[*/GL_{n}]$, the moduli stack of rank $n$ vector bundles, has infinitesimal automorphisms controlled partially by the Lie algebra ${\mathfrak {gl}}_{n}$. This leads to an infinite sequence of deformations and obstructions in general, which is one of the motivations for studying moduli of stable bundles. Only in the special case of the deformation theory of line bundles $[*/GL_{1}]=[*/\mathbb {G} _{m}]$ is the deformation theory tractable, since the associated Lie algebra is abelian.
Note that many stacks cannot be naturally represented as Deligne-Mumford stacks because it only allows for finite covers, or, algebraic stacks with finite covers. Note that because every Etale cover is flat and locally of finite presentation, algebraic stacks defined with the fppf-topology subsume this theory; but, it is still useful since many stacks found in nature are of this form, such as the moduli of curves ${\mathcal {M}}_{g}$. Also, the differential-geometric analogue of such stacks are called orbifolds. The Etale condition implies the 2-functor
   $B\mu _{n}:(\mathrm {Sch} /S)^{\text{op}}\to {\text{Cat}}$
sending a scheme to its groupoid of $\mu _{n}$-torsors is representable as a stack over the Etale topology, but the Picard-stack $B\mathbb {G} _{m}$ of $\mathbb {G} _{m}$-torsors (equivalently the category of line bundles) is not representable. Stacks of this form are representable as stacks over the fppf-topology.
Another reason for considering the fppf-topology versus the etale topology is over characteristic $p$ the Kummer sequence
   $0\to \mu _{p}\to \mathbb {G} _{m}\to \mathbb {G} _{m}\to 0$
is exact only as a sequence of fppf sheaves, but not as a sequence of etale sheaves.

### Defining algebraic stacks over other topologies

Using other Grothendieck topologies on $(F/S)$ gives alternative theories of algebraic stacks which are either not general enough, or don't behave well with respect to exchanging properties from the base of a cover to the total space of a cover. It is useful to recall there is the following hierarchy of generalization
   ${\text{fpqc}}\supset {\text{fppf}}\supset {\text{smooth}}\supset {\text{etale}}\supset {\text{Zariski}}$
of big topologies on $(F/S)$.

## Structure sheaf

The structure sheaf of an algebraic stack is an object pulled back from a universal structure sheaf ${\mathcal {O}}$ on the site $(Sch/S)_{fppf}$. This universal structure sheaf is defined as
   ${\mathcal {O}}:(Sch/S)_{fppf}^{op}\to Rings,{\text{ where }}U/X\mapsto \Gamma (U,{\mathcal {O}}_{U})$
and the associated structure sheaf on a category fibered in groupoids
   $p:{\mathcal {X}}\to (Sch/S)_{fppf}$
is defined as
   ${\mathcal {O}}_{\mathcal {X}}:=p^{-1}{\mathcal {O}}$
where $p^{-1}$ comes from the map of Grothendieck topologies. In particular, this means is $x\in {\text{Ob}}({\mathcal {X}})$ lies over $U$, so $p(x)=U$, then ${\mathcal {O}}_{\mathcal {X}}(x)=\Gamma (U,{\mathcal {O}}_{U})$. As a sanity check, it's worth comparing this to a category fibered in groupoids coming from an $S$-scheme $X$ for various topologies. For example, if
   $({\mathcal {X}}_{Zar},{\mathcal {O}}_{\mathcal {X}})=((Sch/X)_{Zar},{\mathcal {O}}_{X})$
is a category fibered in groupoids over $(Sch/S)_{fppf}$, the structure sheaf for an open subscheme $U\to X$ gives
   ${\mathcal {O}}_{\mathcal {X}}(U)={\mathcal {O}}_{X}(U)=\Gamma (U,{\mathcal {O}}_{X})$
so this definition recovers the classic structure sheaf on a scheme. Moreover, for a quotient stack ${\mathcal {X}}=[X/G]$, the structure sheaf this just gives the $G$-invariant sections
   ${\mathcal {O}}_{\mathcal {X}}(U)=\Gamma (U,u^{*}{\mathcal {O}}_{X})^{G}$
for $u:U\to X$ in $(Sch/S)_{fppf}$.

## Examples
### Classifying stacks

Many classifying stacks for algebraic groups are algebraic stacks. In fact, for an algebraic group space $G$ over a scheme $S$ which is flat of finite presentation, the stack $BG$ is algebraic$^{theorem6.1}$.