Suppose $f(x)$ is a total computable function. Use minimalization to show that there is a computable function $g(y)$ with $dom$ $g = im$ $f$ and $f(g(y))=y$ for all $y \in dom$ $g$
I know this then means that $f(g(y))=y$ for all $y \in im$ $f$ but I don't know where to go from here.
$g(y)=\min\{x:f(x)=y\}$ (plus a few more characters because the site doesn't like minimalization of answers)