The fundamental groupoid is an initial groupoid cover This problem comes from exercise 7 of chapter 2 of Tamás Szamuely's book "Galois Groups and Fundamental Groups". The problem can be stated as the following.

Let $X$ be a connected and locally simply connected topological space. Let $\tilde{X}$ be its fundamental groupoid, i.e the space of homotopy classes of paths in $X$, it forms a cover $p: \tilde{X} \to X \times X$ of $X \times X$ by mapping a path to its endpoints. Now define a groupoid cover of $X$ to be a cover map $\pi: \Pi \to X \times X$, with some additional data: if $s :\Pi \to X$ (resp. $t : \Pi \to X$) denote the composition of $\pi$ with the first (resp. second) projection $X\times X \to X$, one can form the fiber product $\Pi \times_X \Pi$ with respect to $s$ on the left and $t$ on the right (*). The additional data are then three maps of spaces over $X \times X$ : 


*

*$m: \Pi \times_X \Pi \to \Pi$ (**)

*$e: X \to \Pi$ where $X$ is seen as a space over $X \times X$ through the diagonal map

*$i: \Pi \to \Pi$.


These maps must be such that $\Pi$ has a structure of a groupoid, i.e $m(m \times Id) = m(Id \times m)$; $m(e \times Id) = m(Id \times e) = Id$; $t \circ i = s$; $s \circ i = t$; $m(Id \times i) = e \circ t$ and $m(i \times Id) = e \circ s$. A map of groupoid covers is a morphism of covers compatible with these additional data. 
After veryfing that $\tilde{X}$ is a groupoid cover, show that for any groupoid cover $\Pi \to X \times X$, there is a unique map of groupoid covers $\tilde{X} \to \Pi$.

Veryfying that $\tilde{X}$ is a groupoid cover poses no problem. I am stuck on the second part. 
I managed to define a map $f: \tilde{X} \to \Pi$ with the following reasoning: if $\gamma$ is any path in $X$, then, its homotopy class $[\gamma]$ can be retrieved in $\tilde{X}$ by considering the path $t \mapsto (\gamma(0), \gamma(t))$ in $X \times X$, taking its unique lift $\tilde{\gamma}$ to $\tilde{X}$ starting at $c_{\gamma(0)}$ where $c_{\gamma(0)}$ denotes the (homotopy class of) the constant path at $\gamma(0)$, and then taking $\tilde{\gamma}(1)$ should give the homotopy class of $\gamma$. So to define $f$ of the homotopy class of $\gamma$, take the path $t \mapsto (\gamma(0), \gamma(t))$ (which is just $c_{\gamma(0)} \times \gamma$) in $X \times X$, define $\tilde{\gamma}$ to be its unique lift to $\Pi$ starting at $e(\gamma(0))$, this works out because $e$ is a map of spaces over $X \times X$, and so $\pi(e(\gamma(0))) = (\gamma(0), \gamma(0))$, and define $f([\gamma])$ to be $\tilde{\gamma}(1)$. 
I have managed to show that this map $f$ is a cover map, that it respects source, target, inverse, and unit, but I am unable to prove that it behaves well under multiplication. If $\gamma$ and $\eta$ are composable paths in $X$ (i.e $\gamma(0) = \eta(1)$, I tried writing $c_{\eta(0)} \times (\gamma \bullet \eta)$ (where $\bullet$ is the composition of paths) in all the ways I could, but I couldn't make up a lift that involved multiplication in $\Pi$ in any satisfactory way, I feel like there is some trick I am missing.
So, my questions are: 1) Is my definition of $f$ correct? 2) If yes, how to show that $f$ respects multiplication?

(*) In Szamuely's book, composition of two paths $\alpha$ and $\beta$ is defined if the target of $\beta$ is the source of $\alpha$, and defined by going through $\beta$ first and then through $\alpha$, which is why the fiber product is with $s$ on the left and $t$ on the right, and not the other way around.
(**) It's not completely clear to me in what way $\Pi \times_X \Pi$ should be considered as a space over $X \times X$, but I think that the only reasonable way to make it work with the associativity law is to define the projection $\Pi \times_X \Pi \to X \times X$ by $(\alpha, \beta) \mapsto (s(\beta), t(\alpha))$, which fits what happens in the case of $\tilde{X}$. 
 A: Your definition of $f$ is correct. (I will assume your definition of the map $\Pi\times_X \Pi\rightarrow X\times X$ is the intended one as this seems to me the only reasonable choice.) For notational convenience, given $p:[0, 1]\rightarrow X$, define $\tilde p$ to be the unique lift to $\Pi$ of $c_{p(0)}\times p:[0, 1]\rightarrow X\times X$ that starts at $e(p(0))$. In particular, we have $f[p]=\tilde p(1)$.
Now, given $([\gamma], [\eta])\in\tilde X\times_X\tilde X$ with representatives $\gamma, \eta:[0, 1]\rightarrow X$ (so in particular $\gamma(0)=\eta(1)$), we wish to show that $f[\gamma\bullet\eta]=m(f[\gamma], f[\eta])$, ie that $\widetilde{\gamma\bullet\eta}(1)=m(\tilde\gamma(1), \tilde\eta(1))$. Recall that $\widetilde{\gamma\bullet\eta}$ is the unique lift to $\Pi$ of $c_{\eta(0)}\times (\gamma\bullet\eta)$ that starts at $e(\eta(0))$, and note that $c_{\eta(0)}\times (\gamma\bullet\eta)=(c_{\eta(0)}\times\gamma)\bullet(c_{\eta(0)}\times\eta)$. Hence, for $\theta\in[0, 1]$, we have that $\widetilde{\gamma\bullet\eta}(\frac{\theta}{2})$ coincides with the unique lift to $\Pi$ of $c_{\eta(0)}\times\eta$ that starts at $e(\eta(0))$, ie with $\tilde\eta$. In particular, $\widetilde{\gamma\bullet\eta}(\frac{1}{2})=\tilde\eta(1)$, and hence, for $\theta\in[0, 1]$, we have that $\widetilde{\gamma\bullet\eta}(\frac{1+\theta}{2})$ coincides with the unique lift to $\Pi$ of $c_{\eta(0)}\times\gamma$ that starts at $\tilde\eta(1)$. In particular, $\widetilde{\gamma\bullet\eta}(1)$ is the endpoint of the unique lift to $\Pi$ of $c_{\eta(0)}\times\gamma$ that starts at $\tilde\eta(1)$.
Hence, by uniqueness of lifts, to show that $\widetilde{\gamma\bullet\eta}(1)=m(\tilde\gamma(1), \tilde\eta(1))$, it suffices to exhibit a lift to $\Pi$ of $c_{\eta(0)}\times\gamma$ that starts at $\tilde\eta(1)$ and ends at $m(\tilde\gamma(1), \tilde\eta(1))$. We claim $\tilde p:[0, 1]\rightarrow\Pi$, given by $\theta\mapsto m(\tilde\gamma(\theta), \tilde\eta(1))$, defines such a lift.
First note that $\tilde p$ is well-defined. To see this we must check that $s(\tilde\gamma(\theta))=t(\tilde\eta(1))$ for each $\theta\in[0, 1]$. But indeed, recall that $\tilde\gamma$ is a lift of the path $c_{\gamma(0)}\times\gamma$, so – for each $\theta$ – $\pi(\tilde\gamma(\theta))=(\gamma(0), \gamma(\theta))$, and in particular $s(\tilde\gamma(\theta))=\gamma(0)$. Likewise, $\tilde\eta$ is a lift of the path $c_{\eta(0)}\times\eta$, so $\pi(\tilde\eta(1))=(\eta(0), \eta(1))$, and in particular $t(\tilde\eta(1))=\eta(1)=\gamma(0)$, as desired.
Now we must show that $\tilde p(0)=\tilde\eta(1)$ and that $\tilde p(1)=m(\tilde\gamma(1), \tilde\eta(1))$. The latter condition is immediate, and to see the former note that, by definition of $\tilde\gamma$, we have $\tilde\gamma(0)=e(\gamma(0))=e(\eta(1))$. Hence $\tilde p(0)=m(\tilde\gamma(0), \tilde\eta(1))=m(e(\eta(1)), \tilde\eta(1))=\tilde\eta(1)$, as desired, where the last equality follows from the groupoid identity $m(e\times\text{id})=\text{id}$.
Finally, we need only show that $\pi\circ\tilde p=c_{\eta(0)}\times\gamma$, ie that $\tilde p$ really is a lift of $c_{\eta(0)}\times\gamma$. But indeed, for $\theta\in[0, 1]$, by definition of the map $\Pi\times_X\Pi\rightarrow X\times X$ and the fact that $m$ is a map over $X\times X$, we have $\pi(\tilde p(\theta))=\pi(m(\tilde\gamma(\theta), \tilde\eta(1)))=(s(\tilde\eta(1)), t(\tilde\gamma(\theta)))=(\eta(0), \gamma(\theta))=(c_{\eta(0)}\times\gamma)(\theta)$, as desired, where the second to last equality follows from the computations in paragraph 4. This concludes the proof.
