Let $\def\N{\mathcal{N}}$ $\N$ be some (powerful enough) theory of arithmetic. Is there an effective procedure to find a Gödel sentence $A$ in $\N$? That is, a sentence for which $$\vdash A \iff \neg P(A).$$ To be clear, this means building a computer program that runs through all sentences in $\N$, expressed as finite strings of symbols in the language of $\N$, until the program halts at $A$.
Naively it seems that any standard proof of Gödel's First Incompleteness Theorem could give us such a procedure:
- Step 1: use Gödel numbers to define an effectively computable predicate $P$ for which $P(X)$ is true if and only if $X$ is provable in $\N$.
- Step 2: let $A_1(n), A_2(n), \ldots$ be an effectively computable enumeration of all formulas having exactly one free variable in $\N$.
- Step 3: search through the above list until you find the sentence $A_k(n) = \neg P(A_n(n))$. This is possible as both $P$ and $n\mapsto A_n$ are effectively computable.
Then it is easy to show that $A_k(k)$ is a Gödel sentence. Am I missing something, or is this indeed true?