I'm having a difficulty trying to understand the statement "An injective (but not surjective) function must have a left inverse" and how it works. I've tried breaking the statement down step by step using diagrams in order to see how it works and in order to keep the post short.
About step 1: Here $f$ is an injective only function (one-to-one & into) and $g$ is a surjective only function (multi-to-one & onto).
About step 2: When $f$ maps $1,2\in X$, it outputs $r,s\in Y$ as the image. And the image of $f$ becomes the domain of $g$ in the composition. Which makes $t\in Y$ not mapped by $g$ in this case. It was easy to find a function which can invert $f$ back to the exact same members of $X$.
About step 3: The composition $g\circ f$ is a bijective function
My questions are:
1) In my comments of step 2 “And the image of $f$ becomes the domain of $g$ in the composition”. Is this statement correct?
2) In step 2, $t\in Y$ is not mapped by $g$ since it was not a member of the image of $f$. So doesn’t that makes $g$ a partial function in this case, since it doesn’t map all the members of its own domain ($Y$) ? Also another note is $t\in Y$ doesn’t have any element from $X$ who maps (relates) to it via $f$. Is there any reference which explicitly explain how to handle such $t\in Y$ like in the above function composition?
3) I have read somewhere that in order for the composition to give a valid (properly defined) result, “the image” of $f$ (in the example above) must be at least a “subset” of the “domain” of $g$ (which is $Y$ in the example above). But does that mean that the “codomain” of $f$ doesn’t have to be the same as the “domain” of $g$ for the function composition ($g\circ f$) to work aka validly defined? In the example above, Supposed that the codomain of $f$ is now $Z=(r, s, w)$ or $W=(r, s)$ and not $(r, s, t)$ but the image of $f$ remains the same $(r,s)$ and the domain of $g$ also remains the same $(r,s, t)$. What would happen to the composition? Will it still be valid & why?