Prove or disprove that the left inverse of a function $f: X \mapsto X$ if it exists is unique Prove or disprove that the left inverse of a function $f: X \to X$ if it exists is unique.
Similarly prove or disprove the right inverse of a function $f: X \to X$ if it exists is unique.
 A: Let $X=\mathbb{Z}$, the set of integers, and let $f:x\mapsto 2x$, then both $g_1(x)=\left\lceil\frac{x}{2}\right\rceil$ and $g_2(x)=\left\lfloor\frac{x}{2}\right\rfloor$ are left inverses for $f$.
A useful understanding to have in coming up with examples for this kind of thing is the following: A function has a left-inverse if and only if it is one-to-one; a function has a right inverse if and only if it is onto. (Writing proofs of these claims is a great exercise, by the way.) Therefore, if a function is both one-to-one and onto, then it has a two-sided inverse, which is necessarily unique.
Thus, to find a non-unique left-inverse, we must consider a function that is one-to-one, but not onto, as in the above example. Similarly, to find a non-unique right-inverse, we must consider a function that is onto, but not one-to-one. Such functions can only exist on infinite sets, because on a finite set, one-to-one and onto are equivalent.
Taking $X=\mathbb{Z}$ again we can take $f:x\mapsto\left\lfloor\frac{x}{2}\right\rfloor$, we can use either $g_1(x)=2x$ or $g_2(x)=2x+1$ as a right inverse for $f$.
A: Hint: Let $f:\{1,2,3,\dots\}\to\{1,2,3,\dots\}$ be defined by $f(x)=x+1$. What kind of left inverses does $f$ have?
For right inverses, consider $f:[0,1]\to[0,1]$ defined by 
$$
f(x)=\begin{cases}2x\text{ if }x\leq \frac{1}{2}\\x/2\text{ if }x>\frac{1}{2}\end{cases}.
$$
What kind of right inverses does $f$ have?
