TITLE: Homeomorphism group of compact metric space $K$ is $G_{\delta}$ in $C(K,K)$
QUESTION [5 upvotes]: Let $(K,d)$ be a compact metric space and denote $\ C(K,K):=\{ f:K \to K \ ; \space f \space \text{is continuous}  \}$. Endow the set $C(K,K)$ with the supremum metric $\ \rho (f,g):=\mathrm{sup} \ \{ d(f(x),g(x)) \ ; \ x \in K \}$. 
I'd like to show that the group of homeomorphisms of $(K,d)$ is a $G_{\delta}$ subset of the metric space $( C(K,K),\rho)$.
I managed to show that it is enough to prove that the set $\{ f \in C(K,K) \ ; \space f \space \text{is injective} \}$ is $G_{\delta}$, but then I got stuck.
I'll appreciate any help.

REPLY [3 votes]: If you want to show that the set $\{ \,f \in C(K,K)\,\,:\,\,f{\text{ is injective }}\}$  is $Gδ$, note that for $f∈C(K,K)$, $f$ is injective iff $f \in \bigcap\limits_{x \ne y} {\{ \,f \in C(K,K)\,\,:\,\,f(x) \ne f(y)\,\} }$.