The monoid of all the functions $X^X=\{f:X\to X\}$ has a right inverse : the the surjective function and a left inverse: the injective function.
I remember that it has to do with the set theory, is there a simple and intuition explanation?
The monoid of all the functions $X^X=\{f:X\to X\}$ has a right inverse : the the surjective function and a left inverse: the injective function.
I remember that it has to do with the set theory, is there a simple and intuition explanation?
It happens that complete answers are already available, although they are somewhat scattered, especially in "proof verification" problems. This is an attempt to make something a little more canonical. If it happens that there is a more canonical version that I missed in my search, we should link this question as a duplicate to that. Alternatively someone with a gold badge could link the entire collection of questions I'm going to list.
If a function $f:X\to Y$ is surjective, see this question and this question
If a function $f:X\to Y$ is injective, then see this related question.
Proving the converses of both statements is easy to do directly and is done in this post.