Is it true the following statement?



> 
> Given two Polish spaces $X,Y$ and a Borel function $f:X\rightarrow Y$, there exists a Polish space $Z$ and a Borel function $g:X \rightarrow Y\times Z$ with closed graph such that $f(x) \ = \pi\_Y(g(x))$ for all $x \in X$.
> 
> 
> 


In case it was true, do you have any hint for the proof?  

Thanks!



Is every Borel function a projection of a Borel function with closed graph?
Yes, this is true: by Exercise 13.5 in [Kechris' "Classical Descriptive Set Theory"](https://link.springer.com/book/10.1007/978-1-4612-4190-4), for any Borel function $f:X\to Y$ between Polish spaces there exists a continuous bijective map $i:Z\to X$ from a Polish space $Z$ such that the function $f\circ i:Z\to Y$ is continuous.


Now consider the function $g:X\to Y\times Z$, $g:x\mapsto (f(x),i^{-1}(x))$ and observe that it has closed graph $$\Gamma=\{(x,y,z)\in X\times Y\times Z:y=f(x),\; x=i(z)\}=\{(x,y,z)\in X:y=f\circ i(z),\;x=i(z)\}$$by the continuity of the functions $i$ and $f\circ i$. It is clear that $f=\pi\_Y\circ g$.


