diff -urN -X stacks-0.2/src/documentation/dontdiff stacks-0.2.orig/src/categories.tex stacks-0.2/src/categories.tex
--- stacks-0.2.orig/src/categories.tex	2006-02-16 16:33:23.000000000 +0000
+++ stacks-0.2/src/categories.tex	2006-03-14 02:49:38.000000000 +0000
@@ -149,16 +149,18 @@
 A groupoid is a category where every morphism is an isomorphism.
 \end{definition}
 
-\begin{example}\label{example-group}
+\begin{example}
+\label{example-group-groupoid}
 A group $G$ can be thought of as a groupoid with a single object $x$
 and morphisms $\text{Mor}(x,x)=G$, with the composition rule
 given by the group law in $G$.
 \end{example}
 
 \begin{example}
-  Any set is $C$ the set of objects of a groupoid $\mathcal{C}$ if we
-  let $\text{Ob}(\mathcal{C})=C$ and declare $\text{Mor}(x,y)$ to be empty if
-  $x\neq y$ and to be $\{\text{id}_x\}$ if $x=y$.
+\label{example-set-groupoid}
+Any set $C$ the set of objects of a groupoid $\mathcal{C}$ if we
+let $\text{Ob}(\mathcal{C})=C$ and declare $\text{Mor}(x,y)$ to be empty if
+$x\neq y$ and to be $\{\text{id}_x\}$ if $x=y$.
 \end{example}
 
 \smallskip\noindent A functor $F : \mathcal{A} \to \mathcal{B}$
@@ -192,27 +194,29 @@
 $x \in \text{Ob}(\mathcal{A})$ such that $F(x)$ is isomorphic to $z$ in
 $\mathcal{B}$.
 
-\begin{example}\label{example-group-homorphism-functor}
+\begin{example}
+\label{example-group-homorphism-functor}
 A homomorphism $p\colon G\to H$ of groups gives rise to a functor
-between the associated groupoids in Example \ref{example-group}.  It is
+between the associated groupoids in Example \ref{example-group-groupoid}. It is
 faithful (resp.\ fully faithful) if and only if $p$ is injective (resp.\ an
 isomorphism).
 \end{example}
 
-\begin{example}\label{example-comma-category}
-  Given $X\in \text{Ob}(\mathcal{C})$ we define the comma category
-  $\mathcal{C}/X$ to be the category whose objects are morphisms $Y\to
-  X$ for some $Y\in \text{Ob}(\mathcal{C})$, and morphisms between objects
-  $Y\to X$ and $Y'\to X$ are morphisms $Y\to Y'$ in $\mathcal{C}$ that
-  make the obvious diagram commute.  Note that there is a functor
-  $p_X\colon \mathcal{C}/X\to \mathcal{C}$ which simply forgets the
-  morphism for $X$.  Moreover given a morphism $f\colon X'\to X$ in
-  $\mathcal{C}$ there is an induced functor $F\colon \mathcal{C}/X' \to
-  \mathcal{C}/X$ obtained by composition with $f$, and $p_X\circ F =
-  p_{X'}$.
+\begin{example}
+\label{example-comma-category}
+Given a category $\mathcal{C}$ and an object $X\in \text{Ob}(\mathcal{C})$
+we define the category of objects over $X$, denoted $\mathcal{C}/X$ as follows.
+The objects of $\mathcal{C}/X$ are morphisms $Y\to X$ for
+some $Y\in \text{Ob}(\mathcal{C})$. Morphisms between objects
+$Y\to X$ and $Y'\to X$ are morphisms $Y\to Y'$ in $\mathcal{C}$ that
+make the obvious diagram commute.  Note that there is a functor
+$p_X\colon \mathcal{C}/X\to \mathcal{C}$ which simply forgets the
+morphism for $X$.  Moreover given a morphism $f\colon X'\to X$ in
+$\mathcal{C}$ there is an induced functor 
+$F\colon \mathcal{C}/X' \to \mathcal{C}/X$ obtained by composition with $f$,
+and $p_X\circ F = p_{X'}$.
 \end{example}
 
-
 \smallskip\noindent
 A transformation of functors $t : F \to G$ (or simply a morphism of functors)
 between functors $F, G : \mathcal{A} \to \mathcal{B}$ is given by the following
@@ -246,7 +250,9 @@
 
 \subsubsection{Additional notions}
 \label{subsubsection-categories-additional}
-\begin{definition}\label{definition-fibre-products}
+
+\begin{definition}
+\label{definition-fibre-products}
 Let $x,y\in \text{Ob}(\mathcal{C})$ and $f\in \text{Mor}_{\mathcal{C}}(x,z)$
 and $g\in \text{Mor}_{\mathcal C}(y,z)$.  The fibre product of $f$ and $g$ is
 an object $x\times_z y\in \text{Ob}(\mathcal{C})$ together with morphisms 
@@ -275,6 +281,7 @@
 and $g\in \text{Mor}_{\mathcal C}(y,z)$.
 \end{definition}
 
+\noindent
 Given a category $\mathcal{C}$ we can form the opposite category
 $\mathcal{C}^{\text{opp}}$ which has the same objects as $\mathcal{C}$
 but all morphisms reversed, so
@@ -285,28 +292,37 @@
 morphisms $f$ and $g$ in $\mathcal{C}$, $F(f\circ g) = F(g)\circ
 F(f)$.
 
-\begin{example}\label{example-hom-functor}
-  For any $U\in \text{Ob}(\mathcal{C})$ there is a contravariant
-  functor $$\text{Mor}(-,U) \colon\mathcal{C} \to \text{Sets}$$ which
-  takes an object $X$ to the set $\text{Mor}_{\mathcal{C}}(X,U)$.
-  Given a morphism $f\colon X\to Y$ $\text{Mor}(-,U)(f)\colon
-  \text{Mor}(Y,U)\to \text{Mor}(X,U)$ takes $\phi$ to $\phi\circ f$ .
-  If $\mathcal{C}$ is a category of schemes this functor is sometimes
-  referred to as the \emph{functor of points} of $U$.
+\begin{example}
+\label{example-hom-functor}
+For any $U\in \text{Ob}(\mathcal{C})$ there is a contravariant
+functor 
+$$
+\text{Mor}(-,U) \colon\mathcal{C} \to \text{Sets}
+$$
+which takes an object $X$ to the set $\text{Mor}_{\mathcal{C}}(X,U)$.
+Given a morphism $f\colon X\to Y$ the corresponding map
+$\text{Mor}(-,U)(f)\colon \text{Mor}(Y,U)\to \text{Mor}(X,U)$ takes
+$\phi$ to $\phi\circ f$. More commonly this functor is denoted
+$h_U : \mathcal{C}^{\text{opp}} \to \text{Sets}$. If $\mathcal{C}$ is the
+category of schemes this functor is sometimes referred to as the
+\emph{functor of points} of $U$.
 \end{example}
 
-\begin{example}\label{example-representable-functor}
-  A contravariant functor $F\colon \mathcal{C}\to \text{Sets}$ is said
-  to be representable if it is isomorphic to the functor
-  $\text{Mor}(-,U)$ for some object $U$ of $\mathcal{C}$.
-\end{example}
+\begin{definition}
+\label{definition-representable-functor}
+A contravariant functor $F\colon \mathcal{C}\to \text{Sets}$ is said
+to be representable if it is isomorphic to the functor
+$h_U(-) = \text{Mor}(-,U)$ for some object $U$ of $\mathcal{C}$.
+\end{definition}
 
-\noindent
-FIXME: representable morphisms (namely morphisms
-$x\to y$ such that for every $w \to y$ the fibre product $w\times_y x$
-exists), etc.
+\begin{definition}
+\label{definition-representable-morphism}
+A morphism $f : x \to y$ of a category $\mathcal{C}$ is said to be
+representable, if and only if for every morphism $z \to y$ in $\mathcal{C}$
+the fibre product $z\times_y x$ exists.
+\end{definition}
 
-\subsection{2-Categories}
+\subsection{2-categories}
 \label{subsection-2-categories}
 
 \noindent
@@ -358,7 +374,7 @@
 \item Every $2$-morphism is an isomorphism. This makes sense since the 
 conditions sofar imply that $\text{Mor}_\mathcal{C}(x,y)$ is a category
 with $1$-morphisms as objects and $2$-morphisms as morphisms. So this
-condition just means it is a groupoid.
+condition means every $\text{Mor}_\mathcal{C}(x,y)$ is a groupoid.
 \item Let $x,y,z\in \text{Ob}(\mathcal{C})$ and let $G \in 
 \text{Mor}_\mathcal{C}(y,z)$.
 The map $\text{Mor}_\mathcal{C}(x,y) \to 
@@ -383,8 +399,10 @@
 \noindent
 This is obviously not a very pleasant type of object to work with.
 On the other hand, there are lots of examples where it is quite clear
-how you work with it. Note that we require the $2$-morphisms to all
-be isomorphisms. FIXME: Remove this definition? Replace by a better one?
+how you work with it. Note that we require the $2$-morphisms to be
+isomorphisms. As far as this text is concerned all 2-categories occuring
+is this document are (full) sub 2-categories of the example below.
+FIXME: Remove this definition? Replace by a better one?
 
 \begin{example}
 \label{example-category-of-categories}
@@ -413,23 +431,220 @@
 
 \begin{remark}
 \label{remark-other-2-categories}
-There are variants of the construction of \ref{remark-category-of-categories}
+There are variants of the construction of \ref{example-category-of-categories}
 above where we look at the $2$-category of groupoids (contained in some 
 $\alpha$), or categories fibred in groupoids over a fixed category, or stacks. 
 And so on.
 \end{remark}
 
-\begin{remark}
-\label{functor-into-2-category}
-A functor from an ordinary category into a $2$-category will ignore the
-$2$-morphisms unless mentioned otherwise.
-\end{remark}
+\begin{remarks}
+\label{remarks-functor-into-2-category}
+(1) A functor from an ordinary category into a $2$-category will ignore the
+$2$-morphisms unless mentioned otherwise. In other words, it will be a 
+``usual'' functor into the category formed out of 2-category by forgetting
+all the 2-morpshisms.
+
+\smallskip\noindent
+(2) Another notion of a functor from a category $\mathcal{A}$ into a
+2-category $\mathcal{C}$ would be to say that it is given by a map
+$F : \text{Ob}(\mathcal{A}) \to \text{Ob}(\mathcal{C})$ together with a
+family of maps 
+$F : \text{Mor}_{\mathcal{A}}(x,y) \to \text{Mor}_{\mathcal{C}}(F(x),F(y))$
+such that for every composable pair of morphisms $f,g$ of $\mathcal{A}$
+the morphisms $F(g \circ f)$ and $F(g) \circ F(f)$ are 2-isomorphic. This is
+not a very good notion, since for example it does not require $F(\text{id}_x)$
+to be isomorphic to $\text{id}_{F(x)}$. Even if you do then
+there may be a problem: see the conditions in (3) below.
+
+\smallskip\noindent
+(3) A better notion is the following. A weak functor (or a pseudo-functor)
+from a category $\mathcal{A}$ into a 2-category $\mathcal{C}$ is given by 
+\begin{enumerate}
+\item a map $F : \text{Ob}(\mathcal{A}) \to \text{Ob}(\mathcal{C})$,
+\item for every pair $x,y\in \text{Ob}(\mathcal{A})$ a map
+$F : \text{Mor}_{\mathcal{A}}(x,y) \to  \text{Mor}_{\mathcal{C}}(F(x),F(y))$,
+\item for every $x\in \text{ob}(C)$ a $2$-morphism
+$\alpha_x : \text{id}_x \to F(\text{id}_{x})$, and
+\item for every pair of composable morphisms $f,g$ of $\mathcal{A}$ a 
+$2$-morphism $\alpha_{f,g} : F(g \circ f) \to F(g) \circ F(f)$.
+\end{enumerate}
+Now these data are subject to the following conditions:
+(with notations as in Definition \ref{definition-2-category})
+\begin{enumerate}
+\item for any morphism $f : x \to y$ in $\mathcal{A}$ the morphism
+$\alpha_{f,\text{id}_y} : F(f) \to F(f) \circ F(\text{id}_y)$
+equals the composition of $F(f) \circ \text{id}_{F(y)} = F(f)$ with
+$F(f)(\alpha_y)$, and similary for $\alpha_{\text{id}_x,f}$ and
+$\alpha_x$, and
+\item for any triple of composable morphisms $f,g,h$ the
+compositions $F(h)(\alpha_{f,g}) \circ \alpha_{g\circ f, h}$ and
+$F(f)(\alpha_{g,h}) \circ \alpha_{g,f\circ h}$ should be equal.
+\end{enumerate}
+Again this is not a very workable notion, but it does sometimes come up.
+There is a theorem that says that any pseudo-functor is isomorphic to
+a functor. FIXME: Add more as needed.
+\end{remarks}
+
+\subsection{2-fibre products}
+\label{subsection-2-fibre-products}
+
+\noindent
+In this subsection we introduce $2$-fibre products. Suppose that $\mathcal{C}$
+is a 2-category. We say that a diagram
+$$
+\xymatrix{
+w \ar[r] \ar[d] & y \ar[d] \\
+x \ar[r] & z }
+$$
+2-commutes if the two 1-morphisms $w \to y \to z$ and $w \to x \to z$ are
+2-isomorphic. In a 2-category it is more natural to ask for 2-commutativity 
+of diagrams than for actually commuting diagrams. (Indeed, some may say that
+we should not work with strict 2-categories at all, and in a ``weak''
+2-category the notion of a commutative diagram of 1-morphisms does not even
+make sense.) Correspondingly the notion of a fibre product has to be adjusted.
+
+\smallskip\noindent
+Let $\mathcal{C}$ be a $2$-category. Let $x,y,z\in \text{Ob}(\mathcal{C})$ and
+$f\in \text{Mor}_{\mathcal{C}}(x,z)$ and $g\in \text{Mor}_{\mathcal C}(y,z)$.
+In order to define the 2-fibre product of $f$ and $g$ we are going to look at
+2-commutative diagrams
+$$
+\xymatrix{
+&w \ar[r]^{a} \ar[d]_{b} & x \ar[d]^{f} \\
+&y \ar[r]^{g} & z. }
+$$
+Now in the case of categories, the fibre product is a final object in the
+category of such diagrams. Correspondingly a 2-fibre product is a final object
+in a 2-category (see definition below). The 2-category we will consider is
+the 2-category of 2-commutative diagrams defined as follows:
+\begin{enumerate}
+\item Objects are quadruples $(w,a,b,\phi)$ as above where $\phi$
+is a 2-morphism $\phi : f \circ a \to g \circ b$, 
+\item 1-morphisms from $(w,a,b,\phi)$ to $(w',a',b',\phi')$
+are given by $(k : w \to w', \alpha : a' \to a \circ k,
+\beta : b \circ k \to b')$ such that $\phi'$ equals 
+$$
+\xymatrix{
+f \circ a' \ar[r]^{f(\alpha)} &
+f \circ a \circ k \ar[r]^{k(\phi)} &
+g \circ b \circ k \ar[r]^{g(\beta)} &
+g \circ b'. }
+$$
+\item a 2-morphism between $(k_i, \alpha_i, \beta_i)$, $i=1,2$ is given
+by a 2-morphism $\delta : k_1 \to k_2$ such that 
+$$
+\xymatrix{
+a' \ar[rd]_{\alpha_2} \ar[r]^{\alpha_1} & 
+a \circ k_1 \ar[d]^{a(\delta)} &
+&
+b \circ k_1 \ar[r]^{\beta_1} \ar[d]_{b(\delta)} &
+b'
+\\
+&
+a \circ k_2 &
+&
+b \circ k_2 \ar[ru]_{\beta_2}
+&
+}
+$$
+commute.
+\end{enumerate}
+
+\begin{definition}
+\label{definition-final-object-2-category}
+A final object of a 2-category $\mathcal{C}$ is an object $x$ such that
+(1) for every $y \in \text{Ob}(\mathcal{C})$ there is a morphism $y \to x$,
+and (2) every two morphisms $y \to x$ are isomorphic by a unique 2-morphism.
+\end{definition}
+
+\begin{definition}
+\label{definition-2-fibre-products}
+Let $\mathcal{C}$ be a $2$-category.
+Let $x,y,z\in \text{Ob}(\mathcal{C})$ and $f\in \text{Mor}_{\mathcal{C}}(x,z)$
+and $g\in \text{Mor}_{\mathcal C}(y,z)$. A 2-fibre product of $f$ and $g$ is
+a final object in the category of 2-commutative diagrams described above. If
+a 2-fibre product exists we
+will denote it $x\times_z y\in \text{Ob}(\mathcal{C})$, and denote the
+required morphisms $p\in \text{Mor}_{\mathcal C}(x\times_z y,x)$ and 
+$q\in \text{Mor}_{\mathcal C}(x\times_z y,y)$ making the diagram
+$$
+\xymatrix{
+&x\times_y z \ar[r]^{p} \ar[d]_{q} & x \ar[d]^{f} \\
+&y \ar[r]^{g} & z }
+$$
+2-commute and we will denote the given 2-morphism exhibiting this by
+$\psi : f \circ p \to g \circ q$.
+\end{definition}
 
 \noindent
-FIXME. Perhaps define $2$-functors.
+Thus the following universal property holds: for any
+$w\in \text{Ob}(\mathcal{C})$ and morphisms 
+$a \in \text{Mor}_{\mathcal C}(w,x)$ and 
+$b \in \text{Mor}_{\mathcal{C}}(w,y)$ with a given 2-morphism
+$\phi : f \circ a \to g\circ b$
+there is a $\gamma \in \text{Mor}_{\mathcal C}(w,x\times_z y)$
+making the diagram
+$$
+\xymatrix{
+w\ar[rrrd]^a \ar@{-->}[rrd]_\gamma \ar[rrdd]_b &&\\
+&&x\times_y z \ar[r]_{p} \ar[d]_{q} & x \ar[d]^{f} \\
+&&y \ar[r]^{g} & z }
+$$
+2-commute such that for suitable choices of $q \circ \gamma \to b$
+and $a \to p \circ \gamma$ the composition
+$$
+\xymatrix{
+f \circ a \ar[r] &
+f \circ p \circ \gamma \ar[r]^{\gamma(\psi)} &
+g \circ q \circ \gamma \ar[r] &
+g\circ b }
+$$
+equals $\phi$. Of course the exact properties are finer than this. All of the
+cases of 2-fibre products that we will need later on come from the following
+example of 2-fibre products in the 2-category of categories.
+
+\begin{example}
+\label{example-2-fibre-product-categories}
+In this example we switch notations and we let $\mathcal{A}$, $\mathcal{B}$,
+and $\mathcal{C}$ be categories and we let $F : \mathcal{A} \to \mathcal{C}$
+and $G : \mathcal{B} \to \mathcal{C}$ be functors. In this case the 2-fibre
+product $\mathcal{A}\times_\mathcal{C} \mathcal{B}$ exists and is given by
+the following:
+\begin{enumerate}
+\item an object of $\mathcal{A}\times_\mathcal{C} \mathcal{B}$ is a triple
+$(A,B,f)$, where $A\in \text{Ob}(\mathcal{A})$, $B\in \text{Ob}(\mathcal{B})$,
+and $f : F(A) \to G(B)$ is an isomorphism in $\mathcal{C}$,
+\item a morphism $(A,B,f) \to (A',B', f')$ is given by a pair $(a,b)$, where
+$a : A \to A'$ is a morphism in $\mathcal{A}$, and $b : B \to B'$ is a
+morphism in $\mathcal{B}$ such that the diagram 
+$$
+\xymatrix{
+F(A) \ar[r]^f \ar[d]^{F(a)} & G(B) \ar[d]^{G(b)} \\
+F(A') \ar[r]^{f'} & G(B')
+}
+$$
+is commutative.
+\end{enumerate}
+The functors $p : \mathcal{A}\times_\mathcal{C}\mathcal{B} \to \mathcal{A}$
+and $q : \mathcal{A}\times_\mathcal{C}\mathcal{B} \to \mathcal{A}$ are the
+forgetfull functors in this case. The transformation $\psi : F \circ p \to
+G \circ q$ is given on the object $\xi = (A,B,f)$ by
+$\psi_\xi = f : F(p(\xi)) = F(A) \to G(B) = G(q(\xi))$.
 
 \smallskip\noindent
-FIXME. Introduce $2$-fibre product here.
+Let us check the universal property: let $\mathcal{W}$ be a category, let
+$X : \mathcal{W} \to \mathcal{A}$ and $Y : \mathcal{W} \to \mathcal{B}$ be
+functors, and let $t : F \circ X \to G \circ Y$ be an isomorphism of functors.
+The desired functor $\gamma : \mathcal{W} \to
+\mathcal{A}\times_\mathcal{C}\mathcal{B}$
+is given by $W \mapsto (X(W), Y(W), t_W)$. What else could it be? 
+(A meta-argument for uniqueness.) FIXME: write this out.
+
+\smallskip\noindent
+Note that the functor $\gamma$ constructed above actually has the property
+that $p \circ \gamma = X$ and $q \circ \gamma = Y$. In general this need not
+be the case.
+\end{example}
 
 \section{Categories fibred in groupoids}
 \label{subsection-fibred-groupoids}
@@ -461,6 +676,7 @@
 p(\phi) = \text{id}_U\}.
 $$
 
+\smallskip\noindent
 In order to discuss the notion of ``category fibred in groupoids'' we
 temporarily introduce the notion of lifting.
 A {\it lift} of an object $U \in \text{Ob}(\mathcal{C})$ is an object 
@@ -523,7 +739,7 @@
 $p\colon \mathcal{S}\to\mathcal{C}$ is fibred in groupoids if and only if 
 $p$ is surjective.  The fibre category $\mathcal{S}_{U}$ over the (unique)
 object $U\in \text{Ob}(\mathcal{C})$ is the category associated to the
-kernel of $p$ as in Example \ref{example-group}.
+kernel of $p$ as in Example \ref{example-group-groupoid}.
 \end{example}
 
 \smallskip\noindent Suppose that for every $f : V \to U$ and $x\in
@@ -552,7 +768,6 @@
 $$ 
 such that for every $y\in \text{Ob}(\mathcal{S}_W)$ the following
 diagram commutes
-
 \begin{equation}
 \xymatrix{
 f^\ast g^\ast y \ar[r] \ar[d]_{t_y} & g^\ast y \ar[d] \\
@@ -638,65 +853,11 @@
 $$ 
 \end{example}
 
-\begin{example}
-\label{example-functor-groupoids}
-Suppose that $F : \mathcal{C} \to \text{Groupoids}$ is a contravariant functor
-to the category of groupoids (see 
-\hyperref[remark-functor-into-sets]{Remark~\ref*{remark-functor-into-sets}}
-and \hyperref[functor-into-2-category]{Remark~\ref{functor-into-2-category}}). 
-For $f : V \to U$ in $\mathcal{C}$ we will
-suggestively write $F(f) = f^\ast$ for the functor from $F(U)$ to $F(V)$. 
-From this we can construct a category fibred in groupoids over $\mathcal{C}$ 
-as follows. Define 
-$$
-\text{Ob}(\mathcal{S}) =
-\{(U,x) \mid U\in \text{Ob}(\mathcal{C}), x\in \text{Ob}(F(U)\}.
-$$ 
-For $(U,x), (V,y) \in \text{Ob}(\mathcal{S})$ we define
-$$
-\text{Mor}_\mathcal{S}((V,y),(U,x)) = 
-\{ (f, \phi) \mid f\in \text{Mor}_\mathcal{C}(V,U), 
-\phi \in \text{Mor}_{F(V)}(y, f^\ast x)\}.
-$$
-In order to define composition we use that $g^\ast \circ f^\ast = 
-(f \circ g)^\ast$ for a pair of composable morphisms of $\mathcal{C}$
-(by definition of a functor into a $2$-category).
-Namely, we define the composition of $\psi : z \to g^\ast y$ and 
-$ \phi : y \to f^\ast x$ to be $ g^\ast(\phi) \circ \psi$. It is clear
-what the functor $p : \mathcal{S} \to \mathcal{C}$ is. The condition
-that $F(U)$ is a groupoid for every $U$ guarantees that $\mathcal{S}$ is
-fibred in groupoids over $\mathcal{C}$. Lifts of morphisms exist: given 
-$f: V \to U$ in $\mathcal{C}$ and $(U,x)$ a lift of $U$, then 
-$(f, id_{f^\ast x}): (V, {f^\ast x}) \to (U,x)$ is a lift of $f$. 
-Uniqueness means $h$ in the diagram on the left determines $(h,\nu)$ on 
-the right:
-$$
-\xymatrix{
-V \ar[r]^f & U & (V,y) \ar[r]^{(f, \phi)} & (U,x) \\
-W \ar@{-->}[u]^h \ar[ru]_g & &
-(W,z) \ar@{-->}[u]^{(h,\nu)} \ar[ru]_{(g, \psi)} & \\
-}
-$$
-Then $\nu = (h^\ast \phi)^{-1} \circ \psi $ and the uniqueness of inverses
-guarantees this is the only lift making the diagram commute.
-
 \noindent
-We will write $\mathcal{S}_F \to \mathcal{C}$ for the resulting functor
-if we want to indicate the dependence on $F$. Because we can think of 
-objects of $\mathcal{S}_F$ as pairs $(U,x)$, we sometimes say $\mathcal{S}_F$ 
-is a {\it split} category fibred in groupoids.
-\end{example}
-
-\begin{example}\label{example-fibred-category-from-functor-of-points}
-  When $F=\text{Mor}(-,X)$ for some $X \in \text{Ob}(\mathcal{C})$,
-  $\mathcal{S}_F\to \mathcal{C}$ is the comma category $\mathcal{C}/X
-  \to \mathcal{C}$ from Example \ref{example-comma-category}.
-\end{example}
-
-\noindent
-We would like to assert that any category fibred in groupoids 
-over $\mathcal{C}$ is equivalent (over $\mathcal{C}$) to some 
-$\mathcal{S}_F$ as in the example. The notion of equivalence
+Later we would like to make assertions such as ``any category fibred in
+groupoids over $\mathcal{C}$ is equivalent to a split one'', or
+``any category fibred in groupoids whose fibre categories are setlike
+is equivalent to a category fibred in sets''. The notion of equivalence
 depends on the $2$-category we are working with. To make sure
 that everybody knows what we are talking about we define the
 $2$-category of categories over $\mathcal{C}$.
@@ -718,13 +879,15 @@
 is the full sub-$2$-category of this $2$-category whose objects
 are categories fibred in groupoids.
 
-\begin{lemma}\label{lemma-equivalence-fibred-categories}
+\begin{lemma}
+\label{lemma-equivalence-fibred-categories}
 Let $p\colon \mathcal{S}\to \mathcal{C}$ and 
 $p'\colon \mathcal{S'}\to \mathcal{C}$ be categories fibred in groupoids, and
 suppose that $G\colon \mathcal{S}\to \mathcal {S}'$ is a functor over 
 $\mathcal{C}$.  Then $G$ is fully faithful (resp.\ an equivalence) if and only
 if for each $U\in\text{Ob}(\mathcal{C})$ the induced functor 
-$G_U\colon \mathcal{S}_U\to \mathcal{S}'_U$ is fully faithful (resp.\ an equivalence).
+$G_U\colon \mathcal{S}_U\to \mathcal{S}'_U$ is fully faithful (resp.\ an
+equivalence).
 \end{lemma}
 
 \begin{proof}
@@ -754,6 +917,7 @@
 and $\text{Mor }_{\mathcal{S}'}(G(x),G(y))$, hence $G$
 is fully faithful.
 
+\smallskip\noindent
 Finally suppose for all $G_U$ is an equivalence for all $U$, so it is
 fully faithful and essentially surjective.  We have seen this implies $G$ is
 fully faithful, and thus to prove it is an equivalence we have to prove that
@@ -766,6 +930,151 @@
 isomorphic to $G(z)$ in $\mathcal{S}'$.
 \end{proof}
 
+\subsection{Categories fibred in sets}
+\label{subsection-fibred-in-sets}
+
+\noindent
+Let us call a category setlike if it is a groupoid where every object
+has exactly one automorphism: the identity. If $C$ is a set with an 
+equivalence relation $\sim$, then we can make a setlike category
+$\mathcal{C}$ as follows: $\text{Ob}(\mathcal{C}) = C$ and 
+$\text{Mor}_\mathcal{C}(x,y) = \emptyset$ unless $x \sim y$ in which
+case we set $\text{Mor}_\mathcal{C}(x,y) = \{1\}$. Transitivity of
+$\sim$ means that we can compose morphisms. Conversely any setlike
+category defines an equivalence relation on its objects (isomorphism)
+such that you recover the category (up to unique isomorphism -- not
+equivalence) from the procedure just described. This is why these categories
+are sometimes simply called equivalence relations.
+
+\smallskip\noindent
+A category is called discrete if the only morphisms are the identity 
+morphisms. Sometimes discrete categories are called sets (reasons as above).
+Discrete categories are setlike. For any setlike category $\mathcal{C}$
+there is a canonical procedure to make a discrete category equivalent to it,
+namely one replaces $\text{Ob}(\mathcal{C})$ by the set of isomorphism
+classes, and adds identity morphisms.
+
+\begin{definition}
+\label{definition-category-fibred-sets}
+A category fibred in sets $p : \mathcal{S} \to \mathcal{C}$
+is a category fibred in sets if all fibre categories are discrete.
+\end{definition}
+
+\noindent
+We discuss briefly the relationship between categories fibred in sets
+and presheaves (see Sites, \hyperref[sites-definition-presheaf]%
+{Definition~\ref*{sites-definition-presheaf}}). Suppose that $p :
+\mathcal{S} \to \mathcal{C}$ is fibred in sets. Let $f : V \to U$
+be a morphism in $\mathcal{C}$ and let $x \in \text{Ob}(\mathcal{S}_U)$.
+Then there is exactly one choice for the object $f^\ast x$. Thus we see that
+$(f \circ g)^\ast x = g^\ast(f^\ast x)$ for $f,g$ as in Lemma
+\ref{lemma-fibred-groupoids}. It follows that we may think of the
+assigments $U \mapsto \text{Ob}(\mathcal{S}_U)$ and $f \mapsto f^\ast$
+as a presheaf on $\mathcal{C}$.
+
+\smallskip\noindent
+Conversely, given a presheaf of sets 
+$F : \mathcal{C}^{\text{opp}} \to \text{Sets}$
+we can construct a category $\mathcal{S}_F$ fibred in sets
+over $\mathcal{C}$ by taking as fibre category $\mathcal{S}_{F,U}$ 
+the discrete category whose underlying set is $F(U)$. This is explained
+more generally, and in more detail in Example \ref{example-functor-groupoids}
+below. 
+
+\begin{lemma}
+Suppose that $p : \mathcal{S} \to \mathcal{C}$ is a category fibred in
+groupoids all of whose fibre categories $\mathcal{S}_U$ are setlike. 
+Then there exists a category fibred in sets $p' : \mathcal{S}' \to
+\mathcal{C}$ and an equivalence $\mathcal{S} \to \mathcal{S}'$
+of categories over $\mathcal{C}$.
+\end{lemma}
+
+\begin{proof}
+An object of the category $\mathcal{S}'$ will be a pair $(U, \xi)$, where
+$U \in \text{Ob}(\mathcal{C})$ and $\xi$ is an isomorphism class of objects
+of $\mathcal{S}_U$. A morphism $(U,\xi) \to (V , \psi)$ is given by a 
+morphism $x \to y$, where $x \in \xi$ and $y \in \psi$. Here we identify
+two morphisms $x \to y$ and $x' \to y'$ if they induce the same morphism
+$U \to V$, and if for some choices of isomorphisms $x \to x'$ in
+$\mathcal{S}_U$ and $y \to y'$ in $\mathcal{S}_V$ the compositions
+$x \to x' \to y'$ and $x \to y \to y'$ agree. By construction there are
+surjective maps on objects and morphisms from $\mathcal{S} \to
+\mathcal{S}'$. We define composition of morphisms in $\mathcal{S}'$ to
+be the unique law that turns $\mathcal{S} \to \mathcal{S}'$ into a functor.
+FIXME: check this is well-defined. 
+
+\smallskip\noindent
+By construction the rule $(U,\xi) \mapsto U$ is a functor. FIXME: check the
+other properties.
+\end{proof}
+
+\subsection{Presheaves of groupoids}
+\label{subsection-presheaves-groupoids}
+
+\noindent
+In this subsection we compare the notion of categories fibred in groupoids
+with the closely related notion of a ``presheaf of groupoids''. The basic
+construction is explained in the following example.
+
+\begin{example}
+\label{example-functor-groupoids}
+Suppose that $F : \mathcal{C} \to \text{Groupoids}$ is a contravariant functor
+to the category of groupoids (see 
+\hyperref[remark-functor-into-sets]{Remark~\ref*{remark-functor-into-sets}} and
+\hyperref[remarks-functor-into-2-category]%
+{Remark~\ref{remarks-functor-into-2-category}}). 
+For $f : V \to U$ in $\mathcal{C}$ we will
+suggestively write $F(f) = f^\ast$ for the functor from $F(U)$ to $F(V)$. 
+From this we can construct a category fibred in groupoids over $\mathcal{C}$ 
+as follows. Define 
+$$
+\text{Ob}(\mathcal{S}) =
+\{(U,x) \mid U\in \text{Ob}(\mathcal{C}), x\in \text{Ob}(F(U)\}.
+$$ 
+For $(U,x), (V,y) \in \text{Ob}(\mathcal{S})$ we define
+$$
+\text{Mor}_\mathcal{S}((V,y),(U,x)) = 
+\{ (f, \phi) \mid f\in \text{Mor}_\mathcal{C}(V,U), 
+\phi \in \text{Mor}_{F(V)}(y, f^\ast x)\}.
+$$
+In order to define composition we use that $g^\ast \circ f^\ast = 
+(f \circ g)^\ast$ for a pair of composable morphisms of $\mathcal{C}$
+(by definition of a functor into a $2$-category).
+Namely, we define the composition of $\psi : z \to g^\ast y$ and 
+$ \phi : y \to f^\ast x$ to be $ g^\ast(\phi) \circ \psi$. It is clear
+what the functor $p : \mathcal{S} \to \mathcal{C}$ is. The condition
+that $F(U)$ is a groupoid for every $U$ guarantees that $\mathcal{S}$ is
+fibred in groupoids over $\mathcal{C}$. Lifts of morphisms exist: given 
+$f: V \to U$ in $\mathcal{C}$ and $(U,x)$ a lift of $U$, then 
+$(f, id_{f^\ast x}): (V, {f^\ast x}) \to (U,x)$ is a lift of $f$. 
+Uniqueness means $h$ in the diagram on the left determines $(h,\nu)$ on 
+the right:
+$$
+\xymatrix{
+V \ar[r]^f & U & (V,y) \ar[r]^{(f, \phi)} & (U,x) \\
+W \ar@{-->}[u]^h \ar[ru]_g & &
+(W,z) \ar@{-->}[u]^{(h,\nu)} \ar[ru]_{(g, \psi)} & \\
+}
+$$
+Then $\nu = (h^\ast \phi)^{-1} \circ \psi $ and the uniqueness of inverses
+guarantees this is the only lift making the diagram commute.
+
+\noindent
+We will write $\mathcal{S}_F \to \mathcal{C}$ for the resulting functor
+if we want to indicate the dependence on $F$. Because we can think of 
+objects of $\mathcal{S}_F$ as pairs $(U,x)$, we sometimes say $\mathcal{S}_F$ 
+is a {\it split} category fibred in groupoids.
+\end{example}
+
+\begin{example}
+\label{example-fibred-category-from-functor-of-points}
+When $F=\text{Mor}(-,X)$ for some $X \in \text{Ob}(\mathcal{C})$,
+$\mathcal{S}_F\to \mathcal{C}$ is the category 
+$\mathcal{C}/X \to \mathcal{C}$ from Example \ref{example-comma-category}.
+\end{example}
+
+
+
 \begin{lemma} 
 \label{lemma-fibred-strict}
 Let $ p : \mathcal{S} \to \mathcal{C}$ be a category fibred in groupoids.
@@ -784,7 +1093,7 @@
 and an object $x$ of $\mathcal{S}$ over $U$, i.e., 
 $x\in \text{Ob}(\mathcal{S}_U)$. The functor 
 $p' : \mathcal{S}' \to \mathcal{C}$ will map the pair $(x,f)$ to the source 
-of the morphism $f$, in on other words $p'(x,f:V\to U) = V$. A morphism 
+of the morphism $f$, in other words $p'(x,f:V\to U) = V$. A morphism 
 $\varphi : (x_1,f_1: V_1 \to U_1) \to (x_2, f_2 : V_2 \to U_2)$ is given by a 
 pair $(\varphi,g)$ consisting of a morphism $g : V_1 \to V_2$ and a morphism 
 $\varphi : f_1^\ast x_1 \to f_2^\ast x_2$ with $p(\varphi) = g$. It is no 
@@ -838,7 +1147,8 @@
 $\mathcal{S}'$ by Lemma \ref{lemma-equivalence-fibred-categories}.
 \end{proof}
 
-\begin{lemma}\label{lemma-yoneda-2category}
+\begin{lemma}
+\label{lemma-yoneda-2category}
 Let $\mathcal{S}\to \mathcal{C}$ be fibred in groupoids.  Then for any
 $U\in \text{Ob}(\mathcal{C})$ the functor
 $$
diff -urN -X stacks-0.2/src/documentation/dontdiff stacks-0.2.orig/src/stacks.tex stacks-0.2/src/stacks.tex
--- stacks-0.2.orig/src/stacks.tex	2006-03-07 19:44:10.000000000 +0000
+++ stacks-0.2/src/stacks.tex	2006-03-14 02:49:38.000000000 +0000
@@ -116,28 +116,30 @@
 \noindent
 Let $\mathcal{C}$ be a site. The $2$-category of stacks over
 $\mathcal{C}$ will be a full sub-$2$-category of the $2$-category
-of categories over $\mathcal{C}$, see Categories, 
-\autoref{categories-definition-categories-over-C}. Thus a stack will be
-given by a functor of categories $p : \mathcal{S} \to \mathcal{C}$
-which has certain additional properties. Loosely speaking
-the conditions are the following:
+of categories over $\mathcal{C}$, see Categories,
+\hyperref[categories-definition-categories-over-C]%
+{Definition~\ref*{categories-definition-categories-over-C}}. 
+Thus a stack will be given by a functor of categories
+$p : \mathcal{S} \to \mathcal{C}$ which satisfies the following
+conditions:
 \begin{enumerate}
 \item $p : \mathcal{S} \to \mathcal{C}$ is a category fibred
-in groupoids, see Categories, 
-\autoref{categories-definition-fibred-groupoids},
+in groupoids, see Categories,
+\hyperref[categories-definition-fibred-groupoids]%
+{Definition~\ref*{categories-definition-fibred-groupoids}},
 \item descent for morphisms holds, and
 \item descent data for objects are effective.
 \end{enumerate}
 
-\subsection{Explanation and examples}
-\label{subsection-defintion-explanation}
+\subsection{Explanation}
+\label{subsection-definition-explanation}
 
 \noindent
 To explain this, we choose a collection of pullback functors as in
 Categories, \hyperref[categories-lemma-fibred-groupoids]%
 {Lemma~\ref*{categories-lemma-fibred-groupoids}}. Another approach is to use
-Categories, \hyperref[categories-lemma-fibred-groupoids]%
-{Lemma~\ref*{categories-lemma-fibred-groupoids}}.
+Categories, \hyperref[categories-lemma-fibred-strict]%
+{Lemma~\ref*{categories-lemma-fibred-strict}}.
 
 \smallskip\noindent
 First, suppose that $x,y\in \text{Ob}(\mathcal{S}_U)$ are
@@ -209,6 +211,7 @@
 & = & [(\text{Isom}(x,y))(g'')]([(\text{Isom}(x,y))(g')](\phi)).
 \end{eqnarray*}
 
+\noindent
 Alternatively we can argue with
 \hyperref[categories-lemma-fibred-strict]{Lemma~\ref*{categories-lemma-fibred-strict}}
 which says that $\mathcal{S}\to\mathcal{C}$ is equivalent to the
@@ -219,40 +222,36 @@
 presheaf.
 \end{proof}
 
-
-\noindent
-This lemma says that there is no harm in thinking of 
-$g^\ast \phi$ as a morphism ${f'}^\ast x \to {f'}^\ast y$.
-
 \smallskip\noindent
-OK, so the second condition listed above is simply the condition that
-$\text{Isom}(x,y)$ is a sheaf on the site $\mathcal{C}/U$! 
+OK, so the second condition listed in Section \ref{section-definition}
+is simply the condition that $\text{Isom}(x,y)$ is a sheaf on the site
+$\mathcal{C}/U$! 
 
 \smallskip\noindent
 In order to explain the meaning of the third condition, we must define a
-descent datum.  First, we introduce some notation. 
-Suppose that $\{f_i : U_i \to U\}_{i\in I}$
-is a covering in the site $\mathcal{C}$. We will be looking at
-fibre products $U_{ij} = U_i \times_U U_j$ and
-$U_{ijk} = U_i \times_U U_j \times_U U_k$. 
-When three indices, say $i,j$, and $k$, are in play, the projection maps from
-the twofold fibre products will be denoted as follows:  $\text{pr}_{1/2}$ is
-the projection $U_{ij} \to U_i$, $\text{pr}_{3/1}$ is the projection 
-$U_{ik} \to U_k$, and so on.  If only two indices, say $i$ and $j$, are in
-play, the projection maps $U_{ij} \to U_i$ and $U_{ij} \to U_j$ will be 
-denoted by $\text{pr}_{1}$ and $\text{pr}_{2}$, resp.; this should cause no
-confusion.  The projection maps from $U_{ijk}$ to the twofold fibre products
-are $\text{pr}_{12} : U_{ijk} \to U_{ij}$, 
+descent datum. First, we introduce some notation. Suppose that
+$\{f_i : U_i \to U\}_{i\in I}$ is a covering in the site $\mathcal{C}$.
+We will be looking at fibre products $U_{ij} = U_i \times_U U_j$ and
+$U_{ijk} = U_i \times_U U_j \times_U U_k$. It is very important to allow
+$i=j$ and even $i=j=k$ in the following. The projection maps from
+$U_{ij}$ to $U_i$, resp.\ $U_j$ are denoted $\text{pr}_1$, resp.\ 
+$\text{pr}_2$. The projection maps from $U_{ijk}$ to the twofold fibre
+products are $\text{pr}_{12} : U_{ijk} \to U_{ij}$, 
 $\text{pr}_{13} : U_{ijk} \to U_{ik}$, and  
-$\text{pr}_{23} : U_{ijk} \to U_{jk}$.  Finally, the projection maps from 
-$U_{ijk}$ to $U_{i}$, $U_{j}$, and $U_{k}$ are ${\widetilde{pr}}_1$, 
-${\widetilde{pr}}_2$, and ${\widetilde{pr}}_3$, respectively.  
-(Note the relations ${\widetilde{pr}}_1 = \text{pr}_{1/2} \circ \text{pr}_{12}
-= \text{pr}_{1/3} \circ \text{pr}_{13}$, 
-${\widetilde{pr}}_2 = \text{pr}_{2/1} \circ \text{pr}_{12} = 
-\text{pr}_{2/3} \circ \text{pr}_{23}$, and 
-${\widetilde{pr}}_3 = \text{pr}_{3/1} \circ \text{pr}_{13} = 
-\text{pr}_{3/2} \circ \text{pr}_{23}$.)
+$\text{pr}_{23} : U_{ijk} \to U_{jk}$. The projection maps from 
+$U_{ijk}$ to $U_{i}$, $U_{j}$, and $U_{k}$ are $\text{pr}_1$, 
+$\text{pr}_2$, and $\text{pr}_3$, respectively. 
+
+\smallskip\noindent
+This notation is potentially ambiguous, but it is standard in the
+literature. For an example of the ambiguity: note the relations
+$\text{pr}_1 = \text{pr}_{1} \circ \text{pr}_{12} =
+\text{pr}_1 \circ \text{pr}_{13}$, $\text{pr}_2 =
+\text{pr}_2 \circ \text{pr}_{12} = \text{pr}_1 \circ \text{pr}_{23}$,
+and $\text{pr}_3 = \text{pr}_2 \circ \text{pr}_{13} =
+\text{pr}_3 \circ \text{pr}_{23}$.
+
+\smallskip\noindent
 Let $x_i \in \text{Ob}(\mathcal{S}_{U_i})$, $i\in I$ be a collection of
 objects, and let
 $$
@@ -260,10 +259,10 @@
 \text{pr}_{2}^\ast x_j \qquad (i,j \in I)
 $$
 be a collection of morphisms in the fibre categories
-$\mathcal{S}_{U_{ij}}$.  In the definition that follows we will abuse notation
-by identifying, for instance, ${\widetilde{pr}}_1^\ast x_i$ with both 
-$\text{pr}_{12}^\ast \text{pr}_{1/2}^\ast x_i$ and 
-$\text{pr}_{13}^\ast \text{pr}_{1/3}^\ast x_i$.
+$\mathcal{S}_{U_{ij}}$. In the definition that follows we will
+identify, for instance, $\text{pr}_1^\ast x_i$ on $U_{ijk}$ with both 
+$\text{pr}_{12}^\ast \text{pr}_{1}^\ast x_i$ and 
+$\text{pr}_{13}^\ast \text{pr}_{1}^\ast x_i$.
 
 \begin{definition}
 \label{definition-descent-data}
@@ -272,39 +271,39 @@
 triple $(i,j,k)\in I^3$ the diagram
 $$
 \xymatrix{
-{\widetilde{pr}}_1^\ast x_i 
+\text{pr}_1^\ast x_i 
 	\ar[rr]^{\text{pr}_{13}^\ast \phi_{ik}}
 	\ar[rd]_{\text{pr}_{12}^\ast \phi_{ij}}
 & & 
-{\widetilde{pr}}_3^\ast x_k \\
-& {\widetilde{pr}}_2^\ast x_j \ar[ru]_{\text{pr}_{23}^\ast \phi_{jk}}
+\text{pr}_3^\ast x_k \\
+& \text{pr}_2^\ast x_j \ar[ru]_{\text{pr}_{23}^\ast \phi_{jk}}
 }
 $$
-in $\mathcal{S}_{U_{ijk}}$ is commutative.
+in the fibre category $\mathcal{S}_{U_{ijk}}$ is commutative.
 \end{definition}
 
-\noindent
+\begin{remarks}
+\label{remarks-definition-descent-datum}
 Two remarks about this definition are in order.  
 
-\begin{itemize}
-\item{There is a diagonal morphism $\Delta_i : U_i \to U_{ii}$. We can pull back
+\smallskip\noindent
+(1) There is a diagonal morphism $\Delta_i : U_i \to U_{ii}$. We can pull back
 $\phi_{ii}$ via this morphism to get an automorphism 
 ${\Delta_i}^\ast \phi_{ii} \in \text{Aut}_{U_i}(x_i)$.
 On pulling back the cocycle condition for the triple $(i,i,i)$ 
 by $\Delta_{123} : U_i \to U_{iii}$ we deduce that
 ${\Delta_i}^\ast \phi_{ii} \circ {\Delta_i}^\ast \phi_{ii} =
 {\Delta_i}^\ast \phi_{ii}$; thus ${\Delta_i}^\ast \phi_{ii} =
-\text{id}_{x_i}$.} 
+\text{id}_{x_i}$.
 
-\medskip
-
-\item{There is a morphism
+\smallskip\noindent
+(2) There is a morphism
 $\Delta_{13}: U_{ij} \to U_{iji}$ and we can pull back the
 cocycle condition for the triple $(i,j,i)$ to get the
 identity $(\sigma^\ast \phi_{ji}) \circ \phi_{ij} = 
 \text{id}_{\text{pr}_{1/2}^\ast x_i}$, where $\sigma: U_{ij} \to U_{ji}$ is the
-switching morphism.}
-\end{itemize}
+switching morphism.
+\end{remarks}
 
 \smallskip\noindent
 A morphism of descent data 
@@ -385,9 +384,11 @@
 \noindent
 Usually the hardest part to check is the third condition.
 
-\begin{example}
+\subsection{Examples}
+\label{subsection-examples}
+
+\noindent
 FIXME: Need lots of examples.
-\end{example}
 
 \noindent
 FIXME: To be continued.
