Solution (source code)

= Solution

The <Diagonal lemma> says that for every one-variable formula $\theta(x)$ there is a sentence $\gamma$ such that
$$
T\vdash\gamma\leftrightarrow\theta(\ulcorner\gamma\urcorner).
$$
Let $d(n)$ be the computable function taking the code of a one-variable formula $\alpha(x)$ to the code of $\alpha(\bar n)$. By the assumed representation theorem, choose a Sigma-1 formula $D(x,y)$ representing $d$. Given $\theta$, put
$$
\beta(x)=\exists y\bigl(D(x,y)\wedge\theta(y)\bigr)
$$
and let $b=\ulcorner\beta\urcorner$. Taking $\gamma=\beta(\bar b)$, representability proves in $T$ that the unique relevant $y$ is $d(b)=\ulcorner\gamma\urcorner$, yielding the required equivalence.