Jonathan wrote:
> **Puzzle 142.** Define \\(f' : \mathbb{Z} \to \mathbb{Z}\\) by \\(f'(x) = \lfloor \frac{x}{2} \rfloor\\). Then both \\(g'(x) = 2x\\) and \\(h'(x) = 2x + 1\\) are right inverses of \\(f'\\).
Nice again! The functions \\(g'\\) doubles any integer; \\(h'\\) doubles it and adds one, but \\(f'\\) takes each even integer and the next odd integer to the same value, so \\(f' \circ g' = f' \circ h'\\), and in fact \\(f' \circ g' = f' \circ h' = 1_{\mathbb{Z}}\\).
> Notice that \\(f\\) is injective but not surjective, and \\(f'\\) is surjective but not injective. In \\(\textbf{Set}\\), functions with inverses are the same as bijections, and we want to avoid those here.
Right. Everyone who hasn't pondered this already should tackle these:
**Puzzle.** Exactly which functions have left inverses?
**Puzzle.** Exactly which functions have right inverses?
The answer in each case is a famous class of functions.