I am reading [Orbifolds as stacks?](https://arxiv.org/abs/0806.4160)


Given Lie groupoids $\mathcal{G}$ and $\mathcal{H}$ there is a notion of what is called a bibundle from $\mathcal{G}$ to $\mathcal{H}$ which is supposed to be a ageneralized notion of a morphism of Lie groupoids.



> 
> (rough) Definition : A bibundle is a groupoid principal bundle which is equipped with a second groupoid action from the other side.
> 
> 
> (precise) Definition : A bibundle from $\mathcal{G}$ to $\mathcal{H}$ is a manifold $P$ together with maps $a\_L:P\rightarrow \mathcal{G}\_0$ and $a\_R:P\rightarrow \mathcal{H}\_0$ such that
> 
> 
> 1. there is a left action of $\mathcal{G}$ on $P$ with respect to an anchor $a\_L$ and a right action of $\mathcal{H}$ on $P$ with respect to an anchor $a\_R$.
> 2. $a\_L:P\rightarrow \mathcal{G}\_0$ is a principal $H$-bundle.
> 3. $a\_R$ is $\mathcal{G}$ invariant.
> 4. the actions of $\mathcal{G}$ and $\mathcal{H}$ commutes.
> 
> 
> 


The point is to make collection of Lie groupoids as a $2$ category with Lie groupoids seen as objects, bibundles as morphisms between objects and isomorphisms of bibundles as maps between bibundles.


For that, we need to define what does it mean to say composition of two maps between Lie groupoids i.e., given bibundles $P:\mathcal{G}\rightarrow \mathcal{H}$ and $Q:\mathcal{H}\rightarrow \mathcal{K}$, we need to declare what is $P\circ Q:\mathcal{G}\rightarrow \mathcal{K}$.


We want it to be a bibundle. So, we need atleast maps $a\_L:P\circ Q\rightarrow \mathcal{G}\_0$ and $a\_R:P\circ Q\rightarrow \mathcal{K}\_0$.


What we have is $a\_L:P\rightarrow \mathcal{G}\_0,a\_R:P\rightarrow \mathcal{H}\_0,a\_L:Q\rightarrow \mathcal{H}\_0,a\_R:Q\rightarrow \mathcal{K}\_0$ such that both $a\_L$ are principal bundles.


One natural thing (which I did not realize before) is to consider pullback $P\times\_{\mathcal{H}\_0}Q$ from maps $a\_R:P\rightarrow \mathcal{H}\_0,a\_L:Q\rightarrow \mathcal{H}\_0$ that gives maps $\pi\_1:P\times\_{\mathcal{H}\_0}Q\rightarrow P$ and $\pi\_2:P\times\_{\mathcal{H}\_0}Q\rightarrow Q$ which on composition with $a\_L:P\rightarrow \mathcal{G}\_0, a\_R:Q\rightarrow \mathcal{K}\_0$ gives $a\_L\circ \pi\_1:P\times\_{\mathcal{H}\_0}Q\rightarrow \mathcal{G}\_0$ and $a\_R\circ \pi\_2:P\times\_{\mathcal{H}\_0}Q\rightarrow \mathcal{K}\_0$. As $a\_L$ is a submerison, $P\times\_{\mathcal{H}\_0}Q$ has a smooth manifold structure.


It feels like $P\times\_{\mathcal{H}\_0}Q$ is the candidate for composition. As said before, we atleast need a manifodl $P\circ Q$ and maps $P\circ Q\rightarrow \mathcal{G}\_0$ and $P\circ Q\rightarrow \mathcal{K}\_0$.


Along with this, we need action of $\mathcal{G}$ on $P\circ Q$ and an action of $\mathcal{H}$ on $P\circ Q$.


We have obvious action maps


* $\mathcal{G}\_1\times\_{\mathcal{G}\_0}(P\times\_{\mathcal{H}\_0}Q)\rightarrow P\times\_{\mathcal{H}\_0}Q$ with $(g,(p,q))\mapsto (g.p,q)$
* $(P\times\_{\mathcal{H}\_0}Q)\times\_{\mathcal{H}\_0}\mathcal{H}\_1\rightarrow P\times\_{\mathcal{H}\_0}Q$ with $((p,q),h)\mapsto (p,q.h)$


It looks this should be the composition but that paper says some thing more.



> 
> Since the action of $\mathcal{H}$ on $P$ is principal, the action of $\mathcal{H}$ on $P\times\_{\mathcal{H}\_0}Q$ given by $(p,q).h=(p.h,h^{-1}q)$ is free and proper. Hence the quotient $(P\times\_{\mathcal{H}\_0}Q)/\mathcal{H}$ is a manifold.
> 
> 
> 


I am not able to understand what above statements mean. I have not come across the notion of quotient of a manifold by a Lie groupoid. I only know that if a Lie group acts properly, freely on a manifold, the quotient is a maniofld. What Lie group they are considering here? $\mathcal{H}\_1$? I guess no, It is not even a group even though there is a smooth structure.


Can some one help me to see what I am missing here?


EDIT : I think I misunderstood that they are talking about a Lie group action on manifold $P\times\_{\mathcal{H}\_0}Q$ when they are saying $(P\times\_{\mathcal{H}\_0}Q)/\mathcal{H}\_1$. Even though $\mathcal{H}\_1$ is not a Lie group they can still consider the quotient space given by **relation coming form the action** of $\mathcal{H}\_1$.


Let $(p\_1,q\_1),(p\_2,q\_2)\in P\times\_{\mathcal{H}\_0}Q$. We declare
$(p\_1,q\_1)\sim(p\_2,q\_2)$ if there exists $h\in \mathcal{H}\_1$ such that
$p\_1=p\_2.h$ and $q\_1=h^{-1}q\_2$. This is an equivalence relation on $P\times\_{\mathcal{H}\_0}Q$. I guess they mean $(P\times\_{\mathcal{H}\_0}Q)/\sim$ in my notation when they say $(P\times\_{\mathcal{H}\_0}Q)/\mathcal{H}$.


If this is the case, then they use some theorem which says when a quotient space of a manifold given by a relation is a manifold to conclude $(P\times\_{\mathcal{H}\_0}Q)/\mathcal{H}$ i.e., $(P\times\_{\mathcal{H}\_0}Q)/\sim$ in my notation is a manifold.


Can some one please confirm if this is what it is.


EDI : [STACKY LIE GROUPS](https://arxiv.org/pdf/math/0702399.pdf) says in page $6$ that



> 
> Let $\mathcal{G},\mathcal{H},\mathcal{K}$ be Lie groupoids and $M$ be a $\mathcal{G}-\mathcal{H}$ bibundle and $N$ be a $\mathcal{H}-\mathcal{K}$ bibundle. **Viewing
> a bibundle as relation of stacks suggests defining the composition of bibundles as** $M\circ N=(M\times\_{\mathcal{H}\_0}N)/\mathcal{H}\_1$
> where the quotient is with respect to diagonal action $(m,n).h=(m.h,h^{-1}.n)$ for $m,n$ wherever defined.
> 
> 
> 


I am not aware of seeing bibundles as relation of stacks. Can some one help me to see bibundles as relation of stacks. May be then, It would be easier for me to understand why that choice would natural when defining composition.



Composition of bibundles
I will give an example as to why composition of bibundles cannot simply be done as pullback, as well as the relation to perhaps more familiar geometric constructions.


Firstly, note that if $M$ is a manifold and $\mathbf{B}G$ is a one-object Lie groupoid (where the automorphisms of the one object are the Lie group $G$), a bibundle from $M$ to $\mathbf{B}G$ is precisely the same thing as a principal $G$-bundle on $M$. Now consider a homomorphism $\phi\colon G\to H$, and the corresponding functor $\mathbf{B}G\to \mathbf{B}H$. This gives a bibundle from $\mathbf{B}G$ to $\mathbf{B}H$, namely $u(H) \to \ast = Obj(\mathbf{B}G)$, where $u(H)$ is the underlying manifold of the Lie group $H$. The left $\mathbf{B}G$-action is trivial, and the right $\mathbf{B}H$-action (which is the same as an $H$-action) is by multiplication. The naive "composition" of bibundles should give a bibundle from $M$ to $\mathbf{B}H$, which is just a principal $H$-bundle on $M$, but what it actually gives is just $P\times H \to M$, which is the composite of the projection on $P$ and the given map $P\to M$.


The correct composite should be the principal bundle you get by changing the structure group along the given homomorphism $G\to H$, which is the quotient $(P\times H)/G$ by the action of $G$ on $P\times H$ as $(p,h) \mapsto (pg,\phi(g)^{-1}h)$. Equivalently, one can set up an equivalence relation on $P\times H$ so that $(pg,h) \simeq (p,\phi(g)h)$. This generalises directly to the case when you replace $\mathbf{B}G\to \mathbf{B}H$ by some arbitrary functor $X\to Y$ of Lie groupoids (and compose with the bibundle it gives rise to), and with only a little more work when you replace the manifold $M$ by a general Lie groupoid. At that point, you probably will be comfortable with the general case.


