Equivalence of two definitions of recursively enumerable sets

280 Views Asked by At

Let's define a recursively enumerable set as the domain of some program $p$, i.e., $\{x:\phi_p(x)\downarrow\}$.

There is another definition of a recursively enumerable set: it is either the empty set or the range of a computable function $f: \mathbb N\to \mathbb N$.

I'm trying to understand their equivalence.

One direction: suppose the second definition holds. Then define the program $p$ by the following conditions. The program $p$ takes an input $x$ and checks if $x\in f(\mathbb N)$: since $f$ is computable (say via $e$), the program $p$ can use $e$ to see, for each $n=0,1,\dots$, whether $f(n)=x$. If $x\in f(\mathbb N)$, then such $n$ will be found, and in this case we force $p$ to halt. Otherwise the program will work forever. For this program $p$, the domain of $\phi_p$ is $f(\mathbb N)$, q.e.d. Is this proof correct?

The other direction: This seems to be more difficult. I found this answer (which is supposedly what I need), from which the proof appears to be relatively easy, but I don't understand that proof. For example, I don't understand what $\Phi_{e,s}$ is.

1

There are 1 best solutions below

3
On

Your proof seems correct.

Here is another proof of the remaining direction: assume that $A=\operatorname{dom}\phi_e $ for some $e$. If $A$ is finite, then it is obviously an image of some computable function.

Now assume that $A$ is infinite. We will construct an infinite list $\langle c_n\mid n<\omega\rangle$: start from an empty list. We will add natural numbers into the list by considering the following procedure: for each $n$, check $\phi_e(n)\downarrow$. By dovetailing, we can evaluate $\phi_e(n)$ simultaneously for multiple $n$. If we finish computing $\phi_e(n)$ for given $n$, put $n$ into the list.

Since $A$ is infinite, out list is infinite. Let $f$ be the canonical enumeration of the list (i.e. $f(n)=c_n$.) By our construction of the list, $f$ is computable. Moreover, the image of $f$ is exactly $A$: if $n\notin A$, then $n$ will not be appear in our list.