Covering space homeomorphism In the course of an exercise from Hatcher's topology text, I came to the following point. 
Given $p: \tilde{X} \to X$ the universal cover for $X$, and a continuous map $h: \tilde{X} \to \tilde{X}$ satisying $ph=p$, is it true that $h$ must be a homeomorphism?
The space $X$ is fairly nice - it's path connected, locally path-connected. 
I was able to prove this, at least in the context of the problem I was working on, but it was long and messy. I proved surjectivity, openness, and injectivity of $h$ successively, and it was painful. 
I'm wondering is the statement generally true, and if so, is there a nicer way to see it?
Thanks much. 
 A: The "main result" about covering spaces is a necessary and suffiecnt condition for lifting maps to a covering space. The setup is as follows: Let $p : Y \to X$ be a covering map, let $Z$ be a path connected, locally path connected space, and choose $z_0 \in Z$, $y_0 \in Y$ so that $p(y_0) = f(z_0)$. Then a map $f : Z \to X$ lifts to a map $F : Z \to Y$ such that $pF=f$ and $F(z_0)=y_0$ if and only if $f_*(\pi_1(Z,z_0)) \subseteq p_*(\pi_1(Y,y_0))$. Moreover, when the lift exists it is unique.
If $Z$ is simply connected, this condition is always satisfied. So for the case $Y = Z = \tilde{X}$, with $f=p$, the theorem says that maps $h : \tilde{X}\to\tilde{X}$ such that $ph=h$ are uniquely determined by where they send a point $\tilde{x}_0 \in \tilde{X}$, and that they can send $\tilde{x}_0$ to any point you want in $p^{-1}(\tilde{x}_0)$. The uniqueness means that all such $h$ must be homemorphisms (and therefore deck transformations) as follows:
For any two points $a,b \in \tilde{X}$ such that $p(a)=p(b)$, call the unique $h$ such that $h(a)=b$ (and $ph=p$, of course), $h_{a,b}$. Then both $h_{a,b}\circ h_{b,a}$ and $\mathrm{id}_{\tilde{X}}$ satisfy $ph=p$ and send $a$ to itself. By uniqueness, they are equal. Similarly, $h_{b,a} \circ h_{a,b} = \mathrm{id}_{\tilde{X}}$.
Here's a different proof: I decided to add the proof my first instinct told me to write (I wrote the answer above instead because I felt it was more "standard"). You can summarize much of covering space theory in the following statement: given a space $X$ that has a universal cover (I mean, a connected, locally path-connected and semi-locally simply connected space), there is an equivalence of categories $\mathrm{Cov}(X) \to G-\mathrm{Sets}$ where:


*

*The category $\mathrm{Cov}(X)$ has objects all covering spaces $p : Y \to X$, and morphisms from an object $p: Y \to X$ to an object $q : Z \to X$ being continuous maps $f : Y \to Z$ such that $qf = p$ (note that invertible such morphisms from $p : Y\to X$ to itself are deck transformations, but we include non-invertible morphisms too).

*By $G$ I mean the fundamental group of $X$, and $G-\mathrm{Sets}$ is the category whose objects are sets $A$ with an action of $G$  and whose morphisms are $G$-equivariant maps.
The equivalence is given by picking once and for all a basepoint $x_0 \in X$ and sending each covering space $p : Y \to X$ to the set $p^{-1}(x_0)$ with the action of $G = \pi_1(X,x_0)$ given by lifting loops in $X$ to paths in $Y$ and seeing where they end.
OK, now for the question: under this equivalence, the universal cover corresponds to the $G$-set $G$ with the action by (say) left translation. The question now translates to the following question: is every $G$-equivariant map $f : G \to G$ automatically an isomorphism? The answer is yes since any such map is just a right translation by $f(1)$: $f(g) = f(g \cdot 1) = g \cdot f(1)$.
