TITLE: Showing that a certain recursive set cannot exist?
QUESTION [5 upvotes]: I'm having a lot of trouble with problem 17.2 of Computability and Logic (Boolos, Burgess, Jeffrey).  Here's the problem:

Let $T$ be a consistent, axiomatizable theory (in the language of arithmetic) extending $\textbf{Q}$ (the minimal theory of arithmetic). Consider the set $P^{yes}$ of (code numbers of) formulas that are provable in $T$, and the set $P^{no}$ of (code numbers of) formulas that are disprovable in $T$.  Show that there is no recursive set $R$ such that $P^{yes}$ is a subset of $R$ while no element of $R$ is an element of $P^{no}$.

Here are a few things I've tried so far (that have not worked out yet):

Attempt to show that $T$ is recursive (which is a contradiction), i.e. for a given sentence $A$, consider whether $A$ is in $T$ for each of the following cases:

$A \not\in R$ (then $A$ is not in $R$)
$A \in R$ and $~A \in R$ (then $A$ is not in $R$)
$A \in R$ and $~A \not\in R$ (I got stuck on this case)

Attempt to use the diagonal lemma to construct a sentence $G$ that can neither be in $R$ or not in $R$ (I couldn't derive a contradiction for the case where $G$ is in $R$)
Attempt to show that the Rosser sentence can be either proved or disproved in $T$ (which is a contradiction)--I just didn't get very far with this

Any hints would be greatly appreciated.

REPLY [2 votes]: Thomas Andrews posted a proof that uses the fact that $T$ has no computable, complete, consistent extension. Here is a different method that goes through some elementary recursion theory. Let $\phi_e$ be the standard numbering of the partial computable functions. 
First, we will verify that the sets $A = \{e : \phi_e(0) \downarrow = 0\}$ and $B = \{ e : \phi_e(0) \downarrow=1\}$ are recursively inseparable. These sets are easier to work with because they don't refer to formal theories. Suppose that $C$ is any computable set. We want to prove that either $A \not \subseteq C$ or $B \cap C \not = \emptyset$. Using Kleene's recursion theorem, there is an $e$ such that $\phi_e(0) = 1$ if $e \in C$ and $\phi_e(0) = 0$ if $e \not \in C$. Thus, if $e \in C$ then $C \cap B \not = \emptyset$, and if $ e \not \in C$ then $A \not \subseteq C$. This is what we wanted to prove.
Note that $Q$, and thus also any extension, proves every true statement of the form 
$$H(e,n,k) \equiv \phi_e(n) \downarrow = k$$
and also proves $H(e,n,k) \to \lnot H(e,n,k')$ whenever $k \not = k'$.  This is the only fact about $Q$ we will need. 
Suppose that $T$ is an extension of $Q$ and let
$$
A' = \{ \theta : T \vdash \theta\} \\
B' = \{ \theta: T \vdash \lnot \theta\}
$$
Assume for a contradiction that $C'$ is a computable separating set for $A'$ and $B'$. Note that if $\phi_e(0) \downarrow = 0$ then $H(e,0,0) \in A' \subseteq C'$, and if $\phi_e(0)\downarrow = 1$ then $H(e,0,0) \in B'$ and hence $H(e,0,0) \not \in C'$. Thus $C = \{ e : H(e,0,0) \in C'\}$ is a computable separating set for $A$ and $B$, which is impossible.  
Note that there is no need to assume $T$ is computable, just that it extends $Q$. But $A'$ and $B'$ may not be c.e. unless $T$ is computable.