So, I recently started working on the following maths problem: Let $X$ be a topological space. A function $\varphi : \mathbb{R}\rightarrow X$ is said to be periodic if $\varphi(x + 1) = \varphi(x)$ for all $x \in\mathbb{R}$. Construct an explicit bijection between the collection of periodic continuous functions $\varphi : \mathbb{R} \rightarrow X$, denoted as $P(\mathbb{R})$, and the collection of continuous functions $\psi : S^1 \rightarrow X$, denoted as $C(S^1)$.
The problem seemed rather easy, but there is a minuscule detail which I cannot resolve. To solve this problem, I considered the quotient map $\gamma : \mathbb{R}\rightarrow S^1$ (identified as the unit circle in $\mathbb{R}^2$) defined via: \begin{equation*} \gamma(x) = (\cos2\pi x, \sin2\pi x) \end{equation*} and then I defined the map $\iota_{\gamma} : C(S^1) \rightarrow P(\mathbb{R})$, which maps $\psi\mapsto \psi \circ \gamma$. I already checked that this is well-defined and injective, but when trying to solve surjectivity I encounter troubles. To show surjectivity, given a function $\varphi\in P(\mathbb{R})$, I tried to construct a function $\psi \in C(S^1)$ via multiple ways, my latest attempt was this:
Define $\varphi_* := \left.\varphi\right|_{[0, 1)}$ and $\gamma_{*} := \left.\gamma\right|_{[0, 1)}$ (so their domain is restricted to $[0,1)$), which both are still continuous. Note that $\varphi_{*}$ is uniquely determined by $\varphi$ and note that $\gamma_{*}$, unlike $\gamma$, is a bijective function with well-defined inverse. I now tried to show that $\gamma_*^{-1}$ is continuous, but this simply is not true, e.g. the open set $[0, 1/2)$ in the subspace topology on $[0, 1)$ does not satisfy that $\gamma_*^{-1}([0, 1/2))$ is open in the subspace topology on $S^1$. If it was true, I could have defined the continuous map $\psi : S^1\rightarrow \mathbb{R}$ as $\psi = \varphi_* \circ \gamma_{*}^{-1}$ (continuous as composition of continuous funtions) such that $\iota_{\gamma}(\psi) = \varphi$.
My other approaches tried using the canonical projection of $\pi: \mathbb{R}\rightarrow\mathbb{R}/\sim$, where $\sim$ is an equivalence relation on $\mathbb{R}$ defined via $x\sim y \iff x-y \in \mathbb{Z}$. Sadly this approach did not work since it would need $\pi^{-1}$ to be continuous (at least in the way how I approached it).
So, concretely, my problem is not necessarily in just finding a function $\psi$, but in finding one that is continuous. Does anybody have an idea how to resolve this annoying hiccup? Maybe there is something simple that I have overlooked, but I do not see it.
Let $\varphi\in P(\mathbb{R})$. Consider the map $\varphi\circ\gamma^{-1}$ and notice that it is single valued since $\varphi$ is periodic. Notice that $\varphi(x)=\varphi(\gamma^{-1}(\gamma(x)))=(\varphi\circ \gamma^{-1})\circ \gamma(x)$, that is $\varphi=(\varphi\circ \gamma^{-1})\circ \gamma$ so the right hand side is continuous. Then we have that, if $U$ is open in $X$, then $((\varphi\circ \gamma^{-1})\circ \gamma)^{-1}(U)=\gamma^{-1}((\varphi\circ \gamma^{-1})^{-1}(U))$ is open in $\mathbb{R}$ and, since $\gamma$ is an identification for $S^1$ (a set $U$ in $S^1$ is open if and only if $\gamma^{-1}(U)$ is open $\mathbb{R}$), $(\varphi\circ \gamma^{-1})^{-1}(U)$ is open in $S^1$ and $\varphi\circ \gamma^{-1}$ is continuous thus $\varphi\circ \gamma^{-1}\in C(S^1)$. From these, $\iota_\gamma(\varphi\circ\gamma^{-1})=\varphi$ and we conclude.