Let $f \colon X \twoheadrightarrow Y$ be a continuous surjection between compact Hausdorff spaces, and $g \colon \mathbb{R} \to Y$ a continuous function. Can you always find a Borelmeasurable function $h \colon \mathbb{R} \to X$ with $g=f \circ h$?

2$\begingroup$ Yes. In fact there exists a Borel map $s:Y\rightarrow X$ such that $f\circ s=\operatorname{Id}_X $, and you can just take $s\circ h$. The existence of $s$ holds under more general hypotheses, see Bourbaki's General Topology IX, 6, Theorem 5. $\endgroup$ – abx Apr 25 at 10:09

$\begingroup$ Thanks abx, that sounds perfect. However, if I look that theorem up it reads: "Let Y be metrizable and a relatively compact Souslin subspace of X. Then Y is capacitable with respect to every capactiy f on X." This looks nothing like what I'd expect from your comment. Do I have a different version of the book? $\endgroup$ – Chris Heunen Apr 25 at 16:01

$\begingroup$ Oops, sorry, this is Theorem 4 in §6, no. 8. $\endgroup$ – abx Apr 25 at 16:10

$\begingroup$ I don't have a Bourbaki here, but would you confirm that no other assumption are needed? I'd be glad to know it. Thank you! $\endgroup$ – Pietro Majer Apr 25 at 17:05

1$\begingroup$ X has to be polish. $\endgroup$ – Ramiro de la Vega Apr 25 at 17:40
The answer is yes if we also assume $X$ to be metrizable (while other hypotheses may be weakened).
The multivalued map $\psi:\mathbb{R}\to 2^X$ defined by $\psi(t):=f^{1}(g(t))$ for all $t \in\mathbb{R}$, takes values in nonempty closed subsets of $X$, because $f$is surjective and continuous. It is weakly Borel measurable, that is, for any open set $U$ of $X$ the set $$\{t\in\mathbb{R}: \psi(t)\cap U\neq\emptyset\}$$ is a Borel subset of $\mathbb{R}$. Indeed, for this map $\psi$, the latter set is $g^{1}(f(U))$, which is a Borel set provided $X$ is a compact metrizable space: then every open $U$ set of its is a countable union of compact sets, $f(U)$ is an $F_\sigma$ and so is $g^{1}(f(U))$). We can therefore apply the Kuratowski and RyllNardzewski selection theorem and state the existence of a Borel measurable selection $h:\mathbb{R}\to X$ of $\psi$, that is $h(t)\in f^{1}(g(t))$ for all $t\in\mathbb{R}$, that is $f\circ h= g$.
rmk. As shown in the above argument, what is needed to apply the KRN measurable selection theorem is: $f$ is continuous and surjective and for any $U\subset X$ open subset, $g^{1}(f(U))\in\mathcal{B}(\mathbb{R})$.
Also, as suggested by user abx in comment, one can directly prove that $f$ has a Borel measurable section $s:Y\to X$, replacing $g:\mathbb{R}\to Y$ in the argument with the identity map $Y\to Y$. In order to apply the KRN thm one needs to know that for all $U\subset X$ open subset, $ f(U) \in\mathcal{B}(Y)$ (which is true for metrizable $X$).

$\begingroup$ Thanks Pietro. Do you know if X being metrizable is necessary? $\endgroup$ – Chris Heunen Apr 25 at 16:02

$\begingroup$ I don't know, maybe not. For instance, the existence of a Borel measurable section $s:Y\to X$ to $f:X\to Y$ does not seem to imply that $f$ maps open subsets of $X$ to Borel subsets of $Y$, because it does not give $s^{1}(U)=f(U)$, but only the inclusion. $\endgroup$ – Pietro Majer Apr 25 at 16:49
Just a small addition to the existing answers.
Theorem. There exists a nonmetrizable compact Hausdorff space $K$ admitting a continuous surjective function $f:K\to[0,1]^2$ to the unit square such that $f$ has a Borel section if and only if CH holds. Then taking the Peano squarefilling curve $p:[0,1]\to[0,1]^2$ we can show that $p$ has a Borel $f$lifting $[0,1]\to K$ if and only if the Continuum Hypothesis holds.
Skecth of the proof. Consider the split interval $\ddot{\mathbb I}$ (which is the lexicographic product $[0,1]\times\{0,1\}$ endowed with the order topology). It is wellknown that $\ddot{\mathbb I}$ is a compact Hausdorff space admitting a continuous surjective map $\ddot{\mathbb I}\to [0,1]$. Then the square $K=\ddot{\mathbb I}\times\ddot{\mathbb I}$ admits a continuous surjective map $f:K\to[0,1]^2$ such that for every point $z\in[0,1]^2$ the preimage $f^{1}(z)$ contains at most 4 points. Using the answer (and comments) to this question, it can be shown that $f$ has the desired property: it has a Borel section if and only if CH holds. More details on the proof can be found in this paper. $\quad\square$
The above theorem suggests the following (open?)
Problem. Is there a 2to1 map $f:K\to M$ from a compact (Rosenthal) space onto a compact metrizable space $M$, which has no Borel selections?