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.



Inverse of a Borel surjection
Your question is really about the [uniformization problem](http://www.math.ucla.edu/~ynm/lectures/dst2009/dst2009.pdf#page=16), 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](http://www.math.ucla.edu/~ynm/lectures/dst2009/dst2009.pdf#page=203). 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](http://www.karlin.mff.cuni.cz/~holicky/publikace/08velkerezykorr.pdf) by Petr Holicky and [these further exercises in Moschovakis's book](http://www.math.ucla.edu/~ynm/lectures/dst2009/dst2009.pdf#page=212)). 


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](http://books.google.com/books?id=FhYGYJtMwcUC&pg=PA185&lpg=PA185&dq=Borel+set+without+uniformization&source=bl&ots=D99R-GvDD5&sig=kJrpHnBbJ5Zj1R_XqNY0PbbYeds&hl=en&sa=X&ei=0ujKU8aUA8-eyATt9YDIDg&ved=0CC8Q6AEwAg#v=snippet&q=5.1.7%20%22does%20not%20admit%20a%20Borel%20uniformization%22&f=false).) In particular, the projection map $\pi:B\to \mathbb{R}$ is a Borel surjection having no Borel inverse in your sense. 


