Set $\mathcal{S}^{*}=\bigcup_{p>0} \mathbb{N}^{p}$ and define a map $\alpha$ from $\mathcal{S}^{*}$ into $\mathbb{N}$ as follows: if $\sigma$ is a sequence of integers of length $p$, then $\alpha(\sigma)=\alpha_{2}\left(p, \alpha_{p}(\sigma)\right)$.
(a) Show that the function $\alpha$ is injective and that its range is a primitive recursive set.
(b) Show that there exists a primitive recursive function $g$ such that if $\sigma=$ $\left(a_{1}, a_{2}, \ldots, a_{n}\right)$ and if $b=\sup \left(n, a_{1}, a_{2}, \ldots, a_{n}\right)$, then $\alpha(s) \leq g(b) .$
(c) Show that the function $\phi$ defined by
$$
\phi(p, i, x)= \begin{cases}\beta_{p}^{i}(x) & \text { if } 1 \leq i \leq p \\ 0 & \text { otherwise }\end{cases}
$$
is primitive recursive.
(d) We now define another coding: let $\gamma$ be the function which, with every $\left(a_{0}, a_{1}, a_{2}, \ldots, a_{p}\right) \in \mathcal{S}^{*}$, associates the integer
$$
\gamma\left(\left(a_{0}, a_{1}, \ldots, a_{p}\right)\right)=\pi(0)^{a_{0}+1} \cdot \pi(1)^{a_{1}+1} \cdot \ldots \cdot \pi(p)^{a_{p}+1}
$$
it is understood that the value of $\gamma$ on the empty sequence is 1 . Show that $\gamma$ is an injective map and that its range is a primitive recursive set.
(e) Show that the two codings can be obtained from one another in a primitive recursive way; more precisely, show that there exist two primitive recursive functions $f$ and $h$ of one variable such that
(i) for all $x$ in the range of $\alpha, f(x)=\gamma(\sigma)$, where $\sigma$ is the non-empty sequence satisfying $\alpha(\sigma)=x$;
(ii) for all $x$ in the range of $\gamma, h(x)=\alpha(\sigma)$, where $\sigma$ is the non-empty sequence satisfying $\gamma(\sigma)=x$.