I want to show the claim in the title: That for all functions $f: X \to Y$ there exists some set $S$, some surjective function $g: X \to S$, and some injective function $h: S \to Y$ such that $f = h \circ g$.
I've been thinking about this one for a while, but the only observations I've come up with are:
- Because $g$ is surjective, the image of $(h \circ g)$ is equivalent to $h[S]$. And because $h \circ g = f$, we have that the image of $f$ is equal to $h[S]$.
- If we set $h$ to be the identity function and then set $g = f$, then $h$ is injective and we also have $f = h \circ g$. However, this works only if $f$ is surjective, because $g$ needs to be surjective.
I'm unsure as to how I should proceed. Are my observations on the right path?