Let $X$ be an arbitrary topological space and $G$ a topological group. Let $\mathcal{C}(X,G)$ be the group of continuous maps from $X$ to $G$, endowed with the compact-open topology as a topological space.
Why does the co. topology make $\mathcal{C}(X,G)$ a topological group?
This is from exercise from "Algebraic Topology from Homotopical Viewpoint" (p.14) of Aguilar, Gitler, Prieto.
It's easy to see that $\mathcal{C}(X,G)$ is indeed a well-defined group w.r.t. the obvious operations. It is also easy to see that the inversion map is indeed continuous w.r.t. co. topology. But I am stuck at the following step in my proof attempt:
Let $K\subset X$ be compact and $U\subset G$ be open, that is, $U^K$ is a subbasic open set of $\mathcal{C}(X,G)$. Denote $\mu: \mathcal{C}(X,G)\times\mathcal{C}(X,G)\to\mathcal{C}(X,G), (f,g)\mapsto fg$ the multiplication operation and pick $(f,g)\in\mu^{-1}(U^K)$. Since $G$ is a topological group, we have:
$\forall x\in K \exists V_{f(x)}\ni f(x),V_{g(x)}\ni g(x)$ open nbhd.-s of $f(x)$ and $g(x)$ respectively, s.t. $f(x)g(x)\in V_{f(x)}V_{g(x)}\subset U$
I am trying to use the compactness of $K,f(K),g(K),(fg)(K)$ to find open subsets $W_1,W_2 \subset G$ s.t. $f\in W_1^K,g\in W_2^K$ and $W_1 W_2\subset U$ since this would imply that $\mu^{-1}(U^K)$ is open, but I am stuck here, and I am not really sure if it's the right approach to keep the $K$. Then again I am not sure how to obtain another suitable compact $L\subset X$ since there are no further assumptions on the topology of $X$.
I'd be thankful for some hints how to proceed.
Here is how I would prove it:
The compact-open topology on $C(X,G)$ is the same as the topology of compact convergence, which is the initial topology with respect to all restriction maps $r_K:C(X,G)\to C(K,G), f\mapsto f|_K$, where $K$ ranges over all compact subspaces of $X$. Here $C(K,G)$ carries the topology of uniform convergence, for which a basic neighborhood of $f:K\to G$ is of the form $U(f)=\{g;K\to G\mid f(x)^{-1}g(x)\in U\ \forall x\in K\}$ (or of the form $\{g\mid f(x)g(x)^{-1}\in U\}$ since both forms yield the same topology), where $U$ is a symmetric neighborhood of $e$.
Since the topology on $C(X,G)$ is an initial one, it suffices to show that $$C(X,G)\times C(X,G)\xrightarrow* C(X,G) \xrightarrow{r_K} C(K,G)$$ is continuous. But this map is equal to $$C(X,G)\times C(X,G) \xrightarrow{r_K\times r_K} C(K,G)\times C(K,G) \xrightarrow{*} C(K,G)$$ That means it is enough to show that the multiplication is continuous on $C(K,G)$.
So take $f,g:K\to G$, and let $U$ be a symmetric neighborhood of $e$. There exists a symmetric neighborhood $V$ of $e$ such that $V^2\subseteq U$. Let $W=V\cap gVg^{-1}$. Now $W(f)*W(g)\subseteq U(fg)$.