Solution (source code)

= Solution

The <crude incompleteness theorem> says that every consistent recursively axiomatized extension $T$ of $PA^-$ is incomplete.

Suppose instead that $T$ were complete. Enumerating proofs until either $\sigma$ or $\neg\sigma$ appears would decide theoremhood, so its characteristic function $\chi_T$ would be total recursive. By the assumed representation theorem, choose a formula $R(x)$ such that $PA^-$ proves $R(\bar n)$ when $\chi_T(n)=1$ and proves $\neg R(\bar n)$ when $\chi_T(n)=0$. The diagonal lemma supplies $\gamma$ with
$$
PA^-\vdash\gamma\leftrightarrow\neg R(\ulcorner\gamma\urcorner).
$$
If $T\vdash\gamma$, then $\chi_T(\ulcorner\gamma\urcorner)=1$, so $T\vdash R(\ulcorner\gamma\urcorner)$ and is inconsistent. If $T\vdash\neg\gamma$, then the characteristic value is zero, so $T\vdash\neg R(\ulcorner\gamma\urcorner)$ and hence $T\vdash\gamma$, again a contradiction. Completeness must therefore fail.