[Math] how to find two right-inverse functions of a function

function-and-relation-compositionfunctionsinverse

i am stuck in this problem. i need to find two right-inverse functions of this function:

$h: \Bbb N_0\times \Bbb N \to \Bbb N, (m,n)\mapsto m+n$.

i know that the function h' is a right inverse of a function h if and only if:

$h \circ h' = m+n$.

how can i say this in mathematical way and as for the h function given above? i did this:

$h': \Bbb N->\Bbb N_0\times\Bbb N, m+n\mapsto (m,n)$.
$h \circ h' = h(h'(m+n))=m+n$

but now from here, i dont know how to finish the proof and how to show another right-inverse function of h

thanks for help in advance

Best Answer

As you point out, $h^{-1}$ maps naturals to pairs $(m, n)$. If you think about what $h^{-1}$ is doing, you'll see that you need to find a pair $(m, n)$, $m \in \mathbb{N}_0$, $n \in \mathbb{N}$ such that $m+n$ is the function $h^{-1}$'s input. That is, if $h^{-1}(k) = (m, n)$, then $m + n = k$. An easy approach is to fix some $m$ first, then let $n = k - m$. This will work provided $k > m$. We can then handle the remaning cases separately. This gives $h^{-1}(n) = (0, n)$ as a simple example, since $(0, n) \in \mathbb{N}_0 \times \mathbb{N}$. So that gives one right inverse. Another can be given by, for example,

$$h^{-1}(n) = \begin{cases}(1, n-1), & \mbox{if } n > 1\\(0, 1), & \mbox{if } n = 1\end{cases}$$

Can you devise a suitable function for $m = 2$? For $m = 3$?

Related Question