TITLE: Connected groupoids and action groupoids
QUESTION [6 upvotes]: It is written in Wikipedia http://en.wikipedia.org/wiki/Groupoid,
that any connected groupoid $A\rightrightarrows X$ is isomorphic to the action groupoid
coming from a transitive action of some group $G$ on $X$.
I do not understand how to construct the corresponding group $G$.
Let $A\rightrightarrows X$ be a connected groupoid, where $X$ is the set of objects and $A$ is the set of arrows.
Choose an object $x_0\in X$, and consider the set $G=A(x_0,-)$, the set of all arrows starting from $x_0$.
I think that $G$ is the corresponding group. How can  I  define a composition law on $G$?
Any help will be appreciated.

REPLY [4 votes]: Another way of looking at this is to use the equivalence of categories between covering morphisms of a groupoid $P$ and actions of $P$ on sets. (Recall that a covering morphism $p:G \to P$ is a groupoid morphism having unique path lifting. Not necessarily uniqe path lifting gives a fibration of groupoids.) Given an operation of $P$ on a set $X$ then the corresponding covering morphism may be written $P \ltimes X$, an action groupoid, and thought of as a semidirect product because it is a special case of the semidirect product for an action of a groupoid $P$ on a groupoid $H$. For this one needs a morphism of groupoids $\omega: H \to Ob(P)$, where the latter is thought of as a discrete groupoid, and an element $w: x \to y$ in $P$ gives a morphism of groupoids $w_*: \omega^{-1}(x) \to \omega^{-1}(y)$. One has to be precise on conventions to get all this right, which I won't do here. 
So a groupoid $G$ has a representation as an action groupoid whenever you  are given a covering morphism $ G \to P$. This is closely related to Omar's answer, of course.