I am reading [Differentiable Stacks and Gerbes](https://arxiv.org/abs/math/0605694) by Kai Behrend and Ping Xu.


They define gerbe over a stack as follows.



> 
> Let $\mathfrak{X}$ be a differentiable stack. An $\mathfrak{S}$-stack $\mathfrak{R}$ endowed with a morphism $F:\mathfrak{R}\rightarrow \mathfrak{X}$ is called a gerbe over $\mathfrak{X}$ if both $\mathfrak{R}\rightarrow \mathfrak{X}$ and $\mathfrak{R}\rightarrow \mathfrak{R}\times\_{\mathfrak{X}}\mathfrak{R}$ are epimorphisms.
> 
> 
> 


I am having trouble realizing the map $\mathfrak{R}\rightarrow \mathfrak{R}\times\_{\mathfrak{X}}\mathfrak{R}$. Some people call this diagonal map with out even mentioning the map explicitly.


I will recall the definition of $2$-fibered product 



> 
> Let $$\pi\_X:X\rightarrow \mathcal{C}, \pi\_Y:Y\rightarrow
>  \mathcal{C},\pi\_Z:Z\rightarrow \mathcal{C}$$ be categories fibered in
>  groupoids and $$f:Y\rightarrow X, g:Z\rightarrow X$$ be morphisms of
>  categories fibered in groupoids.
> 
> 
> The $2$-fibered product $Z\times\_XY$ is the category whose objects are
>  given by $$(Z\times\_XY)\_0=\{(y,z,\alpha)\in Y\_0\times Z\_0 \times X\_1
>  : \pi\_Y(y)=\pi\_Z(z), \alpha:f(y)\rightarrow g(z)\}.$$ 
>  $$\text{Hom}\_{Z\times\_X Y}((y,z,\alpha),(y',z',\alpha'))=
>  \left\{(u:y\rightarrow y',v:z\rightarrow z') |\alpha'\circ
>  f(u)=g(v)\circ \alpha \right\}$$
> 
> 
> 


Is the map $\mathfrak{R}\rightarrow \mathfrak{R}\times\_{\mathfrak{X}}\mathfrak{R}$ is just given by 


* $\mathfrak{R}\_0\rightarrow (\mathfrak{R}\times\_{\mathfrak{X}}\mathfrak{R})\_0$ with $y\mapsto (y,y,id:F(y)\rightarrow F(y))$.
* $\mathfrak{R}\_1\rightarrow (\mathfrak{R}\times\_{\mathfrak{X}}\mathfrak{R})\_1$ with $(y\xrightarrow{\tau}z)\mapsto (y\xrightarrow{\tau} z,y\xrightarrow{\tau}z)$??


I am not very sure if I understand this correctly. Can some one please confirm this? What does this map and the original map $F:\mathfrak{R}\rightarrow \mathfrak{X}$ being epimorphism signifies?



Understanding definition of gerbe over a stack
I am trying to write down what does it mean to say those two maps $\mathcal{D}\rightarrow \mathcal{C}$ and $\mathcal{D}\rightarrow \mathcal{D}\times\_{\mathcal{C}}\mathcal{D}$ to be epimorphisms.


I am not very comfortable to use the definition of epimorphism as in  [Differentiable Stacks and Gerbes](https://arxiv.org/abs/math/0605694). 


I use the definition of epimorphism as in  [Principal actions of stacky Lie groupoids](https://arxiv.org/pdf/1510.09208.pdf). I am hoping they are equivalent.



> 
> A morphism $F: \mathcal{X}\rightarrow \mathcal{Y}$ of categories fibered in groupoids is said to be an **epimorphism** if, given a manifold $U$, the restriction functor $\mathcal{X}\_U\rightarrow \mathcal{Y}\_U$ is **almost** essentially surjective i.e., given $y\in \mathcal{Y}\_U$, there exists an open cover $\{U\_\alpha\rightarrow U\}$ such that, there exists $x\_\alpha\in \mathcal{X}\_{U\_\alpha}$ and isomorphisms $F(x\_\alpha)\rightarrow y|\_{U\_\alpha}$ in $\mathcal{Y}\_{U\_{\alpha}}$.
> 
> 
> 


Let $U$ be a smooth manifold. As $F:\mathfrak{R}\rightarrow \mathfrak{X}$ is an epimorphism, the functor $\mathfrak{R}(U)\rightarrow \mathfrak{X}(U)$ is almost essentially surjective. For simplicity, I assume it is essentially surjetcive i.e., given $x\in \mathfrak{X}(U)$ there exists $r\in \mathfrak{R}(U)$ such that there is an isomorphism $F(r)\rightarrow x$.


**Is this what you(@inkspot) mean when you say locally surjective on objects??**


As $G:\mathfrak{R}\rightarrow \mathfrak{R}\times \_{\mathfrak{X}}\mathfrak{R}$ is an epimorphism, the functor $\mathfrak{R}(U)\rightarrow (\mathfrak{R}\times \_{\mathfrak{X}}\mathfrak{R})(U)$ is almost essentially surjective. For simplicity, I assume it is essentially surjective i.e., given an element $(y,z,\alpha)\in (\mathfrak{R}\times \_{\mathfrak{X}}\mathfrak{R})(U)$ there exists $x\in \mathfrak{R}(U)$ and an isomorphism $G(x)\rightarrow (y,z,\alpha)$. Here, $\alpha:F(y)\rightarrow F(z)$.


Now, what does it have anything to do with "locally surjective on morphisms"??


Let $a\rightarrow b$ be an arrow in $\mathfrak{X}(U)$. As we have seen above, there is an isomorphism $F(y)\rightarrow a$ and an isomorphism $F(z)\rightarrow b$ where $y,z\in \mathfrak{R}(U)$.


Considering the composition $F(y)\rightarrow a\rightarrow b\rightarrow F(z)$ gives $\alpha:F(y)\rightarrow F(z)$ giving an element $(y,z,\alpha)\in (\mathfrak{R}\times\_{\mathfrak{X}}\mathfrak{R})(U)$.


For this, there exists $x\in \mathfrak{R}(U)$ and an isomorphism $G(x)\rightarrow (y,z,\alpha)$. As mentioned in question, $G(x)=(x,x,id:F(x)\rightarrow F(x))$.


Thus, we have an isomorphsim $(y,z,\alpha:F(y)\rightarrow F(z))\rightarrow (x,x,id:F(x)\rightarrow F(x))$. This means, there exists $u:x\rightarrow y, v:x\rightarrow z$ such that $\alpha\circ F(u)=F(v)\circ id$ i.e., $\alpha\circ F(u)=F(v)$.


To write down explicitly, it means the map
$$a\rightarrow F(y)\rightarrow F(x)\rightarrow F(z)\rightarrow b$$
is same as that of the map $a\rightarrow b$ we started with i.e., 
$\phi=\tau\circ F(v\circ u^{-1})\circ \tau'$


Ignoring $\tau, \tau'$ this says any arrow $a\rightarrow b$ is of the form $F(\eta)$ for some arrow $\eta$ in $\mathfrak{R}(U)$.


**Is this what you(@inkspot) mean when you say locally surjective on morphisms??**



> 
> Overall, Is this definition of gerbe over stack mean given a manifold
>  $U$ the restriction functor $\mathcal{D}(U)\rightarrow
>  \mathcal{C}(U)$ has following properties
> 
> 
> * given an object $x\in \mathfrak{X}(U)$ there is an open cover $\{U\_\alpha\rightarrow U\}$ such that there exists $y\_\alpha\in \mathfrak{R}(U\_\alpha)$ and isomorphisms
>  $F(y\_\alpha)\rightarrow x|\_{U\_\alpha}$ for each index $\alpha$.
> * given an arrow $\phi:a\rightarrow b$ in $\mathfrak{X}(U)$ there is an open cover $\{U\_\alpha\rightarrow U\}$ such that there exists an arrow $\tau\_\alpha:p\_\alpha\rightarrow q\_\alpha$ (after
>  identifying $F(p\_\alpha)$ with $a\_\alpha$ and $F(q\_\alpha)$ with
>  $b\_\alpha$) such that $F(\tau\_\alpha)=\phi\_\alpha$ for each index
>  $\alpha$.
> 
> 
> 


