Q:

Inverse of a Borel surjection

Let $X$ and $Y$ be standard Borel spaces, and let $f:X\to Y$ be a surjective Borel map. Does there exist a Borel inverse of $f$, that is a Borel map $g:Y\to X$ such that $f\circ g = \mathrm{id}_Y$.
In case $f$ is injective, such map does exist, so I am interested in the case when $f$ is not injective. The fact that the graph $\mathrm{Gr}(f)$ is Borel and $g$ chooses over $\mathrm{Gr}(f)^{-1}$ means that there exists at least a universally measurable $g$. If we could show that its graph is Borel as well, that would mean $g$ is Borel. I'm not sure how to do this, and whether such result is true. I've tried to find a counterexample by means of Borel isomorphism, but without much success.

A:

Your question is really about the uniformization problem, a major focus of descriptive set theory. A set $B\subset X\times Y$ is uniformized by a set $C\subset B$ if $C$ is the graph of a function with the same projection as $B$. In other words, the function selects one member of each nonempty section of $B$, and this function is a one-sided inverse of the projection function $\pi_X$ from from $B$ to $\pi_X(B)$. 
There are a variety of uniformization theorems in descriptive set theory, which you can read about in the usual descriptive set-theoretic texts. For example, the Lusin-Novikoff result is that if $B$ is Borel and all sections are countable, then it has a Borel uniformation, as mentioned by Burak in the comments (see Exercise 4F.6 in Moschovakis's book. Alternatively, when the sections are large in various senses, then again there is a Borel uniformization (see Borel classes of uniformizations of sets with large sections by Petr Holicky and these further exercises in Moschovakis's book). 
Meanwhile, the full Borel uniformazation property is not true (and indeed perhaps this is why the descriptive set theorists make so much effort to discover the circumstances when sets can be uniformized and to find out how simple the uniformizing sets can be). Namely, there is a Borel set $B\subset\mathbb{R}\times\mathbb{R}$ projecting to the whole of $\mathbb{R}$, but having no Borel uniformization. (You can find a discussion of the proof that such a $B$ exists in Example 5.1.7 of this text by Srivastava.) In particular, the projection map $\pi:B\to \mathbb{R}$ is a Borel surjection having no Borel inverse in your sense. 

