\documentclass[12pt]{article}
\usepackage{amssymb, amsmath}

\textheight 23cm
\textwidth 6.5in
\oddsidemargin -.1in
\evensidemargin -.1in
\topmargin -1.5cm

\renewcommand{\theenumi}{\arabic{enumi}}
\renewcommand{\labelenumi}{\theenumi)}

\newtheorem{exer}{Exercise}

\newcommand{\eqsyn}{=_{syn}}
\newcommand{\ra}{\rightarrow}
\newcommand{\SL}{{\cal L}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\underN}{\underline{\mathbb{N}}}
\newcommand{\stand}{\underline{\mathbb{N}}}
\newcommand{\calM}{{\cal M}}
\newcommand{\calL}{{\cal L}}
\newcommand{\LA}{{\cal L}_{A}}
\newcommand{\LAL}{{\cal L}_{A,\leq}}
\newcommand{\calP}{{\cal P}}
\newcommand{\ld}{{\overline{\:.\,}}}
\newcommand{\dl}{{\frac{\:.\:}{}}}
\newcommand{\emp}{\varnothing}


\def\Konig{K\"{o}nig}
\def\Godel{G\"{o}del}
\def\Equiv{\Longleftrightarrow}
\def\PA{{\bf PA}}
\def\TA{{\bf TA}}
\def\RA{{\bf RA}}
\def\RAL{{\bf RA_\leq}}
\def\vecx{\vec{x}}
\def\veca{\vec{a}}

\input{prooftree}

\parskip 2ex
\parindent 0ex

\setcounter{page}{66}

\begin{document}

{\large\bf CS 4995}\hspace{.8in}{\large\bf Notes} (T. Pitassi, S. Cook)
\hfill {\large\bf Fall, 2021}

\bigskip

\begin{center}
{\Large\bf Incompleteness }

\bigskip

{\large\bf First part:  Representing relations by formulas}
\end{center}

Our goal now is to prove the \Godel\ Incompleteness Theorems, and associated
undecidability results.  Recall that \TA\ (True Arithmetic) is the
set of all sentences in the vocabulary 
${\cal L}_A =  [0,s, +, \cdot\ ;  =]$ which are true in the standard
model.  We will prove that \TA\ is not a recursive set, and not r.e.,
and in fact it has no recursive set of axioms.  In view of this,
we will study a standard subset of \TA\ known as Peano Arithmetic (or \PA),
which is the set of sentences which are consequences of the Peano
Postulates.  \Godel's Second Incompleteness Theorem states that the consistency
of \PA\ cannot be proved in \PA, and can be generalized to apply to
any theory which can formalize a sufficient amount of number
theory.

The undecidability and incompleteness results very much depend on the
richness of the vocabulary ${\cal L}_A$; that is, both + and $\cdot$ must
be present.  As indicated on page 52 of the Notes, if just + is
present, then the set of true sentences (Presburger Arithmetic) is decidable
and has a nice axiomatization.

{\bf Notation:}
From now until the end of the course, the underlying vocabulary is
${\cal L} = {\cal L}_A = [0,s, +, \cdot\ ;  =]$ (unless otherwise noted).

Recall that
$\stand$ is the standard model or structure for ${\cal L}_A$.
That is, the universe $M=\NN$, and $0,s,+,\cdot$ get their standard
meanings.

{\large\bf Representing relations by formulas}

If $x_1,...,x_n$ are distinct variables, and $A$ is a formula,
we will sometimes write $A(x_1,...,x_n)$ (or $A(\vec{x})$) to indicate that we
are thinking of $A$ as representing a relation whose arguments
are $x_1,...,x_n$.  In this case, if $t_1,...,t_n$ are terms, then
$A(t_1,...,t_n)$ denotes $A$ with the variables $x_1,...,x_n$
simultaneously replaced by $t_1,...,t_n$, respectively.

{\bf Numerals:}  We define $s_0 = 0$ and $s_{k+1} = s s_k$, $k=0,1,...$
 
$s_k$ is a term (or numeral) representing $k \in \NN$.
For example,
$s_3$ stands for the term sss0.
Numerals are syntactic objects.  They represent numbers,
which are semantic objects.

$A(s_{\vec{a}})$ means $A(s_{a_1}, \ldots, s_{a_n})$ where
$a_1, \ldots, a_n \in \NN$.

{\bf Definition:}  Suppose $R$ is an $n$-ary relation,
$A(\vec{x})$ is a formula such that all free variables in $A$ are among
$x_1,...,x_n$.
Then $A(\vec{x})$ {\em represents} $R$ iff
for all $\vec{a} \in \NN^n$
$$ R(\vec{a}) \Leftrightarrow \stand\models A(s_{\vec{a}}) $$
($R(\vec{a})$ holds iff the sentence $A(s_{\vec{a}})$ is true in the
standard model.)

This notion ties together a syntactic object
(a formula $A$) and a semantic object (a relation $R$).

\label{arith}
{\bf Definition:} $R$ is {\em arithmetical} iff $R$ is representable
by some formula (with vocabulary ${\cal L}_A$).

For example, the divisibility relation $x|y$ ($x$ divides $y$)
is representable by the formula
$A(x,y) =_{syn} \exists z(x\cdot z=y)$.  Therefore $x|y$ is an
arithmetical relation.

We will show that many relations are arithmetical, including all recursive
relations, all r.e. relations, and many more.

{\bf Bounded Quantifiers}

{\bf Syntactic Definitions:} Let $t_1$ and $t_2$ be terms.

$t_1 \leq t_2$ stands for
$\exists z(t_1 + z = t_2)$, where $z$ does not occur in $t_1$, $t_2$.

$\exists x \leq t \ A$ stands for $\exists x(x \leq t \wedge A)$,
where $x$ does not occur in $t$.

$\forall x \leq t \ A$ stands for
$ \forall x(x \leq t \supset A)$, where $x$ does not occur in $t$.

These are {\em bounded quantifiers}.
Note that these definitions apply to formulas in the vocabulary ${\cal L}_A$.

{\bf Notation:} Let ${{\cal L}}_{A,\leq}$ be the vocabulary ${{\cal L}}_A$
expanded
by the binary predicate symbol $\leq$.  We define bounded quantifiers
for this vocabulary
as above, except now $x\leq t$ is not an abbreviation for
$\exists z(x+z=t)$.

{\bf Definition of Bounded Formula and $\Delta_0$ Formula:}
A formula $A$ in  ${{\cal L}}_{A,\leq}$
is a {\em bounded} formula iff all of its quantifiers are bounded.
A formula $A$ in ${{\cal L}}_A$ is {\em bounded} iff it is the translation
of a bounded formula in ${{\cal L}}_{A,\leq}$ using the translation
for $t_1\leq t_2$ given above.  A bounded formula of ${{\cal L}}_A$
is also called a $\Delta_0$ formula.

Again ``formula'' always refers to a formula over ${{\cal L}}_A$,
unless otherwise stated.  Thus for example if we write a formula
$$  \exists u\leq y(u\cdot x=y)  $$
this stands for the ${{\cal L}}_A$ formula
$$   \exists u((\exists z \ u+z=y)\wedge u\cdot x=y)  $$

{\bf Definition:} $R(\vec{x})$ is a $\Delta_0$-relation
iff some $\Delta_0$ formula $A$ represents $R$.

Note that all $\Delta_0$ relations are arithmetical.

{\bf Example:}
The relation $\mbox{Prime}(x)$ is represented by the following
bounded formula $A(x)$:
 $$  s0 < x\wedge \forall z \leq x\ \forall y \leq x (x = z \cdot y
\supset (z=1 \vee z=x)) $$
Thus Prime$(x)$ is a $\Delta_0$ relation.

{\bf Example:}  The relation $x|y$ is a $\Delta_0$ relation.

{\bf Side Remark:}  All $\Delta_0$ relations can be recognized in linear
space on a Turing machine, when input numbers are represented in binary
notation.

{\bf Lemma:} The $\Delta_0$ relations are closed under
$\wedge, \vee, \neg $ and the bounded quantifiers $\forall \leq, \exists \leq$.

{\bf Proof:} Notice that in this lemma, the operations in question are
semantic operations, since they operate on relations (semantic objects).

However each of these semantic operations on relations corresponds to
a syntactic operation on formulas.  For example, suppose that $R$ and $S$
are $n$-ary $\Delta_0$ relations.  Then by definition of $\Delta_0$,
there are bounded formulas $A$ and $B$ which represent
$R$ and $S$, respectively.  Then the formula $(A \wedge B)$ is
a bounded formula which represents the relation $R \wedge S$.
Therefore $R \wedge S$ is a $\Delta_0$ relation.  A similar argument
applies to each of the other operations mentioned in the lemma.

{\bf Lemma:} Every $\Delta_0$ relation is recursive.

{Proof:} Structural Induction on bounded formulas in the vocabulary
${\cal L}_{A,\leq}$.
We use the fact that the
recursive relations (i.e. predicates) are closed under
the boolean operations and bounded quantification.
$\Box$

{\bf Remark:}  The converse of the above lemma is false, as can be
shown by a diagonal argument.  For those familiar with complexity
theory, we can clarify things as follows.  As noted in the Side
Remark above, all $\Delta_0$ relations can be recognized in linear
space on a Turing machine.  On the other hand, 
it is not hard to see that all , space $O(n^2)$ relations
are primitive recursive. A straightforward diagonal argument
shows that there are relations recognizable in $n^2$ space
which are not recognizable in linear
space, and hence are not $\Delta_0$ relations.

{\bf Definition:}
A $\exists \Delta_0$ formula (also called a $\Sigma_1$ formula)
is one of the form $\exists y A$, where
$A$ is a $\Delta_0$ formula.

{\bf Definition:} $R$ is a $\exists \Delta_0$-relation
iff $R$ is represented
by a $\exists \Delta_0$ formula.

Notice that we are applying the same adjective ``$\exists \Delta_0$''
to both relations and formulas.  Of course all $\exists\Delta_0$
relations are arithmetical.

{\bf Theorem:} Every $\exists \Delta_0$ relation is r.e. 

{\bf Proof:} Suppose that $R(\vec{x})$ is a $\exists \Delta_0$ relation.
Then $R$ is represented by a formula $\exists yA(\vec{x},y)$, where
$A(\vec{x},y)$ is a  bounded formula.  Then $A$ represents a
$\Delta_0$ relation $S(\vec{x},y)$, such that
$R(\vec{x})=\exists yS(\vec{x},y)$.  By the previous lemma, $S$ is
recursive, and therefore $R$ is r.e.,
by the definition of r.e.         $\Box$

The converse is also true, so that in fact the $\exists\Delta_0$
relations coincide with the r.e. relations.

{\bf Exists Delta Theorem:} Every r.e.\ relation is $\exists \Delta_0$.

The proof will take the next three pages.  This is our easy analog of the
much more difficult MRDP theorem stating that every r.e. relation is
Diophantine (see page 81).

{\bf Unbounded quantifiers:}  We defined the Boolean operations
$\wedge,\vee,\neg$ and the bounded quantifier operations $\forall \leq$
and $\exists \leq$.  Now we defined the (unbounded)
quantifier operations $\forall$ and $\exists$.  Note that these
are operations on relations as opposed to formulas, and hence they
are semantic rather than syntactic operations.

{\bf Definition:}  The relation $S(\vec{x})$ is obtained from
$R(\vec{x},y)$ by the operation $\exists$ (existential quantification) if
$$  S(\vec{x})= \exists yR(\vec{x},y), \mbox{ for all } \vec{x}\in{\NN}^n $$
Similarly $S(\vec{x})$ is obtained from $R(\vec{x},y)$ by the
operation $\forall$ (universal quantification) if
$$  S(\vec{x})= \forall yR(\vec{x},y), \mbox{ for all } \vec{x}\in{\NN}^n $$

Note that the class of recursive relations is not closed under either
of the operations $\exists, \forall$.  For example, the Kleene $T$-predicate
$T(z,x,y)$ is recursive, but $K$ is not recursive, and yet
$$       x\in K \Equiv \exists yT(x,x,y),  $$
where $T$ is the following recursive predicate. $T(z,x,y)$ halts
and outputs 1 if $y$ codes the complete tableaux of the Turing
machine encoded by $z$ on input $x$, and the final configuration
in $y$ halts and outputs $1$.

{\bf Closure Lemma:} The $\exists \Delta_0$ relations are closed under
$\exists$, $\wedge$ and $\vee$, and the bounded quantifiers
$\exists\leq$ and $\forall\leq$.  
%(See page 63 for the definitions
%of $\exists <$ and $\forall <$, from which $\exists \le$ and $\forall \le$
%can be obtained.) 

{\bf Proof}: Again note that these operations are semantic operations.
Consider the operation $\exists$, for example.
Suppose $R(\vec{x},y)$ is represented by the formula $\exists z A(\vec{x},y,z)$,
where $A$ is a bounded formula. Then $\exists y R(\vec{x},y)$ is
represented by the $\exists\Delta_0$ formula
$$\exists u(\exists y \leq u \exists z \leq u \ A(\vec{x},y,z))$$
The argument in similar for the other operations.  The case of
$\forall\leq$ is interesting, but still quite similar.

\begin{exer}
Carry out the proof of the Closure Lemma for the other operations.
\end{exer}

{\bf Remark}:  We cannot extend the above Lemma to the operations $\forall$
and $\neg$.  This is because the $\exists\Delta_0$ relations coincide with
the r.e. relations (by the previous two theorems).  We know that the 
r.e. relations are not closed under $\neg$, because $K^c$ is not r.e.

\begin{exer}
Prove that the r.e. relations are not closed under $\forall$.
\end{exer}

Recall from page 79 that if $f$ is an $n$-ary function, then
graph$(f)$ is the $n+1$-ary relation
$$R(\vec{x},y) = (y=f(\vec{x}))$$

{\bf Main Lemma:}
If $f$ a total computable function, then
graph$(f)$ is an $\exists \Delta_0$ relation.

{\bf Example:}  The relation $(y=2^x)$ is $\exists\Delta_0$.

{\bf Proof of Exists Delta Theorem from Main Lemma:}
From this lemma it follows trivially that
every primitive recursive relation is
a $\exists \Delta_0$ relation, since
$$R(\vec{x}) \Leftrightarrow (R(\vec{x}) = 1)$$
where on the right, we view $R$ as a 0-1
valued function.

Now we can 
show that every r.e. relation is $\exists\Delta_0$.  Recall that
one of our characterizations of r.e.\ relation
was $R(\vec{x}) = \exists y S(\vec{x}, y)$, where $S$ is
recursive.
We know that $S$ is $\exists\Delta_0$ by the paragraph above,
and thus $R$ is $\exists\Delta_0$ by the Closure  Lemma.  $\Box$

{\bf Proof of Main Lemma:} 

We need a new idea: The Godel $\beta$ function. This function
provides us with a way of representing sequences of numbers
by numbers, using $\exists\Delta_0$ formulas.
Note that prime-power decomposition does not help us here,
since it is not clear that the relation $z=x^y$ can be
represented by a formula in the language of arithmetic,
which does not include exponentiation as a built-in function.

{\bf Definition:} (G\"odel $\beta$ function)
$$\beta(c,d,i) = rm(c,d(i+1)+1)$$
Recall $rm(x,y)=x\bmod y$.

{\bf Lemma:} (G\"odel) For any $n, r_0, \ldots, r_n$ there
exists $c,d$ such that
$$\beta(c,d,i) = r_i \quad 0 \leq i \leq n$$
Thus the pair $(c,d)$ represents the sequence $r_0,r_1,...,r_n$ using $\beta$.

For the proof, we need

{\bf Chinese Remainder Theorem} (CRT): Given $r_0, \ldots, r_n$
and $m_0, \ldots, m_n$ such that
\begin{equation}\label{remain}
0\leq r_i < m_i \quad 0 \leq i \leq n
\end{equation}
and
$$\gcd(m_i, m_j) = 1 \quad 0 \leq i<j \leq n$$
there exists $r$ such that
$$rm(r, m_i) = r_i \quad 0 \leq i \leq n$$
{\bf Proof:} of CRT is by counting: 
Distinct values of $r$, $0 \leq r < \Pi m_i$, represent distinct sequences.
But the total number of sequences $r_0,...,r_n$ such that (\ref{remain})
holds is $\Pi m_i$.  Hence every such sequence must be the sequence
of remainders of some $r, 0\leq r < \Pi m_i$.  $\Box$

{\bf Proof} of G\"odel Lemma: Let $d = (n + r_0 + \cdots + r_n + 1)!$\\
Let $m_i = d(i+1) + 1$\\
Claim: $0 \leq i < j \leq n \Rightarrow \gcd(m_i, m_j) = 1$\\
For suppose $p$ is prime, and $p \mid m_i$ and $p \mid m_j$\\
Then $p \mid d(i+1) + 1$ and $p \mid d(j+1) + 1$. Hence
$p$ divides their difference, i.e.
$p \mid d(j-i)$. But $p$ cannot divide $d$ and $(d(i+1) + 1)$
both, so $p \mid j-i$. But then $p \leq j-i < n$, so
$p \mid d$, a contradiction.

By the CRT, there is a number $r=c$ so
$$\beta(c,d,i) = rm(c,m_i) = r_i, \  0 \leq i \leq n \ \  \Box$$



{\bf Lemma 1:} graph($\beta$) is a $\Delta_0$ relation.

{\bf Proof:}
$$(y = \beta(c,d,i)) = [\exists q \leq c(c=q(d(i+1)+1)+y)
\wedge y < d(i+1)+1]$$

{\bf Lemma 2:} If $R(\vec{x}, y)$ is a $\exists \Delta_0$ relation,
graph($f$) is a $\exists \Delta_0$ relation (where $f$ is a total function), and
$S(\vec{x}) = R(\vec{x}, f(\vec{x}))$, then $S$ is a $\exists \Delta_0$
relation.

{\bf Proof:}
$$S(\vec{x}) = \exists y(y = f(\vec{x}) \wedge R(\vec{x}, y))$$


We are now ready to prove the Main Lemma.
We will assume that $f$ is a unary total, computable function.
(The function does not have to be unary, but this will slightly
simplify our argument.)
Recall that $Graph(f)(x,y)=1$ if and only if $f(x)=y$.
Since $f$ is total computable, there exists a Turing machine, $M_f$
that always halts and outputs $f(x)=y$ on input $x$, for all $x$.
We will describe a $\exists \Delta_0$ relation, $R(x,y)$ at a high level.
$R(x,y)$ says that there exists $m$, $c$, $d$ such that four conditions hold.
Intuitively $m$ is the number of
steps of the computation of $M_f$ on $x$, and $c,d$ describe the
tableaux given by $r_1,\ldots,r_{m^2}$, via the Godel beta function.
The first condition says that the first $m$ numbers $r_1,\ldots,r_m$
encode the start configuration of $M_f$ on $x$;
The second condition says that the last $m$ numbers $r_{(m-1)m},\ldots,r_{m^2}$
encode the last configuration, which contains $y$ in the first $|y|$ cells,
and the state is the halt state $q_2$;
The third condition states that for all configurations other than the last one,
the state is not the halt state $q_2$;
And finally, the last condition states that all $2$-by-$3$ squares of cells,
$(r_i, r_{i+1}, r_{i+2}, r_{i+m}, r_{i+2+m)} )$ are consistent 
with the transition function of $M_f$.

All four conditions above are easily described by $\Delta_0$ formula
because all quantifiers are bounded (by $m^2$).
They crucially rely on the Godel $\beta$ function and Lemma 1.
The last condition checks the computation locally, and it is not hard to prove
that this sequence of local checks is satisfied if and only if $\vec{r}$ is
a valid tableaux of $M_f$ on input $x$.


This completes the proof (sketch) of the Main Lemma,
that every primitive recursive function
has a $\exists \Delta_0$ graph, and of the Exists Delta Theorem.  $\Box$

\begin{exer}
Fill in the details of the above argument by
describing the $\Delta_0$ formulas for each of the
four conditions described above.
\end{exer}

\begin{exer}
Give a formula $A(x,y)$ which represents the relation $(y=2^x)$.
Your presentation of $A(x,y)$ may use a formula $B(c,d,i,y)$
representing the graph of the \Godel\ $\beta$ function
$(y=\beta(c,d,i))$.
\end{exer}

{\bf Corollary to Exists Delta Theorem:} Every r.e.\ relation is arithmetical
(i.e.\ representable: see page \pageref{arith}).

Notice that {\em not} all arithmetical relations
are r.e., since the arithmetical relations are
closed under $\forall$ and $\neg$, unlike the
r.e.\ relations.  For example, $K^c$ is arithmetical, but not r.e.

It follows from the Corollary that the set \TA\ cannot be recursive
or r.e.  For example, $K$ is r.e., so there is some formula $A(x)$
which represents $K$ in \TA.  Thus
$$  n\in K^c \Equiv \neg A(s_n) \in \TA   $$
If $\TA$ were r.e., it would follow that $K^c$ is r.e., which yields
a contradiction.  In fact, this argument shows that even the set of
$\exists\Delta_0$ sentences of $\TA$ is not recursive.

In the next section we prove Tarski's Theorem, which is a much stronger
statement about the complexity of \TA.

\begin{exer}
{\bf Definition:} $f$ is a $\Delta_0$-function provided that $f$ is a
total $n$-ary function for some $n$, and\\
(i) graph$(f)$ is a $\Delta_0$ relation, and\\
(ii) For some polynomial $p(\vec{x})$ with coefficients in $\NN$,
$$  f(\vec{x})\leq p(\vec{x}) \mbox { for all } \vec{x}\in {\NN}^n   $$
(a)  Show that the
\Godel\ $\beta$ function $\beta(c,d,i)$ are $\Delta_0$ functions.

(b) Show that the class of $\Delta_0$ functions is closed under composition
(as defined in the Notes, page 57).

\end{exer}

\bigskip

{\bf TARSKI'S THEOREM}

Tarski's theorem states that truth of sentences in the vocabulary $\cal L_A$
cannot be expressed by any one formula $A(x)$ in $\cal L_A$.
This is made precise using the notion of arithmetical relation.

As a corollary to Tarski's Theorem we get a weak form of the
\Godel\ Incompleteness Theorem:  \TA\ has no recursive set of axioms.
(See Corollary 2, page \pageref{notAx}.)

We have just shown that all r.e. relations are arithmetical.  We now
point out some easy closure properties of the set of arithmetical
relations.

{\bf Lemma:}  The set of arithmetical relations is closed under
the Boolean operations $\wedge, \vee, \neg$, and the
quantifiers (bounded and unbounded) $\forall\leq, \exists\leq, \forall,\exists$.

{\bf Proof:}  The (easy) proof is essentially the same as for 
the corresponding lemma for the $\Delta_0$ relations. 

\begin{exer}
Show that the set of arithmetical relations is closed under
substitution of total computable functions for variables.
\end{exer}

{\bf Assigning numbers to formulas:}  We assign a ``\Godel'' number
$\# t$ to each term $t$ and a \Godel\ number $\# A$ to each formula $A$
in the same manner that we assigned numbers to
Turing machines in the section on computability.
The exact details of the assignment are not important, as long as
there are algorithms which can go from terms and formulas
to their numbers and from numbers to the terms and formulas that they
represent.

Thus we can think of a set of sentences as a set of numbers:
 
{\bf Definition:} If $\Gamma$ is a set of sentences, then
$\hat{\Gamma} = \{\#A \mid A \in \Gamma \}$.
 
We say that $\Gamma$ is recursive, r.e., arithmetical, etc iff $\hat{\Gamma}$
is recursive, r.e., arithmetical,  etc.

{\bf Theorem:} (Tarski) \TA\ is not arithmetical.  More precisely, if
we define the relation Truth by
$$\mbox{Truth}(m) \Leftrightarrow m = \#A, \mbox{ for some }
        A \in TA$$
Then Truth is not arithmetical.

{\bf Proof:}   We show that if Truth were arithmetical, then we could
formulate the self-contradictory sentence ``I am false''.
This idea is based on the liar paradox.   The underlying technique
is to get sentences in the vocabulary $\cal L_A$ to refer to themselves.
This idea is due to \Godel.

\Godel's method is to use the substitution function:
$$
 \mbox{sub}(m,n) = \begin{cases} \#A(s_n) \mbox{ if } \#A(x) = m\\
                    0 \mbox{ if $m$ is not the number of any formula}
                   \end{cases}
$$

{\bf Lemma}: The function sub is computable.

For the proof, we note that sub is clearly computable by an algorithm,
so it is computable, by Church's Thesis.   $\Box$

We define the ``diagonal function'' $d(n)$ by
$$d(n) = \mbox{sub}(n,n)$$
Thus $d(n) = \#A(s_n)$, where $\#A(x) = n$.
Then $d$ is a computable function.

Now suppose, contrary to Tarski's Theorem, that Truth is arithmetical.
Define the Relation
$$R(x) = \neg \mbox{Truth}(d(x))$$
Then by the Lemma and Exercise above, $R$ is an arithmetical relation.
Say $A(x)$ represents $R(x)$, and $\#A(x) = e$.
Then
$$d(e) = \#A(s_e)$$
Thus intuitively $A(s_e)$ says ``I am false''.
In fact,\\
$A(s_e) \in TA \Leftrightarrow \neg \mbox{Truth}(d(e)) \quad$ (because $A$ represents $R$)\\
\hspace*{.8in} $\Leftrightarrow A(s_e) \not\in TA \quad$ (def'n of Truth)\\
This is a contradiction, so Truth is not arithmetical.  $\Box$

\bigskip
It follows from Tarski's theorem that the true sentences of arithmetic are not
recursive, not r.e., not co-r.e., etc.  In other words, they are wildly
noncomputable.

\begin{exer}
Show using Church's Thesis that the set of true $\Delta_0$ sentences is
recursive, and therefore arithmetical.  (Just give an informal algorithm.)  
Show the the set of true
$\exists\Delta_0$ sentences is r.e., and therefore arithmetical.
\end{exer}

{\bf Arithmetic Hierarchy} 

For $k\ge 1$ we define a $\Sigma_k$ formula to be one of the form
$$
 \exists y_1\forall y_2 \exists y_3 \cdots Qy_k A(\vec{x},y_1,\ldots,y_k)
$$    
where $Q$ is $\exists$ if $k$ is odd and $Q$ is $\forall$ if
$k$ is even, and $A$ is a $\Delta_0$ formula.

Thus a $\Sigma_1$ formula is the same as an $\exists\Delta_0$
formula, and a $\Sigma_2$ formula has the form
$$
\exists y\forall z A(\vec{x},y,z)
$$
We define $\Sigma_k$ to be the set of relations $R(\vec{x})$ 
such that $R(\vec{x})$ is represented by a $\Sigma_k$ formula. 

Thus $\Sigma_1$ is the set of r.e. relations.
It turns out that the sequence $\Sigma_1,\Sigma_2,\ldots$ forms
a strict hierarchy of sets of relations:
$$
   \Sigma_1 \subsetneq \Sigma_2 \subsetneq \Sigma_3 \subsetneq \cdots
$$
This is called the {\em arithmetic hierarchy}.  Strictness can
be proved by a diagonal argument, using the fact that for each
$k\ge 1$, there is a binary relation $U_k(z,x)$ which is universal
for all unary $\Sigma_k$ relations.  For example the r.e. relation
$$
   U_1(z,x) = \exists y T(z,x,y)
$$
is universal for the set of unary r.e. relations.

The union $\bigcup_k \Sigma_k$ is the set of arithmetical relations.



$$
   \Sigma_1\subset \Sigma_2\subset \cdots
$$ where $\Sigma_1$ is the set of r.e. sets and in general $\Sigma_i$
is the set of all relations representable by $\exists\forall\cdots\Delta_0$
formulas; i.e. formulas which begin with $i$ quantifiers starting with
$\exists$ and alternating between $\exists$ and $\forall$, followed
by a $\Delta_0$ formula.  Then the unions $\bigcup_i \Sigma_i$ is the
set of all arithmetical relations.

{\large\bf Theories}

Notation:
$\Phi_0$ denotes the set of ${\cal L}_A$-sentences (no free variables).

Thus \TA = $\{A\in\Phi_0 \ : \ \stand \models A \}$.
\TA\ stands for {\em True Arithmetic}, the set of all true sentences in
the language of arithmetic.

{\bf Definition}: A {\em theory} is a set $\Sigma$ of sentences closed
under logical consequence.  That is, if
$A$ is a sentence and $\Sigma \models A$ then $A \in \Sigma$.

{\bf Notation:}  If $\Sigma$ is a theory, we often write
$\Sigma \vdash A$ (read ``$\Sigma$ proves $A$'') for $A\in\Sigma$.
This is consistent with the notation $\Phi\vdash A$ introduced
on page 47 in the context of $LK$ proofs.  It is perhaps more
appropriate when the theory $\Sigma$ is axiomatizable, but we will
use this notation for any theory.

Since our underlying vocabulary is ${\cal L}_A$, we may assume
(for this part of the Notes) that $\Sigma\subseteq \Phi_0$, for
every theory $\Sigma$.

{\bf Definitions concerning a theory} $\Sigma$

$\Sigma$ is {\em consistent} iff $\Sigma \neq \Phi_0$

$\Sigma$ is {\em complete} iff $\Sigma$ is consistent, and
for all sentences $A$ either
$\Sigma \vdash A$ or $\Sigma \vdash \neg A$.

{\bf Fact}: $\Sigma$ is consistent iff for all $A \in \Phi_0$, not both
$A \in \Sigma$ and $\neg A \in \Sigma$.
(Observe that for all $A, B \in \Phi_0,
\quad \{A, \neg A\} \ \models \ B$.)  Thus $\Sigma$ is complete iff
for all sentences $A$, exactly one of $\Sigma \vdash A$ and
$\Sigma\vdash \neg A$ holds.

\begin{exer}
Prove that a theory $\Sigma$ is consistent iff $\Sigma$ has a model.
\end{exer}

{\bf Notation:}  If $\calM$ is a structure over the language $\calL$,
then $Th(\calM)$ (the theory of $\calM$) is the set of all sentences
$A$ such that $\calM \models A$.

\begin{exer}
Prove that $Th(\calM)$ is a complete theory,
for every structure $\calM$.
\end{exer}

For example, $\TA= Th(\stand)$, so $\TA$ is a complete theory.

{\bf Definition:}
$\Sigma$ is {\em sound} iff $\Sigma \subseteq \TA$.

In other words,
$\Sigma$ is sound iff all of its sentences are true in the standard model.

Thus \TA\ is a theory which is complete, consistent and sound.

However a consistent theory need not be sound.  For example the
set of logical consequences of $\forall x\forall y(x=y)$
is consistent, because
it has a model with a single-element universe, but it is not sound.

\label{VALID}
{\bf Notation:}
$VALID = \{A \in \Phi_0 : \mbox{   } \models A \}$.

Thus $VALID$ is the set of valid sentences of ${\cal L}_A$.
$VALID$ is a theory which is sound and consistent, but not complete.
There are lots of sentences for which neither they nor their
negation is valid.
For example, $0=1 \not\in VALID$ and
$\neg 0=1 \not\in VALID$.

$VALID$ is the {\em smallest theory}.  That is,
$VALID \subseteq \Sigma$ for all theories $\Sigma$.

{\bf Axiomatizable Theories}

{\bf Definition:} If $\Sigma$ is a theory and $\Gamma \subseteq \Sigma$ then
$\Gamma$ is a set of {\em axioms} for $\Sigma$ iff 1) $\Gamma$ is recursive
and 2) $\Gamma \models A$ for all $A \in \Sigma$.  We say
$\Sigma$ is {\em axiomatizable} iff $\Sigma$ has a set of axioms.

{\bf Theorem:} A theory $\Sigma$ is axiomatizable iff $\Sigma$ is r.e.

{\bf Proof:} $\Leftarrow$:   The right-to-left direction is not so
interesting, and is proved by a simple trick:

Suppose $\Sigma$ is r.e.  Then by a previous Lemma characterizing r.e. sets,
$\hat{\Sigma} = \mbox{ran}(f)$, where $f$ is a total, 
computable function of one variable.  Thus
 $\hat{\Sigma} = \{ f(0), f(1), \ldots \}$.

Let $A_n$ = be the sentence s.t.\ $\#A_n = f(n)$.  Then
$\Sigma = \{ A_0, A_1, \ldots \}$, and this is an
effective enumeration of $\Sigma$.

What is the set $\Gamma$ of axioms?
Let $B_n = A_0 \wedge A_1 \wedge \cdots \wedge A_n$
(with associativity to the left).
Thus $B_n \in \Sigma$.  (Why?)  Let
$$\Gamma = \{ B_0, B_1, B_2 \cdots \}$$
{\bf Claim:} $\Gamma$ is a set of axioms for $\Sigma$.

Condition 2) in the definition is obvious since
$A_0\wedge A_1 \wedge \cdots \wedge A_n \models A_n$

To demonstrate condition 1) ($\Gamma$ is recursive) we need an algorithm
to check whether a given formula $C$ is in $\Gamma$.
First $C$ should be syntactically a conjunction of subformulas,
say 
$C  = C_0 \wedge C_1 \wedge \cdots \wedge C_m$ for some $m$.
Now enumerate the first $m+1$ formulas $A_i$, and check whether
$A_i=C_i$, $i=0,...,m$.

$\Rightarrow$ The left-to-right direction of the Theorem is more
interesting.  Assume $\Sigma$ is axiomatizable, and let $\Gamma$ be a set
of axioms for $\Sigma$.
Then $\Gamma$ is recursive, $\Gamma \subseteq \Sigma$, and
$\Sigma = \{ A \mid \Gamma \models A \}$.
To show $\Sigma$ is r.e. we show how to effectively enumerate it, i.e.
we show how to enumerate the logical consequences of $\Gamma$.

For this we use the completeness theorem for $LK$ (and compactness).
The idea is
that we enumerate all possible $LK$ proofs for sentences in the
vocabulary of arithmetic, and for each one check whether it is a proof
of the form
$$B_1,...,B_k \vdash A$$
where each $B_i$ is a sentence in $\Gamma$.  If so, then we output
$A$.

This argument can be made more formal as follows:  First define the
(semantic) relation $P(a,b)$ by the condition
$$P(a,b) \Leftrightarrow b \mbox{ is the number of a $LK$ proof that
$A$ is valid, where $\#A = a$} $$
Clearly there is an algorithm which, given $a$ and $b$, checks whether
$P(a,b)$ holds.  Therefore
$P$ is recursive, by Church's Thesis.

Now define $Q(a,b)$ by
$$Q(a,b) \Leftrightarrow
       [b = \#( \neg B_1 \vee \cdots \vee \neg B_k \vee A)
\mbox{ where $\#A = a$ and $B_1,...,B_k \in \Gamma$} ] $$
Again $Q$ is recursive, by Church's thesis.  (Recall that $\Gamma$ is
recursive.)

Note that\\
$A \in \Sigma\\
\Leftrightarrow \Gamma \models A\\
\Leftrightarrow \exists k\exists B_1 \cdots B_k \in \Gamma$ such that
$( \neg B_1 \vee \cdots \vee \neg B_k \vee A)$ is valid.

(The last equivalence uses the Compactness Theorem.)  Thus

$a \in \hat{\Sigma} \Leftrightarrow \exists b \exists p \underbrace{ [P(b,p) \wedge Q(a,b)] }_{\mbox{recursive}}$

Thus $\hat{\Sigma}$ is r.e.  $\Box$

{\bf Corollary 1:}  $VALID$ is r.e., where $VALID$ is the set of
valid sentences (page \pageref{VALID}).

{\bf Proof:}  $VALID$ can be axiomatized by the empty set of axioms,
and  the empty set is recursive.

{\bf Remark:} Later we will show that $VALID$ is not recursive.
It follows that
the set of nonvalid sentences is not r.e. (why?).  Hence the set of satisfiable
sentences of ${{\cal L}}_A$ is not r.e., since $A$ is nonvalid iff
$\neg A$ is satisfiable, so the set of nonvalid sentences is
many-one reducible to the set of satisfiable sentences.  On the
other hand, the set of unsatisfiable sentences is r.e. (why?).

\label{notAx}
{\bf Corollary 2:} \TA\ is not axiomatizable.

{\bf Proof:} By Tarski's Theorem,  \TA\ is not arithmetical, so it is not r.e.

{\bf Corollary 3:}  Every sound axiomatizable theory is incomplete.

{\bf Proof:} If $\Sigma$ is sound then $\Sigma \subseteq \TA$,
and if $\Sigma$ axiomatizable,
then $\Sigma \neq \TA$.  So $\Sigma \subsetneq \TA$.
Hence there is $A \in \TA$, ($A$ is true)
s.t.\ $A \not\in \Sigma$.   Also $\neg A \not\in \Sigma$
because $\neg A$ is false.
Hence $\Sigma$ is incomplete.

\bigskip
\noindent
These results are very robust.  We just proved them for a specific vocabulary
but let $\Sigma'$ be any theory
(not necessarily based on the vocabulary $[0,s,+,\cdot \ ;=]$).
For example, $\Sigma'$ could be Zermelo Fraenkel set theory with
the axiom of choice (ZFC), which is strong enough to formalize all
``ordinary'' mathematics.

Assume that natural \#'s can be defined in $\Sigma'$.  In ZFC, this
can be done as follows:
$$\emptyset = 0, \mbox{ and in general $n+1 = n\cup \{n\}$ }  $$
Assume we can define $0,s,+, \cdot $ on ${\mathbb N}$ in $\Sigma'$
(we can in ZFC). Let $\TA'$ be the translation of $\TA$ to the new vocabulary.
If we assume $\TA' \subseteq \Sigma'$, then Tarski's theorem still works.
All notions of representable, arithmetical still apply.
If $\Sigma'$ is axiomatizable then the set of all theorems (i.e.\ $\Sigma'$)
is r.e.
Also the set of number-theoretic theorems is r.e.
Hence these theorems are a proper subset of $\TA'$.

In particular, there are sentences in $\TA$ whose translations into
set theory are not theorems of ZFC.

\bigskip
{\bf Famous Conjectures:}

Goldbach's conjecture:
Every even integer is the sum of 2 primes

Riemann Hypothesis

$P \neq NP$

One can speculate that one of these might be true, but does not follow from
the Zermelo-Fraenkel Axioms.  (However it seems more likely that 
natural assertions like these will eventually either be proved or
disproved in ZFC.)


\begin{center}
{\Large\bf Peano Arithmetic}
\end{center}

{\bf Goals Now}
\begin{enumerate}
\item
We will introduce a standard set of axioms for
the language $\calL_A$.  The theory generated by these axioms is denoted
$\PA$ and called Peano Arithmetic.  Since $\PA$ is a sound, axiomatizable
theory, it follows by the corollaries to Tarski's Theorem that it is
incomplete.  Nevertheless,
it appears to be strong enough to prove all of the standard results
in the field of number theory (including such things as the prime
number theorem, whose standard proofs use analysis).   Even Andrew
Wiles' proof of Fermat's Last Theorem has been claimed to
be formalizable in $\PA$.
\item
We know that $\PA$ is sound and incomplete, so there are true sentences
in the language $\cal L_A$ which are not theorems of $\PA$.  We will
outline a proof of \Godel's Second Incompleteness Theorem, which states
that a specific true sentence, asserting that $\PA$ is consistent,
is not a theorem of $\PA$.  This theorem can be generalized to show
that any consistent theory satisfying general conditions cannot
prove its own consistency.
\item
We will introduce a finitely axiomatized subtheory $\RA$ (``Robinson
Arithmetic'') of $\PA$
and prove that every consistent extension of $\RA$ (including $\PA$)
is ``undecidable'' (meaning not recursive).  As corollaries, we get
a stronger form of \Godel's first incompleteness theorem, as well as
Church's Theorem:  The set of valid sentences of $\calL_A$ is not recursive.


\end{enumerate}

{\bf The Theory PA (Peano Arithmetic)}\\
The so-called Peano postulates for the natural numbers were
introduced by Giuseppe Peano in 1889.
In modern form they can be stated in the language of set theory as
follows.  Let $\NN$ be a set containing an element 0, and let
$S:\NN\ra\NN$ be a function satisfying the following postulates:

GP1: $S(x)\ne 0$, for all $x\in\NN$.\\
GP2: If $S(x)=S(y)$ then $x=y$, for all $x,y\in\NN$.\\
GP3: Let $A$ be any subset of $\NN$ which contains 0 and which is
closed under $S$ (i.e. $S(x)\in A$ for all $x\in A$).  Then $A=\NN$.

Note that GP3 is a form of induction.

It is not hard to show that any two systems $\langle \NN,S,0\rangle$
and $\langle \NN',S',0'\rangle$ which both satisfy GP1,GP2, GP3 are 
isomorphic, in the sense that there is a bijection
$  \phi:  \NN\ra\NN'  $
such that $\phi(0)=0'$ and 
$$   \phi(S(x)) = S'(\phi(x))  , \mbox{ for all $x\in\NN$}  $$
Thus the Peano postulates characterize $\NN$ up to isomorphism.

However, when it comes to designing a formal theory in the predicate
calculus based on these Peano postulates we cannot formulate GP3
except in the context of formal set theory.  It turns out to be
essentially impossible to formulate a completely satisfactory
theory of sets.

One simple solution is to design a ``first-order'' theory of $\NN$
in which the universe is supposed to be $\NN$ and the underlying
language is $[0,s;=]$.  This was done on pages 49-50, and the result
is a complete theory Th(s) which can be completely axiomatized.
However this theory cannot formulate much of interest, because
$+$ and $\cdot$ cannot be defined in this language.   

Thus to formulate our theory \PA\ we extend this simple language
by adding $+$ and $\cdot$
to obtain the language $\LA= [0,s,+,\cdot; =]$.  In this language,
postulates GP1 and GP2 are easily formulated.  The best we can do
to formulate GP3 is to represent sets by formulas $A(x)$
in the language $\LA$, where $A(x)$ is supposed to represent the
set $\{x\mid A(x)\}$.  When this is done carefully, we come up
with the Induction Scheme below.

In order to complete the axioms of \PA\ we need recursive definitions
of $+$ and $\cdot$.  These are formulated below as P3, P4 for $+$
and P5,P6 for $\cdot$.

{\bf Axioms for PA}

\hspace*{.03in} P1 $\forall x (sx \neq 0)$\\
\hspace*{.03in} P2 $\forall x \forall y (sx=sy \supset x=y) \quad s$ is 1-1 function\\
$
\left. \begin{array}{l}
\mbox{P3}\ \forall x (x+0=x) \\
\mbox{P4}\ \forall x \forall y (x+sy = s(x+y))
\end{array} \right\} \mbox{define}\ +
$\\
$
\left. \begin{array}{l}
\mbox{P5}\ \forall x (x \cdot 0=0) \\
\mbox{P6}\ \forall x \forall y (x \cdot sy = (x \cdot y) + x)
\end{array} \right\} \mbox{define}\ \cdot
$

{\bf Induction Scheme:}  Let $Ind(A(x))$ be the sentence
$$\forall y_1 \cdots \forall y_k [(A(0) \wedge \forall x(A(x)
\supset A(sx))) \supset \forall x A(x)]$$
where $A$ is any formula whose free variables are among
$x, y_1, \cdots, y_k$.  (The variables $y_1, \cdots, y_k$
are called parameters.)  All such sentences $Ind(A)$ are axioms.

\bigskip

Let $\Gamma_{PA} = \{P_1, \ldots, P_6 \} \cup \{ \mbox{Induction\ axioms}\}$.
Then $\Gamma_{PA}$ is recursive.  This is clear from Church's thesis.

{\bf Definition:} $\PA = \{ A \in \Phi_0 \mid \Gamma_{PA} \models A \}$

Thus \PA\ is an axiomatizable theory.  It is a sound theory since
all of its axioms (and hence all of its theorems) are true
in the standard model $\underN$.

{\bf Terminology:}  We speak of sentences in $\PA$ as {\em theorems}
of $\PA$, because they can be proved (for example, by $LK$ proofs),
from the axioms of $\PA$.  We use the notation $\PA\vdash A$ to
mean that $A$ is a theorem of $\PA$.


{\bf Example 1:}\\
We show that \PA\ proves that all nonzero elements
have predecessors.  Let
$$   A(x) \ = \ (x=0\vee\exists y( x=sy))  $$
In order to prove this by induction there are two steps:

{\bf Basis:} $x=0$ \qquad   $\PA\vdash A(0)  $

{\bf Induction Step:}
   $z\leftarrow sz \qquad  \PA\vdash \forall x(A(x)\supset A(sx))  $

In fact, both $A(0)$ and $\forall x(A(x)\supset A(sx))$ are
valid sentences, so no axioms of \PA\ are needed to show that they
are theorems of \PA.  It
follows from the induction axiom $Ind(A(x))$ that
$$ \PA\vdash \forall xA(x)  $$

{\bf Example 2:}\\
We show that \PA\ proves the associative law for $+$.
Let
$$   A(z) \ = \ (x+y)+z=x+(y+z)  $$
We use the induction axiom $Ind(A(z))$.

{\bf Basis:} $z=0$
$$
\begin{array}{lll}
(x+y)+0 & = x+y &  \mbox{P3}\\
        & = x+(y+0)   & \mbox{P3}
\end{array}
$$
{\bf Induction Step:} \ $z\leftarrow sz$
$$
\begin{array}{lll}
(x+y)+sz & = s((x+y)+z)  &  \mbox{P4}\\
         & = s(x+(y+z))  &   \mbox{Induction Hypothesis}\\
         & = x+s(y+z)   &  \mbox{P4}\\
         & = x+(y+sz)   &  \mbox{P4}
\end{array}
$$
Thus by $Ind(A(z))$ it follows that
$$ \PA\vdash \forall x\forall y\forall zA(z)  $$

\begin{exer}
Show that \PA\ proves the commutative
law of addition, the associative and commutative laws of
multiplication, and that multiplication distributes over addition,
using the style of Example 2.
In each case state carefully which induction axiom (or axioms)
are needed, and which axioms P1,...,P6 are needed, (or which
earlier results).
\end{exer}

\begin{exer}
Recall the theory of successor $Th(s)$ presented on pages 49-50.
Show that all of the axioms S3, S4, S5, ... follow from S1 and
S2 together with the Induction Scheme $Ind(A(x))$ for all formulas
$A(x)$ in the language of successor $[0,s;=]$.  
\end{exer}

$\PA$ is incomplete, because it is axiomatizable and sound (and
has $\LA$ as the underlying language): see
Corollary 3, page 77. Later we will give explicit true sentences
that are not theorems of $\PA$, including the assertion that $\PA$ is
consistent.

An apparent paradox is that the Peano postulates GP1, GP2, GP3
characterize the
natural numbers in set theory (as explained above), and yet there are
nonstandard models for $\PA$.  (We know there are nonstandard models
both from the fact that
$\PA$ is incomplete, and by the construction using compactness given
on page 51.)  However, the Peano Axioms only characterize the natural
numbers under the assumption that we could do induction using
an arbitrary set.  In $\PA$, we
can only use induction on arithmetical sets.

Observed fact:
All standard theorems of number theory are in $\PA$.  Even Wiles'
1995 proof of ``Fermat's Last Theorem'' apparently can be
formalized in $\PA$.  So famous open problems, such as Goldbach's
conjecture and the prime pair conjecture, can probably be either
proved or disproved in $\PA$.  Goldbach's conjecture can certainly
be disproved in $\PA$ if it is false:  just present and verify a
counter example.  (Is the same true for the prime pair conjecture?)

\bigskip

{\bf $\RA$:  A finitely axiomatized subtheory of $\PA$}

Our main tool for showing that a theory such as $\PA$ is undecidable
is showing that every r.e. relation (including the undecidable
set $K$) is representable in the theory (see the definition below).
This argument applies not only to $\PA$, but to a weak subtheory
of $\PA$ known as $\RA$.

Recall the syntactic definition of $\leq$ :
$t_1\leq t_2$ stands for $\exists z(t_1+z=t_2)$, where $z$ is
a new variable.

We now extend P1,...,P6 with three new axioms.

\hspace*{.03in} P7  $\forall x (x \leq 0 \supset x = 0)$\\
\hspace*{.03in} P8 $\forall x\forall y(x\leq sy \supset
(x \leq y \vee x=sy))$\\
\hspace*{.03in} P9 $\forall x\forall y(x \leq y \vee y\leq x)$

{\bf Definition:} $\RA$ is the theory whose axioms are
P1, $\cdots$, P6, P7, P8, P9.

Note that $\RA$ has no induction axioms.  We note three important facts
about $\RA$:
\begin{itemize}
\item[1)]
$\RA \subseteq \PA$ (i.e.\ P7, P8, P9 are in $\PA$ because they
can be proved by induction).
\item[2)]
$\RA$ has only finitely many axioms.
\item[2)]
The axioms of $\RA$ are $\forall$-sentences (over ${\cal L}_{A,\le}$).
\end{itemize}
Later we will show  that $\RA\not=\PA$.

%\begin{exer}
%Show that P7, P8, P9 are each theorems of \PA.  First translate
%each axiom into the language ${{\cal L}}_A$ by getting rid of $\leq$
%(see page 84).
%\end{exer}
%
{\bf Definition}: A theory $\Sigma$ is {\em decidable} iff
$\{\#A|A \in \Sigma\}$ is recursive.

Informally, $\Sigma$ is decidable iff there is an algorithm which,
given any sentence $A$, determines whether $A$ is in $\Sigma$.

{\bf Definition:}   If $\Sigma$ and $\Sigma'$ are theories, then
$\Sigma'$ is an {\em extension} of $\Sigma$ if $\Sigma\subseteq\Sigma'$.

We will show that \RA\ is undecidable, and use this to prove
that in fact every sound theory (over the language $\LA$) is undecidable.
Our main tool is the representation theorem below.
Recall the definition (bottom of page 66) for a formula $A(\vecx)$
to represent a relation $R(\vecx)$.  We now extend this definition to
apply to a theory $\Sigma$.

\label{repinTh}
{\bf Definition:} A formula $A(\vecx)$ {\em represents} a relation $R(\vecx)$
in a theory $\Sigma$ if for all $\vec{a}\in \NN^n$
$$ R(\vec{a}) \Leftrightarrow \Sigma\vdash A(s_{\vec{a}}) $$

Note that according to our earlier definition, $A(\vecx)$ represents
$R(\vecx)$ (with no theory mentioned) iff $A(\vecx)$ represents $R(\vecx)$
in \TA.

Recall the definition (page 68) of a $\exists\Delta_0$ formula.

\label{RART}
{\bf RA Representation Theorem:}  Every r.e. relation is representable
in \RA\ (and in every sound extension of \RA) by an $\exists\Delta_0$
formula.

This is a major result and will take several pages to prove.
Of course we already know from the Exists Delta Theorem (page 68) that
every r.e. relation is representable in \TA.  The extra work now is showing
that the true $\exists\Delta_0$ formulas are provable in \RA.

Before giving the proof of the Theorem, we prove several consequences.

\label{cor1RA}
{\bf Corollary 1:} Every sound extension of  \RA\ (including \PA)
is undecidable.

{\bf Proof:} Let $\Sigma$ be a sound extension of \RA.
It suffices to show $K\le_m \Sigma$, or more precisely
to show that $K\leq_m \hat{\Sigma}$, where $\hat{\Sigma}$
is the set of codes for
theorems of $\Sigma$; that is $\hat{\Sigma}=\{\#A\mid \Sigma\vdash A\}$
.

Since $K$ is r.e., it follows from the theorem that $K$ is
represented in $\Sigma$ by some $\exists\Delta_0$ formula $A(x)$. 
Thus for all $a\in\NN$
$$  a \in K \Leftrightarrow \Sigma \vdash A(s_a) $$
Define the total computable function $f:\NN\ra\NN$ by
$$   f(a) = \# A(s_a)  $$
Then $f$ is clearly computable by Church's thesis.
Thus
$   a\in K \Leftrightarrow f(a) \in \hat{\Sigma}.$
as required.   $\Box$

Recall Corollary 1, page 77 states that the set $VALID$ of valid
sentences of $\LA$ is r.e.  Now we can prove more:

\label{CTm}
{\bf Corollary 2:  Church's Theorem:}  The set $VALID$ of valid sentences
in the language $\cal L_A$ is undecidable.

{\bf Proof:}  We use the fact that $\RA$ is undecidable,
and has only finitely many axioms, P1,...,P9.  Let $\gamma$ be the conjunction
P1$\wedge$...$\wedge$P9 of these axioms.  Then
$$A \in \RA \Longleftrightarrow (\gamma \supset A)
        \mbox{ is valid}  $$
Hence we've reduced the problem of membership in $\RA$ to the
validity problem, so validity is undecidable.   (We've only given
an informal argument for the reduction, so we need Church's thesis
here.)  $\Box$

{\bf Remark:}  In fact, the validity problem is undecidable for any language
that contains a binary predicate symbol.  This can proved directly
by reduction of the halting problem for Turing machines to validity,
as was shown in Turing's famous 1936 paper introducing Turing machines.

\label{DecT}
{\bf Decidability Theorem:}  Every complete axiomatizable theory is decidable.

{\bf Proof}: We give an informal proof, using Church's thesis.  If
$\Sigma$ is axiomatizable, then by the theorem on page 76, it is r.e.
Here is an algorithm for determining whether a given formula $A$
is in $\Sigma$, assuming that $\Sigma$ is complete.  Enumerate the
members of $\Sigma$. Sooner or later, either $A$ or $\neg A$
will appear in the enumeration.  If $A$ appears, then it is in
$\Sigma$.  If $\neg A$ appears, then $A$ is not in $\Sigma$.
$\Box$.

Now we can obtain an alternative proof of Corollary 3 to Tarski's
Theorem, page 77:

{\bf Corollary:}  Every sound axiomatizable theory is incomplete.

{\bf Proof:}  Let $\Sigma$ be a sound axiomatizable theory.
If $\Sigma$ is not an extension of $\RA$ it is certainly incomplete.
If $\Sigma$ is an extension of $\RA$, then by Corollary 1 above
$\Sigma$ is undecidable, and hence by the Decidability Theorem
$\Sigma$ is incomplete.  $\Box$

\begin{exer}
Prove that there is an $\exists\Delta_0$ sentence $A$ such that
$\neg A \in \TA$ but $\PA\not\vdash \neg A$. (Compare this with
Corollary 2, page \pageref{cor3ED}.)
\end{exer}

In order to prove the \RA\ Representation Theorem we need to
recall the syntactic definitions involving $\le$ given on page 67.

{\bf MAIN LEMMA}: Every bounded sentence in \TA\ is in $\RA$.
That is, every true bounded sentence can be proved
from the axioms of $\RA$.  (Thus $\TA \cap \Delta_0=\RA\cap\Delta_0$.)

{\bf Notation:}  When we write a specific number such as 4 in an
example formula, this is an abbreviation for the corresponding
numeral; $s_4$ (i.e. $ssss0$) in this case.

{\bf Example} of a true bounded sentence:
$$  \forall x \leq 1000\exists y \leq 2 \cdot x [x=0 \vee
        ( x < y \wedge \mbox{Prime}(y))]   $$
Notice that since the quantifiers are bounded, and the assertion is
being made for only finitely many pairs $x,y$.  Each case can be
proved separately by ``brute force''.

To prove the MAIN LEMMA it is easier to expand the language
$\SL_A$ to $\SL_{A,\leq}$ by adding the binary connective $\leq$
as a primitive symbol .  Then we expand the theory \RA\ to the
theory $\RA_\leq$ over the language $\LAL$ by interpreting
$\leq$ in the axioms P7,P8,P9 as a primitive symbol, and by
adding the new axiom

P0 $\ \forall x\forall y(x\leq y \leftrightarrow \exists z(x+z=y))$

Every formula $A$ over $\LAL$ can be translated to a formula $A'$
over $\LA$ by replacing each atomic subformula of the form
$t_1\leq t_2$ in $A$ by the formula $\exists z(t_1 + z = t_2)$, where
$z$ is a variable not occurring in $t_1,t_2$ (see page 67).  Notice
that if $\leq$ does not occur in $A$, then $A\eqsyn A'$.

{\bf Translation Lemma:}  For every formula $A$ over $\LAL$,
$$    \RA_\leq \vdash A \mbox{ iff } \RA \vdash A'  $$

{\bf Proof:}
There is a natural one-one correspondence between models of
$\RA_\leq$ and \RA, namely for each model $\calM$ of \RA\
we associate the model $\hat{\calM}$ of $\RA_\leq$ which is the  same
as $\calM$ except we add the interpretation of $\leq$ in such a way that
axiom P0 is satisfied.  Then we claim that for every $\LAL$ formula $A$
$$    \hat{\calM} \models A \mbox{ iff } \calM \models A' $$
The claim is easily proved by structural induction on $A$.
The Translation Lemma follows easily from the claim.  $\Box$

{\bf Proof} of MAIN LEMMA:
We prove the MAIN LEMMA for $\RAL$.  It follows for \RA\ by the
Translation Lemma.

Let $A$ be a true bounded sentence.  Move all $\neg$'s in $A$
past other connectives so that they
govern only atomic formulas $t= u$.  Do this by using DeMorgan's Laws,
and the equivalences
$$\neg\neg A\Longleftrightarrow A, \quad
   \neg\forall x\leq t \ B\Longleftrightarrow\exists x\leq t\neg B,
\quad  \neg\exists x\leq t \ B \Longleftrightarrow \forall x\leq t
     \neg B  $$

\begin{exer}
Show from the definitions of the bounded quantifiers $\exists x\le t$
and $\forall x\le t$ that for each of the three equivalences
above the formulas on the left and right are logically equivalent
(this is obvious for the first equivalence).
\end{exer}

The proof of the MAIN LEMMA
proceeds by induction on the number of logical operators
(other than $\neg$) in this modified $A$.

For the base case, $A$ has one of the four forms $t=u$, $t\neq u$,
$t\leq u$, $\neg t\leq u$.

{\bf Example:}
$A$ is $s0 + s0 = ss0$.  This can be proved in $\RA$ by the
recursive definition of +:

\hspace*{.1in} $x + 0 = x \quad$ (P3)\\
\hspace*{.1in} $x + sy = s(x+y) \quad$ (P4)

More generally:

{\bf Lemma A1:}  For all $m,n\in \NN$,
$$ \RA \vdash s_m+s_n=s_{m+n} \mbox{ and } $$
$$ \RA \vdash s_m\cdot s_n=s_{m\cdot n}  $$

{\bf Proof:}  The first line is proved by induction (outside the system)
on $n$ using
P3 and P4, as in the example.  Then the second line is proved by induction
on $n$ using P5, P6, and the first line.  $\Box$

If $t$ is any closed term (i.e. with no variables),
then $t^\calM = n$ for some $n \in {\mathbb N}$, where
$\calM$ is the standard model.   Thus $t=s_n \in \TA$.

{\bf Lemma A}:  If $t$ is a closed term and $t=s_n$ is in \TA,
then $\RA \vdash t=s_n$.

{\bf Proof:} Induction on the length of $t$, using Lemma A1.

{\bf Lemma B}:  If $m < n$, then $\RA \vdash s_n \ne s_m$.

{\bf Proof:} Induction on $m$, using P1 and P2.  $\Box$

For example, consider $ss0 \neq s0$.
Recall that P2 is  $\forall x (sx = sy \supset x=y)$.  Thus\\
$ss0 = s0 \supset s0 = 0$.  But by P1, $s0 \neq 0$.  Therefore
$ss0 \neq s0$.

{\bf Remark:}  Arguments such as the one above could be formalized by an $LK$
proof using the equality axioms.
However the implications are clear without bothering to carry out
such a formal proof, if we keep in mind the definition of logical consequence
(page 23 ), and the Basic Semantic Definition (page 22), and in particular
that = must be interpreted as equality in any structure.

The base case for the MAIN LEMMA for the sentences $t=u$ and $t\neq u$
follows easily from Lemma A and Lemma B.  For the case $t\leq u$
we apply P0, so the problem reduces to the first case of Lemma A1.
The case $\neg t\leq u$ follows from Lemma C below, together with
Lemma B.

The induction step for the MAIN LEMMA follows from the following:

{\bf Lemma C}: For all $n$, $\RAL$ proves the sentence
  $$\forall x(x \leq s_n \supset
           (x=0 \vee x=s_1 \vee ... \vee x=s_n))$$

{\bf Proof:}  Induction on $n$.  The base case is
$x\leq 0 \supset x = 0$, which is P7.
The induction step follows easily from P8.
$\Box$ (Lemma C)

For the induction step in the proof of the MAIN LEMMA,
let $A$ be a true bounded sentence.  We assume that $\neg$'s
in $A$ have been driven in as explained above, and $A$
does not fit the base case, so the principle connective of $A$
is one of $\wedge$, $\vee$, $\forall\leq$, $\exists\leq$.  The
cases of $\wedge$ and $\vee$ are trivial:  just apply the induction
hypothesis.

Now consider the case $\forall\leq$, say $A$ is $\forall x\leq t B(x)$,
and this is in \TA.  Since this is a sentence, and by definition of
$\forall x\leq t$, $x$ cannot occur in $t$, it follows that $t$ is
a closed term.  Thus by Lemma A, $\RA$ can prove $t=s_n$ for some $n$.

For example, suppose $n=23$.  Then it suffices to show that
$\forall x \leq 23 \  B(x)$ is provable in $\RAL$.
By Lemma C, $\RAL$ proves
 $$x \leq 23 \supset (x=0 \vee x=1 \vee \cdots \vee x=23) $$
By the Substitution Theorem (page 26) it follows in general, that
for any closed term $u$,
$$   \forall x(x=u\supset  (B(u) \leftrightarrow B(x)))  $$
is valid.
Therefore it follows by reasoning in $\RAL$ that $\forall x \leq t B(x)$
is implied by
$$B(0) \wedge B(1) \wedge \cdots \wedge B(23)$$

Since $\forall x \leq t B(x)$ is true, it follows that
$B(0),B(1),...$ are each true, so by the induction
hypothesis each is in $\RAL$.  Hence
their conjunction is in $\RAL$, so $\forall x \leq tB$ is in $\RAL$.

The case $\exists\leq$ is easier than the $\forall\leq$ case
and does not require Lemma C.
 \hspace{.5in} $\Box$ (MAIN LEMMA)

\begin{exer}
Prove the $\exists\leq$ case in the above proof.
\end{exer}

{\bf Corollaries to MAIN LEMMA}

{\bf Corollary 1:}  The set of bounded sentences of \TA\ is decidable.

{\bf Corollary 2:} Every $\exists\Delta_0$ sentence of \TA\ is
provable in \RA.

\label{cor3ED}
{\bf Corollary 3:} The set of $\exists\Delta_0$ sentences of \TA\
is r.e. (but not decidable).

\begin{exer}
Prove the above three corollaries.
\end{exer}

\begin{exer} \label{ext}
Let $\exists yA(x,y)$ be a $\exists\Delta_0$ formula which
represents $K(x)$ in \RA\ (where $K(x)=(\{x\}_1(x)\neq\infty)$
is the standard halting problem).  Show that there is a consistent
extension $\Sigma$ of \RA\ such that $\exists yA(x,y)$ does not
represent $K(x)$ in $\Sigma$.  {\bf Hint:}  Form $\Sigma$
by adding a suitable false axiom to \RA\ which retains consistency.
\end{exer}

{\bf Proof of \RA\ Representation Theorem:} (See page \pageref{RART}
for the statement.)

{\bf Proof:}  Suppose $R(\vec{x})$ is an r.e. relation.  By the Exists
Delta Theorem  $R(\vec{x})$ is represented in $\TA$ by some
$\exists\Delta_0$ formula $\exists yA(\vec{x},y)$.
Thus for all $\vec{a} \in \NN^n$,
$$  R(\vec{a}) \Leftrightarrow  [\exists yA(s_{a_1},...,s_{a_n},y)\in TA]$$
By Corollary 2 above and the soundness of \RA, this is equivalent to
$$  R(\vec{a}) \Leftrightarrow
            [\Sigma\vdash\exists yA(s_{a_1},...,s_{a_n},y)]$$
where $\Sigma$ is any sound extension of \RA
(i.e. $\RA \subseteq \Sigma \subseteq \TA$).
Thus by the definition $\exists yA(\vec{x},y)$ represents
$R(\vec{x})$ in $\Sigma$.   $\Box$

The following is a generalization of Church's Theorem (page \pageref{CTm}).

{\bf Theorem:}  Every sound theory is undecidable.  

\begin{exer}
Prove the theorem.
\end{exer}

{\large\bf Results for consistent (possibly unsound) theories}

Our goal now is to prove the following theorem:

{\bf Main Theorem}: Every consistent extension of $\RA$ is undecidable.

{\bf Corollary:} 
Every consistent axiomatizable extension of $\RA$ is incomplete.

{\bf Proof of Corollary:}  This follows from
the Decidability Theorem (page \pageref{DecT}).  $\Box$

Notice that this strengthens the Corollary 3, page 77, to Tarski's
Theorem, since we no longer need to assume soundness in order to
conclude that an axiomatizable theory is incomplete (provided that the
theory includes $\RA$).  Notice that soundness is a semantic notion,
whereas consistency can be given a syntactic definition (there is
no proof of 0=1).  The proof of the Main Theorem can be made to avoid
the complex semantic notion of truth of an arbitrary sentence of $\LA$.

An example of an unsound consistent
extension of \RA\ is the theory $Th({\ZZ}[X]^+)$
consisting of all sentences in the language ${\cal L}_A$ which are
true in the structure ${\ZZ}[X]^+$, where the universe of ${\ZZ}[X]^+$
is the set of all polynomials $p(X)$ with integer coefficients such
that either $p(X)$ is the zero polynomial, or the leading coefficient
of $p(X)$ is positive.  (Here + and $\cdot$ are polynomial addition
and multiplication, and the successor of $p(X)$ is $p(X)+1$.)
The axioms P1,...,P9 are in the theory $Th({\ZZ}[X]^+)$, but the theory
is unsound, because the sentence
\begin{equation}\label{notodd}
A= \ \  \exists x\forall y (x\neq y+y \wedge x\neq y+y+s0)  
\end{equation}
is not in \TA\ but is in $Th({\ZZ}[X]^+)$.  (To check the latter claim,
let $x$ be the polynomial $X$.)

Thus $Th({\ZZ}[X]^+)$ is undecidable, by the Main Theorem.

{\bf Corollary:}  \RA $\not=$ \PA

{\bf Proof:}  Let $A$ be the sentence in (\ref{notodd}) above.
Then $\neg A$ is a theorem of \PA\ (it can be proved by induction
on $x$), but $\neg A$ is not a theorem of \RA,
since the structure ${\ZZ}[X]^+$
just described is a model of \RA\ which satisfies $A$.

\begin{exer}
Is $Th({\ZZ}[X]^+)$ axiomatizable? Justify your answer.
\end{exer}

Notice that the structure ${\ZZ}[X]^+$ is a nonstandard model of \RA.
There are no such nice nonstandard models of \PA.  In fact one can
prove that for any nonstandard model of \PA\ with universe $\NN$,
the interpretations of + and $\cdot$ are uncomputable functions.

In order to prove the Main Theorem we need a stronger notion
of representability.

Recall the definition of {\em represents in a theory} $\Sigma$
(page \pageref{repinTh}):

\label{repR}
$A$ {\em represents} $R$ in $\Sigma$ iff
$\forall \vec{a} \in {\mathbb N}^n\ (R(\vec{a}) \Leftrightarrow A(s_{\vec{a}})
 \in \Sigma)$.

{\bf Definition:}
$A$ {\em strongly represents} $R$ in $\Sigma$ iff $\forall \vec{a} \in
{\mathbb N}^n$\\
\hspace*{.5in} 
$R(\vec{a}) \Rightarrow (A(s_{\vec{a}}) \in \Sigma$),
and $\neg R(\vec{a}) \Rightarrow (\neg A(s_{\vec{a}}) \in \Sigma$)

Notice that if $\Sigma$ is a consistent theory, then if $A(\vecx)$
strongly represents $R(\vecx)$ in $\Sigma$ it follows that $A(\vecx)$ also
represents $R(\vecx)$ in $\Sigma$.  The converse is not always true
(unless $\Sigma$ is complete).

\bigskip
\noindent
In order to prove the Main Theorem, we will prove the
following two results:

{\bf Undecidability Theorem:}  If every recursive relation is
representable in a theory $\Sigma$ then $\Sigma$ is undecidable.

{\bf Strong \RA\ Representation Theorem:}
Every recursive relation is strongly representable in $\RA$
by an $\exists\Delta_0$ formula.

\begin{exer}
Prove the converse of the above Theorem:  If $R$ is strongly
representable in $\RA$, then $R$ is recursive.
\end{exer}

{\bf Proof of the Main Theorem:}
This follows from the preceding two theorems by the following
simple fact:
If a relation is strongly representable in $\RA$ then it is strongly
representable in every extension of $\RA$, and hence it is
representable (rather than strongly representable)
in every consistent extension of \RA.  This is immediate from the
definitions of representable and strongly representable (page \pageref{repR}).
$\Box$

We now turn to the proof of the Undecidability Theorem. 
First note that if the
hypothesis of this theorem is strengthened to assume that every
r.e. (as opposed to recursive) relation is representable
in $\Sigma$, then it would be very easy to prove that $\Sigma$
is undecidable.  (See the proof of Corollary 1 to the \RA\ Representation
Theorem, page \pageref{cor1RA}). The reason the theorem
is stated with the weaker hypothesis is to make the argument
in the preceding paragraph work.  See exercise \ref{ext} to see
what goes wrong when using the alternative form of the Undecidability
Theorem.

\label{prUnT}
{\bf Proof of the Undecidability Theorem}: 
(Like the proof of Tarski's Theorem)

Assume $\Sigma$ is recursive. The idea is to formulate a sentence
``I am not in $\Sigma$''.  This should be true, because $\Sigma$
is consistent, but then it should be in $\Sigma$ by representability,
a contradiction. 

Recall $d(x) = \mbox{sub}\ (x,x)$ from the proof of Tarski's theorem.
Then $d$ is a function (semantic notion) with the property that for
all $a \in {\mathbb N}$, $d(a) = \#A(s_a)$ where $a = \#A(x)$.
Note that $d$ is a recursive function.

Define $R(x) \Leftrightarrow (x = \#A$,  for some $A \in \Sigma$).
Thus $R = \hat{\Sigma}$, and
$\Sigma$ is recursive iff $R$ is recursive.  In order to get
a contradiction, assume $R$ is recursive. Let
$$S(x) \Leftrightarrow \neg R(d(x))$$
Then $S$ is recursive.
Hence by hypothesis, $S(x)$ is represented in $\Sigma$ by some
formula $B(x)$.

By definition of representable\\
(1) $\quad \neg R(d(a)) \Leftrightarrow (B(s_a) \in \Sigma), \quad$
for all $a \in {\mathbb N}$

Let $e = \#B(x)$.  Then
$d(e) = \#B(s_e)$ by definition of $d(x)$.  Then by (1),
$$\neg R(d(e)) \Leftrightarrow (B(s_e) \in \Sigma) $$
The LHS asserts $B(s_e) \not\in \Sigma$, because $R$ represents membership
in $\Sigma$.  This is a contradiction, 
hence $\Sigma$ is not recursive.  $\Box$

{\bf Proof of the Strong RA Representation Theorem:} 
Suppose $R(\vec{x})$ is
a recursive relation.  Then both $R$ and $\neg R$ are r.e., so by
the Exists Delta Theorem, there are bounded formulas $B_1$ and
$B_2$ such that $\exists yB_1(\vec{x},y)$ represents $R(\vec{x})$
in \TA\
and $\exists yB_2(\vec{x},y)$ represents $\neg R(\vec{x})$ in \TA.
As pointed out in the previous proof,
$\exists yB_1(\vec{x},y)$ also represents $R(\vec{x})$ in
$\RA$, but in general it will not strongly represent $R(\vec{x})$ in
$\RA$.  For strong representation we define a formula
$$A(\vec{x}) \equiv \exists y[B_1(\vec{x},y)\wedge
      \forall z\leq y\neg B_2(\vec{x},z)]  $$
{\bf Claim:}  $A(\vec{x})$ strongly represents $R(\vec{x})$ in $\RA$.

First we establish that for all $\vec{a}\in\mathbb N$,
\begin{equation}
\label{first}
 R(\vec{a}) \Rightarrow \RA \vdash A(s_{\vec{a}}) 
\end{equation}
Since $\exists yB_1(\vec{x},y)$ represents $R(\vec{x})$ in
$\RA$, we conclude from $R(\vec{a})$ that
$$  \RA \vdash B_1(s_{\vec{a}}, s_b), \mbox{ for some } b\in \mathbb N  $$
By the property of $B_2$ we know
$\forall z\leq s_b \neg B_2(s_{\vec{a}},z) \in \TA$, so by the MAIN
LEMMA this sentence is in $\RA$.  This establishes (\ref{first})
(take $y=b$).

It remains to establish
\begin{equation}
\label{second}
 \neg R(\vec{a}) \Rightarrow \RA\vdash \neg A(s_{\vec{a}})
\end{equation}
Assume $\neg R(\vec{a})$.  Note that $\neg A(s_{\vec{a}})$ is
equivalent to
\begin{equation}
\label{neg}
  \forall y[ \neg B_1(s_{\vec{a}},y)\vee
\exists z\leq y B_2(s_{\vec{a}},z)]     
\end{equation}
Since $\exists zB_2(\vec{x},z)$ represents $\neg R(\vec{x})$
in $\RA$ it follows that for some $c \in \mathbb N$ 
\begin{equation}
\label{c}
  \RA \vdash B_2(s_{\vec{a}}, s_c)
\end{equation}
By P9,
$$   \RA \vdash \forall y (y\leq s_c \vee s_c\leq y)   $$
(This is the only place that P9 is needed.)
Thus to establish (\ref{neg})
in $\RA$ we consider two cases, depending on whether
$y\leq s_c$ or $s_c\leq y$.  For the first case, we note that
$$  \forall y\leq s_c \neg B_1(s_a,y)   $$
is a true bounded formula, and therefore by the MAIN LEMMA
provable in $\RA$, so (\ref{neg}) follows in $\RA$

For the second case, by (\ref{c}) we have
$$   \RA\vdash \forall y(s_c \leq y \supset
       \exists z\leq yB_2(s_a,z))   $$
so again (\ref{neg}) follows in $\RA$.  $\Box$ 

\begin{exer}
Let $\neg \RA = \{A\mid \RA\vdash\neg A\}$.  Thus $\neg \RA$ is the
set of sentences which \RA\ proves false.  Prove that \RA\ and $\neg \RA$
are recursively inseparable.  That is, prove that there is no
recursive set $S$ of sentences such that
$$  \RA \subseteq S \mbox{ and } \neg \RA \subseteq S^c  $$
where $S^c = \{A\in \Phi_0\mid A\not\in S\}$.
(Note that $S$ need not be a theory.)

{\bf Hint:}  Study the proof of Tarski's Theorem (page 91) and of the
Undecidability Theorem (page \pageref{prUnT}).
Assume that there is a recursive set $S$ satisfying the indicated
conditions.  Formulate a sentence asserting ``I am not in $S$'',
and obtain a contradiction.
\end{exer}



\end{document}
