I'm trying to understand the proof sketch of Gödel's Incompleteness Theorem 1 on Wikipedia (https://en.wikipedia.org/wiki/Proof_sketch_for_G%C3%B6del%27s_first_incompleteness_theorem)
In particular, this proof involves the construction of a formula $PF(x,y)$ which holds in case $x$ is the Gödel number of the proof of the statement which has Gödel number $y$. The author says that $PF(x,y)$ is in fact an arithmetical relation, just as $x + y = 6$ is, though a (much) more complicated one" and that the "detailed construction of the formula $PF$ makes essential use of the assumption that the theory is effective."
What would the detailed construction of the formula $PF$ look like?
I understand that one can translate $x$ into its representation as a sequence of arithmetic sentences, and $y$ into its representation as an arithmetic sentence. I assume that assumption that the theory is recursively enumerable implies an effective procedure for checking whether $F(x)$ proves $F(y)$, but how does this imply a formula for $PF(x,y)$? In particular, my understanding is that $PF(x,y)$ must be a finite-length sentence in the language, with $x$ and $y$ as free variables, however, I do not see the way to construct it.
I can imagine (roughly) trying to construct $PF(x,y)$ as the disjunction of all finite sequences of inference rules applied to $F(x)$ but this is not itself finite, even if the set of inference rules is finite.
We define a predicate $Prfseq_T$ which is satisfied by a number $m$ if $m$ Gödel-numbers a sequence of wffs which satisfies the condition of being a well-formed $T$-proof. We can do that because (A) the property expressed is p.r. because -- in arm-waving terms! -- the business of decoding $m$ and then checking that the finite sequence of wffs satisfies the condition of being a proof can done effectively, without any open-ended searches, assuming $T$ is an primitively recursively axiomatized theory of the usual kind. And (B) we've shown that any p.r. property is expressible in the language of first order arithmetic. (Tech note: For $Prfseq_T$ to be p.r. we need $T$ to be not just effectively axiomatised but for it to be primitively recursively decidable whether an expression is an axiom etc.)
Then define $Prf_T(m,n)$ to hold if $m$ numbers a proof sequence in $T$, and $n$ numbers the last wff in that sequence.
If you want more detail, the textbooks will tell you: but for a gentle version, see in particular Ch 15 in the first edition/Ch. 20 of the second edn. of my Introduction to Gödel's Theorems (which should be in the library)