% LaTex2e
%\documentclass[twoside,12pt]{article}
\documentclass[12pt]{article}
\usepackage{amssymb,latexsym,xspace}
%\usepackage{anysize}
%\marginsize{left}{right}{top}{bottom}
%\marginsize{2cm}{2cm}{1cm}{1cm}
\pagestyle{myheadings}
\def\header{{\hfill \mytitle \hfill A. Miller 
                     \hfill \today \hfill}}

\def\al{{\alpha}}
\def\be{{\beta }}
\def\blank{\;\tilde{ }\;}
\def\cconj{\wedge{\kern -5pt\wedge}}
\def\comp(#1){\overline{#1}}
\def\conj{\wedge}
\def\conv{\downarrow}
\def\ddisj{\vee{\kern -5pt\vee}}
\def\degrees{{\mathcal D}}
\def\delone{\Delta_1^0}
\def\dex#1{{\it #1}}
\def\disj{\vee}
\def\div{\uparrow}
\def\dotminus{\dot{-}}
\def\dualGamma{\widetilde{\Gamma}}
\def\emp{\emptyset}
\def\ga{\gamma}
\def\iff{\leftrightarrow}
\def\implies{\rightarrow}
\def\join{\oplus}
\def\jump(#1){#1^\prime}
\def\lattice{{\mathcal E}}
\def\la{\langle}
\def\la{\langle}
\def\lesss{\lhd}
\def\less{\unlhd}
\def\om{\omega}
\def\pair(#1,#2){\langle #1,#2\rangle}
\def\pione{\Pi^0_1}
\def\poset{{\mathbb P}}
\def\pow{{\mathcal P}}
\def\proof{\par\noindent Proof\par\noindent}
\def\proves{\vdash}
\def\pr{\prime}
\def\qed{\par\noindent QED\par}
\def\rationals{{\mathbb Q}}
\def\ra{\rangle}
\def\ra{\rangle}
\def\res{{\upharpoonright}}
\def\rmand{\mbox{ and }}
\def\rmiff{\mbox{ iff }}
\def\rmor{{\mbox{ or }}}
\def\sigone{\Sigma^0_1}
\def\sig{\sigma}
\def\si{\sig}
\def\sm{\setminus}
\def\sq{\subseteq}
\def\su{\sq}
\def\st{\;:\;}
\def\uu{{\mathcal U}}
\def\vv{{\mathcal V}}
\def\xx{{\mathcal X}}

%%%%% specials %%%%%%%%%%%%%%%%%%

\def\redegrees{{\mathcal R}}
\def\rec{recursive\xspace}
\def\re{r.e. }
\def\anre{an r.e. }
\def\Anre{An r.e. }
\def\recenum{recursively enumerable\xspace} 
\def\prec{partial recursive\xspace}
\def\mytitle{Lecture notes in Recursion Theory }
\def\recly{recursively\xspace}  

\iffalse  % remove this line
\def\redegrees{{\mathcal C}}
\def\rec{computable\xspace}
\def\re{c.e.  }
\def\anre{a c.e. }
\def\Anre{A c.e. }
\def\recenum{computably enumerable\xspace}
\def\prec{partial computable\xspace}
\def\mytitle{Lecture notes in Computability Theory }
\def\recly{computably\xspace}  
\fi       % remove this line

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% \def\hmwk#1#2{\par\bigskip\noindent  {\bf Hmwk #1.} (#2)}
\def\hmwk#1#2{\par\bigskip\noindent \addtocounter{theorem}{1}
 {\bf Exercise \thetheorem . }}
%    {\bf Exercise \thetheorem . ( #2 )}}
\def\exer{\hmwk{nothing}{nothing}}
\def\prob{\hmwk{nothing}{nothing}}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{cor}[theorem]{Corollary}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{question}[theorem]{Question}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{example}[theorem]{Example}
\newtheorem{define}[theorem]{Definition}
\newtheorem{exercise}[theorem]{Exercise}

% \def\exerlabel#1{\begin{exerlabelx}\label{#1}\end{exerlabelx}}

\markboth\header\header
\begin{document}

\begin{center}
\mytitle \\
Arnold W. Miller
\end{center}

These are lecture notes from Math 773.  There were
mostly written in 2004 but with some additions in 2007.

\bigskip\noindent
DESCRIPTION: Abstract theory of computation. Turing degree and 
jump, arithmetic hierarchy, index sets, 
simple and (hyper)hypersimple sets, Kleene-Post
results in Turing degrees, finite injury priority arguments:
Friedberg-Muchnik Theorem, Sacks Splitting Theorem, existence
of a maximal set.  Infinite injury priority arguments: Lachlan
minimal pair, Sacks density theorem, Shoenfield incomplete high degrees.
Recursive ordinals and the hyperarithmetical hierarchy.

\bigskip\noindent
Some general references in this area are:

\par\noindent Hartley Rogers, Theory of recursive functions, 1967
\par\noindent Robert Soare, Recursively enumerable sets and degrees, 1987
\par\noindent Piergiorgio Odifreddi, Classical recursion theory, vol 1,2 
 1989,1999
\par\noindent Barry Cooper, Computability theory, 2004
\par\noindent Robert Soare, Computability theory and applications, 2008

\bigskip

\tableofcontents

\bigskip


\section{UR-Basic programming}

We begin by giving a formal definitions of computability, a toy
programming language: UR-BASIC.

\par\noindent Variables are any string of letters or numerals, A-Za-z0-9.
\par\noindent Statements are of the form
\par Let $X=X+1$
\par Let $X=X\dotminus 1$
\par If $X\leq Y$ then goto $k$
\par\noindent  where $X$ and $Y$ are any variables and $k$ is a nonnegative
integer, i.e. $k\in\om$, which is a line number.

A UR-Basic program is a sequence $S_0$, $S_1$, $S_2$, $\ldots$, $S_n$ of
statements.  Variables only take on nonnegative integer
values.  The symbol $\dotminus$ means subtraction
unless the result is negative and then it yields zero.
The program halts if we ``goto'' to a line $k>n$.

A function $f:\om\to\om$ is UR-Basic computable
iff there exists a program $P$, designated input variable $X$ and
output variable $Y$ such that for any $n\in\om$ if we put
$X=n$ and all other variables zero and start with the first statement of
$P$, then $P$ 
eventually halts with $f(n)$ in variable $Y$.  There is a similar definition
for $f:\om^m\to \om$ to be UR-Basic computable.

Next we indicate how to simulate more complex statements using these
three kinds of statements.  When substituting multiline
statements for a single statement, the ``goto'' numbers must be adjusted.


\begin{tabbing}
XXXXXXXXXXXXXXX \= XXXXXXXXXXXXXXXXXXXX \= \kill
\underline{Basic}: \> \underline{UR-Basic}: \\
Go to k \> If $X\leq X$ then goto $k$ \\
Continue \> Let Donothing=Donothing+1\\
\> \\
Let Y=X
\> 1 If $X\leq Y$ then go to 4\\
\> 2 Let Y=Y+1\\
\> 3 Go to 1 \\
\> 4 If $Y\leq X$ then go to 7 \\
\> 5 Let $Y=Y\dotminus 1$ \\
\> 6 Go to 4 \\
\> 7 Continue \\
\> \\
Constants \\
0 \> this is a variable - we agree never to change it\\
1 \> let $1=1+1$\\
  \> \\
2 \> Let $2=2+1$ \\
  \> Let $2=2+1$ \\
  \> \\
If $X<Y$ then goto $k$ \> Let $tempX =X$ \\
\> Let $tempX=tempX+1$\\
\> if $tempX \leq Y$  then goto $k$ \\
\>\\
If $X=Y$ then goto $k$ \> 1 If $X < Y$ then goto 4 \\
\> 2 If $Y< X$ then goto 4 \\
\> 3 Go to $k$ \\
\> 4 continue \\
\>\\
For $i=1$ to $n$          \> 1 If $n=0$ then goto 7 \\
\phantom{AAA} $S_1$       \> 2 Let $i=1$\\
\phantom{AAA} $\ldots$    \> 3 $S_1$\\
\phantom{AAA} $S_k$       \> $\ldots$ \\
Next $i$                  \> 4 $S_k$\\
                          \> 5 Let $i=i+1$ \\
                          \> 6 If $i\leq n$ then goto 3\\
                          \> 7 continue\\
\>\\
\end{tabbing}

\begin{example}
The pair of functions remainder and quotient are UR-Basic computable
i.e., input $n,m$ then output $q,r$ with $n=qm+r$ and $0\leq r<m$.
\end{example}
\proof
\bigskip
\noindent $n=qm+r$:
\par 1 Let $q=0$
\par 2 Let $r=n$
\par 3 If $r<m$ then goto 7
\par 4 Let $r=r\dotminus m$
\par 5 Let $q=q+1$
\par 6 go to 3
\par 7 continue
\bigskip
\qed

\begin{example}
The functions $Z=X+Y$, $Z=XY$, $Z=X^Y$, and
$X\dotminus Y$ are UR-Basic computable.

\end{example}
\proof
$Z=X+Y$:
\par Let $Z=X$
\par For $i=1$ to $Y$
\par \hspace{.2in} Let $Z=Z+1$
\par Next $i$

\bigskip
\noindent $Z=XY$:
\par Let $Z=0$
\par For $i=1$ to $Y$
\par \hspace{.2in} Let $Z=Z+X$
\par Next $i$

\bigskip
\noindent $Z=X^Y$:
\par Let $Z=1$
\par For $i=1$ to $Y$
\par \hspace{.2in} Let $Z=ZX$
\par Next $i$

\bigskip
\noindent $Z=X\dotminus Y$:
\par Let $Z=X$
\par For $i=1$ to $Y$
\par \hspace{.2in} Let $Z=Z\dotminus 1$
\par Next $i$

\qed

\hmwk{1}{Fri 9-3} 
Prove that the greatest common divisor function
$d=gcd(n,m)$ is UR-Basic computable.  Or if you prefer the
function $f(n)=$ the $n^{th}$ prime.  Or you can prove that
your favorite function is UR-Basic computable.

\section{Primitive recursive functions}


The class of primitive recursive functions is the 
smallest set of functions $f:\om^m\to\om$ 
of arbitrary arity $m$ which contain
\begin{enumerate}
\item the constant zero function, $Z:\om\to\om$, $Z(n)=0$ all $n$,
\item the successor function, $S:\om\to\om$ with $S(n)=n+1$ all $n$
(which we usually write $n+1$), and
\item the projections $\pi^n_m(x_1,\ldots,x_n)=x_m$ for $1\leq m\leq n<\om$
\end{enumerate}  
and is closed under 
\begin{itemize}
\item composition: $h$ is primitive recursive, if
$$h(x_1,\ldots,x_m)=f(g_1(x_1,\ldots,x_m),\ldots,g_n(x_1,\ldots,x_m))$$
where $f$ is $n$-ary and each $g_i$ is $m$-ary are primitive recursive, and
\item primitive recursion: $h$ is primitive recursive, if
\begin{eqnarray*}
h(0,x_1,\ldots,x_m)   & = & g(x_1,\ldots,x_m)\\
h(y+1,x_1,\ldots,x_m) & = & f(y,x_1,\ldots,x_m,h(y,x_1,\ldots,x_m))
\end{eqnarray*}
where $g$ is $m$-ary and $f$ is $(m+2)$-ary primitive recursive. 
\end{itemize}

Note that by using the projections and compositions we may swap variables
around and introduce dummy variables, e.g.
$$h(x,y,z)=f(g(x,y),z,k(z,x))=f(g_1(x,y,z),g_2(x,y,z),g_3(x,y,z))$$
where 
\begin{eqnarray*}
g_1(x,y,z) & = & g(\pi^3_1(x,y,z),\pi^3_2(x,y,z))\\
g_2(x,y,z) & = & \pi^3_3(x,y,z) \\
g_3(x,y,z) & = & k(\pi^3_3(x,y,z),\pi^3_2(x,y,z))
\end{eqnarray*}

A predicate $P\sq \om^n$ is primitive recursive iff its characteristic
function $\chi_P(\vec{x})$ is where 
$$\chi_P(\vec{x})=\left\{
\begin{array}{ll}
1 & \mbox{ if } P(\vec{x})\\
0 & \mbox{ if } \neg P(\vec{x})\\
\end{array}\right.$$

Constant functions of any arity are primitive recursive.  E.g.,
the function $f(x,y,z)=2$ for all $x,y,z$ is defined by
$$f(x,y,z)=S(S(Z(\pi^3_1(x,y,z))))$$

\def\prim[#1,#2,#3]{\par\bigskip\noindent Define #1: \par #2 \par #3}

\prim[$z=x+y$, $x+0=x$, $x+(y+1)=(x+y)+1$]

\prim[$z=xy$, $x0=0$, $x(y+1)=xy+x$]

\prim[$z=x^y$, $x^0=1$, $x^{y+1}=x^yx$]

\prim[$z=x^{(y)}=x^{x^{x^{.^x}}}$, $x^{(0)}=x$, $x^{(y+1)}=x^{x^{(y)}}$]

\prim[$z=x!$,$0!=1$,$(x+1)!=(x+1)x!$]

\prim[$z=x\dotminus 1$, $0\dotminus 1=0$, $(x+1)\dotminus 1=x$]

\prim[$z=y\dotminus x$, $y\dotminus 0=y$, $y\dotminus(x+1)=(y\dotminus x)\dotminus 1$]

\bigskip\noindent Define
$$sign(x)=\left\{
\begin{array}{ll}
1 & \mbox{ if } x>0\\
0 & \mbox{ if } x=0\\
\end{array}\right.$$
by $sign(x)=1\dotminus(1\dotminus x)$.

\bigskip

\begin{prop}
The predicates $x\leq y$, $x=y$, $x<y$ are primitive recursive. 
If $P$ and $Q$ are primitive recursive predicates, then so is $P\vee Q$ and
$\neg P$.  If $P(\vec{x}, y)$ is a primitive recursive predicate
and $f(\vec{x})$ a primitive recursive function, then
$Q(\vec{x})\equiv P(\vec{x},f(\vec{x}))$ is a primitive recursive
predicate.
\end{prop}
\proof

$\chi_{\leq}(x,y)=1\dotminus(x\dotminus y)$

$\chi_{P\vee Q}=sign(\chi_{P}+\chi_{Q})$

$\chi_{\neg P}=1\dotminus \chi_P$

$x=y$ iff $x\leq y$ and $y\leq x$

$x<y$ iff $\neg y\leq x$

$\chi_{Q}(\vec{x})=\chi_P(\vec{x},f(\vec{x}))$

\qed

\begin{prop}
If $P(\vec{x}, y)$ is a primitive recursive predicate and 
$f(\vec{x})$ a primitive recursive function, then
$$\exists y\leq f(\vec{x})\; P(\vec{x}, y)
\rmand
\forall y\leq f(\vec{x})\; P(\vec{x}, y)$$
are both primitive recursive predicates.
\end{prop}
\proof
Let 
$$Q(\vec{x},z)\equiv \exists y \leq z\;\; P(\vec{x}, y)$$
Then $\chi_Q$ has the recursive definition:

$\chi_Q(\vec{x},0)=\chi_P(\vec{x},0)$

$\chi_Q(\vec{x},z+1)=sign(\chi_Q(\vec{x},z)+\chi_P(\vec{x},z+1))$

\bigskip
Note that
$$Q(\vec{x},h(\vec{x})\equiv \exists y \leq h(\vec{x})\; P(\vec{x}, y)$$

and

$$\forall y \leq h(\vec{x})\; P(\vec{x}, y)
\equiv \neg \exists y \leq h(\vec{x})\;\neg P(\vec{x}, y)$$

\qed

\noindent For example,

$x$ divides $y$ iff $\exists z\leq y$ $y=xz$.

$x$ is a Prime iff $x>1$ and $\forall y\leq x$ if $y$ divides $x$, then
$y=1$ or $y=x$.

\noindent are primitive recursive predicates.

\bigskip\noindent Bounded search:
define
$f(\vec{x},z)=\mu y\leq z \; P(\vec{x},y)$ where 
$f$ is the least $y\leq z$ which satisfies
$P(\vec{x},y)$ and $f=0$ if no
$y\leq z$ can be found.

\begin{prop}
Suppose $Q$ is a primitive recursive predicate and $h$ a primitive recursive
function. Then
$$g(\vec{x})=\mu y\leq h(\vec{x}) \; P(\vec{x},y)$$
is primitive recursive.
\end{prop}

\proof
Let 
$$Q(\vec{x},y)\equiv P(\vec{x},y)\wedge \forall u<y\; \neg P(\vec{x},u).$$
Then if we define 
 $$f(\vec{x},z)=\mu y\leq z \; P(\vec{x},y)$$
then 
 $$f(\vec{x},z)=\sum_{y=0}^z \;y\cdot\chi_{Q}(\vec{x},y)$$
which has the following primitive recursive definition:

$f(\vec{x},0)=0$

$f(\vec{x},z+1)= f(\vec{x},z)+ (z+1)\chi_Q(\vec{x},z+1)$

\noindent Hence
$$g(\vec{x})=f(\vec{x},h(\vec{x}))=\mu y\leq h(\vec{x})\;\; P(\vec{x},y).$$

\qed


\begin{prop}
If $f:\om\to\om$ is primitive recursive, the graph(f) is a primitive
recursive predicate.  If graph(f) is a primitive recursive predicate
and there is a primitive recursive function $g$ which bounds $f$, then
$f$ is primitive recursive.
\end{prop}
\proof
Graph(f) has characteristic function $\chi_{=}(f(\vec{x}),y)$.
 If $f$ is bounded by $g$ then
$$f(\vec{x})=\mu y\leq g(\vec{x})\;\;(\vec{x},y) \mbox{ is in the graph of }
 f.$$
\qed

\noindent Examples:

z=max(x,y) iff ($x=z$ and $x\geq y$) or ($y=z$ and $y\geq x$)

\noindent has primitive recursive graph and is bounded by $x+y$, so it
is a primitive recursive function.

Division,Quotient: input $n,m>0$ output $q,r$ with $n=qm+r$ and $r<m$.  
$q=$ quotient$(n,m)$ and $r=$ remainder$(n,m)$ both have primitive
recursive graphs bounded by $n+m$ so they are primitive recursive. 

\hmwk{2}{Wed 9-8}
Let $r(n)=$ $n^{th}$ digit of $\sqrt{2}=1.4142136\ldots$, so
$r(0)=1$, $r(1)=4$, and so on.  Prove that $r$ is primitive recursive.
If you prefer you may use $e=2.7182818\ldots$ instead
of $\sqrt{2}$.  Does every naturally
occurring constant in analysis have this property?

\prob Define $n$ is square-free iff $n\geq 2$ and no $m^2$ divides $n$
for $m\geq 2$.  Let $S(n)$ be the sum of the first $n$ square-free
numbers.  Prove $S$ is a Primitive recursive function.

\section{Primitive recursive functions are UR-Basic computable}

\begin{theorem}
Every primitive recursive function is UR-Basic computable.
\end{theorem}
\proof
The empty program with input x and output y, computes the constant
zero function.  Similarly for the projections.  The successor function
is computed by the one-line program ``Let x=x+1'', with input and output
variable x.  

For closure under composition:
$z=f(g_1(\vec{x}),\ldots,g_n(\vec{x}))$ use the basic program:

Let $z_1=g_1(\vec{x})$

Let $z_2=g_2(\vec{x})$

$\cdots$

Let $z_n=g_n(\vec{x})$

Let $y=f(z_1,\ldots,z_n)$

\noindent where appropriate substitution of UR-Basic code has been done. 

\bigskip
\noindent The
basic code for a primitive
recursive definition

$f(\vec{x},0)=g(\vec{x})$ 

$f(\vec{x},n+1)=h(n,f(\vec{x},n),\vec{x})$

\noindent looks like

input $\vec{x},n$

Let $y=g(\vec{x})$

For $i=1$ to $n$

$\;\;\;\;\;$ Let $y=h(i\dotminus 1,y,\vec{x})$

next $i$

output $y=f(\vec{x},n)$

\qed

\section{UR-BASIC computable functions are recursive}

\begin{define} The partial recursive functions are the
smallest class of functions containing the primitive recursive
functions and closed under composition, primitive recursion, and
unbounded search $\mu$:
$$f(\vec{x})=\mu y\;\; P(\vec{x},y)$$
where $P$ is a recursive predicate,i.e., its characteristic function
is recursive.
\end{define}

\begin{theorem} (Kleene) \label{kleeneq}
There exists a primitive recursive predicate $Q$ and
primitive recursive $g$ such that for every partial UR-Basic
computable $f:\om\to\om$ there exists an $e$ such that 
$$\forall x\;\;\;\;\;f(x)=g(\mu z\;\; Q(e,x,z)).$$ 
\end{theorem}
\proof
An informal description of $g$ and $Q$ are as follows.
$Q(e,x,z)$ says that the program coded by $e$ with input
$x$ does the computation coded by $z$.  $g(z)$ is the value
of the output variable at the final step of the computation coded
by $z$.

In order to more formally define $Q$ we begin by describing 
a method of coding
pairs and finite sequences using primitive recursive functions.


\noindent Coding pairs. the mapping
$x,y \mapsto \pair(x,y)$ defined by 
$$\pair(x,y)=2^x(2y+1)-1$$ 
is a primitive recursive bijection between $\om^2$ and
$\om$. Both unpairing functions are primitive recursive since
if $x=\pair(x_0,x_1)$, then $x_0,x_1\leq x$.  So define the head and
tail functions $h$ and $t$ as follows:

$$h(\pair(x,y))=x \rmand t(\pair(x,y))=y$$

\noindent Triples can be coded by $\la x,y,z\ra=\pair(x,\pair(y,z))$ and 
similarly by induction for $n$-tuples:
$$\la x_1,x_2,\ldots,x_n\ra=\la x_1,\la x_2,\ldots,x_n\ra\ra.$$ 
Note that, for example,
$$h(t(t(\la x,y,z,w\ra)))=z$$
so the ``coordinate function'' $\la x,y,z,w\ra \mapsto z$
is primitive recursive. 

\noindent To code finite sequences of arbitrary length define
the function 
$$c(y,k)=h(t^{(k)}(y))$$  
where $t^{(k)}$ stands for the composition of $t$ with itself $k$ times.
It has a primitive recursive definition $f(k,x)=t^{(k)}(x)$:
$$f(x,0)=x$$
$$f(x,k+1)=t(f(x,k))$$
It is easy to check that $c$ has the property that for
any $n$ and for any finite sequence
$y_0,y_1,\ldots, y_n$ there exists $y$ such that $c(y,k)=y_k$ for
all $k\leq n$. We often use $y_i$ to denote $c(y,i)$

\bigskip


We can assume that the UR-Basic program only uses the variable
$v_i$ for $i<\om$ and that the input variable is $v_0$ and
output variable $v_1$.  

1. $S=\pair(0,i)\in\om$ codes the statement ``Let $v_i=v_i+1$''.
 
2. $S=\pair(1,i)\in\om$ codes the statement ``Let $v_i=v_i\dotminus 1$''.

3. $S=\la n,i,j,k\ra$ for $n\geq 2$ codes the statement 
``If $v_i\leq v_j$ then goto $k$''.

\noindent For $e\in\om$ let $e=\pair(n,S)$ and let 
$S_0,S_1,\ldots,S_{n-1}$ be the program statements with $S_i$ coded
by $c(S,i)$.

Next we define three primitive recursive predicates:

In the tuple $(e,x,y)$, $e$ codes the program, $x$ is the input value and $y$
is pair $\pair(k,V)$ coding the line $k$ in the program which is being executed
and $V$ coding the values of the variables.  

$$Init(e,x,y)\equiv $$ 
$$\exists V<y\;\; y=\pair(0,V)
\rmand c(V,0)=x \rmand \forall i<e\; (i>0\to c(V,i)=0)$$

Since this is the start we want to start with Statement 0, i.e., $y=(0,V)$
and  $v_0=x$ and $v_i=0$ for all $i$ with $0<i<e$.  Note that we can  bound
this by $e$ since $e$ cannot refer to any variables with index higher than $e$.

$$Halt(e,y)\equiv$$ $$ \exists n,S<e \;\exists k,V<y\;\; y=\pair(k,V)
\rmand e=\pair(n,S)\rmand k\geq n$$

All this says is we halt when we try to execute a line number
greater than the length of the program.

$$Onestep(e,y,y^\pr)\equiv$$

(This says we take one step from $y$ to $y^\prime$.)

\medskip\noindent
$\exists k,V,k^\pr,V^\pr< y+y^\pr$ and $\exists n,S<e$ such that 
all of the following are true:
\begin{enumerate}

\item $y=\pair(k,V)$,  $y^\pr=\pair(k^\pr,V^\pr)$, and $e=\pair(n,S)$

\item $k<n$ (we don't take a step if program has halted) 

\item If $c(S,k)$ codes ``Let $v_i=v_i+1$'' then 

$c(V^\pr,i)=c(V,i)+1$,

$c(V^\pr,j)=c(V,j)$ for all $j<e$ with $j\neq i$, and 

$k^\pr=k+1$,

\item If $c(S,k)$ codes ``Let $v_i=v_i\dotminus 1$'' then 

$c(V^\pr,i)=c(V,i)\dotminus 1$,

$c(V^\pr,j)=c(V,j)$ for all $j<e$ with $j\neq i$, and 

$k^\pr=k+1$.

\item If $c(S,k)$ codes ``If  $v_i\leq v_j$ then goto $l$'' then 

$V=V^\pr$ and 

if $c(V,i)\leq c(V,j)$ then $k^\pr =l$ else $k^\pr=k+1$.


\end{enumerate}

\bigskip
Next we define the predicate $Q(e,x,z)$.
Informally, it says that $z$ codes a computation using program $e$ and
input $x$.

$$Q(e,x,z)\equiv $$ $$\exists N,y<z\;\;z=\pair(N,y)\rmand 
Init(e,x,c(y,0))\rmand Halt(e,c(y,N))\rmand $$ $$\forall i<N\;\;
Onestep(e,c(y,i),c(y,i+1))$$

\bigskip
Finally we define the function $g$.
It simply extracts the value of $v_1$ the output variable
from the computation
coded by $z$.  Since $g(z)\leq z$ it is enough to see that its graph
is primitive recursive:

$$g(z)=v \rmiff $$
$$\exists N,y,V,k<z  \;\;\pair(N,y)=z \rmand c(y,N)=\pair(k,V)
\rmand c(V,1)=v$$ 

\qed

\begin{cor}
The family of (partial) UR-Basic computable functions is the
same as the family of (partial) recursive functions.
\end{cor}
\proof
The family of UR-Basic computable functions is closed under 
unbounded search $\mu$, i.e.,

To compute the function $f(\vec{x})=\mu y \;\; P(\vec{x},y)$ use
code:

\bigskip

1 Let $y=0$

2 If $P(\vec{x},y)$ then goto 5

3 Let $y=y+1$

4 Goto 2

5 continue

\bigskip
Hence every partial recursive function is partial UR-Basic computable.  The
Theorem supplies the other inclusion.
\qed

The Theorem shows that only one unbounded search is
needed to get every partial recursive function.
Something that is not immediately evident from the definition
of recursive function.

\exer
Another way to code finite sequences of arbitrary length is to use prime
factorization.
\par (a) Define: nextprime$(x)=y$ to be
the smallest prime $y>x$.
Prove that nextprime$(x)$ is primitive recursive.
\par (b) Define:
$p_0=2$ and $p_n$ is the $n^{th}$ odd prime.
Prove that the function $n\mapsto p_n$ is primitive recursive.
\par (c) Define $c(x,i)=k$ iff $k$ is the
least integer such that $p_i^{k+1}$ does not divide $x$.
Prove that $c$ is primitive recursive and for any finite sequence
$x_0,x_1,\ldots, x_n$ there exists $x$ such that $c(x,k)=x_k$ for
all $k\leq n$.


\exer Suppose that $f:\om\to\om$ is UR-Basic computable by a program
$P$ and there exists a primitive recursive function $s:\om\to\om$ such
that for every $x$ the program $P$ computes $f(x)$ in $\leq s(x)$ 
steps.  Prove that $f$ is primitive recursive.

\exer The programming language P-Basic has only four kinds of statements
\par (a) Let $X=X+1$
\par (b) Let $X=X\dotminus 1$
\par (c) Let $X=Y$
\par \noindent where $X$, $Y$ are any variables 
\par (d) for-next loops, e.g.
\begin{tabbing}
For $i=1$ to $n$        \\ 
\phantom{AAA} $S_1$     \\ 
\phantom{AAA} $\vdots$  \\ 
\phantom{AAA} $S_k$     \\ 
Next $i$                \\ 
\end{tabbing}
The loop variable $i$ and $n$ must be distinct and
in the body of the loop ($S_1,\dots,S_k$) the variables $i$ and $n$ are not
allowed to be changed, i.e., 

For n= 1 to $\ldots$

For i= 1 to $\ldots$

Let n = $\ldots$

Let i = $\ldots$ 

\noindent are not allowed.
Prove that the P-Basic computable functions are the same as the
primitive recursive functions.

\begin{exercise}\label{pairexer}
Another popular pairing function $p:\om^2\to \om$ is described
by Figure \ref{pairfig}.   Show that $p$ is a polynomial.
Hint: the point $(m,n)$ is on the diagonal of the
square of area $(m+n)^2$.
\end{exercise}


\def\text#1{\makebox(0,0)[cc]{#1}}
\unitlength=1.20mm
\begin{figure}
\begin{picture}(50,50)
\put(10,10){\vector(0,1){35}}
\put(10,10){\vector(1,0){35}}
\put(10,10){{\circle*{1}}}
\put(20,10){{\circle*{1}}}
\put(30,10){{\circle*{1}}}
\put(40,10){{\circle*{1}}}
\put(10,20){{\circle*{1}}}
\put(20,20){{\circle*{1}}}
\put(30,20){{\circle*{1}}}
\put(10,30){{\circle*{1}}}
\put(20,30){{\circle*{1}}}
\put(10,40){{\circle*{1}}}
\put(18,12){{\vector(-1,1){6}}}
\put(28,12){{\vector(-1,1){6}}}
\put(38,12){{\vector(-1,1){6}}}
\put(18,22){{\vector(-1,1){6}}}
\put(28,22){{\vector(-1,1){6}}}
\put(18,32){{\vector(-1,1){6}}}
\put(10,07){\text{0}}
\put(20,07){\text{1}}
\put(30,07){\text{3}}
\put(40,07){\text{6}}
\put(07,20){\text{2}}
\put(07,30){\text{5}}
\put(07,40){\text{9}}
\put(22,22){\text{4}}
\put(32,22){\text{7}}
\put(22,32){\text{8}}
\put(30,32){\text{$=p(1,3)$}}
\end{picture}
\caption{Pairing function $p(n,m)$, see exercise \ref{pairexer}. 
\label{pairfig}}
\end{figure}

\section{Church-Turing Thesis}

\bigskip 

\begin{quote}
Church-Turing Thesis: \par Every intuitively computable function
is recursive.
\end{quote}

\bigskip
Good evidence for Church's thesis is the fact that all other ways people have
come up with to formalize the notion of effectively computable function (e.g. RAM
machines, register machines, generalized recursive functions, neural nets, etc)
can be shown to define the same set of functions.  Church's original formal
definition was using the lambda calculus.  However it is not easy to see that
even the elementary arithmetic functions such as successor or addition are
representable in the lambda calculus.  It took his student, Kleene, several 
weeks to prove this.   Similarly, it is also true that all computable functions 
can be represented in John Conway's Game of Life.  But this is difficult to see
and so does not really give convincing evidence that the informal notion of
effectively calculable has been captured.

In section \ref{tur} we define the notion of Turing computable function and
include Turing's analysis of why every effectively calculable function should
be Turing computable.

\begin{prop}
There exists a \rec function $f:\om\to\om$ which is not 
primitive recursive.
\end{prop}
\proof
Make an effective list $f_n:\om^{k_n}\to \om$ of all the primitive recursive
functions. Define $f(n)=f_n(n)+1$ if $f_n$ is a 1-ary function, otherwise
put $f(n)=0$. Since the listing is effective by the Church-Turing
Thesis the function $f$ is recursive.  But by the usual diagonal argument
$f$ is not on the list.
\qed

\hmwk{3}{Fri 9-11}
Prove that there exists a (total) $h:\om\to\om$ whose graph is a primitive
recursive predicate but $h$ is not a primitive recursive function. 
Hint: consider $h(x)=\mu z \; Q(e,x,z)$.

\hmwk{4}{Mon 9-13}
Prove there exists a primitive recursive bijection $p:\om\to\om$ such
that $p^{-1}$ is not primitive recursive.


\section{Universal partial \rec function}

\begin{prop}(Turing)
There exists a universal \prec function $$\psi:\om\to\om$$
i.e. if we define $\psi_e(x)=\psi(\pair(e,x))$ then 
$\{\psi_e\st e\in\om\}$ is a uniformly computable listing of
all \prec functions.
\end{prop}
\proof
$\psi(\pair(e,x))=g(\mu z\;Q(e,x,z))$.
\qed

Note that for any $n\geq 2$ if $f(x_1,\ldots,x_n)$ is a \prec function
then there will be $e$ such that
$$\forall x_1,\ldots,x_n \;\; \psi(\la e,\la x_1,\ldots,x_n\ra\ra)
=f(x_1,\ldots,x_n).$$
So $\psi$ is universal for \prec functions of any arity.


\begin{prop}
(Padding Lemma) There exists a 1-1 
 \rec function $p$ such that $\psi_e=\psi_{p(e,n)}$
 for every $e,n$.
\end{prop} 
\proof
To pad the program $S_0,S_1,\ldots,S_m$ coded by $e$ just add the statement
$$S_{m+1}=\rm{Let }Donothing\pair(e,n)=Donothing\pair(e,n)+1$$
and let $p(e,n)$ code this new program.
\qed

\begin{prop}(S-n-m Theorem). There exists a \rec function $S$
such that $\psi_{e}(\pair(x,y))=\psi_{S(e,x)}(y)$
for all $e,x,y$.
\end{prop}
\proof
Given $\mathcal P$ the program coded by $e$ and input $x$ 
make-up a new program coded by $S(e,x)$ which puts $x$ into
$\mathcal P$'s first input variable and then pops into program 
$\mathcal P$.
\qed
The name S-n-m comes from the obvious generalization
to n-tuple $\vec{x}$ and m-tuple $\vec{y}$
$$\psi_{e}(\pair(\vec{x},\vec{y}))=\psi_{S_{n,m}(e,\vec{x})}(\vec{y})$$
so what we are stating is the S-1-1 Theorem.

These propositions can be combined as follows:
\begin{prop}\label{1-1-s-1-1}
Suppose $\theta(x,y)$ is a \prec function.  Then there is a
one-to-one \rec function $f:\om\to\om$ such that 
$$\forall x,y\;\;\;\psi_{f(x)}(y)=\theta(x,y).$$
\end{prop}
\proof
Suppose $\theta=\psi_{e_0}$.  Then
$$\theta(x,y)=\psi_{p(S(e_0,x),x)}(y)$$
and so $f(x)=p(S(e_0,x),x)$ works.
\qed

We call this the 1-1-S-1-1 Theorem.


\section{The \recenum sets }

\begin{define} For $A\sq\om$ define:
\begin{enumerate}
\item $A$ is \recenum iff either $A$ is empty or $A$ is
the range of a \rec function, i.e., $A=\{a_0,a_1,a_2,\ldots\}$ where
the function $n\mapsto a_n$ is \rec.  This is abbreviated \re
\item $A$ is $\sigone$ iff there exists a \rec predicate 
$R\sq\om^2$
such that $$A=\{n\st \exists m \; R(n,m)\}.$$
\end{enumerate}
\end{define}

\begin{define}\label{defWe}
$W=\{\pair(e,x)\st\psi(\pair(e,x))\conv\}$.  Then
$\{W_e\st e\in\om\}$ where $W_e=\{x\st \pair(e,x)\in W\}$ is a uniform
listing of the \re sets.
\end{define}


\begin{prop}\label{simplere}
For $A\sq \om$ the following are equivalent:
\par (1) $A$ is \recenum.
\par (2) $A$ is the domain of a \prec function.
\par (3) $A$ is $\sigone$.
\par (4) $A$ is finite or $A$ has a one-to-one \rec enumeration.
\par (5) There exists $e$ such that $A=W_e$.
\end{prop}
\proof

$(1)\implies (2)$: Given a \rec enumerable listing $a_n$ describe
a partial \rec function $f$ by:
\begin{itemize}
\item input $x$
\item look for $x$ on the list: $a_0,a_1,a_2,\ldots$
\item halt if you find it, otherwise continue looking forever.
\end{itemize}

$(2)\implies (1)$: Define $\psi_{e,s}(x)\conv=y$ to mean that 
$$e,x,y<s \;\;\conj\;\; \exists z<s \; (Q(e,x,z) \;\;\conj \;\;g(z)=y).$$
See Theorem \ref{kleeneq}.  The predicate
$$P(e,x,y,s)\equiv \psi_{e,s}(x)\conv=y$$
is primitive recursive.  It roughly says that the
algorithm coded by $e$ with input $x$ terminates in fewer than $s$ steps
and outputs $y$.  (Actually $z$ is a sequence
coding the values of the variables and the line number at each step.)
If $A$ is the domain of $\psi_e$, then
either $A$ is empty or let $x_0\in A$ be arbitrary and define
a recursive enumeration of $A$ by
$$a_{n}=\left\{
\begin{array}{ll}
x & \mbox{ if } n=\la x,y,s\ra \rmand \psi_{e,s}(x)\conv=y \\
x_0 & \mbox{ otherwise. }
\end{array}\right.$$


$(1)\implies (3)$: Let $f:\om\to\om$ be \rec and have range $A$. 
Let $R$ be the graph of $f$, then 
$y\in A$ iff $\exists x \; R(x,y)$.

$(3)\implies (2)$: Suppose $x\in A$ iff $\exists y\; R(x,y)$.
Then $f(x)=\mu y\; R(x,y)$ is partial recursive with domain $A$.

$(1)\implies (4)$: Given $\{a_n\st n<\om\}$ a $\rec$ enumeration
of $A$, define a \rec enumeration 
$\{b_n\st n<\om\}$ by: 

$b_{n+1}=a_m$ where $m$ is the least
such that $a_m\notin\{b_i:i\leq n\}$.

$(2) \leftrightarrow (5)$: by definition.

\qed

\begin{define}
For $A\sq\om$, define:
\begin{enumerate}
\item $A$ is \rec iff its characteristic function $\chi_A$ is \rec.
\item $\comp(A)=\om\sm A$ the complement of $A$,
\item $A$ is $\pione$ iff $\comp(A)$ is $\sigone$, and
\item $\delone=\sigone\cap \pione$.
\end{enumerate}
\end{define}

\begin{prop}
For $A\sq\om$ the following are equivalent:
\par (1) $A$ is \rec.
\par (2) $A$ and $\comp(A)$ are both \recenum.
\par (3) $A$ is $\delone$.
\par (4) $A$ is finite or $A$ has a strictly increasing \rec enumeration.
\end{prop}
\proof

$(1)\implies (2)$: It is easy to see that \rec implies \recenum and
that the complement of a \rec set is \rec.

$(2)\implies (1)$: Input $x$. 
Effectively list $A$ and $\comp(A)$ simultaneously until $x$ shows up.

$(2)$ iff $(3)$: Trivial.

$(1)\implies (4)$: Take $a_n$ to be the $n^{th}$ element of $A$.

$(4)\implies (1)$: Let $\{a_n\st n<\om\}$ be a strictly increasing
$\rec$ enumeration
of $A$. The following algorithm computes the characteristic function
of $A$:
\begin{itemize}
\item Input $x$. 
\item Find $n$ such that $a_n>x$.  
\item Then
$x\in A$ iff $x\in \{a_i\st i<n\}$.
\end{itemize}

\qed


\begin{example}
There exists \anre set $K$ which is not \rec.
\end{example}
\proof
$$K=\{e\st \psi_e(e)\conv\}$$
If $\comp(K)$ is the domain of $\psi_e$, then $e\in K$ iff $e\notin K$.
\qed

\begin{prop}
Every infinite \re set contains an infinite \rec set.
\end{prop}
\proof
Given $\{a_n\st n<\om\}$ a $\rec$ enumeration
of $A$, define a strictly increasing \rec enumeration 
$\{b_n\st n<\om\}$ by:

$b_0=a_0$ and

$b_{n+1}=a_m$ where $m$ is the least such that $a_m>b_n$.

\qed

\begin{prop}
If $A$ and $B$ are \re sets, then $A\cap B$ is \re and $A\cup B$ is \re
If $A$ and $B$ are \rec sets, then $A\cap B$, $A\cup B$, and
$\comp(A)$ are all \rec sets.
\end{prop}
\proof
Domain of $f+g$ is the intersection of domain $f$ and domain $g$.
Enumerate $A\cup B$ by $x_{2n}=a_n$ and $x_{2n+1}=b_n$.
\qed

\hmwk{6}{Fri 9-17} Suppose that $V\sq\om$ is \re  For each $n$ define
$V_n=\{x\st \pair(n,x)\in V\}$.  Prove that $\cup_nV_n$ is \re

\hmwk{5}{Wed 9-15}
Prove that every nonempty \recenum set $A$ is the range
of a primitive recursive function.  Extra Credit: prove that not
every infinite \recenum set is the range of a one-to-one
primitive recursive function.

\exer  (a) For a partial function $f:\om\to\om$ prove that $f$ is 
\prec iff its graph is \recenum.
\par (b) For a \prec $h$ prove there is a \prec $g$
with $dom(g)\supseteq range(h)$ such that
$$\forall y \in range(h)\;\;\;  h(g(y))= y.$$
\par (c) Give an example for (b) for which $g$ cannot be total.

\exer Consider a partial function $f:\om\to\om$ and the three set:  
\begin{enumerate}
\item $dom(f)\sq\om$
\item $graph(f)\sq\om\times\om$
\item $range(f)\sq\om$.
\end{enumerate}
For each of the sets $(1),(2),(3)$ could be:

(a) \rec or

(b) \recenum but not \rec. 

\noindent For each of the 8 possibilities, either give an example of such an
$f$ or prove there is no such $f$.  Extra credit: consider the
third possibility (c) not \recenum.

\exer % from qual 2003-8
If $f:\omega \to \omega$, then
$f^n$ denotes $f$ applied $n$ times; e.g., 
$f^3(0) = f(f(f(0)))$.
Give an example of a (total) \rec $f$ such that
$\{f^n(0):n \in \om\}$ is not \rec.

\exer % from qual 2003-8 and 2001 #8
Define
$V_e=\{x : \la e,x \ra\in V\}$.  Prove or disprove:
\begin{enumerate}
\item $\exists V$ \recenum
such that $\{V_e :  e\in\om\}$ is the set of all \rec sets.
\item  $\exists V$ \rec
such that $\{V_e :  e\in\om\}$ is the set of all \rec sets.
\item  $\exists V$ \re such $\{V_e:e\in\omega\}$ is the set of
all nonempty \re sets.
\item $\exists f$ a \rec function such that for all $e\;\;$
$W_e\not=\emptyset$ implies $f(e)\in W_e$.
\item $\exists f$ \prec such that for all $e\;\;$
$W_e\not=\emptyset$ implies $f(e)\downarrow\in W_e$.
\end{enumerate}

\begin{exercise}
Prove there exists a \rec function $f:\om\to\om$ such that
for every $e$
$$ W_e\mbox{ infinite } \to (\psi_{f(e)}:\om \to W_e \mbox{ is 
total, one-to-one, and onto}).$$
\end{exercise}

For the definition of $W_e$ see Definition \ref{defWe}.

\section{Separation and reduction}

\begin{example}\label{insep}
There exists disjoint \re sets $K_0$ and $K_1$ which are \recly
inseparable, i.e., there is not exists a \rec set $R\sq\om$ with
$K_0\sq R$ and $K_1\sq\comp(R)$.  
\end{example}
\proof
$$K_0=\{e\st \psi_e(e)\conv=0\}\rmand 
K_1=\{e\st \psi_e(e)\conv=1\}$$
\qed

\begin{define}\label{reduction}
For any $\Gamma\sq P(\om)$ define $\dualGamma$ to be the
set of all $\comp(A)$ for $A\in\Gamma$ and define 
$\Delta=\Gamma\cap\dualGamma$. $Sep(\Gamma)$ is the property
that for every $A,B\in\Gamma$ disjoint there exists $C\in\Delta$ with
$A\sq C$ and $B\sq\comp(C)$. $Red(\Gamma)$ (the reduction principle)
is the property that for every $A,B\in\Gamma$ there exists disjoint
$A^\pr\sq A$ and $B^\pr\sq B$ with $A^\pr,B^\pr\in\Gamma$ and
$A\cup B=A^\pr\cup B^\pr$.
\end{define}

\begin{prop}
$Red(\Gamma)$ implies $Sep(\dualGamma)$.
\end{prop}
\proof
Apply reduction to the complements.
\qed

\begin{prop} \label{red->sep}
$Red(\sigone)$ and hence $Sep(\pione)$.
\end{prop}
\proof
$A=\{x\st\exists u\; R(u,x)\}$ and 
$B=\{x\st\exists v\; S(v,x)\}$.  Put
$$x\in A^\pr\iff \exists u\; R(u,x)\rmand \forall v\leq u \neg S(v,x)$$
$$x\in B^\pr\iff \exists v\; S(v,x)\rmand \forall u < v \neg R(u,x)$$
\qed

In example \ref{insep} it follows that $K_0$ and $K_1$ cannot be separated
by disjoint $\pione$ sets $B_0$ and $B_1$ because such a $B_0$ and
$B_1$ could be \recly separated.

\hmwk{7}{Mon 9-20} Prove
$Sep(\Gamma)$ for $\Gamma=\{A\cup B\st A\in\sigone,\; B\in\pione\}$.


\section{Many-one reducibility}

\begin{define} For $A,B\sq\om$ define:
\begin{enumerate}
\item $A\leq_m B$ iff there exists a \rec function $f$ such that
$$\forall x\in\om\;\; x\in A \iff f(x)\in B.$$  
Equivalently, $f^{-1}(B)=A$.  Also equivalently
$f(A)\sq B$ and $f(\overline{A})\sq \overline{B}$.
\item $A\leq_1 B$ iff
 the $f$ in the definition of $\leq_m$ can be taken 
 to be one-to-one.
\end{enumerate}
\end{define}



\begin{prop}
\begin{enumerate}
\item $A\leq_1 B$ implies $A\leq_m B$.
\item $A\leq_m B$ iff $\comp(A)\leq_m \comp(B)$ and similarly for $\leq_1$.
\item $\leq_m$ and $\leq_1$ are transitive and reflexive.
\item $A\leq_m B$ and $B$ is \rec, then $A$ is \rec.
\item $A\leq_m B$ and $B$ is \recenum, then $A$ is \recenum.
\end{enumerate}
\end{prop}
\proof
Most of these are trivial.  Note that $f$ reduces $A$ to $B$ then
it also reduces $\comp(A)$ to $\comp(B)$.  Transitivity follows
by composition.  

For (4) if $f$ witnesses $A\leq_mB$, i.e.,
$$\forall n\;\; n\in A \rmiff f(n)\in B,$$
then $\chi_A(n)=\chi_B(f(n))$.

For (5) suppose that
$$n\in B\rmiff \exists m\;\;R(n,m)$$
and
$$\forall n\;\; n\in A \rmiff f(n)\in B.$$
Then 
$$\forall n\;\; n\in A \rmiff \exists m\;\; R(f(n),m).$$
\qed

\begin{define}
\begin{enumerate}
\item $A\equiv_mB$ iff $A\leq_m B$ and $B\leq_m A$.
\item $m-deg(A)=\{B\st A\equiv_mB\}$, the many-one degree of $A$.
\item $A\equiv_1B$ iff $A\leq_1 B$ and $B\leq_1 A$.
\item $1-deg(A)=\{B\st A\equiv_1B\}$, the one degree of $A$.
\end{enumerate}
\end{define}


\begin{exercise}
\label{reduceonto}Suppose $A$ and $B$ are infinite \re sets and 
$A \leq_1 B$. Show there is a computable one-to-one reduction of 
$A$ to $B$ which maps $A$ onto $B$.
\end{exercise}



\section{Rice's index Theorem}

Recall that
$\{W_e\st e\in\om\}$ is the standard
listing of all \re sets (\ref{defWe}).

\begin{example}
$Empty=\{e\st W_e=\emp\}$ is not \rec. 
\end{example}
\proof
Define 
$$\theta(e,x)=\left\{
\begin{array}{ll}
\conv=0 & \mbox{ if } e\in K\\
\div    & \mbox{ otherwise }\\
\end{array}\right. $$
By the S-n-m theorem there exists $f$ \rec such that 

$$\forall e,x\;\;\; \psi_{f(e)}(x)=\theta(e,x)$$
But then $e\in K$ iff $W_{f(e)}\neq\emp$ iff $f(e)\notin E$
so $K\leq_m \comp(E)$ and therefore $E$ not \rec.
\qed

\begin{prop}
(Rice) If $A$ is a nontrivial index set, 
then $A$ is not \rec. 
\end{prop}
\proof
This is like the proof for Empty. Without loss of generality assume
the index of the empty function is in $A$ and the index
$e_0$ of some nonempty partial computable function is not in
$A$.
Define 
$$\theta(e,x)=\left\{
\begin{array}{ll}
\psi_{e_0}(x) & \mbox{ if } e\in K\\
\div    & \mbox{ otherwise }\\
\end{array}\right. $$
By the S-n-m theorem there exists $f$ \rec such that 

$$\forall e,x\;\;\; \psi_{f(e)}(x)=\theta(e,x)$$
But then 
$$e\in K \rmiff f(e)\notin A$$
and therefore $A$ is not \rec.

\qed

\section{Myhill's \rec permutation Theorem}

\begin{theorem}\label{bij}
(Myhill) $A\leq_1 B$ and $B\leq_1A$ iff there exists a \rec bijection
$\pi:\om\to\om$ with $\pi(A)=B$.
\end{theorem}
\proof
The Schroeder-Bernstein Theorem says:
if there exists a 1-1 $f:A\to B$ and 1-1 $g:B\to A$, then
there exists a bijection $h:A\to B$.  One way to prove this
is to assume $A$ and $B$ are disjoint and define a bipartite
graph on the vertices $A\cup B$.  Put $a\in A$ connected to
$b$ iff either $f(a)=b$ or $g(b)=a$.  As $f$ and $g$ are 1-1
the order of every vertex is either 1 or 2.  The connected components
of this graph come in 4 types, see figure \ref{fig1}.
Note that in Type 1 the point $a\in A$ is not in the range of
$g$ and in Type 2 the point $b\in B$ is not in the range of $f$.
Type 4 components are infinite in both `directions' while Type 3
is the only finite component.

\def\text#1{\makebox(0,0)[cc]{#1}}
\unitlength=1.20mm
\begin{figure}
\begin{picture}(100,150)

\put(20,70){\begin{picture}(80,80)(0,10)
\put(10,90){\text{$A$}}         \put(30,90){\text{$B$}} \put(5,80){\text{$a$}}
\put(10,80){\vector(2,-1){19}}  \put(10,80){\circle{1}} \put(20,78){\text{$f$}}
\put(30,70){\vector(-2,-1){19}} \put(30,70){\circle{1}} \put(20,68){\text{$g$}}
\put(10,60){\vector(2,-1){19}}  \put(10,60){\circle{1}} \put(20,58){\text{$f$}}
\put(30,50){\vector(-2,-1){19}} \put(30,50){\circle{1}} \put(20,48){\text{$g$}}
\put(10,40){\circle{1}}         \put(10,40){\vector(2,-1){19}}
\put(20,30){\text{$\vdots$}}    \put(20,20){\text{Type 1}}
\put(50,90){\text{$A$}}         \put(70,90){\text{$B$}} \put(75,80){\text{$b$}}
\put(70,80){\vector(-2,-1){19}} \put(70,80){\circle{1}} \put(60,78){\text{$g$}}
\put(50,70){\vector(2,-1){19}}  \put(50,70){\circle{1}} \put(60,68){\text{$f$}}
\put(70,60){\vector(-2,-1){19}} \put(70,60){\circle{1}} \put(60,58){\text{$g$}}
\put(50,50){\vector(2,-1){19}}  \put(50,50){\circle{1}} \put(60,48){\text{$f$}}
\put(70,40){\vector(-2,-1){19}} \put(70,40){\circle{1}}
\put(60,30){\text{$\vdots$}}    \put(60,20){\text{Type 2}}
\end{picture}}

\put(15,-10){\begin{picture}(90,80)(0,10)
\put(10,90){\text{$A$}}         \put(30,90){\text{$B$}} 
\put(10,80){\vector(1,0){19}}   \put(10,80){\circle{1}} \put(20,82){\text{$f$}}
\put(30,80){\vector(-2,-1){19}} \put(30,80){\circle{1}} \put(20,77){\text{$g$}}
\put(10,70){\vector(1,0){19}}   \put(10,70){\circle{1}} \put(20,72){\text{$f$}}
\put(30,70){\vector(-2,-1){19}} \put(30,70){\circle{1}} \put(20,67){\text{$g$}}
\put(10,60){\vector(1,0){19}}   \put(10,60){\circle{1}} \put(20,62){\text{$f$}}
\put(30,60){\vector(-2,-1){19}} \put(30,60){\circle{1}} \put(20,57){\text{$g$}}
\put(10,50){\vector(1,0){19}}   \put(10,50){\circle{1}} \put(20,52){\text{$f$}}
\put(30,50){\vector(-2,3){19}}  \put(30,50){\circle{1}} \put(28,55){\text{$g$}}
\put(20,35){\text{Type 3}}
\put(60,90){\text{$A$}} \put(80,90){\text{$B$}} \put(70,85){\text{$\vdots$}}
\put(80,80){\vector(-2,-1){19}} \put(80,80){\circle{1}} \put(70,77){\text{$g$}}
\put(60,70){\vector(1,0){19}}   \put(60,70){\circle{1}} \put(70,72){\text{$f$}}
\put(80,70){\vector(-2,-1){19}} \put(80,70){\circle{1}} \put(70,67){\text{$g$}}
\put(60,60){\vector(1,0){19}}   \put(60,60){\circle{1}} \put(70,62){\text{$f$}}
\put(80,60){\vector(-2,-1){19}} \put(80,60){\circle{1}} \put(70,57){\text{$g$}}
\put(60,50){\vector(1,0){19}}   \put(60,50){\circle{1}} \put(70,52){\text{$f$}}
\put(70,45){\text{$\vdots$}}    \put(70,35){\text{Type 4}}
\end{picture}
}
\end{picture}
\caption{ Schroeder-Bernstein connected components\label{fig1}}
\end{figure}

\begin{figure}
\unitlength=1.36mm
\begin{picture}(40,40)(-25,40)
\put(10,80){\vector(1,0){19}}   \put(10,80){\circle{1}} \put(20,82){\text{$f$}}
\put(30,80){\vector(-2,-1){19}} \put(30,80){\circle{1}} \put(20,77){\text{$g$}}
\put(10,70){\vector(1,0){19}}   \put(10,70){\circle{1}} \put(20,72){\text{$f$}}
\put(30,70){\vector(-2,-1){19}} \put(30,70){\circle{1}} \put(20,67){\text{$g$}}
\put(10,60){\vector(1,0){19}}   \put(10,60){\circle{1}} \put(20,62){\text{$f$}}
\put(30,60){\vector(-2,-1){19}} \put(30,60){\circle{1}} \put(20,57){\text{$g$}}
\put(10,50){\vector(1,0){19}}   \put(10,50){\circle{1}} \put(20,52){\text{$f$}}
\put(30,50){\vector(-2,3){19}}  \put(30,50){\circle{1}} \put(28,55){\text{$g$}}
\put(5,80){\text{$n_0$}}
\put(5,70){\text{$n_1$}}
\put(5,60){\text{$n_2$}}
\put(5,50){\text{$n_3$}}
\put(35,80){\text{$m_0$}}
\put(35,70){\text{$m_1$}}
\put(35,60){\text{$m_2$}}
\put(35,50){\text{$m_3$}}
\end{picture}
\caption{Myhill back and forth\label{fig2}}
\end{figure}


To get $h$ simply define $h=f$ on any component of type 1,3, or 4 and
$h=g^{-1}$ on components of type 2.

The proof of Myhill's theorem is similar except we may never know exactly
which type of component we are looking at.

Suppose $f$ and $g$ are 1-1 \rec functions reducing $A$ to
$B$ and $B$ to $A$.  

Effectively construct a sequence $\pi_s$ of bijections with

\begin{enumerate}
\item $\pi_s:D_s\to E_s$ is a bijection.
\item $D_s$ and $E_s$ are finite subsets of $\om$.
\item $\pi_s\sq \pi_{s+1}$.
\item $n\in D_{2n}$ and $n\in E_{2n+1}$.
\item if $\pi_s(n)=m$, then \label{five} 
either $m=fgfg\cdots f n$ or
$n=gfgf\cdots g m$.
\end{enumerate}

In the condition \ref{five} we have dropped the parentheses to make it more
readable.
 
If we then take $\pi=\cup_s\pi_s$, then $\pi$ is a recursive bijection
since we effectively constructed the sequence. 
It takes $A$ to $B$, because suppose $\pi(n)=m$.  Then if
$m=fgfg\cdots f n$
$$n\in A\rmiff fn\in B\rmiff gfn\in A\rmiff fgfn\in B\rmiff \cdots
\rmiff m=fgfg\cdots f n\in B$$
similarly if $n=gfgf\cdots g m$
$$m\in B\rmiff gm\in A\rmiff fgm\in B\rmiff gfgm\in A\rmiff \cdots
\rmiff n=gfgf\cdots g m\in A$$
either way $n\in A$ iff $m\in B$.

At stage s=0 we take $\pi_0$ to be the empty function.

At stage s+1 suppose we are given $\pi_s:D_s\to E_s$.  If $s=2n$
we try to extend $\pi_s$ to include $n\in D_{s+1}$. If its
already there we let $\pi_{s+1}=\pi_s$.  Otherwise consider the
following sequences:

Let $n=n_0$, $fn_0=m_0$ and in general $f(n_k)=m_k$ and
$g(m_k)=n_{k+1}$, see figure \ref{fig2}.


\bigskip
\par\noindent Case 1. For some $k$ we have that $m_k\notin E_s$.

In this case we put $\pi_{s+1}=\pi_s\cup\{\pair(n_0,m_k)\}$.

\bigskip
\par\noindent Case 2. Not case 1.  

\bigskip
In this case the connected component of the graph (see Figure \ref{fig1}) must
be of Type 3, i.e., a finite closed loop.  
Suppose $g(m_k)=n_0$.  But by condition \ref{five} if all
the $m_k$ are in $E_s$, then they must map via $\pi_s^{-1}$ to 
the set $\{n_0,n_1,\ldots,n_k\}$ (although not in any particular
order).  But this is a contradiction, since $n=n_0\notin D_s$. 
Hence Case 2 cannot happen.

\bigskip

The construction at stage s+1 where $s=2n+1$ is entirely analogous except
we make sure $n\in E_{s+1}$.

\qed

\exer Define 
$$Q=\{\la e_1,e_2\ra \st e_1\in W_{e_2}, \; e_2\in W_{e_1}, \rmand
e_1\neq e_2\}.$$
Prove that $Q$ is creative.

\section{Roger's adequate listing Theorem}

\begin{theorem}
(Rogers) Suppose $\rho:\om\to\om$ is \prec and 
we define $\rho_e(x)=\rho(e,x)$.  Suppose
\begin{enumerate}
\item $\rho$ is universal, i.e., $\{\rho_e\st e\in\om\}$ includes
all \prec functions.
\item $\rho$ satisfies padding, i.e., there exists one-to-one
\rec $p:\om\times\om\to\om$ such that 
$$\forall e,n \;\; \rho_{e}=\rho_{p(e,n)}$$
\item $\rho$ satisfies S-1-1, i.e., there exists a \rec $S:\om\times\om\to\om$
such that 
$$\forall e_1,e_2,x\;\; \rho_{e_1}(\pair(e_2,x))=\rho_{S(e_1,e_2)}(x)$$
\end{enumerate}
Then there exists a \rec bijection $\pi:\om\to\om$ such that
$$\forall e\;\; \psi_e=\rho_{\pi(e)}$$
\end{theorem}
\proof
Let $\psi=\rho_{e_0}$. Using padding and S-1-1 for $\rho$ we can find a 1-1
\rec function $f(e)=p(S(e_0,e))$ such that
$$\forall e\;\; \psi_e=\rho_{S(e_0,e)}=\rho_{f(e)}$$
similarly there is a 1-1 \rec function $g$ such that
$$\forall e\;\; \rho_e=\psi_{g(e)}.$$
By the proof of Theorem \ref{bij} there is a \rec bijection
$\pi:\om\to\om$ with the property that whenever
$\pi(n)=m$ then either
$m=fgfg\cdots f n$ or $n=gfgf\cdots g m$. But 
$$\psi_n=\rho_{f n}=\psi_{gf n}=\ldots =\rho_{fgfg\cdots f n}=\rho_m$$
and 
$$\rho_m=\psi_{g m}=\rho_{fg m}=\ldots =\psi_{gfgf\cdots g m}=\psi_n$$
so in either case $\psi_n=\rho_{\pi(n)}$.
\qed

\hmwk{8}{Wed 9-22} Find an example of a \prec $\rho$ which is
universal but fails to satisfy padding.  Find an example
which is universal, satisfies padding but fails to satisfy 
S-1-1.  (S-1-1 implies padding see Soare p.25-26.)


\section{Kleene's  Recursion Theorem}

\begin{theorem}
(Kleene - Recursion Theorem) 
For any \rec function $f$ there exists an $e$ with
$\psi_e=\psi_{f(e)}$.
\end{theorem}
\proof
Define a \prec function $\theta$ by
$$\theta(u,x)=\psi_{\psi_u(u)}(x)=\psi(\la\psi(\la u,u\ra),x\ra)$$
By padding-S-1-1 we can find a (one-to-one) \rec function $d:\om\to\om$
such that 
$$\forall u\;\; \psi_{d(u)}(x)=\theta(u,x)$$
Let $v$ be an index for $f\circ d$, i.e.,
$$\forall x \;\; \psi_v(x)=f(d(x))$$
Put $e=d(v)$ then
$$\psi_e(x)=\psi_{d(v)}(x)=\theta(v,x)=\psi_{\psi_v(v)}(x)=
\psi_{f\circ d(v)}(x)=\psi_{f(e)}(x)$$
\qed

From the proof we can get an infinite \rec set of fixed points 
$e$, since we can
take any $v^\pr$ such that $\psi_{v^\pr}=f\circ d$ and set
$e^\pr=d(v^\pr)$. Also
note that our fixed point $e$ is obtained effectively from an index for
$f$,  so given a \rec $f:\om\times\om\to \om$ if we let $f_n:\om\to\om$
be defined by $f_n(x)=f(n,x)$ then we get a fixed points $e_n$ 
$$\psi_{e_n}=\psi_{f_n(e_n)}$$
and the function $h(n)=e_n$ is \rec.  This is called the recursion
theorem with parameters:

\begin{theorem}
For any \rec function 
$f:\om^2\to\om$ there exists a 1-1 \rec function $h:\om\to\om$ such that
$\psi_{h(x)}=\psi_{f(x,h(x))}$ for all $x$.
\end{theorem}

\begin{example}
There are infinitely many $e$ such that $\psi_e(0)=e$.
There are infinitely many $e$ such that $W_e=\{e\}$.  
\end{example}
\proof
Define $\theta(e,x)=e$ for all $e$. By the S-n-m Theorem there exists
a \rec $f$ such that 
$$\forall e,x\;\; \psi_{f(e)}=\theta(e,x)$$
By the Recursion Theorem there are infinitely many fixed points for
$f$, i.e., 
$$\psi_e=\psi_{f(e)}$$
and for each of these $\psi_e$ is the constant function $e$.

Define a \prec function $\theta$ by
$$\theta(e,x)=\left\{
\begin{array}{ll}
\conv=0 & \mbox{ if } e=x \\
\div    & \mbox{ otherwise }
\end{array}\right.
$$
By S-n-m theorem there is a \rec function $g$ with
$\psi_{g(e)}(x)=\theta(x)$.  By the definition of $\theta$
we see that for every $e$:
$$ W_{g(e)}=\{e\}$$
By the Recursion Theorem there are infinitely many fixed points for
$g$ and for any of them
$$W_e=W_{g(e)}=\{e\}.$$



\hmwk{9}{Fri 9-24} Prove:
\par (a) for every $f,g$ \rec functions, there exists $e_1$ and
$e_2$ such that $\psi_{f(e_1)}=\psi_{e_2}$ and $\psi_{g(e_2)}=\psi_{e_1}$
\par (b) $\exists e_1\neq e_2\;\;\;\; W_{e_1}=\{e_2\}, \; W_{e_2}=\{e_1\}$
\par (c) $\exists e_1>e_2>e_3\;\;\;\; W_{e_1}=\{e_2\}, \; W_{e_2}=\{e_3\},
\; W_{e_3}=\{e_1\}$

\exer Suppose $V\subseteq \omega$ is \recenum. Show there exists infinitely
many $e$ such that 
$W_e=V_e$ where $V_e=\{n:\la e,n\ra\in V\}$.

\exer Prove there is a strictly increasing \rec function $f:\om\to\om$ such that
$W_{f(n)}=\{n+f(n)\}$ for all $n$.

\begin{example}
(Smullyan) For any \rec functions $f(x,y)$ and $g(x,y)$ there exists
$a,b\in\om$ such that
$$\psi_{f(a,b)}=\psi_a \rmand \psi_{g(a,b)}=\psi_b$$
\end{example}
\proof
By the recursion theorem
$$\forall x\;\exists y \;\; \psi_{g(x,y)}=\psi_{y}$$
but since the fixed point $y$  is obtained effectively from $x$ 
and an index for $g$ there exists a \rec function $h$ such that
$$\forall x\;\; \psi_{g(x,h(x))}=\psi_{h(x)}$$
Apply the fixed point theorem to $f(x,h(x))$ there exists $a\in\om$
such that
$$\psi_{f(a,h(a))}=\psi_a$$
Letting $b=h(a)$ does the job.
\qed

\hmwk{10}{Mon 9-27} Prove
\par (a) $\exists e_1<e_2<e_3\;\;\;\; W_{e_1}=\{e_2\}, \; W_{e_2}=\{e_3\},
\; W_{e_3}=\{e_1\}$
\par (b) $\exists e_1\neq e_2\;\;\; W_{e_1}=\{e_1,e_2\}=W_{e_2}$
\par (c) $\exists e_1<e_2<e_3\;\;\; W_{e_1}=\{e_2,e_3\},\;
W_{e_2}=\{e_1,e_3\},\;   W_{e_3}=\{e_1,e_2\}$


\section{Myhill's characterization of creative set}

\begin{define}
A \re set $A$ is m-complete iff $B\leq_m A$ for every \re B.
Similarly 1-complete.
\end{define}
\begin{define}

\Anre set $C$ is creative iff there exists a \rec
function $q\in\om^\om$ such that for every $e$
$$W_e\cap C=\emp \implies q(e)\notin C\cup W_e.$$
\end{define}


\begin{theorem}\label{creative}
(Myhill) For $C\sq\om$ \re the following are equivalent:
\begin{enumerate}
\item $C$ is creative
\item $C\equiv_1 K$
\item $C$ is 1-complete
\item $C$ is m-complete
\end{enumerate}
\end{theorem}
\proof
$(2)\implies (3)$: It is enough to see that $K$ is 1-complete, since
then for any $B$ \re we would have $B\leq_1 K\leq_1 A$.
Define a \prec function $\rho$ as follows:
$$\rho(e,x)=\left\{
\begin{array}{ll}
\conv=0 & \mbox{ if } e\in B \\
\div    & \mbox{ otherwise } \\
\end{array}
\right.$$
$\rho$ is \prec because we enumerate $B$ looking to see if $e$ ever
turns up, if not the computation never halts.  Using the 1-1-S-1-1
Theorem there exists a 1-1 \rec function $f$ such that
$$\forall e,x\;\; \psi_{f(e)}(x)=\rho(e,x)=\left\{
\begin{array}{ll}
\conv=0 & \mbox{ if } e\in B \\
\div    & \mbox{ otherwise } \\
\end{array}
\right.$$
Then $e\in B$ iff $\psi_{f(e)}(f(e))\conv$ iff $f(e)\in K$.

$(3)\implies (4)$: Trivial

$(4)\implies (1)$: The creativity of $K$
is witnessed by the identity function, i.e., 
$$W_e\cap K=\emp\implies e\notin W_e\cup K.$$
Suppose $K\leq_m A$ is witnessed by the function $f$.  Then there exists
a \rec function $q$ such that
$$\mbox{ for all $e\;\;\;$ } W_{q(e)}=f^{-1}(W_e)$$  
(Use S-1-1 to get $\psi_{q(e)}=\psi_e\circ f$.)
Then 
$$W_e\cap A=\emp\implies $$ 
$$f^{-1}(W_e)\cap K=\emp \implies$$
$$W_{q(e)}\cap K=\emp\implies $$ 
$$q(e)\notin f^{-1}(W_e)\cup K\implies$$ 
$$ f(q(e))\notin W_e\cup A$$
so $f\circ q$ witnesses the creativity of $A$.

$(1)\implies (2)$:  

\noindent {\bf Claim} The creativity function for
$A$ can be taken to be 1-1.  

\proof Given any creativity function $d$ for
$A$.  Construct a \rec function $f$ such that
$$\forall x\;\;\; W_{f(x)}=W_x\cup\{d(x)\}.$$
To do this use
$$\forall x,y\;\; \psi_{f(x)}(y)=\rho(x,y)=\left\{
\begin{array}{ll}
\conv=0 & \mbox{ if } y\in W_x \rmor y=d(x) \\
\div    & \mbox{ otherwise } \\
\end{array}
\right.$$
Now we get a strictly increasing creativity function 
$\hat{d}$ recursively as follows:
Input $e$ put $e=e_0$ and effectively generate the sequence
$e_{s+1}$ where $W_{e_{s+1}}=W_{e_s}\cup\{d(e_s)\}$, i.e. put
$e_{s+1}=f(e_s)$. 

Search for the least $s$ such that either
\begin{enumerate}
\item $d(e_s)>\hat{d}(e-1)$ or
\item $d(e_s)=d(e_t)$ for some $t<s$.
\end{enumerate}
If the first happens put $\hat{d}(e)=d(e_s)$. If the second happens, then
we know it is not the case that $W_e\sq\comp(A)$, because
then $W_{e_s}$ are all subsets of $\comp(A)$ and the
$d(e_s)$ are all distinct.
So in this case we may put $\hat{d}(e)$ to anything we like:
e.g. put $\hat{d}(e)=\hat{d}(e-1)+1$.

This proves the Claim.
\qed 
Now we show that $K\leq_1 A$. Define a \prec function $\theta$ as
follows:
$$\psi_{f(n,x}(y)=\theta(n,x,y)=
\left\{
\begin{array}{ll}
\conv=0 & \mbox{ if } n\in K \rmand y=\hat{d}(x) \\
\div    & \mbox{ otherwise } \\
\end{array}
\right.$$
It follows that
$$W_{f(n,x)}=
\left\{
\begin{array}{ll}
\{\hat{d}(x)\} & \mbox{ if } n\in K \\
\emp    & \mbox{ otherwise } \\
\end{array}
\right.$$
By the uniform proof of the recursion theorem and by padding we get a
1-1 \rec sequence $n\mapsto e_n$ of fixed points so that 
$$\forall n \;\;
W_{f(n,e_n)}=W_{e_n}=
\left\{
\begin{array}{ll}
\{\hat{d}(e_n)\} & \mbox{ if } n\in K \\
\emp    & \mbox{ otherwise } \\
\end{array}
\right.$$
But then $n\in K$ iff $\hat{d}(e_n)\in A$. So $K\leq_1 A$.
\qed

Most naturally occurring non\rec \re sets are m-complete. 

\hmwk{11}{Wed 9-29} Prove or disprove:
there exists a creative set $A$ and 
a \rec function $q:\om\to\om$ such that for every $e$
$$W_e\cap A\mbox{ finite }\implies q(e)\notin W_e\cup A.$$

\exer Prove that a \re set A is creative iff there exists
a computable $f$ such that 
for every $e$
\begin{enumerate}
\item $W_e\cap A=\emp \implies f(e)\notin W_e\cup A$ and
\item $W_e\cap A\neq\emp \implies f(e)\in W_e\cap A$.
\end{enumerate}



\section{Simple sets}

\begin{define}
$A$ is simple iff $A$ is \re, $\comp(A)$ is infinite, and
$\comp(A)$ does not contain an infinite \re set.
\end{define}

\begin{theorem}\label{simple}
(Post) There exists a simple set.
\end{theorem}
\proof 
Define a \rec sequence $A_s\sq s$ of increasing finite sets as follows.
$A_0=\emp$.  At stage $s+1$ find the least $e<s$ (if any) such
that $W_{e,s}\cap A_s=\emp$ and $\exists x>2e\; x\in W_{e,s}$.
Put $A_{s+1}=A_s\cup\{x\}$ for the least $e$ and $x$ for which this
is true. If this happens we say that $e$ has acted at
stage $s+1$.  If there no such $e$, then put $A_{s+1}=A_s$.  

The set $A=\cup_s A_s$ is simple. Note that each $e$ can act at most
once.  Hence if $W_e$ is infinite and $W_e\cap A=\emp$, 
eventually there will come a stage $s$ where $\exists x>2e\; x\in W_{e,s}$
and all smaller $e$'s which will ever act have already 
acted at a previous stage.  But then $e$ will act, which is a contradiction.

Also we see that $\comp(A)$ is infinite because for all $e$
$|A\cap 2e|\leq e$ since the only $e^\pr$ which can put an $x$ into
$A$ with $x\leq 2e$ are those $e^\pr$ with $e^\pr<e$.   

\qed

\exer Are there always \rec Skolem functions?  Prove or disprove:
\par (a) Given a \rec $R\subseteq\omega^2$ such that
$\forall x\exists y \;R(x,y)$ there exists a \rec $f$
such that $\forall x\;R(x,f(x))$
\par (b) Given a \rec $R\subseteq\omega^3$ such that
$\forall x\exists y \forall z\;R(x,y,z)$ there exists a \rec $f$
such that $\forall x\forall z\;R(x,f(x),z)$
\par Hint: Think "Simple".

\hmwk{12}{Fri 10-1}
Suppose $A$ is a simple set and $A=\{a_n\st n\in\om\}$ is a 1-1
\rec enumeration of $A$.  Prove there exists infinitely many
$n$ such that $W_{a_n}=\{a_m\st m>n\}$.  (Hint: it is easier to 
show there exists $e\in A$ such that $W_e=\{e\}$.)

\begin{exercise}
\label{simplereduce} Show that 
\begin{enumerate}
\item[(a)] If $A\leq_1 B$ and $B$ is simple, then $A$ is simple
or $\comp(A)$ is finite.
\item[(b)] If $A$ and $B$ are simple, then $A \cup B$ is simple.
\item[(c)] If $A$ is simple, $b\in\comp(A)$, and
$B=A\cup\{b\}$, then $B<_1 A$ and if $B\leq_1 C\leq_1 A$ then
$C\equiv_1 B$ or $C\equiv_1 A$.
\end{enumerate}
\end{exercise}



\section{Oracles}

\begin{define}
$A\leq_T B$ or $A$ is Turing reducible to $B$.
Add to the UR-Basic programming language statements of the form:
$$\mbox{ Let } y=\chi_B(x)$$
for any variables $x,y$.  This programming language is
called Oracle UR-Basic.  Then $A\leq_T B$ iff there is 
an Oracle UR-Basic program with Oracle for $B$ 
which computes the characteristic function
$\chi_A$ of $A$.
\end{define}

\section{Dekker deficiency set}

\begin{prop}\label{dekker}
(Dekker Deficiency Set) For every \re set $A$ which is not \rec there
exists a simple set $B$ with $B\equiv_T A$.
\end{prop}
\proof
Let $\{a_n\st n\in \om\}$ be a 1-1 \rec enumeration of $A$.  Define
$$B=\{n\st \exists m>n\;\; a_m<a_n\}$$
It is easy to see that $B$ is \re 

$\comp(B)$ is infinite: Otherwise there would be an $N$ such that
$a_{n+1}>a_n$ for all $n>N$ and then $A$ would be \rec.

$A\leq_T B$: Input $x$. Find $n\in\comp(B)$ such that
$a_n>x$. Then $x\in A$ iff $x\in\{a_i:i<n\}$.

$\comp(B)$ does not contain an infinite \rec set: Suppose
$R\sq\comp(B)$ is an infinite \rec set.  But then the argument
we just gave for $A\leq_T B$ shows that $A\leq_T R$ which would
make $A$ \rec. 

$B\leq_T A$: Input $n$. Using an Oracle for $A$ check if 
$$\{a_i\st a_i<a_n\rmand i<n\}=A\cap\{x\st x<a_n\}$$
if they are equal, then $n\notin B$, otherwise $n\in B$. 
\qed


\hmwk{13}{Mon 10-4} (From Cooper)
Define $B\sq\om$ is intro-reducible iff $B\leq_T C$ for
every infinite $C\sq B$.  Prove that for every $A$ there exists
$B\equiv_T A$ intro-reducible.

\section{Turing degrees and jumps}

\begin{define}
For $A\sq\om$ define 
the Turing degree of $A$ to be $$a=deg(A)=\{B\st B\equiv_T A\}.$$
Let $\degrees=\{deg(A)\st A\sq\om\}$
be the Turing Degrees.  $(\degrees,\leq)$ is the partial order where
$a\leq b$ iff $A\leq_T B$. 
\end{define}

\begin{define}
For $\sig\in 2^{<\om}$ and $e,x,y,s\in\om$ we write
$$\{e\}^\sig_s(x)\conv=y$$
to mean that the $e^{th}$ oracle machine with input $x$ and
using $\sig$ to answer Oracle questions, converges in less than
$s$ steps and outputs $y$.  We also require that $e,x,y<s$ and that in
this computation the oracle is not asked about any $n$ such that
$n\notin dom(\sig)$
or $n\geq s$. 
\end{define}

\begin{prop}
The predicate $O(\sig,e,x,y,s)$ defined by
$$O(\sig,e,x,y,s) \rmiff \{e\}^\sig_s(x)\conv=y$$
is primitive recursive.
\end{prop}

\begin{define}
For $A\sq \om$ the jump of $A$ is defined by
$$\jump(A)=\{e: \exists s\;\; {e}^{A\res s}_s(e)\conv\}$$
\end{define}

\begin{prop} \label{jump}
(1) $A\leq_T B$ implies $\jump(A)\leq_1\jump(B)$.
\par (2) $A<_T\jump(A)$
\end{prop}
\proof
(1) Define 
$$\theta(e,x)=
\left\{
\begin{array}{ll}
\conv=0 & \mbox{ if } {e}^A(e)\conv \\
\div    & \mbox{ otherwise } \\
\end{array}
\right.$$
Then $\theta$ is \prec in $A$ and since $A\leq_T B$ we have that
$\theta$ is \prec in $B$.
By the 1-1-S-1-1 Theorem relativized
to $B$ there exists a 1-1 \rec function $f$ such that
$$\forall e,x\;\; \{f(e)\}^B(x)=\theta(e,x).$$
But then $e\in \jump(A)$ iff $\{e\}^A(e)\conv$ iff 
$\{f(e)\}^B(f(e))\conv$ iff $f(e)\in \jump(B)$.

(2) To see $A\leq_1 \jump(A)$ construct a 1-1 \rec function $f$
so that $\{f(n)\}^A(?)$ has the same computation on any input
and it converges iff $n\in A$.  Then $n\in A$ iff $f(n)\in\jump(A)$.
To see that $\jump(A)\not\leq_T A$, suppose that it is.
Define $f=1-\chi_{\jump(A)}$.  Then since $f\leq_T\jump(A)\leq_T A$ there
is an $e_0$ with $\{e_0\}^A=f$.  But then $e_0\in\jump(A)$ iff
$e_0\notin\jump(A)$. 
\qed

\begin{cor}
If $A\equiv_T B$, then $\jump(A)\equiv_T\jump(B)$. Hence,
letting $\jump(a)\in\degrees$ be the Turing degree of $\jump(A)$ is 
well-defined and $a<\jump(a)$ for every $a\in\degrees$.
\end{cor}

Similarly, $a^{\prime\prime}$ is the jump of the jump of $a$, and
$a^{(n)}$ is $n$ jumps of $a$.

\section{Kleene-Post: incomparable degrees}

\begin{define}
$a|b$ iff not $a\leq b$ and not $b\leq a$.  I.e. the degrees $a$ and
$b$ are Turing incomparable.
\end{define}

\begin{prop}
(Kleene-Post) There exists $a,b\in\degrees$ with $a|b$.
\end{prop}
\proof

Construct sequences $(\sig_s\in 2^{<\om}:s\in\om)$,
$(\tau_s\in 2^{<\om}:s\in\om)$
with the property that
$\sig_s\sq\sig_{s+1}$ and
$\tau_s\sq\tau_{s+1}$ for each $s$.  For $s=0$ take
$\tau_s$ and $\sig_s$ to be the empty sequence.

At stage $s+1$ we are given $\tau_s$ and $\sig_s$ and we do as follows:

\bigskip\noindent Case $s=2e$:

Let $n=|\tau_s|$.

Case a. There exists $\sig\supseteq \sig_s$ such that
$\{e\}^{\sig}(n)\conv$.  In this case put $\sig_{s+1}=\sig$ and
put $\tau_{s+1}=\tau_si$ where $i=0,1$ whichever is different
from $\{e\}^{\sig}(n)$.

Case b. No such $\sig$.  Put $\sig_{s+1}=\sig_s$ and
$\tau_{s+1}=\tau_s0$.

\bigskip\noindent Case $s=2e+1$:

Let $n=|\sig_s|$ and proceed similarly to $s=2e$ with the roles of
$\sig_s$ and $\tau_s$ reversed.

This ends the construction.  We put $A=\cup_{s\in\om}\sig_s$ and
$B=\cup_{s\in\om}\tau_s$.
\qed

It is easy to see that the entire construction is \rec in $\jump(o)$ and
hence there are incomparable Turing degrees beneath $\jump(o)$.

\begin{prop}
(Kleene-Post) For every $a\in\degrees\sm\{o\}$ there exists
$b\in\degrees$ with $a|b$.
\end{prop}
Let $deg(A)=a$. Construct $(\tau_s\in 2^{<\om}:s\in\om)$
as follows.  $\tau_0=\la\ra$.


At stage $s+1$ we are given
$\tau_s$.

\bigskip \noindent Case $s=2e$.  Let $n=|\tau_s|$. Take
$i=0$ or $i=1$ so that $i\neq \{e\}^A(n)$.  Put $\tau_{s+1}=\tau_si$.

\bigskip \noindent Case $s=2e+1$.

Case a. There exists $n<\om$, $\rho_1,
\rho_2$ with $\tau_s\sq \rho_i$ and
$$\{e\}^{\rho_1}(n)\conv\neq\{e\}^{\rho_2}(n)\conv$$
In this case we put $\tau_{s+1}=\rho_1$ or
$\tau_{s+1}=\rho_2$ which ever that case is that
$$\{e\}^{\tau_{s+1}}(n)\neq A(n).$$

Case b. There is no such $n$ and $\rho_i$.  Put
$\tau_{s+1}=\tau_s0$.

\bigskip This ends the construction.  Now we check that $B=\cup_s\tau_s$
is Turing incomparable to $A$.  The cases $2e$ easily
show that $B\not\leq_T A$.
Suppose $A\leq_T B$ and choose
$e$ so that $\{e\}^B=A$ and consider stage $s+1$ where
$s=2e+1$.  In case (a) we get that $\{e\}^B(n)\neq A(n)$ so that
it is impossible. Now
we show that case (b) cannot happen.  Define
$$f(n)=i \rmiff \exists \tau\supseteq\tau_s \{e\}^\tau(n)\conv=i$$
Note that $f$ is well-defined because we are in case (b) and
$f$ is total because we are assume that $\{e\}^B$ is the characteristic
function of $A$.  Hence $f$ which is \rec is the characteristic function
of $A$, which contradicts the assumption that $A$ is not \rec.
\qed


\hmwk{14}{Wed 10-6}
Prove that for every countable  ${\mathcal A}\sq\degrees \sm\{0\}$ there
exists $b\in\degrees$ such that $a|b$ for all $a\in{\mathcal A}$.

\section{The join}

\begin{define}
$A\join B=\{2n\st n\in A\}\cup \{2n+1\st n\in B\}$.
\end{define}

\prob Prove
\par (a) $A\leq_T A\oplus B$ and $B\leq_T A\oplus B$
\par (b) $A\oplus B\equiv_T B\oplus A$
\par (c) $(A\oplus B)\oplus C\equiv_T A\oplus (B\oplus C)$
\par (d) if $A\leq_T C$ and $B\leq_T C$, then $A\oplus B\leq_T C$
\par (e) if $A\leq_T \hat{A}$ and $B\leq_T \hat{B}$, then
$A\oplus B\leq_T \hat{A}\oplus \hat{B}$


\begin{define}
$a\vee b=deg(A\join B)$ is the join or least upper bound of $a$ and $b$.
\end{define}

\begin{exercise}\label{simplejoin}
Show that if $A$ and $B$ are simple, then $A\oplus B$
is simple.
\end{exercise}

\exer (Young) Suppose $A$ and $B$ are simple and are $\leq_1$ incomparable.
Prove that they have no join with respect to $\leq_1$.  That is, there
is no $C$ such 
\begin{enumerate}
\item $A\leq_1 C$ and $B\leq_1 C$ and
\item for all $D$ if $A\leq_1 D$ and $B\leq_1 D$, then $C\leq_1 D$.
\end{enumerate}
Note that $A\oplus B$ does not work and nothing else does either.
Hint: Use exercises \ref{simplejoin}, \ref{simplereduce}, and
\ref{reduceonto}.

\section{Meets}

Meets, $a\wedge b$, in the Turing degrees may or may not exist.

\begin{prop}
(Kleene-Post) There exists $a,b\in\degrees\sm\{o\}$ with $a\wedge b=0$
i.e., for all $c$ if $c\leq a$ and $c\leq b$ then $c=o$.
\end{prop}
\proof
As before construct sequences $(\sig_s\in 2^{<\om}:s\in\om)$,
$(\tau_s\in 2^{<\om}:s\in\om)$
with the property that
$\sig_s\sq\sig_{s+1}$ and
$\tau_s\sq\tau_{s+1}$ for each $s$.  For $s=0$ take
$\tau_s$ and $\sig_s$ to be the empty sequence.

At stage $s+1$ we are given $\tau_s$ and $\sig_s$ and we do as follows:

\bigskip\noindent Case $s=3e$. Let $n=|\sig_s|$.  Let $i=0$ or $i=1$ so that 
$\psi_e(n)\neq i$. Put $\sig_{s+1}=\sig_si$.

\bigskip\noindent  Case $s=3e+1$. Similar to $3e$ but for $\tau_{s+1}$.

\bigskip\noindent Case $s=3\pair(e_1,e_2)+2$.

Case a. There exists $n<\om$, $\sig\supseteq \sig_s$, and
$\tau\supseteq \tau_s$ such that
$$\{e_1\}^\sig(n)\conv\neq \{e_2\}^\tau(n)\conv$$
put $\sig_{s+1}=\sig$ and $\tau_{s+1}=\tau$.

Case b. Not case a. Put $\tau_{s+1}=\tau_s$ and $\sig_{s+1}=\sig_s$.

\bigskip
This ends the construction.  We put $A=\cup_s\sig_s$ and $B=\cup_s\tau_s$.
The stages $3e,3e+1$ guarantee that neither $A$ nor $B$ is \rec.
Now suppose that $C\leq_T A$ and $C\leq_T B$.  This will be witnessed by
a pair $e_1$ and $e_2$.  At stage $s=3\pair(e_1,e_2)+2$ it must have been
that Case a. failed since we assume that
$$\{e_1\}^A=\{e_2\}^B=C.$$
But then we may define a total \rec function $f$ by
$$f(n)=i \rmiff \exists \sig\supseteq\sig_s\;\; \{e_1\}^\sig(n)\conv=i$$
and $f$ must be the characteristic function of $C$ and hence $C$ is
\rec.
\qed

\begin{prop}
(Kleene-Post) For every $c\in\degrees$ there exists $a,b\in\degrees$
with $a\wedge b=c$ and $a|b$,
i.e., $a>c$, $b>c$, and for all $d$
if $d\leq a$ and $d\leq b$ then $d\leq c$.
\end{prop}
\proof
This is a relativization of the above argument.  Construct $A_0$ and
$B_0$ so that for every $e$
$$\{e\}^C\neq A_0\join C  \rmand \{e\}^C\neq B_0\join C$$
and
$$\{e_1\}^{A_0\join C}= \{e_2\}^{B_0\join C}=D \implies D\leq_T C$$
Then take $A=A_0\join C$ and $B=B_0\join C$.
\qed

\prob Find a minimal triple, i.e., $a,b,c\in\degrees\sm\{0\}$ such that
$$\forall d\;\; (d\leq a\rmand d\leq b\rmand d\leq c)\to d=0$$
but no 2 are a minimal pair.
\par Hint: Construct $X,Y,Z$ non \rec so that
$$(\{e_0\}^{X\oplus Y}=\{e_1\}^{Y\oplus Z}=\{e_2\}^{X\oplus Z}=D)
\to D \leq_T 0.$$


\prob Prove:
\par (a) There exists $A\su\om$ such that 
$A_n\not\leq_T\hat{A}_n$ for every $n$
where 
$$A_n=\{x:\la n,x\ra\in A\} \rmand 
\hat{A}_n=\{\la m,x\ra : m\neq n \rmand \la m,x\ra\in A\}.$$
\par (b) There exists Turing degrees $a_r$ for $r\in {\mathbf Q}$
such that for all $r,s\in {\mathbf Q}\;\;$
($r<s$ iff $a_r < a_s$).   Hint: use part (a).
\par (c)* Same as part (b) but also $a_r<0'$ for all $r$.

\hmwk{15}{Fri 10-8}
Prove that for every $b\in\degrees$ with $b>o$ there exists $a\in\degrees$ 
with $a>o$ and $a\wedge b=0$.

\exer Prove that for every $c\in\degrees$ with $c\geq o^\pr$
that there exists incomparable degrees $a$ and $b$ with
$a\wedge b=0$, and $a\vee b = c$.

Hint: one way to code a set
$C$ into $A\join B$ is to use boot-strapping.  Define 
$$x_{2n}=\mu x>x_{2n-1}\; A(x)=1$$
$$x_{2n+1}=\mu x>x_{2n}\; B(x)=1$$
$$n\in C \rmiff x_n \mbox{ is even. }$$

\section{Spector: exact pairs}

\begin{prop}(Spector) \label{exactpair}
Given $(a_n\st n<\om)$ in $\degrees$ with
$a_n<a_{n+1}$ for all $n$ there exists $b,c\in\degrees$ with
\par (1) $a_n\leq b$ and $a_n\leq c$ for all $n$ and
\par (2) for all $d\in\degrees$ if $d\leq b$ and $d\leq c$ then
there exists $n$ with $d\leq a_n$.
\end{prop}
\proof
Let $deg(A_n)=a_n$ and set $A=\{\pair(n,x)\st n<\om, x\in A_n\}$.
The key to this construction is to make $B$ and $C$ have the property
that for each $n$
$$B_n=^*A_n=^*C_n$$
where $B_n=\{x\st \pair(n,x)\in B\}$ and $C_n=\{x\st \pair(n,x)\in C\}$.
The symbol $X=^*Y$ means ``equal except for a finite set''.

As before construct sequences $(\sig_s\in 2^{<\om}:s\in\om)$,
$(\tau_s\in 2^{<\om}:s\in\om)$ with the property that $\sig_s\sq\sig_{s+1}$
and $\tau_s\sq\tau_{s+1}$ for each $s$.  For $s=0$ take $\tau_s$ and
$\sig_s$ to be the empty sequence.

At stage $s+1$ we will extend $\sig_s$ and $\tau_s$ so as to agree with
$A_i$ for $i<s$ on new elements of their domain.  Define
$$f_s=\sig_s\cup\{\la\la i,x\ra, j\ra\st \la i,x\ra\notin dom(\sig_s),\;\;
i<s, \rmand A_i(x)=j\}$$
$$g_s=\tau_s\cup\{\la\la i,x\ra, j\ra\st \la i,x\ra\notin dom(\tau_s),\;\;
i<s, \rmand A_i(x)=j\}$$
Note that $f_s$ is a partial function extending $\sig_s$ which agrees
with the characteristic function of each $A_i$ for $i<s$ except possible
on the (finite) domain of $\sig_s$.  Similarly $g_s$.

Let $s=\pair(e_1,e_2)$.

\bigskip\noindent Case a. There exists $n<\om$, $\sig\supseteq \sig_s$
and $\tau\supseteq \tau_s$ such that $f_s\cup\sig$ is a function
(i.e., they are compatible - see
Figure \ref{exactfig}) and $g_s\cup\tau$ is a function and
$$\{e_1\}^\sig(n)\conv\neq \{e_2\}^\tau(n)\conv.$$
Put $\sig_{s+1}=\sig$ and $\tau_{s+1}=\tau$.

\def\text#1{\makebox(0,0)[cc]{#1}}
\unitlength=1.20mm
\begin{figure}
\begin{picture}(60,50)
\put(10,10){\vector(0,1){40}}
\put(10,10){\vector(1,0){50}}
\put(30,30){\line(0,1){20}}
\put(30,07){{\text{$s$}}}

\put(10,20){\line(1,0){25}}
\put(40,15){\line(0,-1){5}}
\put(35,15){\oval(10,10)[tr]}

\put(10,30){\line(1,0){35}}
\put(50,25){\line(0,-1){15}}
\put(45,25){\oval(10,10)[tr]}

\put(30,15){{\text{$dom(\si_s)$}}}
\put(40,25){{\text{$dom(\si)$}}}

\put(12,22){\line(0,1){6}}
\put(14,22){\line(0,1){6}}
\put(16,22){\line(0,1){6}}
\put(18,22){\line(0,1){6}}
\put(20,22){\line(0,1){6}}
\put(22,22){\line(0,1){6}}
\put(24,22){\line(0,1){6}}
\put(26,22){\line(0,1){6}}
\put(28,22){\line(0,1){6}}
\put(30,22){\line(0,1){6}}

\end{picture}
\caption{$\si$ must agree with $A$ on the shaded region.
\label{exactfig}}
\end{figure}



\bigskip\noindent Case b. Not Case a.  Put $\sig_{s+1}=\sig_s$ and
$\tau_{s+1}=\tau_s$.

\bigskip This completes the construction, so put $B=\cup_s \sig_s$ and
$C=\cup_s \tau_s$.

\bigskip
Claim. For all $n$ we have that $A_n\leq_T B$ and $A_n\leq_T C$.
To see this note that in the construction that
for all $s>n$ that $f_s(\pair(n,m))=f_{n+1}(\pair(n,m))$.  Furthermore,
except for the finitely many element of the domain of $\si_{n+1}$
we have that $A_n(m)=f_{n+1}(\pair(n,m))$.  It follows
that $A_n=^*B_n$ and so $A_n\leq_T B_n\leq_T B$.  Similarly for
$C$.

\bigskip
Claim.  Suppose that $D\leq_T B$ and $D\leq_T C$.  Then
$D\leq_T A_n$ for some $n<\om$.   To see this suppose that
$$\{e_1\}^B=\{e_2\}^C=D$$
and $s=\pair(e_1,e_2)$.  Since the characteristic functions of
$B$ and $C$ extend $\sig_{s+1}$ and $\tau_{s+1}$ respectively
it is evident that
Case (a) could not have occurred.   So we assume Case (b).
Note that in this case it is impossible that there exists
$n,\rho_1,\rho_2$ with $\sig_s\sq \rho_1$ and $\sig_s\sq\rho_2$,
and each of $\rho_1$ and $\rho_2$ compatible with $f_s$ such that
$$\{e_1\}^{\rho_1}(n)\conv\neq \{e_1\}^{\rho_2}(n)\conv.$$
This is because $\{e_2\}^C(n)\conv$ and so then we would be in Case (a).

It follows easily as before that $D=\{e_1\}^B\leq_T f_s$.  But
$$f_s\leq_T A_0\join A_1\join\cdot\join A_{s-1}\leq_t A_{s-1}$$
so $D\leq_T A_{s-1}$.
\qed

\exer Suppose $a,b\in\degrees$ and $a\wedge b$ does not exist. Prove
there exists $(c_n\in\degrees:n<\om)$ such that
\begin{enumerate}
\item $c_n\leq a$ and $c_n\leq b$ for all $n$,
\item  $c_n<c_{n+1}$ for all $n$, and
\item for all $d\in\degrees $ if $d\leq a$ and $d\leq b$, then
$d\leq c_n$ for some $n$.
\end{enumerate}

\section{Friedberg: jump inversion}

\begin{prop}
(Friedberg Jump Inversion) For every $a\in\degrees$ if $a\geq \jump(o)$
then there exists $b\in\degrees$ with $\jump(b)=a$.
\end{prop}
\proof
We construct sequence $(\tau_s:s\in\om)$
\rec in $A\join\jump(0)\equiv_T A$ as follows.

At stage $s+1$ we are given $\tau_s\in 2^{<\om}$ 

(a) We put
$\tau=\tau_si$ where $i=A(s)$. 

(b) Let $e=s$. 
We ask $\jump(0)$ if there exists $\si\supseteq \tau$
such that
$$\{e\}^\si_{|\si|}(e)\conv$$ 
If there is such a $\si$ then we effectively find one
and put $\tau_{s+1}=\si$.

More precisely, before the
construction begins find a \rec function $f(e,\tau)$ such that
\begin{enumerate}
\item  for any $e,\tau$ 
$$\psi_{f(e,\tau)}(0)\conv\rmiff \exists  \si\supseteq \tau\;\;
 \{e\}_{|\si|}^\si(e)\conv$$
\item when $\psi_{f(e,\tau)}(0)$ converges it outputs such a $\si$
and
\item the algorithm $\psi_{f(e,\tau)}(?)$ ignores its input.
\end{enumerate}
We put $\tau_{s+1}=\tau$ if $f(e,\tau)\notin \jump(0)$,
otherwise we put $\tau_{s+1}=\si=^{def}\psi_{f(e,\tau)}(0)$.

This ends the construction.
We let $B=\cup_{s\in\om}\tau_s$.

\bigskip\noindent {\bf Claim.} 
\begin{enumerate}
\item $(\tau_s:s\in\om)\leq_T A\join\jump(0)\leq_T A$
\item $A\leq_T(\tau_s:s\in\om)$
\item $(\tau_s:s\in\om)\leq_T B\join\jump(0)$
\item $\jump(B)\leq_T(\tau_s:s\in\om)$
\end{enumerate}
\proof

(1) The construction only requires oracles for
$\jump(0)$ and $A$.   Also $A\geq_T\jump(0)$.

(2)  We encoded the characteristic function of $A$ at step (a).  Hence 
  $$s\in A \rmiff \tau_{s+1}(|\tau_s|)=1.$$

(3)  Recursively construct the sequence $(\tau_s:s\in\om)$
using oracles for $\jump(0)$ and $B$.  
Given $\tau_s$ we use that $\tau_{s+1}\sq B$ to figure
out the first digit, i.e., $\tau$ of step (a).  
To do step (b) we only used 
$\jump(0)$ and the \rec function $f$.  

(4)  By our construction given any $e$ let $s=e$, then we have that
$$e\in\jump(B)\rmiff \{e\}^B(e) \conv\rmiff 
\{e\}^{\tau_{s+1}}_{|\tau_{s+1}|}(e)\conv$$

This proves the Claim.  But note that the Claim implies
$$\jump(B)\leq_T (\tau_s:s\in\om)\leq_T A\leq_T (\tau_s:s\in\om)
\leq_TB\join\jump(0)\leq_T\jump(B)$$

\qed

\hmwk{16}{Mon 10-11}
Prove that $\forall a\in\degrees\;\;a\geq \jump(o)\implies
\exists b,c\in\degrees\;\;
b|c$ and $\jump(b)=a=\jump(c)$.


\section{Spector: minimal degree}

\begin{theorem}
(Clifford Spector) There exists a minimal Turing degree, i.e.,
$\exists a\in\degrees$ with $o<a$ but no $b\in\degrees$ with $o<b<a$.
\end{theorem}
\proof
For any $\si\in 2^n$, i.e., a finite sequence of zeros and ones, we
can code $\si$ by the number
$$x=2^n+\sum\{2^{i}\st i<n \rmand \si(i)=1\}.$$
The extra $2^n$ is there to distinguish sequences ending
in zeros from each other.  We suppress this coding and just talk
about \rec subsets of $2^{<\om}$.
\begin{define}
$T\sq 2^{<\om}$ is a perfect tree iff
\begin{enumerate}
\item $T$ is nonempty,
\item $\si\sq\tau\in T$ implies $\si\in T$, and
\item $\forall \si\in T\;\;\exists \tau_0,\tau_1\in T$ with
$\si\sq\tau_0$,  $\si\sq\tau_1$, and $\tau_0$ and $\tau_1$
are incomparable.
\end{enumerate}
\end{define} 

\begin{define}
For $T\sq 2^{<\om}$ a tree we define:
\begin{enumerate}
\item $\si\in T$ splits iff $\si0,\si1\in T$
\item $\si=stem(T)$ iff $\si$ splits but no shorter
node of $T$ splits
\item  $[T]=\{x\in 2^\om \st \forall n\;\; x\res n \in T\}$
\item  for $\si\in T$ let
$$T(\si)=\{\tau\in T\st \tau\sq\si\rmor\si\sq\tau\}$$
\end{enumerate}
\end{define}

To prove the Theorem construct a sequence $(T_s\st s\in\om)$ of
\rec perfect trees as follows.  

\bigskip
At stage $s=0$ take $T_0=2^{<\om}$.  

\bigskip
At stage $s+1$ where $s=2e$ let $\si=stem(T_s)$
and $n=|\si|$.  If
$\psi_e(n)\conv=0$ then put $T_{s+1}=T_s(\si 1)$ otherwise
put $T_{s+1}=T_s(\si 0)$.

\bigskip
At stage $s+1$ where $s=2e+1$ we obtain $T_{s+1}\sq T_s$
a perfect \rec subtree as follows. We first ask the
question:

\begin{quote}
Does there exist $\si\in T_s$ such that for all 
$\si_1,\si_2\in T(\si)$ and $n,m_1,m_2<\om$ if 
$\{e\}^{\si_1}(n)\conv=m_1$ and
$\{e\}^{\si_2}(n)\conv=m_2$, then $m_1=m_2$?
\end{quote}

\par Case (a) If the answer is yes, we take $T_{s+1}=T_s(\si)$
for any such $\si$. 

\par Case (b) If the answer is no, we construct \rec sequences

$(\si_\rho\in T : \rho\in 2^{<\om})$ and 
$(n_\rho\in\om : \rho\in 2^{<\om})$

\noindent such that 
\begin{enumerate}
\item $\{e\}^{\si_{\rho0}}(n_\rho)\conv\neq 
\{e\}^{\si_{\rho1}}(n_\rho)\conv$ and
\item $\si_\rho\sq \si_{\rho 0}$ and $\si_\rho\sq \si_{\rho 1}$.
\end{enumerate} 
Note that (1) implies that $\si_{\rho0}$ is incomparable
to $\si_{\rho1}$.  We put
$$T_{s+1}=\{\si \st \exists \rho\in 2^{<\om}\;\;\si\sq\si_\rho\}$$
then $T_{s+1}$ is a \rec perfect subtree of $T_s$.

This ends the construction of the sequence of trees.
Note that $T_{s+1}\sq T_s$.
Take $A$ to be the subset of $\om$ whose characteristic
function is the unique element of $\cap_{s\in\om}[T_s]$.
It is easy to see that stage $2e+1$ guarantees that $A$ is
not \rec, so it is enough to see stage $2e+2$ guarantees 
that if $B=\{e\}^A$ then either $B$ is \rec or $A\leq_T B$.

\bigskip
Case (a) for all $\si_1,\si_2\in T_{s+1}$ and $n,m_1,m_2<\om$ if 
$\{e\}^{\si_1}(n)\conv=m_1$ and
$\{e\}^{\si_2}(n)\conv=m_2$, then $m_1=m_2$.
In this case $B$ is \rec, since $A\in[T_{s+1}]$ and $B=\{e\}^A$
means that all we have to do to compute $B(n)$ is to
search the \rec tree $T_{s+1}$ for any $\si$ for
which $\{e\}^\si(n)\conv$ and then $B(n)=\{e\}^\si(n)$.

\bigskip
Case (b) In this case we show that $A\leq_T B$.  We know
$A\in [T_{s+1}]$. Suppose
we know that $\si_{\rho}\sq A$.  To decide whether
$\si_{\rho0}\sq A$ or $\si_{\rho1}\sq A$,  we 
compute both of
$$\{e\}^{\si_{\rho0}}(n_\rho)\rmand \{e\}^{\si_{\rho1}}(n_\rho).$$
Since these two computations are guaranteed to converge and to
different values at most one of them can agree with $B(n_\rho)$.
One of them must agree and so using an oracle for
$B$ we can determine the unique $i=0,1$ so
that $\si_{\rho i}\sq A$. 
\qed

\hmwk{17}{Fri 10-15}
Prove that there are uncountably many minimal degrees.

\exer Prove there exists a perfect tree $T\su 2^{<\om}$ such that
for every $n$ and distinct $y,x_1,x_2,\ldots,x_n\in [T]$
$$y\not\leq_T x_1\oplus x_2\oplus \cdots \oplus x_n.$$

\section{Sacks: minimal upper bounds}

\begin{theorem}
(Sacks) Minimal upper bounds exists. Given 
any sequence of degrees $(a_n\in\degrees\st n<\om)$ such 
that 
$a_n<a_{n+1}$ for all $n$ there exists $b\in\degrees$ with
$a_n<b$ all $n$ but there is no $c\in\degrees$ with
$a_n<c<b$ for all $n$.
\end{theorem}
\proof
Here we use the notion of a \recly-pointed tree.  

\begin{define}
$T\sq 2^{<\om}$ is \recly-pointed iff $T$ is a perfect tree and
$T\leq_T A$ for every $A\in [T]$.
\end{define}

The new ingredient required in this construction is 

\bigskip\noindent {\bf Claim.} Suppose $T\sq 2^{<\om}$ is
\recly-pointed tree and $T\leq_T B$. Then there exists
$T^*\sq T$ a \recly-pointed tree such that $T^*\equiv_T B.$
\proof
There exists a natural bijection $f:2^{<\om}\to Split(T)$ where
$Split(T)$ are the splitting nodes of $T$.  Note that $f$
and $T$ are Turing equivalent.  Given $B\in 2^\om$ let
$$T_B=\{\si\in 2^{<\om}\st \si(2n)=B(n) \mbox{ whenever }
2n<|\si|\}.$$
Now take $T^*$ to be the tree generated by $f(T_B)$.
\qed

Construct $(T_s:s\in\om)$ a sequence of \recly-pointed trees as
follows.

Suppose $T_s\equiv_T A_s$ and $e=s$.  
Relativizing Spector's proof above
to $T_s$ we can obtain $T^\circ\sq T_s$ with $T^\circ\leq_T T_s$ a
perfect subtree so that for every $B\in [T^\circ]$:
$\;\;\;\;$ if $C=\{e\}^B$ then either $B\leq_T (C\join T^\circ)$ or
$C\leq_T T^\circ$. 

Note that $T^\circ$ is \recly-pointed and
$T^\circ\leq_T A_s$.  Hence by applying the Claim
above we can obtain $T_{s+1}\sq T^\circ$ such that
$T_{s+1}$ is \recly-pointed and $T_{s+1}\equiv_T A_{s+1}$. 

This ends the construction.  
We let $B$ be the unique element of $\cap_{s\in\om}[T_s]$.

\bigskip
First note that $A_s\leq_T B$ for each $s$,
because $B\in [T_s]$, $T_s$ is \recly-pointed and
so $A_s\equiv_T T_s\leq_T B$.
 

Suppose that $A_s\leq_T C\leq_T B$ for every $s\in\om$.  
Then at some stage $s=e$ we have that 
$C=\{e\}^B$.  Hence by construction either $C\leq_T T^\circ\leq_T A_s$
or $B\leq_T (C\join T^\circ)$.  The first is impossible
since $A_s<_T A_{s+1}\leq_T C$ and so it must be that
$B\leq_T (C\join T^\circ)$. But $T^\circ\leq_T A_s\leq_T C$
so $B\leq_T C$.
\qed

\hmwk{18}{Mon 10-18}
(a) Prove there exists $a,b\in\degrees$ with $o<a<b$ and not
there exists $c$ with either $o<c<a$ or $a<c<b$. 
\par
(b) (Extra Credit) Prove there exists $a,b\in\degrees$ with $o<a<b$ and
($c\leq b \rmiff c=0\rmor c=a\rmor c=b$), for all $c\in\degrees$.

\exer  Show that the degree of 
$$0^{(\omega)}=\{\la n,x\ra: x\in 0^{(n)}\}$$ 
is not a minimal upper bound of the degrees of
$\{0^{(n)}:n\in\omega\}$.  
\par\noindent Hint: in Theorem \ref{exactpair} 
get $B,C$ computable in $0^{(\omega)}$.
\par Show there is $A\su\om$ such that for all $n$
$$0^{(n)}\leq_T A <_T\jump(A)\leq_T 0^{(\omega)}.$$

\section{Friedberg-Muchnik Theorem}

\begin{define}
The use of an oracle computation $\{e\}^A(x)$ written
 $$use(\{e\}^A(x))$$ 
is $n+1$ where $n$ is the maximum number
for which the oracle for $A$ is queried.  
\end{define}

Note that if $u=use(\{e\}^A(x))$ and $B\cap u = A\cap u$ then
$\{e\}^A(x)$ and $\{e\}^B(x)$ are the same computation.

\begin{theorem}\label{fm}
(Friedberg-Muchnik) There exists \re sets $A_0$ and $A_1$ such
that $A_0\not\leq_T A_1$ and $A_1\not\leq_T A_0$.
\end{theorem}
\proof
Our requirements are:

$R_{2e+i}\;\;\;\;\;\; \{e\}^{A_i}\neq A_{1-i}$

\noindent for each $e\in\om$ and $i=0,1$.  

The strategy for meeting
this requirement is to attach a follower $x\in\om$ to
$R_{2e+i}$ and then wait until 
$\{e\}^{A_{i,s}}_s(x)\conv=0$.  When this happens we put 
$x$ into $A_{1-i}$ and try to avoid injuring the computation
$\{e\}^{A_{i,s}}_s(x)$.  If we succeed then $\{e\}^{A_i}(x)=0\neq 1=A_{1-i}(x)$.
If we wait forever, then $x$ is never put into $A_{1-i}$ and
so $A_{1-i}(x)=0\neq \{e\}^{A_i}(x)$.
In either case the requirement
$R_{2e+i}$ is met.  There are two possible successful outcomes for this
strategy, either we wait forever or we act at some
stage and then preserved the relevant computation. 


\begin{center}
Construction
\end{center}

Everything in the construction will be done effectively.

At each stage $s$ of the construction we will 
have effectively constructed:
\begin{enumerate}
\item finite sets $A_{i,s}$ for $i=0,1$, 
\item a follower $x=x_{q,s}$ for each $R_q$ with $q<s$, and
\item a function $f_s$ with domain $s$ which
is attempting to predicate the final outcomes of our strategy for
each $R_q$ with $q<s$.
\end{enumerate}

At stage $s=0$ put $A_{i,0}=\emp$ for $i=0,1$. Nobody has
followers and $f_s$ is the empty function.

At stage $s+1$  
look for the least $q=2e+i<s$ such that
\begin{enumerate}
\item $f_s(q)=$`waiting' and
\item  $\{e\}^{A_{i,s}}_s(x)\conv =0$ with use less than $s$
where $x=x_{q,s}$ is the follower of $R_{2e+i}$.
\end{enumerate}
If we find such a $q$ then we take the following actions:
\begin{enumerate}
\item Put $x$ into $A_{1-i}$, i.e., 
$$A_{1-i,s+1}=A_{1-i,s}\cup\{x\}$$
\item Set $f_{s+1}(q)=$`acted'.
\item Reappoint followers for lower priority requirements, i.e.
for each $q^\pr>q$ with $q^\pr<s+1$ put 
$x=\pair(q^\pr,s+1)$ to be the follower of $R_{q^\pr}$.
\item Make all lower priority requirements start over, i.e.,
for each $q^\pr>q$ put $f_{s+1}(q^\pr)=$`waiting'.
\end{enumerate}
We say that $R_q$ acted at stage $s+1$.  If there is no such $q$
then we just continue to wait.  In either case assign
$x=(s,s+1)$ to be the follower of $R_s$
and put $f_{s+1}(s)=$`waiting'.  

This ends the stage and the construction. 

Note that the sequence 
$$(A_{s,0},A_{s,1},f_s,x_{q,s}\st s\in\om,\;q<s)$$
is \rec.  

We put $A_i=\cup_{s\in\om}A_{i,s}$.  These are
\re sets since $A_{i,s}\sq A_{i,s+1}$.

\begin{center}
Verification
\end{center}

\bigskip
\noindent {\bf Claim.} For each $q$
\begin{enumerate}
\item $R_q$ acquires a permanent follower, i.e., there exist
some stage $s_0$ such that for all $s>s_0$ the follower of
$R_q$ at stage $s$ is that same as at stage $s_0$.
\item $R_q$ is met, i.e, $\{e\}^{A_i}\neq A_{1-i}$
\item $R_q$ acts at most finitely many times.
\end{enumerate}
\proof
This is the main claim and it is proved by induction on $q$.

So suppose that (3) is true for all $q^\pr<q$.  Then there
is a stage $s_0$ such that some $q^\pr<q$ acted and 
no such $q^\pr<q$ acts after stage $s_0$.  Then
the follower $x_q$ of $R_q$ appointed at stage $s_0$ is the permanent
follower of $R_q$.  Furthermore $f_{s_0}(q)=$`waiting'. 


Suppose $q=2e+i$. After stage $s_0$ there are two possibilities:

\noindent (a) for some $s>s_0$ we have that 
$\{e\}^{A_{i,s}}_s(x_q)\conv =0$ with use less than $s$ or

\noindent (b) not (a).

\bigskip
Suppose (a).  In this case since no higher priority $q^\pr$ acts
after stage $s_0$ then $R_q$ will act.  Hence 
$x_q$ is put into $A_{1-i}$.  Furthermore all other followers
of lower priority requirements appointed now or at future
stages will be larger than the use of the computation
$\{e\}^{A_{i,s}}_s(x_q)$ (we assume that $s\leq \pair(q^\pr,s)$).
Hence 
$$\{e\}^{A_{i}}(x_q)\conv=0\neq 1=A_{1-i}(x_q)$$

Suppose (b).  In this case it must be that
either 
$$\{e\}^{A_{i}}(x_q)\div \rmor \{e\}^{A_{i}}(x_q)\conv\neq 0.$$
In either case $x_q$ is never put into $A_{1-i}$ - this
is because the possible followers of two distinct requirements
are disjoint and no follower is used again for the same
requirement.  
So $A_{1-i}(x_q)=0\neq \{e\}^{A_{i}}(x_q)$ and thus $R_q$ is
met.

So as we see $R_q$ will act at most one more time after stage
$s_0$ and so it acts only finitely many times.
This proves the Claim and the Theorem.
\qed

We say that $R_q$ is injured when it is made to appoint new followers and start
over.  Hence, the terminology `finite injury priority argument'.

\begin{cor}
There exists a set $A$ which is \re and $0<_T A<_T \jump(0)$.
\end{cor}
\proof
Since $0$ and $\jump(0)$ are $\leq_T$ comparable to every
\re set it must be that both $A_i$ from the Friedberg-Muchnik
Theorem are strictly in between.
\qed

\exer (Trachtenbrock) % Soare p.121 2.5
\par Define $A$ is auto-reducible iff there exists $e$ such that
for all $x$,
$$\{e\}^{A\setminus\{x\}}(x)\downarrow=A(x).$$
Prove
\par (a) For all $B$ there exists  $A\equiv_m B$ such that $A$ is auto-reducible.
\par (b) There exist \anre $A$ which is not auto-reducible.
\par (c) There exist a low \re $A$ which is not auto-reducible.
\par (d)* There exist a \re $A\equiv_T K$ which is not auto-reducible?


\section{Embedding in the \re degrees}

\bigskip
We define
$$A_n=\{x\st \pair(n,x)\in A\}$$
and
$$\join_{k\neq n}A_k=\{\pair(k,x)\in A\st k<\om\rmand k\neq n\}.$$

\begin{theorem}
There exists \anre set $A$ such that for every $n$ 
$$A_n\not\leq_T \join_{k\neq n}A_k$$
\end{theorem}
\proof
This is a minor modification of the Friedberg-Muchnic argument
(Theorem \ref{fm}).

Our requirements are:

$R_{\pair(e,n)}\;\;\;\;\;\; \{e\}^{\join_{k\neq n}A_k}\neq A_{n}$

for $e,n\in\om$.  And the construction is nearly the same:

At stage $s+1$  
look for the least $q=\pair(e,n)<s$ such that
\begin{enumerate}
\item $f_s(q)=$`waiting' and
\item  $\{e\}^{\join_{k\neq n}A_{k,s}}_s(x)\conv=0$
with use less than $s$ where $x=x_{q,s}$ is the follower of $R_q$.
\end{enumerate}
If we find such a $q$ then we take the following actions:
\begin{enumerate}
\item Put  
$$A_{s+1}=A_{s}\cup\{\pair(n,x)\}$$
\item Set $f_{s+1}(q)=$`acted'.
\item Reappoint followers for lower priority requirements, i.e.
for each $q^\pr>q$ with $q^\pr<s+1$ put 
$x=\pair(q^\pr,s+1)$ to be the follower of $R_{q^\pr}$.
\item Restart lower priority requirements, 
for each $q^\pr>q$ put 
$$f_{s+1}(q^\pr)=\mbox{`waiting'}.$$
\end{enumerate}
Finally, assign
$x=(s,s+1)$ to be the follower of $R_s$
and $f_{s+1}(s)=$`waiting'.  

The verification is virtually the same as in the Friedberg-Muchnic 
Theorem.
\qed

\begin{cor}
Every \rec partially ordered set embeds into the \re degrees $\redegrees$.
\end{cor}
\proof
Let $\poset=(\om,\unlhd)$ be a partial order with $\unlhd$ a \rec
binary relation on $\om$.
Define $J(p)=\{\pair(q,x)\in A \st q\unlhd p\}$ and
let $j(p)=deg(J(p))$.  Then 
$$j:\poset\to \redegrees$$
is an order preserving embedding.
\qed 


\hmwk{20}{Mon 10-25}
Prove there exists a \rec partial order $\poset_0=(\om,\leq_0)$ 
such that every countable partial order 
$\poset_1$ can be embedded into it, i.e., there exists a 1-1 mapping
$j:\poset_1\to\poset_0$ such that
$p\leq_1 q$ iff $j(p)\leq_0 j(q)$.

Hint: Construct $\poset_0$ so that for every pair of finite
posets $\poset_1\su \poset_2$ and embedding $j_1:\poset_1\to\poset_0$
there is an embedding $j_2:\poset_2\to\poset_0$ with $j_1\su j_2$.


\bigskip

It follows from this exercise that every countable partial order embeds
into the \re degrees. 

\hmwk{21}{Wed 10-27}
Prove that for every creative set $A$ there exist a set $B$ which is
\re and disjoint from $A$ but cannot be separated from it by a \rec set.
Prove that there exists disjoint \re sets $A_0$ and
$A_1$ which are \recly inseparable but not creative.
Hint: Construct $A_0$ and $A_1$ as in Theorem \ref{fm}
with the additional requirements:
$$ R_e\;\;\;\; \psi_e = D \rightarrow 
 D \mbox{ does not separate } A_0 \rmand A_1$$

\section{Limit Lemma and Ramsey Theory}

\begin{lemma}\label{limitlemma}
(The Limit Lemma) Suppose $g\in\om^\om$, then 

\noindent $g\leq_T \jump(0)$ 

iff 

\noindent there exists $f:\om\times\om\to\om$
\rec such that for all $n$
$$\lim_{s\to\infty}f(n,s)=g(n).$$
\end{lemma}
\proof
Suppose $g=\{e\}^{\jump(0)}$. 
Let $(\jump(0)_s\st s\in\om)$ be a \rec enumeration
of $\jump(0)$, e.g., $\jump(0)_s=\{e<s\st \{e\}_s(e)\conv\}$. 
Define
$$f(n,s)=\left\{
\begin{array}{ll}
1 & \mbox{ if } \{e\}^{\jump(0)_s}_s(n)\conv \\
0 & \mbox{ otherwise}
\end{array}\right.$$
Then $g(n)=\lim_{s\to\infty}f(n,s)$. 

For the converse, suppose that $g(n)=\lim_{s\to\infty}f(n,s)$
where $f$ is \rec.  For each $n$ using an oracle for $\jump(0)$ we
can compute $s_0$ so that for every $s>s_0$ we have that
$f(n,s)=f(n,s_0)$. 

(Try $s_0=0$ and ask the oracle if the
computation that searches for a change in $f$ ever terminates.
If yes, try $s_0=1$, etc.  Continue incrementing $s_0$ until
the oracle says that beyond this stage $f$ does not change.)

It follows that $g(n)=f(n,s_0)$.  
Hence there is an
algorithm with oracle $\jump(0)$ which computes $g$.
\qed

\begin{define}
$[X]^n=\{s\sq X\st |X|=n\}$
\end{define}

Ramsey Theorem says that for every $n,k<\om$ and $f:[\om]^n\to k$ there
is $H\in [\om]^\om$ such that $f\res [H]^n$ is constant.  This $H$ is
called homogeneous for $f$.

\begin{example}
(Jockusch, Spector) There is a \rec $f:[\om]^3\to 2$ such that
$\jump(0)\leq_T H$ for every
infinite $H$ which is homogeneous for $f$.
\end{example}
\proof
Define
$$f(\{e_0<s_1<s_2\})=\left\{
\begin{array}{ll}
0 & \mbox{if } \forall e<e_0 \;\; (\{e\}_{s_1}^{\jump(0)_{s_1}}\downarrow 
\rmiff  \{e\}_{s_2}^{\jump(0)_{s_2}}\downarrow)\\
1 & \mbox{otherwise.}\\
\end{array}\right.$$
If $H$ is an infinite homogeneous set for $f$, then $f$ must map
$[H]^3$ to $1$ since every infinite set $H$ contains a triple which $f$
maps to $1$.
\qed

\begin{example}
(Jockusch) There is a \rec $f:[\om]^2\to 2$ such that
there does not exist an infinite \rec $H$ which is homogeneous for $f$.
\end{example}
\proof
Construct $b\in 2^\om$ with the properties:
\begin{enumerate}
\item $b\leq_T \jump(0)$ and
\item for every $e$ if $W_e$ is infinite then there are $n,m\in W_e$
such that $b(n)=0$ and $b(m)=1$.
\end{enumerate}
By the limit Lemma there is a \rec $g:\om^2\to 2$ such that
$$b(n)=\lim_{s\to\infty} f(n,s).$$
Then $f$ cannot have an infinite \rec homogeneous set $H$. 
For suppose $H=\{h_k\st k<\om\}$ is a strictly increasing computable
enumeration of $H$.  Then for $k<l$ we would
have to have that $f(h_k,h_l)=b(h_k)$ and so
$b$ will be constant on $H$.
\qed

See also Corollary \ref{jock} for another proof.
Seetapun has shown that every \rec $f:[\om]^2\to 2$ has an infinite
homogeneous set which does not compute $\jump(0)$.


\section{A low simple set}

Another way to prove that some \re degree is nontrivial is to
construct a low simple set $A$.  Since a simple set is not
\rec we have that $0<_T A$. Low means
that $\jump(A)\equiv_T\jump(0)$ so $A<_T\jump(0)$ by Lemma
\ref{jump}.  

\begin{theorem}\label{lowsimple}
There exists a low simple set $A$, i.e. $\jump(A)\equiv \jump(0)$
and $A$ is simple.
\end{theorem}

\proof
We make the degree of $A$ low by a strategy that is suggested by the
proof of the limit lemma, namely we would like to use
$$f(e,s)=\left\{\begin{array}{ll}
1 & \mbox{ if } \{e\}^{A_s}_s(e)\conv \\
0 & \mbox{ otherwise}
\end{array}\right.$$
to show that $\jump(A)\leq_T\jump(0)$.  That is,
$\jump(A)(e)=\lim_{s\to\infty}f(e,s)$.  If $e\in\jump(A)$ then
it is easy to see that $f(e,s)=1$ for all sufficiently large $s$.
The problem then is to make sure that if $f(e,s)=1$ for infinitely
many $s$, then $e\in \jump(A)$.

So we make the following requirements:

$N_e\;\;\;\;\;\;  (\exists^\infty s\;\; \{e\}_s^{A_s}(e)\conv)
\implies \{e\}^{A}(e)\conv$

In order to make sure that the set $A$ is simple
we have the following requirements:

$P_e\;\;\;\;\;\; (W_e$ infinite) $\implies W_e\cap A\neq\emp$

The strategy for $P_e$ is the same as for the Post Simple Set construction
(Theorem \ref{simple}), that is we wait for some $x\in W_{e,s}$ with
$x>2e$ and $A_s\cap W_{e,s}=\emp$ and put $x$ into $A_{s+1}$.

The strategy for $N_e$ is to wait until we see convergence and then try
to prevent the computation from changing by restraining numbers less
than the use of the computation from entering $A$.

The requirement $P_e$ is positive since the strategy trys to put
things into $A$ while the requirement $N_e$ is negative since it
tries to keep things out of $A$. 

\begin{center}
Construction
\end{center}

At each stage in the construction we will have 
$A_s$ and $r(e,s)$ for each $e$.  We will always have that
$r(e,s)=0$ for $e\geq s$ so the function $r$ is really a finite function.

Stage $s+1$.  Look for the least $e<s$ such that 
\begin{enumerate}
\item $W_{e,s}\cap A_s=\emp$
\item $\exists x>2e$ with $x\in W_{e,s}$ and 
$x>r(e^\pr,s)$ for all $e^\pr<e$.
\end{enumerate}

For the least such $e$ choose the least $x$ as above and 
put $A_{s+1}=A_s\cup\{x\}$.  We say in this case
that $P_e$ acted at stage $s+1$. If there is no such $e$ put
$A_{s+1}=A_s$.   

Next we compute $r(e,s+1)$ for all $e<s+1$.
If $\{e\}_s^{A_{s+1}}(e)\conv$, then put
$$r(e,s+1)=use(\{e\}_s^{A_{s+1}}(e)$$
otherwise put $r(e,s+1)=0$.

This is the end of the construction.  
We let $A=\cup_{s\in\om}A_s$ which is \re

\begin{center}
Verification.
\end{center}

\bigskip\noindent {\bf Claim. }
\begin{enumerate}
\item $P_e$ is met.
\item $N_e$ is met.
\item $\lim_{s\to\infty}r(e,s)=r(e)<\infty$ exists.
\end{enumerate}
\proof
We prove this by induction on $e$. 
Note that each $P_e$ can act at most once, since after it
acts $W_e$ and $A$ are no longer disjoint.
Assume the claim is true
for every $e^\pr<e$.

(1) By induction we have some
$s_0$ such that for all $s>s_0$ and $e^\pr<e$ that
$r(e^\pr,s)=r(e^\pr)$.  Put
$$R=max\{r(e^\pr)\st e^\pr<e\}.$$
We can also choose $s_0$ so large that no $P_{e^\pr}$ for
$e^\pr<e$ acts after stage $s_0$ since each $P_{e^\pr}$ acts at
most once.
Suppose that $W_e$ is infinite.
It follows that at some stage $s>s_0$ there will be
a $x\in W_{e,s}$ such that $x>2e+R$.  At stage $s+1$
either $A_s\cap W_{e,s}\neq\emp$ or $P_e$ will act.
In either case $P_e$ is met.

(2) Choose $s_0$ so that no $P_{e^\pr}$ for $e^\pr\leq e$ acts
after stage $s_0$.  This means that after stage $s_0$ no
positive requirement can ever injure a computation of
$N_e$.  Hence if there  is  some $s_1>s_0$ such that
$\{e\}_{s_1}^{A_{s_1}}(e)\conv$ then no 
$x<use\{e\}_{s_1}^{A_{s_1}}(e)$ will ever enter $A$.  It follows
that this is the final computation and therefore
$\{e\}^{A}(e)\conv$ with the same computation as at stage $s$.

(3) As above, either we never see convergence and then
$r(e,s)=0$ for all $s>s_0$ or we see convergence and then
$r(e,s)=r(e,s_1)$ for all $s>s_1$.

\bigskip
This finishes the proof of the Claim and the Theorem.

\qed



\hmwk{19}{Fri 10-22}
(From Soare) 
A set $A$ is auto-reducible iff there exists $e$ 
such that for every $x$ we have 
$$\{e\}^{A\sm \{x\}}(x)\conv=A(x).$$
Prove there is a \re set which is not auto-reducible. Extra
credit: Prove that there exists a $A$ low simple set which 
is not auto-reducible.

\section{Friedberg splitting Theorem}

\begin{theorem}
(Friedberg Splitting) Every \re set which is not \rec is
the disjoint union of two \recenum sets which are not \rec.
\end{theorem}
\proof
Suppose $B=\{b_s\st s<\om\}$ is a one-one \rec enumeration of
the non\rec set $B$. We will decide at each stage to put
$b_s$ into either $A_0$ or $A_1$.  Hence at any stage $s$
we will have
$$B_s=\{b_t\st t<s\}=A_0^s\sqcup A_1^s$$
where $\sqcup$ stands for disjoint union.

The requirements are:

\bigskip
$R_{2e+i}\;\;\;\;\ W_e\neq \comp(A_i)$ 
\bigskip

The strategy is to try to make $A_i\cap W_e\neq\emptyset$.

\begin{center}
Stage $s$
\end{center}
Find the least $2e+i<s$ (if any) such that
\begin{enumerate}
\item $W_e^s\cap A_i^s=\emptyset$ and
\item $b_s\in W_e^s$.
\end{enumerate}
For the least such put $b_s$ into $A_i$, i.e.,
$$A_i^{s+1}=A_i^{s}\cup\{b_s\}\rmand A_{1-i}^{s+1}=A_{1-i}^{s}.$$
In this case, we say that $R_{2e+i}$ acted at stage $s$.

If there is no such $2e+i$ put $b_s$ into $A_0$.
This ends the construction.

\begin{center}
Verification
\end{center}

Suppose for contradiction that $\comp(A_i)=W_e$.   Since $A_i\su B$ we 
know that
 $$B\cup W_e=\om.$$
We show that $B$ is computable.   Note that each requirement
can act at most once. Choose a stage $s_0$ so that for any $q<2e+i$ if $R_q$
every acts it has already acted before stage $s_0$.

\bigskip
\noindent To compute $B$:
Input $x$.  Find any $s>s_0$ such that $x\in B_s\cup W_e^s$. 

Case 1. $x\in B_s$.  Hence $x\in B$.

Case 2. $x\in W_e^s\sm B_s$.   We claim that $x\notin B$.   If it were
then for some $t>s>s_0$ we would have $x=b_t$ and at that stage we would
put $b_t$ into $A_i$.  But we are assuming $A_i\cap W_e=\emptyset$ and
this would be a contradiction.

\qed

\exer Suppose $B$ is a \re set which is not \rec.  Prove there exists
a partial \rec function $f$ with domain $B$ such that for every
$n<\om$ the set $f^{-1}\{n\}$ is not computable.

\exer Prove or disprove.  There exists $A_n$ for $n<\om$ pairwise
disjoint \re sets which are not \rec such that
$$\om=\sqcup_{n<\om}A_n.$$

\hmwk{22}{Fri 10-29}
Define $f$ is proper iff $f$ is a \prec function and
both the domain and range of $f$ are non\rec subsets of $\om$.
Prove that for every
proper $f$ that there exists proper $f_0$ and $f_1$ with
$f$ the disjoint union of $f_0$ and $f_1$.  (We are identifying
the functions with their graph.)

\exer Show that if $B$ is \re but not \rec, then there exists
$A_i$ \re such that
$B=A_0\sqcup A_1$ and $A_0$ and $A_1$ cannot be separated by
a \rec set.   Hint: If $\psi_e$ is total, show that there must
be infinitely many $s$ such that $\psi_{e,s}(b_s)\downarrow$.


\section{Sacks splitting Theorem}

\begin{theorem}
(Sacks) Suppose $0<_T C\leq_T \jump(0)$ and $A$ is \re Then there exists
\re sets $A_0$ and $A_1$ such that 
\begin{enumerate}
\item $A$ is the disjoint union of $A_0$ and $A_1$, i.e., $A=A_0\sqcup A_1$,
\item $C\not\leq_T A_i$ for $i=0,1$, and
\item $A_i$ is of low degree for $i=0,1$, i.e.,
$\jump(A_i)\equiv_T\jump(0)$.
\end{enumerate}
\end{theorem}
\proof
By the limit lemma there exists a \rec function $g:\om\times\om\to 2$
such that for every $n$
$$C(n)=\lim_{s\to \infty} g(s,n).$$
To simplify notation let $C_s(n)=g(s,n)$. 

Let $A=\{a_s\st s\in\om\}$ be a 1-1 \rec enumeration of $A$.  If $A$ is
finite or even \rec the result is trivially true, so we don't have to
worry about that case.  We will achieve the splitting of $A$ by simply
putting $a_s$ into exactly one of the two sets $A_0$ or
$A_1$ at stage $s+1$.     

\begin{center}
The Requirements
\end{center}

The lowness of the sets will be achieved by the same requirements
as in the low simple set proof:

$N_{e,i}\;\;\;\;\;\; (\exists^\infty s \;\;\{e\}^{A_{i,s}}(e)\conv )\implies
\{e\}^{A_{i}}(e)\conv$

\noindent Our new requirements are for each $e\in\om$ and $i=0,1$:

$R_{e,i}\;\;\;\;\;\;\; \{e\}^{A_i}\neq C$

\noindent which we will write $R_q=R_{e,i}$ where $q=2e+i$.  If we meet each
of these, then $C\not\leq_T A_i$ for $i=0,1$. 
The strategy used for meeting $R_{e,i}$ is to preserve the length of
agreement between $\{e\}^{A_i}$ and $C$.  This seems contradictory, since
we want them to be different.  The reason it succeeds is because otherwise
we will be able to compute $C$.

For each $q$ we will
have two variables $l_q$ and $u_q$ which are the length of
agreement and the use of some computations.
We will use $u_q$ to restrain for both $N_q$ and $R_q$.

\begin{center}
The Construction
\end{center}

At stage $s=0$ put $A_{i,s}=\emp$ and put
$u_q=l_q=0$.  

\bigskip \noindent {\bf Stage $s+1$.}

Begin by computing the length of agreement $l_q$ and
the usage $u_q$ for each $q<s+1$:

Suppose $q=2e+i$.  

\noindent  
(a) If $\{e\}^{A_i,s}_s(e))\conv$, then:
$$u_q := \max\{u_q,use(\{e\}^{A_i,s}_s(e))\}.$$

\noindent 
(b) Next we adjust the length of agreement.  There are two cases:

(1) For all $x \leq l_q$ 
$$\{e\}^{A_{i,s}}_s(x)\conv=C_s(x).$$
In this case we bump up the usage and increment $l_q$:
\begin{eqnarray*}
u_q &:= &\max\{\; u_q,use(\{e\}^{A_i,s}_s(x))\st x\leq l_q\;\} \\
l_q &:= &l_q+1\\
\end{eqnarray*}

\bigskip
(2) Not case (1).  In this case we do not change $l_q$ and $u_q$.

\bigskip \bigskip
Now we take action.  Find the least $q<s+1$ (if any) such that
$a_s<u_q$.  If $q=2e+i$, then put $a_s$ into the opposite
set, $A_{1-i}$, i.e., 
$$A_{1-i,s+1}=A_{1-i,s}\cup\{a_s\}.$$
(Hence we protect the computations in (b)(1) for $q$ from being injured.)

If no such $q$ exists, then put $a_s$ into $A_0$.
This ends the stage and the construction.

\bigskip

\begin{center}
The Verification
\end{center}

Now we verify that the construction works. 
We use the notation $l_q^s$ and $u_q^s$ to refer to the values of
these variables at stage $s$.

\bigskip\noindent {\bf Claim. }  For each $q$
\par (1) $R_q$ is met,
\par (2) $\lim_{s\to \infty} l_q^s=L_q<\infty$,  
\par (3) $\lim_{s\to \infty} u_q^s=U_q<\infty$, and
\par (4) $N_q$ is met.
\proof
In the case of (2) and (3) since our variables are nondecreasing this
just means that at some stage they stop growing.
The Claim is proved by induction on $q$.  So suppose it
is true for all $p<q$ and let $R_q=R_{e,i}$

\begin{center}
Proof of (1) 
\end{center}

\noindent For contradiction assume that $R_q$ is not met, i.e.,
$$\{e\}^{A_i}=C.$$

\medskip \noindent {\bf Subclaim} (a). $\lim_{s\to\infty}l_q^s=\infty$.

To see why this is true, note that for any $x$ there will be some
stage $s_0$ where $C_s\res x=C\res x$ for all $s>s_0$ and
also $\{e\}^{A_i}\res x$ will be same computations as
$\{e\}^{A_{i,s_0}}_{s_0}\res x$, i.e., the use of the oracle
has settled down. After $s_0$  
the variable $l_q$ will be incremented
until it is at least $x$, if it isn't already. 
This proves subclaim (a).

\bigskip\noindent Now go to a stage $s_0$ such that for all $s>s_0$
\begin{enumerate}
\item  for all $p<q$ 
$\;\;\;u_{p}^s=U_{p}$ and 
\item $a_s> \max\{U_{p}\st p<q\}$. 
\end{enumerate}

\medskip \noindent {\bf Subclaim} (b).  If $s>s_0$ is a stage
where $l_q$ is incremented then 
$$C(x)=\{e\}^{A_{i,s}}_s(x).$$
for any $x<l_q$
 
To see why this is true, note that $u_q$ protects the computation
$\{e\}^{A_{i,s}}_s(x)$ from ever changing since
$a_s$ is never beneath $u_{p}$ for any higher priority
$p<q$.  This means that 
$$\{e\}^{A_{i,s}}_s(x)=\{e\}^{A_{i}}(x).$$
But we are assuming $\{e\}^{A_{i}}=C$.  This proves subclaim (b).

\medskip
Now we get a contradiction to our assumption that $C$ is not \rec.
To compute $C(x)$ search for a stage $s>s_0$ where $l_q>x$
and it has just been incremented.  Then 
$C(x)=\{e\}^{A_{i,s}}_s(x)$.

This contradiction proves the main Claim part (1) that $R_q$ is met.


\begin{center}
Proof of (2) 
\end{center}

\noindent Since $R_q$ is met there exists $x$ such that
either 
\par (a) $\{e\}^{A_{i}}(x)\div$ or 
\par (b) $\{e\}^{A_{i}}(x)\conv\neq C(x)$.  

\noindent
Fix any such $x$.  Go to a stage $s_0$ such that for all $s>s_0$ 
\begin{enumerate}
\item for all $p<q$ 
$\;\;\;u_{p}^s=U_{p}$,
\item $a_s> \max\{U_{p}\st p<q\}$, and
\item $C_s(x)=C(x)$. 
\end{enumerate}

It is impossible that at some stage $s>s_0$ where $l_q>x$ that
$l_q$ is incremented.  This is because at such a stage $s$
$$\{e\}_s^{A_{i,s}}(x)\conv= C_s(x).$$
For
the rest of the construction $u_q$ will protect the computation 
$\{e\}_s^{A_{i,s}}(x)$.  But then
$$\{e\}^{A_{i}}(x)=\{e\}_s^{A_{i,s}}(x)= C_s(x)=C(x)$$
which contradicts the choice of $x$.

\begin{center}
Proof of (3) 
\end{center}

\noindent Note that $u_q$ changes only
when either $l_q$ is incremented or
when we see $\{e\}^{A_{i,s}}_s(e)$ converges.
Hence if we go to a stage $s_0$ such that for all $s>s_0$
\begin{enumerate}
\item  for all $p<q$ 
$u_{p}^s=U_{p}$,
\item $a_s> \max\{U_{p}\st p<q\}$, and
\item $l_q^s=L_q$ 
\end{enumerate}
then $u_q$ will change at most once more, after which it
protects the computation $\{e\}^{A_{i,s}}_s(e)$ from changing
and never changes again.

\begin{center}
Proof of (4) 
\end{center}

The proof that
$N_q$ is met is the same as in the low simple set argument.

\bigskip
This ends the proof of the Claim and of the Sacks Splitting
Theorem.
\qed


\begin{prop}\label{splitjoin}
Suppose $A=A_0\sqcup A_1$ is a disjoint union of \re sets $A_0$ and
$A_1$, then $A\equiv_T A_0\join A_1$.
\end{prop}
\proof
Clearly $A=A_0\cup A_1\leq_T A_0\join A_1$.  To see that
$A_i\leq_T A$, input $x$ and first ask the oracle if $x\in A$.
If yes, enumerate $A_0$ and $A_1$ until $x$ shows up. 
\qed
 
\begin{cor}
(Friedberg Splitting) Every \re set which is not \rec is
the disjoint union of two \re sets which are not \rec.
\end{cor}
\proof
Take $C=A$.  Then $A_i\not\leq_T A$ but if either is \rec then
by Proposition \ref{splitjoin} we get a contradiction.
\qed

\begin{cor}
For every $c\in\degrees$ if $o<c<\jump(o)$, then there exists
$a\in\redegrees$ with $a|c$. 
\end{cor}
\proof
Let $A=\jump(0)=K$.  By Proposition \ref{splitjoin}, $A=A_0\join A_1$ where
$C\not\leq_T A_i$ for both $i=0,1$.  But then at most
one of the $A_i$ can be $\leq_T C$, since otherwise
$$\jump(0)\equiv_T A_0\join A_1\leq_T C.$$
\qed

\begin{cor}
There exists $a_0,a_1\in\redegrees$ such that
$$(a_0\vee a_1)^\pr\neq \jump(a_0)\vee \jump(a_1)$$
\end{cor}
\proof
By the Theorem there exists low \re sets $A_i$
such that $A_0\join A_1\equiv_T \jump(0)$.
Hence 
$$\jump(a_0)\vee \jump(a_1)=\jump(o)<o^{\pr\pr}=(a_0\vee a_1)^\pr$$
\qed

\begin{cor}
No \re degree is minimal, in fact, beneath any nontrivial \re degree
is a nontrivial low \re degree.
\end{cor}
\proof
Given \re set $A$ which is not \rec, let $C=A$ and then
we have low \re sets $A_0$ and $A_1$ which split $A$ and 
$A\not\leq_T A_i$.  Then for each $i$ we have that
$0<_T A_i<_T A$.
\qed 

\exer (Welch) Prove there are low \re degrees $a_0$ and $a_1$ such that
for every \re degree $b$ there are \re degrees $b_0\leq a_0$
and  $b_1\leq a_1$ with $b=b_0\vee b_1$. Hint: Sacks split $W$.


\section{Lachlan and Yates: minimal pair}

\begin{theorem}
(Lachlan, Yates) There exists a minimal pair of \re degrees, i.e.
$a_0,a_1\in\redegrees\sm\{o\}$ such that the only degree
$b$ with $b\leq a_0$ and $b\leq a_1$ is $b=o$.
\end{theorem}
\proof

\begin{center}
Requirements:
\end{center}

 $P_{e,i}\;\;\;\;\;\;\;\;\;\;\;\psi_e\neq A_i$

\medskip

 $N_{e_0,e_1}\;\;\;\;\;\;\;(\{e_0\}^{A_0}=\{e_1\}^{A_1}=B) \implies B$ \rec.

\begin{center}
Strategies:
\end{center}


\noindent For $P_{e,i}$ wait for $\psi_{e,s}(x)\conv=0$ for some follower $x$
and then put $x$ into $A_i$.

\medskip

\noindent For $N_{e_0,e_1}$ restrain agreement to get (a) or (b):

\par (a) for some
$l<\om$ we have 
that $\{e_0\}^{A_0}\res l\conv=\{e_1\}^{A_1}\res l\conv$ and either

 $\;\;\;\;$ ($\{e_0\}^{A_0}(l)\div$ or $\{e_1\}^{A_1}(l)\div$) or
  ($\{e_0\}^{A_0}(l)\conv\neq \{e_1\}^{A_1}(l)\conv$ )
 
\par (b)  $\{e_0\}^{A_0}=\{e_1\}^{A_1}=B$ and $B$ is \rec by
virtue of our restraining certain computations, that is, we can compute
$B$ by finding stages where we can be sure the approximate computation
at that stage is the final one.

\begin{center}
Outcomes:
\end{center}

For $P_{e,i}$ the outcomes are either to wait forever or to act at
some time.  We order them by $\{$ act $<$ wait $\}$. 

\medskip

For $N_{e_0,e_1}$ the outcomes are either $l<\om$ where $l$ is the
largest length of agreement which we see at a true stage or
$\{\infty\}$ if the length of agreement has infinite limit.
We use the ordering
$$\infty<\cdots<l+1<l<\cdots<2<1<0$$
because it is traditional to take limit infimums (rather than
limsups) in
the outcome tree to determine the truth path.

\medskip
The outcomes are $\Lambda=\{$act,wait $\}\cup \{\infty\} \cup\om$.
The tree of outcomes is $\Lambda^{<\om}$.  At each stage $s$ in the
construction we will have \recly constructed
$f_s\in\Lambda^s$ which is an approximation to the true path, i.e.,
the eventually correct outcomes.

If $\alpha\in \Lambda^n$ where $n=2\pair(e_0,e_1)$ then $\alpha$
works on
the requirement $N_{e_0,e_1}$. If $\beta\in \Lambda^n$ where
$n=2m+1$ and $m=2e+i$, then $\beta$ works on the requirement 
$P_{e,i}$. 

\begin{center}
Supplementary variables:
\end{center}

For each such $\beta$ working on a positive requirement
we have a restraint variable $R_\beta\in\omega$.
Also for each such $\beta$ we let 
$$F_\beta=\{\pair(\beta,x):x\in\om\}$$ 
be the followers of $\beta$.
These could be any pairwise disjoint family of uniformly \rec infinite
subsets of $\om$.

For each $\alpha$ working on a negative requirement we have two
variables $l_\alpha$ and $u_\alpha$ (length of agreement and
the usage of some computations). 


\begin{center}
The Construction:
\end{center}

Stage $s=0$.  Put $A_{0,0}=A_{1,0}=\emp$ and $f_0=\langle\rangle$, and 
put all
supplementary variables, $R_\beta,l_\alpha,u_\alpha$ equal to 
zero.

\bigskip
Stage $s+1$.  Given $A_{0,s}, A_{1,s},$ and $f_s\in\Lambda^s$
proceed as follows.

\bigskip\noindent
Action: 

Look for the least $\beta\subsetneq f_s$ working on a positive
requirement $P_{e,i}$ such that
\par (1) $f_s(|\beta|)=$`wait' and 
\par (2) there exist $x>R_\beta$ with $x\in F_\beta$ and $x<s$ such
that $\psi_{e,s}(x)\conv=0$.

\noindent Put the least such $x$ into $A_i$, i.e., 
$$A_{i,s+1}=A_{i,s}\cup\{x\}.$$
In this case we say that $\beta$ and $P_{e,i}$ acted at stage $s+1$.
If no such $\beta$ exists, then no action is taken.

\bigskip\noindent
Update variables: 

Define $f_{s+1}\res n$ for $n\leq s+1$ by induction on $n$.  At the
same time we may update the supplementary variables 
for each $\ga\sq f_{s+1}$.

\bigskip
\noindent {\bf Case} $\beta= f_{s+1}\res n$ where $\beta$ is working on
$P_{\hat{e},\hat{i}}$.    

If $P_{\hat{e},\hat{i}}$ has acted
at some stage $\leq s+1$ then put $f_{s+1}(n)=$`act'. Otherwise
$f_{s+1}(n)=$`wait'.  

Define $R_\beta$ to be the maximum of the
following sets:

 \noindent (1)$\{u_\alpha:\alpha<_{lex}\beta\}$ where 
$\alpha<_{lex}\beta$ means that there exists $k <\min(|\alpha|,|\beta|)$
such that $\alpha\res k=\beta\res k$ and $\alpha(k)<\beta(k)$ in
the ordering of outcomes.

 \noindent (2) $\{u_\alpha:\alpha\subsetneq\beta$ and $\beta(|\alpha|)\neq\infty\}$.

\bigskip
Remarks. $\beta$ preserves computations of $\alpha$'s 
which are lexicographically to
its left because $\alpha$'s want $\beta$'s to their
right to respect their computations.  $\beta$ also respects
computations directly below it except for those which 
$\beta$ thinks will have an infinite length of agreement.

\bigskip\noindent
{\bf Case} $\alpha=f_{s+1}\res n$ and $\alpha$ is working on
$N_{e_0,e_1}$.  

\medskip\noindent We begin by asking:

Does $\{e_0\}_{s+1}^{A_0,s+1}(x)\conv = \{e_1\}_{s+1}^{A_1,s+1}(x)\conv$ 
for every $x\leq l_\alpha$?

\noindent If yes, we put $f_{s+1}(n)=\infty$ and we set:
\begin{eqnarray*}
u_\alpha &:= &\max\{u_\alpha,use(\{e_i\}_{s+1}^{A_i,s+1}(x)): 
x\leq l_\alpha,i=0,1\}\\
l_\alpha &:= &l_\alpha+1
\end{eqnarray*}

\noindent If no, we put $f_{s+1}(n)=l_\alpha$ and make no changes in the
variables.

\bigskip
Remarks.  If we see expansion in the length of agreement over what it
was when last we set it, we guess optimistically that the length of
agreement will expand forever.  If we don't see this expansion, we
pessimistically guess we will never see another expansion. (At least
on the stages which go thru $\alpha$.)  

\bigskip

\begin{center}
Verification.
\end{center}

We begin by defining the true path $f\in \Lambda^\om$.  
We define $f\res n$ by induction on $n$.  First let
$$T_n=\{s>n: f\res n\sq f_s\}$$
these are the true stages and note
that $T_{n}\sq T_{n-1}$.  The set $T_n$ is a \rec set which (by induction)
is infinite.  Define $f(n)$ by
$$f(n)=\liminf_{s\in T_n} f_s(n).$$
If $\beta=f\res n$ is working on  $P_{e,i}$, then
$f(n)=$`act' if $P_{e,i}$ every acts, and otherwise $f(n)=$`wait', meaning we
wait forever. In the case $\alpha=f\res n$ is working on a negative 
requirement $f(n)$ will be $\infty$ if there are infinitely many $s\in T_n$ in 
which the
length of agreement $l_\alpha$ has been incremented
and otherwise it will be the final
value of $l_\alpha$. 

\bigskip
\noindent 
{\bf Claim.} For each $n$ the requirement that $f\res n$ is working on is met.

\proof

\bigskip
{\bf Case} $f\res n=\beta$ is working on $P_{e,i}$.  

\medskip
If $f(n)=$`act', then
for some $x$ we put $x$ into $A_i$ at a stage $s$ where we saw 
$\psi_{e,s}(x)\conv=0$.  But then $A_i(x)=1\neq \psi_e(x)$.  

If $f(n)=$`wait', let us first prove that $R_\beta$ 
does not change at any stage $s\geq \min(T_n)$.  We first note that
for every $s>\min(T_n)$ that it is not true that $f_s<_{lex} \beta$.
Why?  Suppose $f_s\res k=\beta\res k$ and $f_s(k)<\beta(k)$.
If $\beta(k)=$`wait' and $f_s(k)$=`act', then we get a contradiction,
since then $\beta$ is not on the true path $f$.  In the case of
a negative requirement $\alpha=\beta\res k$ then $\beta(k)=l<\om$
(since nothing is to the left of $\infty$), but this would mean that
the true path would go to the left of $\beta$.   It follows
that for every $s\in T_n$ the variables 
$\{u_\alpha:\alpha<_{lex}\beta\}$ will be what they were at the
stage $s=min(T_n)$.  Similarly for any 
$u_\alpha$ with $\alpha\sq\beta$ and $\beta(|\alpha|)\neq\infty$
these variables will have also reached their maximum since $u_\alpha$
is only changed when $l_\alpha$ is incremented.


To see that $P_{e,i}$ is met in this case let $R_\beta^*$ be
this final value of $R_\beta$.   Let $x\in F_\beta$ with
$x>R_\beta^*$.  It is not the case that $\psi_e(x)\conv=0$,
because if this ever happened then for some large enough stage $s\in T_n$ 
the worker $\beta$ would have acted (either putting this or some smaller
$x$ into $A_i$.   Since $x$ is never put into $A_i$ the requirement is
met because $\psi_e(x)\neq 0=A_i(x)$.

\bigskip
{\bf Case} $f\res n=\alpha$ is working on $N_{e_0,e_1}$.  

\medskip
{\bf Subcase} $f(n)=l$ 

\noindent Then for every $s\in T_{n+1}$ the length of
agreement was less than $l+1$, i.e. for some $x\leq l+1$
it was not true that:
$$\{e_0\}^{A_0,s}_s(x)\conv = \{e_1\}^{A_1,s}_s(x)\conv$$ 
otherwise we would have incremented $l_\alpha$.
It follows that
$$\neg (\{e_0\}^{A_0}=\{e_1\}^{A_1}=B)$$
and so $N_{e_0,e_1}$ is satisfied.

\medskip
{\bf Subcase} $f(n)=\infty$ 

\noindent Then we claim that $B$ is \rec. To see this
suppose $s_1<s_2$ are successive stages in $T_{n+1}$.   Note that
$\alpha= f_{s_1}\res n=f_{s_2}\res n$ and
$f_{s_1}(n)=f_{s_2}(n)=\infty$. 
See Figure \ref{minpairfig}.


\def\text#1{\makebox(0,0)[cc]{#1}}
%\unitlength=1.20mm
\unitlength=1.00mm
\begin{figure}
\begin{picture}(70,100)(-40,5)
\put(40,10){\line(-1,2){10}}
\put(30,30){\line(-1,1){10}}
\put(30,30){\line(1,1){10}}
\put(40,10){{\circle*{1}}}
\put(30,30){{\circle*{1}}}
\put(25,25){\text{$\al^\pr$}}
\put(20,40){{\circle*{1}}}
\put(40,40){{\circle*{1}}}

\put(15,35){\text{$\infty$}}
\put(45,35){\text{$l_{\al^\pr}$}}

\put(40,40){\line(1,3){10}}
\put(50,70){{\circle*{1}}}
\put(53,67){\text{$\be^\pr$}}

\put(65,90){\text{$f_{s^\pr}$}}
\put(50,70){\vector(1,2){12}}

\put(20,40){\line(0,1){20}}
\put(20,60){{\circle*{1}}}
\put(20,60){\line(1,1){10}}
\put(20,60){\line(-1,1){10}}
\put(10,70){{\circle*{1}}}
\put(30,70){{\circle*{1}}}

\put(10,70){\line(0,1){10}}
\put(30,70){\vector(1,3){10}}

\put(10,80){{\circle*{1}}}
\put(10,80){\line(-1,1){10}}
\put(10,80){\line( 1,1){15}}
\put(25,95){{\circle*{1}}}
\put(25,95){\vector(0,1){10}}
\put(30,100){\text{$f_{s_2}$}}
\put(28,92){\text{$\be_{2}$}}

\put(15,55){\text{$\al$}}
\put(05,65){\text{$\infty$}}
\put(35,65){\text{$l_\al$}}
\put(34,82){{\circle*{1}}}
\put(38,78){\text{$\be$}}
\put(42,95){\text{$f_s$}}

\put(00,90){{\circle*{1}}}
\put(00,90){\vector(1,4){3}}
\put(07,99){\text{$f_{s_1}$}}
\put(00,85){\text{$\be_1$}}
\end{picture}
\caption{$s_1<s,s^\pr<s_2$ \label{minpairfig}}
\end{figure}

This means that $l_\alpha$ was
incremented at each stage $s_i$, say $l-1$ to $l$ at
stage $s_1$ and $l$ to $l+1$ at stage $s_2$.  At stage $s_1$
before any action the two computations agreed: 
$$\{e_0\}_{s_1}^{A_0,s_1}\res l \conv = \{e_1\}_{s_1}^{A_1,s_1}\res l\conv.$$
If $\beta_1\sq f_{s_1}$ is the node which acted at stage $s_1$ (if any), 
then it must be that $\alpha\sq\beta_1$ and
$\beta_1(n)=\infty$.  This action could destroy
either the left side or ride side of this agreement but not both,
since some $x$ may be put into $A_0$ or $A_1$ but not both.
The variable $u_\alpha$ is set to protect the surviving side in subsequent
stages.  At stages $s$ with $s_1<s<s_2$ any acting node $\beta$ must
either be above $\al\hat{\phantom{a}}\la l_\al\ra$ or
be lexicographically to the right of $\al$ as $\beta^\pr$ is in 
the figure.
But this means that $R_\beta\geq u_\alpha$ and so the action at stage
$s$ cannot damage the surviving side.  At stage $s_2$ we increment
$l$ to $l+1$ which means that the destroyed side must have come back and
equaled the surviving side.  

This means that for
each $s,s^\pr\in T_{n+1}$ with $s<s^\pr$ and $x<l_\al^s$:
$$\{e_0\}_s^{A_0,s}(x)\downarrow = \{e_0\}_{s^\pr}^{A_0,s^\pr}(x)\downarrow.$$ 
The two computations may be different but they output the
same value (and the same for $e_1$).  Hence,
assuming $\{e_0\}^{A_0}=B$, to compute $B(x)$ search for
a stage $s\in T_{n+1}$ such that $x<l_\alpha^s$ and 
then $B(x)=\{e_0\}_s^{A_0,s}(x)$.  It follows that $B$ is \rec.
This proves the Claim and the minimal pair theorem. 
\qed

\exer Put the Friedberg-Muchnik argument on a tree of outcomes. 
Show there is no injury on the true path.

\hmwk{23}{Fri Nov 5}
Put the low simple non-auto-reducible set construction on a tree
of outcomes.  Prove the construction works.  Show that there is
no injury on the true path.

\exer (From Cooper)  Show that there is minimal pair
$A_0$ and $A_1$ such that $(A_0\join A_1)^\pr\equiv_T \jump(0)$.


\bigskip

\section{Friedberg: A one-one enumeration of the \re sets }

\begin{theorem}\label{uniqenum}
(Friedberg, Enumeration without repetition) 
There exists \anre set $U$ such that
\begin{enumerate}
\item $\{U_e\st e\in\om\}$ is the set of all \re sets and
\item $U_{e_1}\neq U_{e_2}$ for all $e_1\neq e_2$
\end{enumerate}
\end{theorem}
\proof

We will first construct \anre set $V$ and then modify it to get $U$.
The requirements are:

$R_e\;\;\;\;\;\;\forall \hat{e}<e \;\;(W_{\hat{e}}\neq W_e)\implies W_e=V_x$
for some unique $x$.

\bigskip
The strategy for meeting this requirement is to appoint a
follower $x$.
As long as it looks like 
$\forall \hat{e}<e \;\;(W_{\hat{e}}\res x\neq W_e\res x)$ keep enumerating
$W_e$ into $V_x$.  Otherwise make it a disloyal follower and put
it into the garbage.  What do we do with $V_x$ when $x$ is a disloyal
follower?  We make it into an initial segment.

\begin{define}
$A\sq\om$ is an initial segment iff $A=\emp$ or $A=\om$ or there
exists $n<\om$ such that $A=[0,n]=^{def}\{i<\om\st 0\leq i\leq n\}$.
\end{define}

\noindent So our modified requirement is:

\bigskip
$R_e\;\;\;\;\;\;$ If $\forall \hat{e}<e \;\;(W_{\hat{e}}\neq W_e)$
and $W_e$ is not an initial segment, then $W_e=V_x$
for some unique $x$.
\bigskip


\noindent At stage $s+1$ in our construction we have the following sets:
\begin{enumerate}
\item $F_s$ the followers
\item a 1-1 mapping from $F_s$ to $\om$ which tells us
that $x$ is the follower of $e$,  say $f_s(x)=e$ 
\item $D_s$ the disloyal former followers
\item $(V_{x,s}\st x\in F_s\cup D_s)$
\item a nondecreasing variable $g_s$ keeping track of last
initial segment assigned to a disloyal follower.
\end{enumerate}

The sets $F_s$ and $D_s$ will be disjoint finite sets whose
union is an initial segment.

\begin{center}
Construction
\end{center}

\noindent {\bf Stage $s+1$} 

Let $s=\pair(e,?)$.  (So we visit each $e$ infinitely often.) 

If no follower is assigned to $R_e$, let $x=min(\comp(F_s\cup D_s))$ and
assign $x$ to be the follower of $R_e$.  Put $F_{s+1}=F_s\cup\{x\}$
and end the stage.

If $x$ is the follower of $R_e$ and
\begin{enumerate}
\item $\forall \hat{e}<e$
$$W_{\hat{e},s+1}\cap [0.x]\neq (W_{e,s+1})\cap [0,x]$$
\item $W_{e,s+1}\cap [0,x]$ is not an initial segment
\end{enumerate}
then put $V_{x,s+1}=V_{x,s}\cup W_{e,s+1}$ and end the stage.
Actually in this case $V_{x,s}\sq W_{e,s}$ so we could have
said put $V_{x,s+1}= W_{e,s+1}$.

\medskip
If $x$ is the follower of $R_e$ and either of those two conditions
fails then 
\begin{enumerate}
\item change $x$ into a disloyal follower, i.e., $F_{s+1}=F_s\sm \{x\}$
and $D_{s+1}=D_s\cup\{x\}$,
\item let $g_{s+1}$ be the minimum $g>g_s$ such that
$V_{e,s}\sq [0,g]$, and
\item permanently assign $V_x$ to be $[0,g_{s+1}]$,
i.e., set $V_{x,s+1}=[0,g_{s+1}]$ and never change $V_x$ again. 
\end{enumerate}
End the stage.

\begin{center}
Verification
\end{center}

\bigskip
\noindent {\bf Claim 1.} The following are equivalent for any $e$:
\begin{enumerate}
\item $W_e$ is not an initial segment of $\om$
and $W_e\neq W_{\hat{e}}$ for each $\hat{e}<e$.
\item $R_e$ obtains a permanent follower $x$ and hence $V_x=W_e$.
\end{enumerate}
\bigskip
\proof
Suppose condition 2 holds.
Then $R_e$ obtains a permanent follower $x$.  Then for all
stages $s+1$ after $x$ is appointed and
for which $s=\pair(e,?)$, 
we have that
$W_{e,s}\cap [0,x]$ is not an initial segment and
$W_{e,s}\cap [0,x]\neq W_{\hat{e},s}\cap [0,x]$ for each $\hat{e}<e$.
Condition (1) follows since there are infinitely many such stages. 

Suppose that condition 1 holds.
Choose $y$ so that 
$W_e\cap [0,y]$ is not an initial segment and
$$W_e\cap [0,y]\neq W_{\hat{e}}\cap [0,y]$$ for
every $\hat{e}<e$.  
Go to some stage $s_0$ where 
$$W_{e,s_0}\cap [0,y]=W_{e}\cap [0,y]$$
and 
$$W_{\hat{e},s_0}\cap [0,y]=W_{\hat{e}}\cap [0,y]$$ for
every $\hat{e}<e$.  If $R_e$ has no permanent follower then 
infinitely many followers are appointed to it.
Hence some follower 
$x>y$ will be appointed after stage $s_0$.  But such a follower will 
always remain loyal.
\qed

Let $D=\cup_{s\in\om} D_s$ be the set of disloyal followers.  Then
$\comp(D)$ is the set of permanent followers.

\bigskip
\noindent {\bf Claim 2.}
\begin{enumerate}
\item $\{V_x\st x\in\comp(D)\}$ is the set of \re
sets which are not initial segments. 
\item There exist a \rec set $G$ such that
$$\{[0,n]\st n\in G\}=\{V_x\st x\in D\}.$$ 
\item $V_x\neq V_{x^\pr}$ unless $x= x^\pr$. 
\end{enumerate}
\bigskip
\proof

Part (1) follows from Claim 1.

For Part (2), since the sequence $g_s$ is non-decreasing we see that
$$G=\{g_s\st s\in\om\}$$
is \rec.

For Part (3) note that there are two types of $V_x$. 
If $x$ is a permanent follower of
some $R_e$ and then $V_x=W_e$ where $W_e$ is
not an initial segment and 
$W_e$ is distinct from each $W_{\hat{e}}$.
Or $x$ is a disloyal follower at some
stage $s+1$ and then $V_x=[0,g_{s+1}]$.  Since  the sequence $g_s$ is
bumped up each time it is used we see that the $V_x$ 
for disloyal followers are distinct finite initial segments.
This proves Claim.
\qed


Let us show how to modify $V$ to $U$ to
prove Friedberg's enumeration without repetition theorem.
Note that $V$ uniquely enumerates every \re set except $\om$, $\emp$, and the 
finite initial
segments of the form $[0,n]$ where $n\notin G$.
Let $\{x_n:1<n<\om\}$ be a 1-1 \rec enumeration of $\comp(G)$.
Now define $U$ by $U_0=\om$, $U_2=\emp$, 
$U_{2n}=[0,x_n]$ for $n>1$, and $U_{2n+1}=V_n$.

\qed

\begin{define}\label{defreclass}
A family of subsets $\vv$ of $\om$ is called \anre class
iff there exists \anre set $V$ such that
$$\vv=\{V_e\st e\in\om\}$$
where $V_e=\{x\st \la e,x\ra\in V\}$.  $V$ is call an enumeration of
$\vv$.   If $V_e\neq V_{e^\pr}$ whenever $e\neq e^\pr$ then $V$
is called a Friedberg enumeration of $\vv$.
\end{define}

\begin{theorem}
If $\vv$ is \anre class containing all initial segments, then
$\vv$ has a Friedberg enumeration.
\end{theorem}
\proof
This is an obvious modification of the proof of Theorem \ref{uniqenum}.
\qed

\begin{example}
(Pour-El, Putnam) There is \anre class consisting of infinitely
many one and two element sets which has no Friedberg enumeration.
\end{example}
\proof
Take $A$ to be any set which is \re but not \rec.  Let
$F_n=\{2n,2n+1\}$ and $G_n=\{2n\}$. Then 
$$\vv=\{F_n\st n\in\om\}\cup \{G_n\st n\in\comp(A)\}$$
is \anre class.  This is because we just enumerate $2n+1$ into
$G_n$ turning it into $F_n$ when $n$ is enumerated into $A$).
But $\vv$ cannot have a Friedberg enumeration $V$ since then:
$$\forall n\;\; (n\in\comp(A) \rmiff \exists x,y\;\; x\neq y 
\rmand 2n\in (V_x\cap V_y)).$$

\qed

\begin{example}
(Pour-El, Putnam)
There is an infinite \re class $\vv$ containing $\om$
such that any enumeration of $\vv$ must list $\om$ infinitely many times.
\end{example}
\proof
Let $A$ be any \re set which is not \rec.
Let $\vv$ be the class of \re sets $B$ such that $B\su\comp(A)$ or
$B=\om$.  To see that $\vv$ is \anre class just enumerate
each $W_e$ into $V_e$ as long as you see that $A_s\cap W_{e,s}=\emp$.  If
this ever fails, enumerate all of $\om$ into $V_e$. 
 
If there is an enumeration of $\vv$ which only lists $\om$ finitely
many times, then there is an enumeration $U$ of the elements of $\vv$
which are not $\om$.  But then 
$$\comp(A)=\bigcup\{U_e\st e\in\om\}$$
would the be \anre set.
\qed

It seems to require a more complicated proof than that for 
Theorem \ref{unique} to show:

\begin{theorem}
(Friedberg) The class of graphs of partial \rec function has
a Friedberg enumeration.
\end{theorem} 

\exer Prove that the family of \rec sets is \anre class and
has a Friedberg enumeration.

\exer Prove that the family of \re sets which are not simple
is \anre class and
has a Friedberg enumeration.

\section{Hypersimple sets}

\begin{define}
Coding finite sets. 
For $D\sq \om$ let $x=\sum_{n\in D} 2^n$.  Write $D_x=D$. 
\end{define}

\begin{define}
$(D_x\st x\in R)$ is a strong array 
iff $R$ is an infinite \rec set and for every $x,y\in R$ we have 
$D_x\cap D_y=\emp$ whenever $x\neq y$.
\end{define}

\begin{define}
A set $A\sq\om$ is hypersimple iff $A$ is \re, $\comp(A)$ is infinite,
and for every strong array $(D_x\st x\in R)$ 
there exists $x\in R$ such that $D_x\sq A$. 
\end{define}

\begin{prop}
(Post) \label{posthsimple}
\par(1) Hypersimple implies simple.
\par(2) There is a simple set which is not hypersimple.
\par(3) There is a hypersimple set.
\end{prop}
\proof

\noindent (1) If $A$ is not simple, then there exists an infinite \rec set
$R\sq\comp(A)$.  Then $\{D_{2^x}\st x\in R\}$ witnesses that
$A$ is not hypersimple.

\noindent (2) In Post's original construction of a simple set $A$ 
(see Theorem \ref{simple}) we
constructed a simple set $A$
by waiting until there was some $x\in W_{e,s}$ with
$x>2e$ and $W_{e,s}\cap A_s=\emp$ and then putting $x$ into $A$.
The reason that $\comp(A)$ was infinite was because
for every $e$ we had that $|[0,2e]\cap A|\leq e$.  This means
that for every $a$ we have that
$$[a,4a]\cap \comp(A)\neq\emp$$
because $[a,4a]$ is $3/4$ of the interval $[0,4a]$. 
So define $a_0=5$ and $a_{n+1}=4a_n+1$.
Take $x_n$ so that $D_{x_n}=[a_n,4a_n]$ and note that
$D_{x_n}\cap \comp(A)\neq \emp$ for each $n$ so the
\rec set $R=\{x_n\st n<\om\}$ witnesses that $A$ is not hypersimple.

\noindent (3) This is a consequence of the following proposition,
although originally Post gave a construction similar to his construction
of a simple set.

\qed

\begin{prop}
(Dekker) Deficiency sets are hypersimple.
\end{prop}
\proof
See Theorem \ref{dekker}.  Suppose that $A=\{a_s\st s\in\om\}$
is a 1-1 \rec enumeration of $A$ and $A$ is not \rec.  Define
$$D=\{s\st \exists t>s\;\;\; a_t<a_s\}.$$
As we saw before $A\equiv_T D$ and $D$ is simple.  A similar proof
will show that $D$ is hypersimple.  

Suppose for contradiction that there exists a strong array $(D_x\st x\in R)$
such that $D_x\cap \comp(D)\neq\emp$ for every $x\in R$.  

Now we get a contradiction by showing that $A$ is computable.  

Input $u$.  Find an $x\in R$ such that
$$u<\min\{a_s\st s\in D_x\}.$$
Such an $x$ exists, since $a_s$ is a 1-1 enumeration and
the $D_x$ are pairwise disjoint.
But now at least one of $t\in D_x$ is not deficient, so
for all $s>t$ we have $a_s>a_t$.  Hence
$u\in A$ iff $u=a_s$ for some $s\leq \max{D_x}$.  
\qed

\hmwk{25}{Wed Nov 10}
Define $A$ to be bdd-hypersimple iff  $A$ is \re, $\comp(A)$ is infinite,
and for every strong array $(D_x\st x\in R)$ such that
there exists $N<\om$ such that $|D_x|\leq N$ for all $x\in R$, 
there exists $x\in R$ such that $D_x\sq A$.
Prove that bdd-hypersimple is equivalent to simple.

\begin{define}
For any set $A\sq \om$ such that $\comp(A)$ is infinite define
$\overline{a}_n$ to be the $(n+1)^{th}$ element of $\comp(A)$,
i.e., 
$$\comp(A)=\{\overline{a}_0<\overline{a}_1 <\cdots<\overline{a}_n<\cdots\}.$$ 
\end{define}

\begin{prop} \label{hsimple}
For any \re set $A$ with $\comp(A)$ infinite the following are equivalent:
\begin{enumerate}
\item $A$ is hypersimple.
\item For any \rec increasing sequence $n_k<n_{k+1}$ there are
infinitely many $k$ with $[n_k,n_{k+1})\sq A$.
\item For any \rec $f\in\om^\om$ there are infinitely many
$k$ such that $f(k)<\overline{a}_k$.
\end{enumerate}
\end{prop}
\proof

$(1)\implies (2)$.  This is clear since
if $D_{x_k}=[n_k,n_{k+1})$, then $R=\{x_k\st k<\om\}$ is a strong 
array.  There are infinitely many since 
$R(l)=^{def}\{x_k: k>l\}$ is a strong array for any $l$.

$(2)\implies (3)$. Given a \rec $f$ construct a \rec 
sequence $n_{k+1}>n_k$ with the property
that $f(n_k+1)< n_{k+1}$ for each $k$.  For any $k$ such that 
$[n_k,n_{k+1})\sq A$ note that $\comp(A)\cap [0,n_{k+1})\sq [0,n_k)$ and so 
$\overline{a}_{n_k+1}=(n_k+1)^{th}$ element of $\comp(A)$ must be greater than
$n_{k+1}$.  Hence $f(n_k+1)<\overline{a}_{n_k+1}$.

$(3)\implies (1)$.  Suppose $A$ is not hypersimple
and hence there exists a strong array $(D_x\st x\in R)$ such
that $D_x\cap\comp(A)\neq\emp$ for all $x\in A$.  Let
$\{x_n\st n\in\om)$ be a 1-1 \rec enumeration of $R$ and define
$$f(n)=1+\max(\cup_{m\leq n}D_{x_m})$$
Then $|\comp(A)\cap[0,f(n))|> n$ and so $f(n)>\overline{a}_n$.

\qed

\begin{exercise}
Suppose $A$ is hypersimple and $f:\om\to\om$ is \rec. Prove
there exist an infinite \rec set $C$ such that 
$f(n)<\overline{a}_n$ for
all $n\in C$.
\end{exercise}

\hmwk{26}{Fri 11-12}
Prove that for every \re set $A\sq\om$ if $\comp(A)$ is infinite, then
there exists a hypersimple set $B\supseteq A$.

\bigskip

Consider propositional logic with the set of atomic letters
$$\{P_n\st n\in\om\}.$$  
For any propositional sentence $\psi$ and subset $A\sq\om$ define
$$A\models \psi$$ 
inductively by
$$A\models P_n\rmiff n\in A$$
$$A\models \neg\psi \rmiff \mbox{ not } A\models \psi$$
$$A\models (\psi\vee\theta) \rmiff ( A\models \psi
\rmor A\models \theta )$$
and so forth for the other logical symbols.

By coding symbols as elements of $\om$ and  thinking of sentences as strings of
symbols  or finite sequences of elements of $\om$, we identify the set of
propositional sentences with a \rec subset of $\om,\;\;$  SENT.  
The details of
this coding are left to the reader.

The following notion is known as truth-table (tt) reducibility.

\begin{define}
$A\leq_{tt} B$ iff there exists a \rec sequence 
$$(\theta_n\in SENT\st n\in\om)$$ such that for all $n\in\om$
$$n\in A\rmiff B\models \theta_n$$
\end{define}

Note: It is easy to see that $A\leq_{tt} C$ and $B\leq_{tt} C$
implies $(A\cap B)\leq_{tt} C$ and $\comp(A)\leq_{tt} C$.
Hence the family of sets which are truth-table reducible to $C$ 
is closed under
finite boolean combinations.
It is easy to see that $\leq_m$-reducible is stronger than
$\leq_{tt}$, and $\leq_{tt}$ is stronger than $\leq_{T}$.

\begin{prop}
(Nerode) The following are equivalent:
\begin{enumerate}
\item $A\leq_{tt}B$.
\item There exist $e$ with the property that
$$\forall X\;\forall x\; \{e\}^X(x)\conv$$
and $\{e\}^B=A$.
\item There exists $e$ and $f\in\om^\om$ \rec such that
$$\forall x \;\{e\}^B_{f(x)}(x)\conv$$
and $\{e\}^B=A$.
\end{enumerate}
\end{prop}
\proof

$(1)\implies (2)$.  Given $(\theta_n\st n\in\om)$ witnessing that
$A\leq_{tt} B$, it is easy to construct an oracle machine 
$e$ such that for any input $x$ and oracle $X$ that
$\{e\}^X(x)\conv=1$, if $X\models\theta_x$ and 
$\{e\}^X(x)\conv=0$, if  $X\models\neg\theta_x$.  

$(2)\implies (3)$.  We show that the same $e$ works.  Input
$x$ and let
$$T_x=\{\si\in 2^{<\om}\st \{e\}^\si_{|\si|}(x)\div\}.$$
The trees $T_x$ are uniformly \rec in $x$.  By Konig's tree lemma,
since
$T_x$ has no infinite branch, it is finite.  Therefore we
can compute the least $n$ such that for all
$\si\in 2^n$ we have that $\si\notin T_x$. Put $f(x)=n$.

$(3)\implies (1)$.  Input $x$.  Compute a use bound $u_x$
so that for every 
possible computation $\{e\}^?_{f(x)}(x)$
the computation only asks about $i<u_x$.  (Since it takes at
least one step to ask the oracle anything there are at most
$2^{f(x)}$ such simulations.) 

Now define 
$$t_x=\{R\sq [0,u_x]\st \{e\}^R_{f(x)}(x)\conv=1\}.$$ 
Define
$$\theta_x=\ddisj_{R\in t_x}(\cconj_{i\in R}\;P_i\;\conj\; 
\cconj_{i\in [0,u_x]\sm R}\;\;\neg P_i)$$
Then for any $x\in\om$ we have that
$$x\in A\rmiff \{e\}^B_{f(x)}(x)\conv=1\rmiff
B\cap [0,u_x]=R\in t_x\rmiff B\models \theta_x.$$
\qed


\begin{prop}
(Post)
\begin{enumerate}
\item If $A$ is simple, then $A<_m K$.
\item If $A$ is hypersimple, then $A<_{tt} K$.
\item There exists a simple $A$ with $A\equiv_{tt} K$.
\end{enumerate}
\end{prop}
\proof

(1) If $K\leq_m A$ then $A$ is creative and hence
not simple. (See Theorem \ref{creative}.)

(2) Since every \re set is many-one reducible to $K$ it is
enough to see that $K\leq_{tt} A$ implies $A$ is not hypersimple.


\bigskip\noindent {\bf Claim.} Let $\Gamma=\{P_n:n\in A\}$.
Then there exists a \rec list $(\rho_n:n<\om)$ of
propositional sentences such that for every $n$
\begin{enumerate}
\item $A\models \rho_n$ and
\item $\Gamma\cup\{\rho_m:m<n\}\not \proves \rho_n.$
\end{enumerate}

\proof
Since $\comp(K)\leq_{tt} A$ there exists a \rec function
$\theta:\om\to SENT$ such that $n\in\comp(K)$ iff $A\models \theta(n)$.

Now we effectively construct $\rho_n$ as follows.
Let
$$\Sigma_n=\{\rho : \Gamma\cup\{\rho_m:m<n\} \proves \rho\}.$$
Note that $\Sigma_n$ is \recly enumerable as a subset of SENT.
Also
$A\models \theta$ for every $\theta\in \Sigma_n$.  It follows
that $\theta^{-1}(\Sigma_n)\sq \comp(K)$ is \re
By the S-n-m Theorem
there exists a \rec function $f$ such that
$$W_{f(n)}=\theta^{-1}(\Sigma_n)$$
and by the proof that $K$ is creative we have that
$$f(n)\in \overline{K\cup \theta^{-1}(\Sigma_n)}.$$
Take $\rho_n=\theta(f(n))$.
\qed

Let $S_k$ be that set of all $n$ such that the propositional
letter $P_n$ occurs in the sentence $\rho_k$, i.e., $S_k$
is the support of $\rho_k$.

\bigskip\noindent {\bf Claim. } For any $n$ let
$$m=\max\left(\bigcup\{S_k\st k\leq 2^{2^{n+1}}+1\}\right)$$
then $\comp(A)\cap [n,m)\neq\emp$.
\proof
Suppose not and assume that $[n,m)\sq A$.  
Let
$\rho_k^*$ be obtained from $\rho_k$ by replacing
all propositional letters $P_i$ for $n<i<m$ by
the letter $P_n$.  Note that $\Gamma\proves P_i$ for
all these $i$ and hence $\Gamma\proves \rho_k^*\equiv \rho_k$
for every $k\leq 2^{2^{n+1}}+1$.  But there are at most
$2^{2^{n+1}}$ logically inequivalent
propositional sentences with atomic letters
$P_i$ for $i\leq n$ and so for some $k<l$ we have that
$\rho_k^*\equiv \rho_l^*$.  But this is a contradiction
since then
$$\Gamma\proves \rho_i\equiv \rho_j.$$
\qed

Now it is an easy matter to construct a \rec sequence
$n_k<n_{k+1}$ so that
$\comp(A)\cap [n_k,n_{k+1})\neq\emp$ for
each $k$.
Hence $A$ is not hypersimple.

\bigskip

(3) Let $B$ be any simple set which is not hypersimple.  By
Proposition \ref{hsimple} there exists a \rec increasing
sequence $(n_k:k<\om)$ such that for all $k$ we have that
$\comp(B)\cap [n_k,n_{k+1})\neq \emp$.   Now
let
$$A=B\cup\bigcup_{k\in K}[n_k,n_{k+1})$$
$A$ is simple because it is a superset of the simple set
$B$.  $\comp(A)$ is infinite because for each $k\in\comp(K)$
we have $\comp(A)\cap [n_k,n_{k+1})\neq\emp$.
We have that $K\leq_{tt}A$ because
$$k\in K\rmiff A\models\cconj_{n_k\leq i<n_{k+1}} P_i$$
\qed


\exer Prove that $\leq_{tt}$ is transitive, i.e.,
$A\leq_{tt}B$ and $B\leq_{tt}C$ implies $A\leq_{tt}C$.

\section{Hyperhypersimple sets}

\begin{define}
$V$ is a weak array iff $V$ is \re and $V_x\cap V_y=\emp$ whenever
$x\neq y$. As usual, $V_x=\{y:\pair(x,y)\in V\}$.
\end{define}

\begin{define}
$A\sq \om$ is hyperhypersimple iff $A$ is re, $\comp(A)$ is infinite,
and for every weak array $V$ there exists $x$ with $V_x\sq A$.
\end{define}

\begin{prop}\label{charhyperhyper}
For any $A\sq \om$ for which $A$ is \re and $\comp(A)$ is infinite
the following are equivalent:
\begin{enumerate}
  \item $A$ is hyperhypersimple
  \item for every infinite \re set $B$ such that
$W_x\cap W_y=\emp$ for all distinct $x,y\in B$ there exists
$x\in B$ with $W_x\sq A$
  \item for every weak array $V$ there exists an
infinite \rec set $R$ such that $V_x\sq A$ for all $x\in R$
 \item for every weak array $V$ such that $V_x$ is
finite for all $x$ there exists $x$ such that $V_x\sq A$
\end{enumerate}
\end{prop}
\proof

(1) iff (2) is true because the two types of arrays
are the same.

$(1)\implies (3)$,  The sequence $(R_n=\{\pair(n,m):m\in\om\}:n<\om)$
is a uniformly \rec partition of $\om$ into infinite pieces.
Take
$$U_n=\cup_{e\in R_n}V_e$$
Then $U$ is weak array and so there exists $n$ with $U_n\sq A$.

$(4)\implies (1)$.   Given a weak array $V$ such that
$V_e\cap \comp(A)\neq\emp$ for all $e$ we find another weak
array $V^*$ such that
$V^*_e$ finite and $V_e^*\cap \comp(A)\neq\emp$ for all $e$.
For each $s$ define $V^*_{e,s}=V_{e,s_0+1}$ where $s_0$ is
the largest $t\leq s$ such that $V_{e,t}\sq A_s$.
\qed


\hmwk{27}{Mon 11-15}
Prove
\par (a) If $A$ is simple and $B$ is simple, then $A\cap B$ is simple.
\par (b) If $A$ is hypersimple and $B$ is hypersimple, then $A\cap B$ is 
hypersimple.
\par (b) If $A$ is hyperhypersimple and $B$ is hyperhypersimple, 
then $A\cap B$ is hyperhypersimple.

\begin{example}
  There exists a hypersimple set $A$ which is not hyperhypersimple.
\end{example}
\proof
Let $B\sq \om$ be any hypersimple set.  Define $A\sq \om$
by
$$A=\{\pair(n,m): n\in B\rmor n\leq m\}.$$
See Figure \ref{hyperfig}.
\def\text#1{\makebox(0,0)[cc]{#1}}
%\unitlength=1.20mm
\unitlength=1.20mm
\begin{figure}
\begin{picture}(60,60)(-30,0)
\put(10,10){\vector(1,0){40}}
\put(10,10){\vector(0,1){40}}
\put(10,10){\line(1,1){35}}
\put(10,15){\line(1,1){30}}
\put(10,20){\line(1,1){25}}
\put(10,25){\line(1,1){20}}
\put(10,30){\line(1,1){15}}
\put(10,35){\line(1,1){10}}
\put(10,40){\line(1,1){05}}
\put(30,10){\line(0,1){40}}
\put(30,05){\text{$n\in B$}}
\put(40,20){\circle{12}}
\put(40,20){\text{$D_x$}}
\put(45,33){\circle{10}}
\put(45,33){\text{$D_y$}}
\put(10,25){\line(1,0){45}}
\put(05,25){\text{$V_k$}}

\end{picture}
\caption{$A=\{\pair(n,m): n\in B\rmor n\leq m\}.$\label{hyperfig}}
\end{figure}
$A$ is not hyperhypersimple since each of the horizontal lines:
$$V_k=^{def}\{\pair(m,k)\st m\in\om\}$$ meets $\comp(A)$. To see
that $A$ is hypersimple
suppose we are given a strong array $(D_n:n\in R)$.
Let $\pi(\pair(m,n))=m$ be projection to the first coordinate.
We can find
an infinite \rec subset $S\sq R$ such that
$(\pi(D_x\cap Q):x\in S)$ are pairwise disjoint where
$Q=\{\pair(n,m): m<n<\om\}$.
Since $B$ is hypersimple, there exists $x\in S$ with $\pi(D_x\cap Q)\sq B$
and hence $D_x\sq A$.
\qed

\begin{example}
Dekker deficiency sets are never hyperhypersimple.
\end{example}
\proof
Let $A=\{a_s:s\in\om\}$ be a one-one \rec enumeration of a
non \rec set $A$. And
$D=\{s:\exists t>s\;\; a_t<a_s\}$.  We construct a weak array $V$
to meet the requirements:

\bigskip
$R_x \;\;\;\;\;\;\;\;\; V_x\cap \comp(D)\neq\emp $

\bigskip
\noindent Stage s+1

Step (a).
For any $x\leq s$ if $R_x$ has a follower $t$ such that
$a_s<a_t$ then unappoint $t$ so that now $R_x$ has no
follower.

Step(b).
For the least $x$ for which $R_x$ has no follower, appoint
$s$ the follower of $R_x$ and put $V_{x,s+1}=V_{x,s}\cup\{s\}$.


This ends the stage and the construction.  Note that 
$V$ is a weak array.

\bigskip\noindent {\bf Claim.}  Each $R_x$ obtains
a permanent follower $s$ and for this $s$
we have $s\in V_x\cap\comp(D)$.
\proof
This is by induction on $x$.  So after some sufficiently large 
stage $s_0$ no $y<x$ is appointed a
new follower.  Suppose for contradiction that
$R_x$ is appointed a new follower at stages
$s_1,s_2,\ldots$ where $s_0<s_1<s_2<\cdots$.  Note that
since higher priority requirements don't get new followers
after $s_0$ each time $R_x$ losses its follower it acquires
the stage itself as its new follower.  But this means that
$$a_{s_1}>a_{s_2}>a_{s_3}>\cdots$$
which is a contradiction.
\qed

\exer Prove that if $A$ is hypersimple and $(D_x:x\in C)$ is a
strong array then  there exists an infinite computable $E\su C$ such
that $D_x\su A$ for all $x\in E$.


\section{Maximal sets}


\begin{define}
 \par $A\sq^*B$ iff $B\sm A$ is finite.
 \par $A=^* B$ iff $A\sq^* B$ and $B\sq^*A$
 \par $\forall^{\infty}$ means `for all but finitely many'
\par $\exists^\infty$ means `exists infinitely many'
\end{define}



\begin{define}
  $M\sq \om$ is maximal iff $M$ is \re, $\comp(M)$ is infinite,
and for every $A$ \re if $M\sq A$ then $M=^*A$ or $A=^*\om$.
\end{define}

\begin{prop}
  Maximal sets are hyperhypersimple.
\end{prop}
Suppose $V$ is a
weak array such that $V_e\cap \comp(A)\neq\emp$ for all
$e$.  Define
$$B=A\cup\bigcup_{e<\om}V_{2e}$$
then $A\neq^*B$ and $B\neq^*\om$, so $A$ is not maximal.
\qed

\begin{theorem}
  (Friedberg) Maximal sets exist.
\end{theorem}

\proof
We will construct the maximal set $M$ as follows.
We use the notation  $p_n$ for the  $n^{th}$ element
of the complement of $M$, i.e.,
$$\comp(M)=\{p_0<p_1<p_2<\cdots \}$$
Are requirements are

\bigskip
$R_e\;\;\;\;\;\;\;(\forall^\infty n  \;\;p_n\in W_e)\;\;
\rmor\;\;(\forall^\infty n  \;\;p_n\notin W_e)$

\bigskip
\noindent This guarantees that $M\cup W_e=^*\om$ or
$M\cup W_e=^*M$,

At stage $s$ given $M_s$ we let
$$\comp(M_s)=\{p_{0,s}<p_{1,s}<p_{2,s}<\cdots \}$$
The idea of this proof is called moving markers.
We think of a marker labeled
$n$ with position $p_{n,s}$.
As we slide the marker upward we put the uncovered numbers
into $M_s$.  In order to get $\comp(M)$ infinite we want
each marker to eventually stop moving.

\begin{define}
$\si\in 2^n$ is the $n$-state of $x$ at stage $s$
iff
$$ \mbox{ for all } e<n\;\;\;\;\;\;
\si(e)=\left\{
\begin{array}{ll}
1 & \mbox{ if } x\in W_{e,s} \\
0 & \mbox{ if } x\notin W_{e,s}
\end{array}\right.
$$
\end{define}
Two easy facts about the $n$-state are the following:

\medskip
(1) Suppose $s_1\leq s_2$,
\par\noindent $\si_1\in 2^n$ is the $n$-state of $x$ at stage $s_1$, and
\par\noindent $\si_2\in 2^n$ is the $n$-state of $x$ at stage $s_2$, 
\par then $\si_1\leq_{lex} \si_2$.

\medskip
(2) For fixed $n$ and $x$ there is $\si\in 2^n$ such that
$\si$ is the $n$-state of $x$ for all but finitely many stages $s$.
We call this the final $n$-state of $x$.

\bigskip

Our strategy can be summarized simply as `maximize the lexicographic
order of the $n$-state of $p_n$'.

\bigskip\noindent Stage $s+1$.

\noindent Find the least $n$ (if any) such that
there exists  $m$ with $n<m<s$  such that

if             $\si\in 2^n$ is the $n$ state of $p_{n,s}$ and
\par $\;\;\;$   $\tau \in 2^n$ is the $n$ state of $p_{m,s}$, then
$\si<_{lex}\tau$.


\noindent For the least such $n$ find the least $m$ and shift the marker
$n$ to $m$:

Put $p_{n+i,s+1}=p_{m+i,s}$ for all $i<\om$.  Equivalently put
$$M_{s+1}=M_s\cup\{p_{j,s}: n\leq j<m\}$$
Otherwise as usual if there are no such $n,m$ just go
to the next stage with everything unchanged.

This ends the stage and the construction.

\bigskip\noindent{\bf Claim.} The markers eventually stop
moving, i.e.,
$$\lim_{s\to\infty} p_{n,s}=p_n<\infty$$
\proof
This is proved by induction on $n$.  Note that the
only way the marker $n$ moves is either that it is bumped
up by some marker $m<n$ or it moves to a higher $n$-state.
So consider some stage $s_0$ so that no marker $m<n$ moves
after stage $s_0$.  But it is impossible for $p_n$ to
change infinitely many times after this since its
$n$-state would have to increase lexicographically infinitely
many times.  (Note that in between moves its $n$-state might
also change without the marker moving but it can only increase
if it doesn't move.)
\qed

\bigskip\noindent{\bf Claim.}
For each $n$ there exists $\tau\in 2^n$ such
that 
$$\forall^\infty m\;\;\tau =\mbox{ the final $n$-state
of $p_m$.} $$
\proof
Suppose not.  Then there exists distinct $\tau_1,\tau_2\in 2^n$ such
that

$\exists^\infty m \;\; \tau_1 =$ the final $n$-state of $p_m$ and

$\exists^\infty m \;\; \tau_2 =$ the final $n$-state of $p_m$.

\noindent Suppose $\tau_1<_{lex} \tau_2$.  Then we can choose
$m_1, m_2$ with $n<m_1<m_2$ and the final $n$-state of
$p_{m_i}$ is $\tau_i$.  
This is a contradiction, since for some large enough stage
$s_0>m_2$ the markers $p_j$ for $j\leq m_2$ have stopped moving
and their final $n$-states are their states at stage $s_0$.
But by the construction some marker $\leq p_{m_1}$ must move.
\qed

This final claim proves the Theorem, since if $n=e+1$ we
have that

\noindent $\tau(e)=1$ implies $\forall^\infty m \;\;p_m\in W_e$

and

\noindent $\tau(e)=0$ implies $\forall^\infty m \;\;p_m\notin W_e$

\qed

\begin{example}
There exists a hyperhypersimple set which is not maximal.
\end{example}
\proof
First we note that it easy to get $M_1$ and $M_2$ maximal so
that $M_1\neq^* M_2$.
Take any maximal set $M$ and let $R\sq M$ to be an infinite \rec subset.
Let $\pi:\om\to\om$ be a \rec bijection which takes $R$ to
$\comp(R)$.  Let $M_1=M$ and let $M_2=\pi(M_1)$. 

Now let $A=M_1\cap M_2$.  Then $A$ is
hyperhypersimple (see exercise) but not maximal since $A\sq M_1\sq\om$ and
$A\neq^* M_1$ and $M_1\neq^*\om$.
\qed

Remark.  Yates noted that we can add to the maximal set construction an extra
`kick' to the $p_e$ marker to ensure that $\{e\}(e)\conv$ iff
$\{e\}_{p_e}(e)$. Then the maximal set constructed will be Turing equivalent
to $K$.


\hmwk{28}{Wed 11-17}
Suppose $A=\{a_n:n<\om\}$ is a 1-1 \rec enumeration of a hyperhypersimple
set $A$.  Let
$B=\{a_{a_n}:n<\om\}$.  Prove that $B$ is hyperhypersimple but not 
maximal.

\hmwk{29}{Fri 11-19}
\Anre set $A\sq \om$ is simple in $R$ where $R$ is an infinite \rec set
iff $\comp(A)\cap R$ is infinite but contains no infinite \re subset.
Is every \re set which is not \rec, simple in some infinite \rec set?
Hint: Split a maximal set.



\section{The lattice of \re sets}
 
\begin{define}
The lattice of \re sets is $\lattice =(\re sets, \sq)$.
A subset $X\sq\lattice$ is definable iff there is a first order
formula $\theta(v)$ in the language of $\sq$ such that
$$X=\{A\in\lattice\st \lattice \models \theta(A)\}.$$
Similarly for $X\sq \lattice^2$ or $X\sq\lattice^3$.
\end{define}

\begin{example}
The following are definable in $\lattice$.
\begin{enumerate}
 \item $\{(A,B,C)\in\lattice^3\st A\cup B =C\}$
 \item $\{(A,B,C)\in\lattice^3\st A\cap B =C\}$
 \item $\{\emp\}$
 \item $\{\om\}$
 \item \rec sets
\par 
$A$ is \rec iff $\lattice\models \exists B\;\; B\cap A=\emp \rmand B\cup A=\om$
 \item \re but not \rec sets
 \item infinite \re sets
\par
$A$ is infinite \re  iff
$\lattice\models \exists B\;\; B\sq A $ and $B$ is not \rec

 \item finite sets
 \item cofinite sets
 \item $\su^*$, $=^*$
 \item simple sets
 \item maximal sets
 \end{enumerate}
\end{example}

\begin{define}
$\pi$ is an automorphism of $\lattice$ iff $\pi:\lattice\to\lattice$
is a bijection such that for every $A,B\in\lattice$
$$ A\sq B \rmiff \pi(A)\sq \pi(B).$$
\end{define}

Note that for any first-order formula $\theta(v_1,\ldots,v_n)$
in the language of $\lattice$, i.e., $\sq$, that for any
$\pi\in aut(\lattice)$ and $A_1,\ldots,A_n\in\lattice$ we have
that 
$$\lattice\models \theta(A_1,\ldots,A_n)\rmiff 
\lattice\models \theta(\pi(A_1),\ldots, \pi(A_n))$$
Hence definable sets are closed under automorphisms.  

\begin{example}
If $A\in\lattice$, then $\{A\}$ is definable in $\lattice$ iff 
$A=\emp$ or $A=\om$. 
\end{example}
\proof
If $A$ is neither $\emp$ or $\om$, then we can choose $n,m<\om$ such
that $n\in A$ and $m\notin A$.  Let $\pi:\om\to\om$ be the identity
except $\pi(n)=m$ and $\pi(m)=n$.  Define $\pi:P(\om)\to P(\om)$
by $\pi(A)=\{\pi(n):n\in A\}$.  Then since $\pi$ is \rec it is
clear that $\pi\in aut(\lattice)$.   But since 
$$\pi(A)=(A\sm\{n\})\cup\{m\}$$
we see that $\{A\}$ is not closed under automorphisms and hence cannot
be definable.
\qed

\begin{prop}
\begin{enumerate}

\item For every $\pi\in aut(\lattice)$ there exists a bijection
$\hat{\pi}$ of $\om$ such that $\pi(A)=\{\hat{\pi}(n):n\in A\}$.

\item Not every bijection $\pi:\om\to\om$ induces an automorphism
of $\lattice$.

\item There are continuum many bijections $\pi:\om\to\om$ which
induce an automorphism of $\lattice$.

\end{enumerate}

\end{prop}
\proof

(1) It is easy to see that the set of singletons
$$\{\{n\}:n\in\om\}\sq \lattice$$
is definable in $\lattice$.  Hence any automorphism
$\pi:\lattice\to\lattice$ must permute the singletons.  Define
$\hat{\pi}(n)$ so that  $\pi(\{n\})=\{\hat{\pi}(n)\}$.  
But now for every $n\in\om$
$$n\in A \rmiff \{n\}\sq A  \rmiff \pi(\{n\})\sq \pi(A) 
\rmiff \hat{\pi}(n)\in \pi(A)$$ 
Hence $\pi(A)=\{\hat{\pi}(n):n\in A\}$.

(2) Take any bijection which maps the even integers to some non \rec 
infinite coinfinite set. 

(3) Let $M$ be a maximal set.  Let $\pi:\om\to\om$ be any bijection
such that $\pi\res M=id$.  There are continuum many such bijections,
one for each permutation of $\comp(M)$.  But for any $A\in \lattice$
we have that $A\cap\comp(M)$ is finite or $A\cap\comp(M)=^*\comp(M)$.
But this gives us that $\pi(A)=^*A$. Similarly 
$\pi^{-1}(A)=^*A$.
\qed

The following theorem shows that the family of hyperhypersimple
sets is definable in $\lattice$.

\begin{theorem}
(Lachlan) $A$ is hyperhypersimple iff 
$A$ is \re, $\comp(A)$ is infinite, and
$$\lattice\models \forall B\supseteq A\;\;\exists C\supseteq A \;\;
B\cap C = A \rmand B\cup C=\om$$
\end{theorem}
\proof
Suppose $A$ is not hyperhypersimple and $V$ is a weak array
such that $V_e\cap \comp(A)\neq \emp$ for all $e$.  
Define
$$B=A\cup\bigcup_{e\in\om}(V_e\cap W_e)$$
Suppose for contradiction that $C$ satisfies 
$B\cap C = A$ and $B\cup C=\om$.  Then for some
$e$ we have that $C=W_e$.  Let $x\in V_e\cap\comp(A)$.  
If $x\in W_e$ then $x\in C\cap B$ but this contradicts
$B\cap C = A$.
If $x\notin W_e$ then $x\notin C$ and $x\notin B$ but
this contradicts $B\cup C=\om$.

Conversely suppose there exists $B$ as above for which there is
no $C$.  We must show there is a weak array $V$ such that
$V_e\cap\comp(A)\neq \emp$ for all $e$.  So let
$B=\{b_s:s\in\om\}$ be a 1-1 \rec enumeration of $B$ and
put $B_s=\{b_t: t<s\}$.  Similarly, let $A_s$ be a
\rec enumeration of $A$.

We will construct $V_{e,s}$ pairwise disjoint subsets of $B$ and
meet the requirements:

\bigskip

$R_e\;\;\;\;\;\;\; V_e\cap\comp(A)\neq\emp$

\bigskip

We will carry along $g(e,s)$ a gate which we use to let elements
into each $V_e$.  At stage $s=0$ as usual we
put $V_{e,s}=\emp$ and $g(e,s)=0$.

\begin{center}
Construction
\end{center}

\bigskip
{\bf Stage $s+1$.}

\noindent First define
$g(e,s+1)$ for $e<s$.
If  $V_{e,s}\su A_s$, then $g(e,s+1)=g(e,s)+1$.  In other words,
if the requirement $R_e$ is not looking good, then increment the gate,
otherwise let it alone.

Look for the least $e<s$ (if any) such that
$b_s\leq g(e,s+1)$ and put $b_s$ into $V_e$, i.e.,
$$V_{e,s+1}=V_{e,s}\cup\{b_s\}.$$
If there is no such $e$, do nothing.
This ends the construction.

\bigskip
\begin{center}
Verification
\end{center}

\noindent {\bf Claim.}  $\lim_{s\to\infty} g(e,s)=g(e)<\infty$
and $R_e$ is met.
\proof
This is proved by induction on $e$.  Choose $s_0$ so
that for all $\hat{e}<e$ and $s>s_0$ we have
that $g(\hat{e},s)=g(\hat{e})$ and
$$b_s> \max\{g(\hat{e}):\hat{e}<e\}$$

Suppose for contradiction that
$$\lim_{s\to\infty} g(e,s)=\infty$$  
Define
$$C=A\cup \bigcup_{s\geq s_0}([0,g(e,s+1)]\cap\comp(B_s)$$
Suppose $x\in\comp(A)$.  Then we claim that
$$x\in C\rmiff x\in\comp(B)$$
This is a contradiction since then $C\cap B= A$ and
$C\cup B=\om$.

Suppose $x\in\comp(B)$. This implies that $x\in \comp(B_s)$ for
all $s$.  But if $g(e,s)\to\infty$ we have that $x\in C$.

Suppose $x\in C$.  Then for some $s\geq s_0$ we
have that $x\in [0,g(e,s)]\cap \comp(B_s)$ (since we are
assuming $x\notin A$.)   If $x\notin\comp(B)$ then 
$x\in B\sm B_s$. Hence $x=b_t$ for some $t\geq s$. 
But notice that $b_t=x\leq g(e,s)\leq g(e,t+1)$.  
By our choice of $s_0$ we have that 
$b_t> g(\hat{e})$ for all $\hat{e}<e$ and 
so $b_t$ will be put into $V_e$.  But $x=b_t$ was assumed
to be an element of $\comp(A)$.  This means that $g(e,t)$ will
never increase again which contradicts it going to $\infty$.

The reason $R_e$ is met is because if $g(e,s)$ stops growing
then eventually we stop putting $b_s$'s into $V_e$.  Hence
$V_e$ is finite and so it is impossible that $V_e\sq A$.

This proves the Claim and the Theorem.
\qed

The following shows that the family of hypersimple sets is not
definable in $\lattice$.

\begin{theorem}
(Martin) There exists a hypersimple set $A$ and $\pi\in aut(\lattice)$
such that $\pi(A)$ is not hypersimple.
\end{theorem}
\proof
We will construct the \re set $A$ as usual by constructing a \rec increasing
sequence $A_s$.  We will construct a \rec sequence  $\pi_s$ 
of bijections of $\om$ with the property that
$\pi_s(n)=n$ for every $n\geq s$.  So each $\pi_s$ is really
a finite permutation. $\pi$ will be the limit of $\pi_s$.

Let $W_{e,s}^*$ be defined as follows:

$W_{e,s}^*=W_{e,s_0}$ where $s_0\leq s$ is the largest $t\leq s$ with
the property that for distinct $x,y\in W_{e,t}$ we have
that $D_x\cap D_y=\emp$.

The list $W_{e}^*$ automatically contains all strong arrays.
Our requirements for this construction include:

\bigskip

$R_e\;\;\;\;\;\; W_e^* \mbox{ infinite } \implies \exists x\in W_e^*\;\;\;\;
D_x\sq A$

\bigskip

The strategy for making sure that $\comp(A)$ is a variant on the 
Post $2e$ strategy.
At stage $s=0$ in our construction we have $A_s=\emp$ and $\pi_s$ the
identity.


\bigskip
{\bf Stage $s+1$.}
\par \noindent
Given $\pi_s$ and $A_s$, we say that $e<s$ requires attention iff
\begin{enumerate}
\item $\neg \exists n\in W_{e,s}^*\;\;\; D_n\sq A_s$
\item $\exists x,y$ such that
 \begin{enumerate}
   \item $x,y\notin A_s$
   \item $\exists n\in W_{e,s}^*\;\; x\in D_n$
   \item $e<x<y<s$, $\;\;\;\; e<\pi_s(x)$, $\;\;\;e<\pi_s(y)$
   \item 
      \begin{enumerate}
          \item $e$-state of $x$ at stage $s$ = $e$-state of $y$ at stage $s$
          \item $e$-state of $\pi_s(x)$ at stage $s$ = $e$-state of 
          $\pi_s(y)$ at stage $s$
      \end{enumerate}
   \item $2x<\pi_s(y)$.
 \end{enumerate}
\end{enumerate}

The action at this stage is the following.  For the least $e<s$ 
(if any) which
requires attention we choose the least $x$ for which there is a $y$ and
then we choose the least $y$.   For this choice 
$(e,x,y)=(e_s,x_s,y_s)$ we 

(a) put $x$ into $A$, $A_{s+1}=A_s\cup\{x_s\}$

(b) put $\pi_{s+1}=\pi_s\circ swap(x,y)$ where $swap(x,y)$ refers
to the transposition which interchanges $x$ and $y$.

\noindent As usual if there is no $e$ which requires attention we
do nothing and go onto the next stage. 

This ends the construction.  Let $Q$ denote the stages $s$ where
action takes place at stage $s+1$.  Then
$$A=\{x_s:s\in Q\}$$
We define
$$\pi(u)=\lim_{s\to\infty}\pi_s(u)$$
although at this point we have not proved that this limit always exists.
Note the pointwise limit of 1-1 functions must be 1-1 
where it is defined. 

Note that for $s\in Q$ we have that $\pi_{s+1}(x_s)=\pi_s(y_s)$.  Since
$x_s$ enters $A$ we have (by  $2a$) that $x_s$ will never be
a $x_t$ or $y_t$ latter.  It follows that $\pi(x_s)=\pi_{s+1}(x_s)$.  
Hence 
$$B=^{def}\{\pi_{s+1}(x_s): s\in Q\}=\{\pi(x_s): s\in Q\}$$ 
is well defined and \re
 
\bigskip\noindent {\bf Claim (1)}
for any $n$ we have that $|B\cap [0,2n]|\leq n$.

\proof
Note that (by $2e$) we have that $\pi(x_s)=\pi_s(y_s)>2x_s$. 
Since each $x_s$ is distinct the Claim follows.
\qed
As we have seen before this implies that $B$ is not hypersimple.
(Proposition \ref{posthsimple}).

\bigskip\noindent {\bf Claim (2)}
$\lim_{s\to\infty}\pi_s(u)=\pi(u)<\infty$ for every $u$.
\proof
Fix $s_0$ so that $A\cap [0,u]=A_{s_0}\cap [0,u]$.  Now
the only way that $\pi_{s+1}(u)\neq \pi_s(u)$ for some
$s>s_0$ is if $u=x_s$ or $u=y_s$. 
But in either case since $x_s<y_s$ and $x_s$ enters $A$
we have $A$ changes in the interval $[0,u]$ which is a contradiction.
\qed

We don't know yet that $\pi$ is onto.

\bigskip\noindent {\bf Claim (3)} For each $e$
\par (a) $R_e$ is met.
\par (b) $\exists s_0\;\forall s>s_0\;\;\; e_s>e$
\proof
This is proved by induction on $e$.  

(a) We may suppose by
induction that there exists $s_0$ such that
$e_s\geq e$ for all $s>s_0$.  Suppose $R_e$ is not met.
Then $W_e^*$ is infinite and for all $n\in W_e^*$ 
we have that $D_n\cap \comp(A)\neq\emp$.  For each
$n\in W_e^*$ define
$$u_n=\min(D_n\cap \comp(A))$$
Since the $D_n$ are pairwise disjoint all of the $u_n$ are
distinct.  Note there exist $\si,\tau\in 2^e$ such that

$\exists^\infty n\in W_e^*\;\;\; \si = $ final $e$-state of $u_n$ and
$\tau =$ final $e$-state of $\pi(u_n)$.

Choose $u_n$ and $u_m$ such that 
\begin{enumerate}
\item $n,m\in W_e^*$
\item $e<u_n<u_m$
\item $2u_n<\pi(u_m)$
\item $\si$ is the final $e$-state of $u_n$ and $u_m$, and
\item $\tau$ is the final $e$-state of $\pi(u_n)$ and $\pi(u_m)$.
\end{enumerate}

Increase $s_0$ (if necessary) so that not only is $e_s\geq e$ for all
$s\geq s_0$ but also so that 
\begin{enumerate}
\item $n,m\in W_{e,s_0}^*$
\item $u_n<u_m<s_0$ and $\pi(u_n)<s_0$ and $\pi(u_m)<s_0$
\item $\pi_s(u_n)=\pi(u_n)$ and $\pi_s(u_m)=\pi(u_m)$ all $s>s_0$
\item $\si$ is the $e$-state of $u_n$ and $u_m$ at stage $s_0$, 
\item $\tau$ is the $e$-state of $\pi(u_n)$ and $\pi(u_m)$ at
stage $s_0$ and
\item $A_{s_0}\cap [0,u_m]=A\cap [0,u_m]$
\end{enumerate}

Recall that we chose $u_n,u_m\in\comp(A)$.  
It is easy to check that $e$ requires attention at stage
$s_0$ and $u_n$ and $u_m$ witness this
fact.  But this means that $u_n$ or some smaller
$u$ enters $A$.  But this contradicts the condition
that $A$ does not change below $u_m$.

(b) Suppose that $e_s\geq e$ for all $s>s_0$ and $R_e$ is
met.  If $W_e^*$ is infinite, then for some
$n\in W_e^*$ we have that $D_n\sq A$.
But this will be seen at some stage and so $e$ will not
require attention after that.
If $W_e^*$ is finite, then suppose that 
$$\cup\{D_n\st n\in W_e^*\}\sq [0,N].$$
After we reach a stage $s>s_0$ where $A_s\cap [0,N]=A\cap [0,N]$,
then $e$ will never again require attention because then $A$ would
change beneath $N$.

\qed

\bigskip\noindent {\bf Claim (4)} $\pi$ is onto.
\proof
Given $z$ choose $s_0$ so that $e_s>z$ for all $s\geq s_0$. 
If $\pi_{s_0}(u)=z$, then $u$ will never be
either $x_s$ or $y_s$ for any $s\geq s_0$. This is because we
required (2c) that $\pi_s(x_s),\pi_s(y_s)>e_s$.
Hence $\pi(u)=z$.
\qed

\bigskip\noindent {\bf Claim (5)} 
\par (a) $\forall C\in\lattice\;\;\; \pi(C)\in\lattice$
\par (b) $\forall C\in\lattice\;\;\; \pi^{-1}(C)\in\lattice$
\proof

(a)
Fix $s_0$ so that for all $s>s_0$ we have that $e_s>e$.  
Then we show that
$$\pi(W_e)=\bigcup_{s>s_0}\pi_s(W_{e,s})$$
To see this first suppose $y\in \pi(W_e)$.  Then there
exists $x\in W_e$ with $\pi(x)=y$ but for all sufficiently
large $s$ we have that $x\in W_{e,s}$ and $\pi_s(x)=\pi(x)$
and thus $y\in\pi_s(W_{e,s})$.  

To see the other inclusion, suppose that
$y\in\pi_s(W_{e,s})$ for some $s>s_0$.  We claim that for
every $t>s$ that $y\in \pi_t(W_{e,t})$.  This is proved by
induction on $t$.  Suppose that $\pi_t(u)=y$ for some
$u\in W_{e,t}$.  Then $\pi_{t+1}(u)=\pi_t(u)$ unless
$u=x_t$ or $u=y_t$ and then
$\pi_{t+1}(x_t)=\pi_t(y_t)$ and $\pi_{t+1}(y_t)=\pi_t(x_t)$.
But since
$x_t$ and $y_t$ have the same $e_t$-state and $e_t>e$,
if one is in $W_{e,t}$ so is the other.  In either case
we have that there exists $v\in W_{e,t+1}$ with
$\pi_{t+1}(v)=y$.   Now to see that $y\in\pi(W_e)$ 
suppose that $\pi(u)=y$ and choose
sufficiently large $t>s_0$ such that $\pi_t(u)=\pi(u)=y$.
Since $\pi_t$ is a bijection and $y\in \pi_t(W_{e,t})$, 
it must be that $u\in W_{e,t}$
and hence $u\in W_e$.

(b) This is similar, except we use that $\pi_t(x_t)$ and
$\pi_t(y_t)$ have the same $e_t$-state.
\qed

\hmwk{30}{Wed 11-24}
Prove that there exists a bijection $\pi:\om\to\om$ such that 
$\pi(A)\in\lattice$ for all $A\in\lattice$ but $\pi\notin aut(\lattice)$.
(Hint: use a maximal set.)

\exer For each $n\geq 2$ prove there is a sequence of maximal sets
$A_1,\ldots,A_n$ such that $A_i\neq^*A_j$ for distinct $i$ and $j$.
Prove that for any such sequence that
${\mathcal E}^*(A_1\cap A_2\cap\cdots \cap A_n)$ is isomorphic
to $(\pow(\{1,\ldots,n\}),\su)$.  The structure
${\mathcal E}^*(A)$ is the set of \re supersets of $A$ modulo the
finite sets and ordered by $\su^*$.


\section{Arithmetic hierarchy}

\begin{define}
For $A$ and $B$ predicates over subsets of $\om$ or finite
products of $\om$ we define:

$\Pi_0^0=\Sigma_0^0=$ the \rec predicates.

$A$ is $\Sigma^0_{n+1}$ iff there exists $B$ which is $\Pi^0_{n}$
and $A(x)\equiv \exists y\;\; B(x,y)$.

$A$ is $\Pi^0_{n+1}$ iff there exists $B$ which is $\Sigma^0_{n}$
and $A(x)\equiv \forall y\;\; B(x,y)$.

$A$ is $\Delta_n^0$ iff $A$ is $\Sigma^0_{n}$ and $A$ is $\Pi^0_{n}$.

\end{define}

Note that by DeMorgan's Laws 
$$\Pi_n^0=\{\neg A: A\in \Sigma_n^0\} \rmand \Sigma_n^0=
\{\neg A: A\in \Pi_n^0\}$$
and hence
$$\Delta_n^0=\{\neg A: A\in \Delta_n^0\}.$$

\begin{prop}
Suppose $\Gamma$ is $\Sigma_n^0$, $\Pi_n^0$, or $\Delta^0_n$. Then
$\Gamma$ is closed under $\leq_m$, i.e., $A\leq_m B\in\Gamma$
implies $A\in\Gamma$.  This implies that if
the predicate $B(x,y)$ is in $\Gamma$ and $f$ is a
\rec function, then $A(x,y)\equiv B(x,f(x))$ is in $\Gamma$. 
\end{prop}

\begin{prop}
If $B(x,y)$ in $\Sigma_n^0$, then $A(x)\equiv \exists y\;\; B(x,y)$ is
in $\Sigma_n^0$. If $B(x,y)$ in $\Pi_n^0$, then 
$A(x)\equiv \forall y\;\; B(x,y)$ is
in $\Pi_n^0$.
\end{prop}

\begin{prop}
Suppose $\Gamma$ is $\Sigma_n^0$, $\Pi_n^0$, or $\Delta^0_n$. 
If $A,B\in\Gamma$, then
$A\conj B$ and $A\disj B$ are both in $\Gamma$.
Also, $\Gamma$ predicates are closed under bounded quantification,
e.g., $\exists u<x\; A(u,x,\ldots)$ and $\forall u<x\; A(u,x,\ldots)$. 
\end{prop}

\begin{prop}
$\;\;\;\Sigma_n^0\cup \Pi_n^0\;\;\sq\;\; \Delta_{n+1}
\;=\;\Sigma_{n+1}^0\cap \Pi_{n+1}^0$
\end{prop}

\begin{define}
We say that $A$ is universal for $\Gamma$ iff
$$\Gamma=\{A_x\st x\in\om\}.$$

We say that $A$ is $m$-complete for $\Gamma$ iff
$$\Gamma=\{B\st B\leq_m A\}$$
\end{define}

Note that universal for $\Gamma$ implies $m$-complete for
$\Gamma$. Also, the complement of a set universal for
$\Gamma$ is universal for $\dualGamma$ and the same
for $m$-completeness.

\begin{prop}
For each $n>0$ there is a universal $\Sigma_n^0$ set.
\end{prop}

\begin{prop}
For each $n>0$ we have $Red(\Sigma_n^0)$, $Sep(\Pi^0_n)$,
$\neg Sep(\Sigma_n^0)$, and $\neg Red(\Pi^0_n)$.
\end{prop}
\proof
See definitions \ref{reduction}. 
We first show $Red(\Sigma_n^0)$.
Let 
$$A(x)\equiv \exists y \; R(x,y)\;\;\;\rmand \;\;\;
B(x)\equiv \exists y \; S(x,y)$$
where $R$ and $S$ are $\Delta_n^0$.  Reduce $A$ and $B$ by
$$A_0(x)\equiv \exists y \; ( R(x,y)\conj \forall z<y\; \neg S(z,x))$$
and
$$B_0(x)\equiv \exists y \; (S(x,y) \conj \forall z\leq y\; \neg R(z,x))$$

Since $Red(\Gamma)\implies Sep(\dualGamma)$ 
Proposition \ref{red->sep}, it follows that
$Sep(\Pi^0_n)$ holds.

To see $\neg Sep(\Sigma_n^0)$, first construct a doubly
universal pair $A$ and $B$.  These are $\Sigma_n^0$ sets such that
for every pair $C$ and $D$ of $\Sigma_n^0$ sets there exists a
$u$ with $C=A_u$ and $D=B_u$.  To get $A$ and $B$ let $U$ be
a universal $\Sigma_n^0$ set.  Then define
$$A=\{(\pair(x,y),z)\st \pair(x,z)\in U\}$$
and 
$$B=\{(\pair(x,y),z)\st \pair(y,z)\in U\}$$
then $u=\pair(x,y)$ codes the pair $U_x$ and $U_y$.
Now applying reduction to $A$ and $B$ we get
$A^0\sq A$ and $B^0\sq B$.  Note that this simultaneously 
reduces all cross sections $A_u$ and $B_u$.  
Assuming for contradiction that separation holds, let
$C$ be $\Delta_n^0$ such that $A^0\sq C$ and $B^0\sq\comp(C)$.  
We get a contradiction since, then $C$ would be a universal $\Delta_n^0$ set.
This is because if $P$ is $\Delta_n^0$ then there exists
$u$ with $A_u=P$ and $B_u=\comp(P)$.  But the reduction 
followed by separation can't 
effect the $u$ cross section, so $C_u=P$.
\qed


\hmwk{31}{Mon 11-29}
Prove there does not exist a universal $\Delta_n^0$ set.


\section{Post: $\Delta_2^0$ same as \rec in $\jump(0)$}


\begin{lemma}\label{infty}
$A\sq\om$ is $\Pi_2^0$ iff there exists $P$ \rec such that
$$A(x)\rmiff \exists^\infty s\;\;P(s,x)$$
\end{lemma}
\proof
($\leftarrow$) $\exists^\infty s\;\;P(s,x)$ iff $\forall t\;
\exists s>t\;P(s,x)$

\noindent ($\rightarrow$) Suppose
$$A(x)\rmiff \forall n\;\exists m\; R(n,m,x)$$
where $R$ is $\Delta_1^0$.  Define $P\sq \om^{<\om}\times \om$ by
$$P(\si,x)\rmiff \forall i<|\si|\;\; [ R(i,\si(i),x)\rmand
\forall j<i\; \neg R(i,j,x)]$$
\qed


\begin{theorem} \label{postdelta}
  (Post) Suppose $A\sq\om$.  Then $A$ is $\Delta_2^0$ iff
$A\leq_T\jump(0)$
\end{theorem}
\proof
Suppose $A$ is $\Delta_2^0$.  Then by Lemma \ref{infty} there
exists \rec $P(u,x)$ and $Q(v,x)$ such that
$$A(x)\equiv \exists^{\infty} u\;\; P(u,x)$$
$$\neg A(x)\equiv \exists^{\infty} v\;\; Q(v,x)$$
Now define $g(x,s)$ as follows.  Input $x,s$ and let
$u_s$ be the maximum $u\leq s$ such that $P(u,x)$ (zero if no such $u$).
Similarly define $v_s$ to be the maximum $v\leq s$ such that $Q(v,x)$.
Define
$$g(x,s)=\left\{
\begin{array}{ll}
1  & \mbox{if }u_s\geq v_s\\
0  & \mbox{if }u_s<v_s\\
\end{array}\right.
$$
It is easy to check that
$$A(x)=\lim_{s\to\infty}g(x,s)$$
and so by the Limit Lemma \ref{limitlemma} we have that $A\leq_T\jump(0)$.

Conversely if $A\leq_T\jump(0)$ then by the Limit Lemma we
have $g$ \rec such that
$$A(x)=\lim_{s\to\infty}g(x,s)$$
but then
$$A(x) \equiv \forall^\infty s \;\; g(x,s)=1
\equiv \exists^\infty s \;\; g(x,s)=1$$
so $A$ is $\Delta_2^0$.
\qed


\begin{lemma}
(1) $A\sq \om$ is $\Sigma_1^0(B)$ iff $A\leq_m \jump(B)$.
\par (2) $A$ is $\Delta_2^0(B)$ iff $A\leq_T \jump(B)$.
\end{lemma}
\proof
$A$ is $\Sigma_1^0(B)$ iff there exists a predicate $R\leq_T B$ such
that
$$A(x)\rmiff \exists y\;\; R(x,y)$$

\noindent
(1) is just a relativization of the standard result that $\jump(0)$
is m-complete for $\Sigma_1^0$.

\noindent 
(2) is just the relativization of Post's Theorem \ref{postdelta}. 

\qed

\begin{theorem}
(Post)
\par (1) $A\leq_T 0^{(n)}$ iff $A$ is $\Delta_{n+1}^0$.
\par (2) $0^{(n)}$ is an $m$-complete $\Sigma_n^0$-set.
\end{theorem}
\proof
(1) for $n=2$:

$A\leq_T 0^{\pr\pr}$ iff $A\leq_T (0^\pr)^\pr$ iff
$A$ is $\Delta_2^0(\jump(0))$.

$A$ is $\Delta_2^0(\jump(0))$ iff there exists $R_1,R_2\leq_T\jump(0)$
such that
$$A(x)      \rmiff \exists n\;\forall m \; R_1(n,m)$$
$$\neg A(x) \rmiff \exists n\;\forall m \; R_2(n,m)$$
but since $R_1,R_2\leq_T\jump(0)$ iff $R_1$ and $R_2$ are $\Delta_2^0$,
we have that

$A$ is $\Delta_2^0(\jump(0))$ iff $A$ is $\Delta_3^0$.

\noindent (2) for $n=2$:

$0^{\pr\pr}$ is $\Sigma^0_1(\jump(0))$ and $m$-complete for
$\Sigma^0_1(\jump(0))$.   But $\Sigma^0_1(\jump(0))$ is $\Sigma^0_2$.
This is because $B$ is $\Sigma^0_1(\jump(0))$ iff there exists
$R\leq_T \jump(0)$ such that
$$B(x) \rmiff \exists y\;\; R(x,y)$$
But $R\leq_T\jump(0)$ iff $R$ is $\Delta_2^0$.   Hence $B$ is
$\Sigma_2^0$ iff $B$ is $\Sigma^0_1(\jump(0))$.

\bigskip
The proofs for $n>2$ are analogous.

\qed

\hmwk{32}{Wed 12-1}
Prove there does not exist $A$ which is $m$-complete for
$\Delta^0_2$.  

\exer (Enderton, Putnam) Prove that if $0^{(n)}\leq_T A$ for every $n$, then
$0^{(\om)}\leq_T A^{\pr\pr}$.   
\par\noindent Hint: Show that
$$P(e_1,e_2)\equiv \exists B,C\;\;\; B=\{e_1\}^A\wedge
C=\{e_2\}^A\wedge C=\jump(B)$$
is $\Pi^0_2(A)$.

\section{EMP, TOT, FIN, and REC}

\begin{prop}
  $EMP=^{def}\{e\st W_e=\emp\}$
is $\Pi^0_1$-m-complete.
\end{prop}
\proof
$$e\in EMP\rmiff \forall x,s\;\; x\notin W_{e,s}$$
so $EMP$ is $\Pi^0_1$. 
Let $A$ be $\Pi_1^0$, then there is $R$ \rec so that
$$A(x)\rmiff \forall y\;\; R(x,y).$$
Using S-n-m Theorem get $f$ \rec so that
for every $x$
$$W_{f(x)}=\{y\st \neg R(x,y)\}$$
Then $A(x)$ iff $f(x)\in EMP$.
\qed


\begin{prop}\label{tot}
\par  $TOT=^{def}\{e\st W_e=\om\}$ is m-complete for $\Pi^0_2$.
\par  $FIN=^{def}\{e\st W_e$ is finite$\}$ is m-complete for $\Sigma^0_2$.
\end{prop}
\proof
$$e\in TOT \rmiff \forall x \;\exists s\; x\in W_{e,s}$$
$$e\in FIN \rmiff \exists x \;\forall y,s\; (y\in W_{e,s}\implies y<x)$$
so $TOT$ is $\Pi^0_2$ and $FIN$ is $\Sigma^0_2$.
Now suppose that $A$ is $\Pi_2^0$ we show that
$$(A,\comp(A))\leq_m(TOT,FIN)$$
which simultaneously shows that $TOT$ is $\Pi^0_2$-m-complete
and $FIN$ is $\Sigma^0_2$-m-complete.
Suppose
$$A(x)\rmiff  \exists^\infty s\;\;P(s,x)$$
where $P$ is $\Delta_1^0$.  Using S-n-m find a \rec function $f$
so that
$$W_{f(x)}=\{t\st\exists s>t \;\; P(s,x)\}$$
Hence $A(x)\implies W_{f(x)}=\om$ while
$\neg A(x)\implies W_{f(x)}$ is finite.
\qed

\begin{prop}
  $COF=^{def}\{e\st \comp(W_e)$ is finite $\}$ is
$\Sigma_3^0$-m-complete.
\end{prop}
\proof
$$e\in COF\rmiff \exists n\;\forall m>n\;\exists s\;\; m\in W_{e,s}$$
Now suppose that $A$ is $\Sigma_3^0$.  Then there exists
$P$ which is $\Delta_1^0$ such that
$$A(x)\rmiff \exists n\;\;\exists^\infty m\;\; P(n,m,x)$$
Input $x$ and describe the \re set $B_x$ by using a moving marker
construction similar to the construction of a maximal set but
simpler. At any stage $s$ we have that
$$\comp(B_{x,s})=\{p_{0,s}<p_{1,s}<p_{2,s}<\cdots\}$$
We look for the least $n<s$ (if any)
such that $P(n,s,x)$ and bump the $n^{th}$ marker, i.e.,
enumerate $p_{n,s}$ into $B_x$, i.e., $B_{x,s+1}=B_{x,s}\cup\{p_{n,s}\}$.
Note that if $A(x)$ is true then there exist $n$ so that the
$n^{th}$ marker is bumped infinitely often and so $B_x$ is
cofinite.  On the other hand if $\neg A(x)$, then each marker
eventually stops moving and so $B_x$ is coinfinite.

By the usual S-n-m argument we can find a \rec function $f$ so
that $B_x=W_{f(x)}$ for all $x$ and so
$$A(x)\rmiff f(x)\in COF$$
\qed

\begin{prop}
  $REC=^{def}\{e\st W_e$ is \rec $\}$ is
$\Sigma_3^0$-m-complete.
\end{prop}
\proof
$$e\in REC\rmiff \exists e^\pr\;\;( W_e\cup W_{e^\pr}=\om\rmand
W_e\cap W_{e^\pr}=\emp)$$
and $W_e\cup W_{e^\pr}=\om$ is $\Pi_2^0$ and
$W_e\cap W_{e^\pr}=\emp$ is $\Pi^0_1$.
To see that it is $m$-complete, use a moving marker argument as
above.  Just add an additional reason to bump the $e^{th}$ marker
to make sure that if $B_x$ is coinfinite, then
for each $e$
$$\psi_e(e)\conv\;\; \implies\;\; \psi_{e,p_e}(e)\conv$$
This guarantees that if $B_x$ is coinfinite, then $K\leq_T B_x$.
\qed

\hmwk{33}{Fri 12-3}
\par (a) Let $A$ be an infinite \re set.  Let
$$Q_A=\{e\st W_e=A\}$$
Prove that $Q_A$ is $\Pi^0_2$-m-complete.
\par (b) Let $A$ be a finite nonempty set. Prove that 
$$Q_A=\{e\st W_e=A\}$$
is $D(\Sigma^0_1)$-m-complete, where
$$D(\Sigma^0_1)=\{A\cap \comp(B)\st A,B\in \Sigma^0_1 \}.$$

\begin{lemma} \label{unique}
  Suppose $A$ is $\Sigma_{k+1}^0$ then there exists $B$
$\Pi_k^0$ such that 
$$A(x) \rmiff \exists y\;\; B(x,y)\rmiff \exists ! y\;\; B(x,y)$$
\end{lemma}
\proof
Suppose
$$A(x)\rmiff \exists y\;\; P(x,y)$$
where $P$ is $\Pi_k^0$.  Then
$$A(x)\rmiff \exists y\;\; (P(x,y)\conj \forall z<y \; \neg P(x,z)$$
Define
$$C(x,y)\rmiff \forall z<y \; \neg P(x,z)$$
In case $k+1=1$ then $C$ is $\Delta_1^0$.  In case $k+1>1$ then
since $C$ is $\Sigma_k^0$ we have
by induction a $\Pi^0_{k-1}$ predicate $D$ so that
$$C(x,y)\rmiff \exists u\; D(x,y,u)\rmiff\exists ! u\; D(x,y,u)$$
Hence
$$A(x)\rmiff \exists y\;\exists u\;\;(P(x,y)\conj D(x,y,u))\rmiff
\exists! y\;\exists! u\;\;(P(x,y)\conj D(x,y,u))$$
so taking $B(x,\pair(y,u)) \equiv P(x,y)\conj D(x,y,u)$ does
the trick.
\qed

\begin{prop}
(a) $A$ is $\Pi^0_3$ iff there exists $B$ which is $\Delta_1^0$ such
that
$$A(u)\equiv \exists^\infty s\;\forall n \; B(s,n,u)$$
\par
(b) $A$ is $\Pi^0_4$ iff there exists $B$ which is $\Delta_1^0$ such
that
$$A(x)\equiv \exists^\infty s\;\exists^\infty t \; B(s,t,x)$$
\end{prop}
\proof
(a) Suppose
$$A(u)\equiv \forall x \;\exists y \;\forall z\; R(x,y,z,u)$$
where $R$ is $\Delta_1^0$. Define
$$Q(x,u)\equiv \exists y \;\forall z\; R(x,y,z,u)$$
Then by Lemma \ref{unique}  there is a $C$ which is $\Pi_1^0$ and
$$Q(x,u)\equiv \exists y\;\; C(x,y,u) \equiv \exists ! y\;\; C(x,y,u)$$
Hence
$$A(u)\equiv \forall x\exists ! y \;\;C(x,y,u)$$
$$A(u)\equiv \exists^{\infty}\si\in \om^{<\om}\;\;
\forall i<|\si|\;\; C(i,\si(i),u)$$
Note that $\forall i<|\si|\;\; C(i,\si(i),u)$ is $\Pi_1^0$ and
so there is $B$ \rec so that
$$\forall n \;B(\si,n,u) \equiv \forall i<|\si|\;\; C(i,\si(i),u)$$

\medskip
\noindent (b)
Suppose
$$A(u)\equiv \forall x \;\exists y \; R(x,y,u)$$
where $R$ is $\Pi^0_2$.  By Lemma \ref{unique} applied to
$\exists y \;\; R(x,y,u)$ we may assume that
$$A(u)\equiv \forall x\;\exists ! y\; R(x,y,u)$$
Hence
$$A(u)\equiv \exists^{\infty}\si\;\forall i<|\si|\;\;
R(i,\si(i),u)$$
but the predicate
$$ Q(\si,u)\equiv\forall i<|\si| \;\;R(i,\si(i),u)$$
is $\Pi_2^0$ so there exists a \rec $B$ so that
$$Q(\si,u)\equiv \exists^{<\infty}\tau\;\; B(\si,\tau,u)$$
Hence
$$A(u)\equiv \exists^\infty \si\;\exists^\infty\tau\;\; B(\si,\tau,u)$$
\qed


\exer For the correct class $\Gamma$, show that INF, EQ, EQ* are m-complete
$\Gamma$ sets where
$$\mbox{INF}=\{e\st W_e \mbox{ is infinite}\}$$
$$\mbox{EQ}=\{\la e_1,e_2\ra\st W_{e_1}=W_{e_2}\}$$
and
$$\mbox{EQ}^*=\{\la e_1,e_2\ra\st W_{e_1}=^*W_{e_2}\}.$$


\hmwk{34}{Mon 12-6}
\par Let
$PTIME=\{e\st \psi_e $ runs in polynomial time $\}$, i.e.,
there exists a polynomial $p(x)$ such that 
$\psi_e(x)$ halts in less than $p(x)$ steps for every $x$.  
Prove that $PTIME$ is $\Sigma^0_2$-m-complete.

\hmwk{35}{Wed 12-8}
For each $e$ let $Q_e=\{{n\over m+1}\st \pair(n,m)\in W_e\}\sq\rationals.$
Define
\par $\Omega=\{ e\st Q_e$ is order isomorphic to $\om\}$.  
\par\noindent Prove that $\Omega$ is $\Pi^0_3$-m-complete.

\exer Show that if $Q=\{e\st W_e\in\vv\}$ is not $\Sigma^0_3$
then $\vv$ cannot be \anre class.  See Definition \ref{defreclass}.

\exer Prove that the family of coinfinite \re sets is not
\anre class. 

\exer Prove that SIMP=$\{e\st W_e$ is simple $\}$ is m-complete $\Pi^0_3$.
Hint: Like the proof for COF but also let $W_e$ kick the $e^{th}$ marker at most
once to make $A$ meet $W_e$ if $W_e$ infinite.

% 2001 #21
\exer Prove that the family of simple sets is not \anre class.

% 2001 #20
\exer
 Prove of disprove:
\par (a) there exists a total $f\leq_T 0^{((2)}$ such that for all
$e$, if $W_e$ is \rec, then $W_{f(e)}=\overline{W_e}$.
\par (b) there exists a total $f\leq_T 0^{(3)}$ such that for all
$e$, if $W_e$ is \rec, then $W_{f(e)}=\overline{W_e}$.



\section{Domination and high degrees}

\begin{theorem}\label{martindom}
(Martin) For any set $A\su\om$ the following are
equivalent:
\begin{enumerate}
\item $0^{\pr\pr}\leq_T \jump(A)$ and
\item there exists $g\leq_T A$ such that 
$\forall^\infty n \;\;f(n)\leq g(n)$ for every \rec $f$. 
\end{enumerate}
\end{theorem}
\proof

$(1)\to (2)$ 

Since TOT is Turing equivalent to $0^{\pr\pr}$ (\ref{tot}), by the
limit lemma (\ref{limitlemma})
there is a total $h\leq_T A$ so that for every $e\in\om$
$${\mbox{T0T}}(e)=\lim_{s\to\infty} h(e,s).$$
Define $h_e(x)=h(e,x)$ and define
$g(x)$ to be the maximum of the set:
$$\{ \{e\}(x)\st e<x \rmand \{e\}_s(x)\downarrow
\mbox{ where } h_e\res[x,s)\equiv 1\}.$$
Note that if $\{e\}$ is not total, then $h_e$ is eventually 
zero. If it is total then $h_e$ is eventually one.  It is
easy to check that $g\leq_T h\leq_T A$ and $g$ eventually dominates
each \rec functions.

$(2)\to (1)$

\noindent Define 
$$h(e,s)=\left\{
\begin{array}{ll}
1 & \mbox{ if } \{e\}_{g(s)}(x)\downarrow \mbox{ for all } x<s \\
0 & \mbox{ otherwise}.
\end{array}
\right. $$
Then since $g$ eventually dominates all \rec functions we get that
$${\mbox{T0T}}(e)=\lim_{s\to\infty} h(e,s)$$
and hence by the limit lemma that 
$$0^{\pr\pr}\equiv_T{\mbox{T0T}}\leq_T \jump(A).$$

\qed

\begin{theorem} \label{martin-tenn}
(Martin, Tennenbaum) If $A$ is a maximal set, then
$$A^{\pr\pr}\equiv_T 0^{\pr\pr}.$$
\end{theorem}
\proof
Let $g(n)=\overline{a}_n$ where $\comp(A)=\{\overline{a}_0<
\overline{a}_1<\cdots\}$.
We already know that since $A$ is hypersimple that
$\exists^\infty n\;\; f(n)<g(n)$ for any \rec $f$.
Suppose $\exists^\infty n\;\; g(n)<f(n)$.  Then
there is a strong array $\la F_n : n<\om\ra$ such that
$|F_n\cap\comp(A)|\geq 2$  for infinitely many $n$.  This
because there must be infinitely many $n$ with
$$f(n)\leq g(n)<g(n+1)<f(n+1)$$
and hence $F_n=[f(n),f(n+1))$ does the trick.  But as in the
characterization of hyperhypersimple 
(\ref{charhyperhyper} part 4) there is a weak array
$\la H_n\su F_n : n<\om\ra$ such that for every $n$ if
$F_n\cap\comp(A)\neq\emp$, then $|H_n\cap\comp(A)|=1$.
But then
$$A\su A\cup\bigcup_nH_n\su\om$$
shows that $A$ is not maximal.
\qed

Theorem \ref{martin-tenn} is also true for the hyperhypersimple sets.  Martin 
has shown the converse 
that every high \re degree contains a maximal set.

\exer Prove that
if for all $f$ \prec we have that 
$$\forall^{\infty}n\in dom(f)\;\;f(n)\leq g(n) $$
then $\jump(0)\leq_T g$.

\begin{example}
Suppose $A$ is maximal and $B=A\join A$.  Then $B$ is not
maximal,  but
$\la \overline{b}_n:n<\om\ra$ eventually dominates every \rec function.
\end{example}

\proof
It is not maximal since $B\su (B\join \mbox{Evens})\su\om$
and these inclusions are non trivial.

To see domination note that $\overline{b}_{2n}=2\overline{a}_{n}$ and
$\overline{b}_{2n+1}=2\overline{a}_{n}+1$.  For any \rec $f$
$$\forall^\infty n\;\; (f(2n),f(2n+1)<\overline{a}_{n}<\overline{b}_{2n}<
\overline{b}_{2n+1})$$
and hence
$$\forall^\infty m\;\; f(m)<
\overline{b}_{m}.$$
\qed

\begin{example}
There is a \re set $A$ which is not hyperhypersimple but
$\overline{a}_n$ eventually dominates every \rec function.
\end{example}
\proof
Let $F_k=[n_k,n_{k+1})$ be the strong array with $n_{k+1}=n_k+k+1$.
Note that $|F_k|=k$.  Let $B$ any maximal set.  For each $k$ and $l$ if
$|B\cap k|=l$ let $G_k$ be the top $l$ elements of $F_k$.  
It is easy to see that $\la G_k\su F_k:k\in\om\ra$ is a weak array.
Let
$$A=\bigcup G_k\cup \bigcup_{k\in B} F_k.$$
Note that for every $k$
$$|F_{\overline{b}_k}\sm G_{\overline{b}_k}|=k.$$
For each $l<\om$ define
$$P_l=\{n_k+l:l<k<\om\}$$
then $\la P_l:l<\om\ra$ is a weak array demonstrating that
$A$ is not hyperhypersimple.  Note that
$$F_{\overline{b}_k}\sm G_{\overline{b}_k}=\{\overline{a}_i:l_k\leq i<l_{k+1}\}$$
where $l_{k+1}=l_k+k$ and so $l_k={{k(k+1)\over 2}}$.  Hence
for any \rec function $f$ we have
that 
$$\forall^\infty k \;\;f(l_{k+1})<\overline{b}_k<
\overline{a}_{l_k}$$
and
so for $f$ increasing we have:
$$\forall^\infty m \;\; f(m)<\overline{a}_m.$$
\qed

\exer Prove that for any maximal set $B$
$$\forall^\infty n\;\; f(\overline{b}_n)<\overline{b}_{n+1}$$
for every \rec $f$.

\section{High degrees using the Psuedojump}


\begin{theorem}\label{high}
(Shoenfield, Sacks) There is a nontrivial high degree,
i.e., there exists a \re set $A$ with
$A<_T\jump(0)$ and $A^{\pr\pr}\equiv_T 0^{\pr\pr}$.
\end{theorem}

\proof
This was originally proved using an infinite injury priority argument.
We give here a proof due to Jockusch and Shore which needs only a finite
injury priority argument together with relativization and uniformization.

Define that pseudojump operator $J_e$ as follows:
$$J_e(A)=A\join W_e^A.$$

\begin{lemma}
For any $e_0$ there exists a \re set $A$ with
\par\centerline{$A>_T 0$ and $J_{e_0}(A)\equiv_T \jump(0)$.}
\end{lemma}
\proof
Let
$\jump(0)=\{e_s:s<\om\}$ be a one-to-one \rec enumeration of $\jump(0)=K$.

\begin{center}
Requirements and strategies
\end{center}

\noindent Our requirements can be described as follows:

\medskip

$P_{2e}\;\;\;\;\;\;\; \comp(A)\neq W_e$

\medskip

\noindent Our strategy will be to put its follower $v_{2e}$ into $A$ if it
ever turns up in $W_e$.

\medskip

$P_{2e+1}\;\;\;\;$ Code $e$ into $A$ if e every turns up in $\jump(0)$.

\medskip

\noindent Our strategy will
put its follower $v_{2e+1}$ into $A_{s+1}$ if $e=e_s$.
We will show that $v_{2e+1}$ can be computed from $J_{e_0}(A)$ and
so  $\jump(0)\leq_T J_{e_0}(A)$.

\medskip

$N_n\;\;\;\;\;\;\;\; (\exists^\infty s\;\; \{e_0\}_s^{A_s}(n)\downarrow)
\to \{e_0\}^{A}(n)\downarrow$

\medskip
\noindent This is to insure that $W_{e_0}^A\leq_T \jump(0)$.  We use the
usual low simple set strategy of restraining the computation.

\begin{center}
Construction
\end{center}

For each negative requirement $N_n$ define the restraint function
$r(n,s)$ to be the use of the computation $\{e_0\}_s^{A_s}(n)$ (recall
that this is zero if the computation does not converge).

For each positive requirement $P_n$ its set of potential
followers is 
$$F_n=\{\la n,m\ra:m<\om\}$$ and its follower $v_n^s$ at stage
$s$ is:
$$v_n^s=\min\{v\in F_n\st v>\max(r(m,s):m\leq n)\}.$$
We say that $P_n$ requires attention at stage $s$ iff
\begin{enumerate}
\item ($n=2e+1$ and $e=e_s$) or
\item  $n=2e<s$ and $W_e^s\cap A_s=\emp$ and $v_n^s\in W_e^s$.
\end{enumerate}
Put $A_{s+1}=A_s\cup\{v_n^s: P_n \mbox{ requires attention at stage $s$}\}$.

\begin{center}
Verification
\end{center}

Note that each positive requirement can act at most once.  It follows
that $$\lim_{s\to\infty}r(n,s)=r(n)<\infty$$ and each $N_n$ and $P_n$
is met.  Hence we have that $W_{e_0}^A\leq_T \jump(0)$ and
$A>_T 0$.  It remains only to see the following:

\medskip
{\bf Claim.} $\jump(0)\leq_T A\join W_{e_0}^A$.

\medskip
Define
$$f(n)=\left\{
\begin{array}{ll}
1 & \mbox{ if  $P_n$ ever acts}\\
0 & \mbox{ otherwise.}
\end{array}\right.$$
Obviously $\jump(0)\leq_T f$ since $e\in\jump(0)$ iff $f(2e+1)=1$. 
So it is enough to see that $$f\leq_T A\join W_{e_0}^A.$$  

Assume we have computed $f\res n$
using an oracle for $A\join W_{e_0}^A$ and we show how to compute $f(n)$.  
Find
a stage $s_0$ so that
\begin{enumerate}
\item $\forall m<n$ if $P_m$ ever acts, it has already acted 
by stage $s_0$, and
\item $\forall m\leq n \;\;\;\; \{e_0\}^A(m)\downarrow$ iff
$\{e_0\}_{s_0}^{A_{s_0}}(m)\downarrow$.
\end{enumerate}
Using the oracle ($n\in W_{e_0}^A$?) we can test that $s_0$ satisfies (2), 
but since
$r(m,s_0)$ will protect the computation $\{e_0\}_{s_0}^{A_{s_0}}(m)$,
this will in fact be the correct computation at all stages $s\geq s_0$.
It follows that $r(m,s)=r(m,s_0)$ for all $m\leq n$ and $s\geq s_0$. 
Therefor $v(n,s)=v(n,s_0)$ for all $s\geq s_0$.   Hence $P_n$ will
act iff either it has already by stage $s_0$ or $v(n,s_0)\in A$
(which happens iff it acts after $s_0$).

This proves the Claim and the Lemma.
\qed

Next we need to see that a relativized and uniformitized version of
the Lemma is true.



\noindent The Lemma says:

For all $e$ there exists a \re set $A$ such that 
$A>_T 0$ and $J_e(A)\equiv \jump(0)$.

\medskip
\noindent The uniformized version says:

There exists a \rec $f:\om\to\om$ such that for all $e$
$$W_{f(e)}>_T 0 \rmand J_e(W_{f(e)})\equiv \jump(0).$$

\medskip
\noindent Or using the psuedojump we could equivalently prove:

There exists a \rec $f:\om\to\om$ such that for all $e$
$$J_{f(e)}(0)>_T 0 \rmand J_e(J_{f(e)}(0))\equiv \jump(0).$$

\medskip
\noindent The same proof will work for every oracle $B$. 
So finally we get the relativized and uniformitized version:

\begin{lemma}\label{psuedo}
There exists a \rec $f:\om\to\om$ such that for all $e$ and for all $B\su\om$:
$$J_{f(e)}(B)>_T B \rmand J_e(J_{f(e)}(B))\equiv \jump(B).$$
\end{lemma}


\bigskip
Fix $f$ from Lemma \ref{psuedo} and consider any
$n>0$ and $e$.

\begin{prop}\label{prophigh}
Suppose 
$$\forall B \;\; (J_e(B))^{(n)}\equiv_T B^{(n)}\rmand 
(J_e(B))^{(n-1)}\not\equiv_T B^{(n-1)}$$
Then
 $$\forall B \;\; (J_{f(e)}(B))^{(n)}\equiv_T B^{(n+1)}\rmand 
(J_{f(e)}(B))^{(n-1)}\not\equiv_T B^{(n)}.$$
\end{prop}
\proof
Note that 
$$(J_{f(e)}(B))^{(n)}\equiv_T (J_e(J_{f(e)}(B)))^{(n)}$$
by substituting $J_{f(e)}(B)$ for $B$ in the hypothesis.
We also have that 
$$(J_e(J_{f(e)}(B)))^{(n)}\equiv_T B^{(n+1)}$$
because $J_e(J_{f(e)}(B))\equiv_T \jump(B)$
and hence
$$(J_{f(e)}(B))^{(n)}\equiv_T B^{(n+1)}.$$
Similarly by substituting $J_{f(e)}(B)$ for $B$ in the hypothesis
$$(J_{f(e)}(B))^{(n-1)}\not\equiv_T (J_e(J_{f(e)}(B)))^{(n-1)}\equiv_T B^{(n)}$$
and so 
$$(J_{f(e)}(B))^{(n-1)}\not\equiv_T B^{(n)}.$$
\qed

We are using the terminology $B^{(0)}=B$.

\bigskip

By a similar proof we have

\begin{prop}\label{proplow}
Suppose $$\forall B \;\; (J_e(B))^{(n)}\equiv_T B^{(n+1)}\rmand 
(J_e(B))^{(n-1)}\not\equiv_T B^{(n)}.$$
Then 
$$\forall B \;\; (J_{f(e)}(B))^{(n+1)}\equiv_T B^{(n+1)}\rmand 
(J_{f(e)}(B))^{(n)}\not\equiv_T B^{(n)}.$$
\end{prop}


\bigskip


Define the high low hierarchy of \re degrees as follows
\begin{enumerate}
\item $H_0=\{\jump(o)\}$
\item $L_0=\{o\}$
\item $L_n=\{a\in\redegrees\st a^{(n)}=o^{(n)}\}$
\item $H_n=\{a\in\redegrees\st a^{(n)}=o^{(n+1)}\}$
\end{enumerate}

Choose $e_0$ so that for every $B$, $\jump(B)\equiv_T J_{e_0}(B)$.  
Let $e_{n+1}=f(e_n)$.  And let ${\bf a}_n$ be the Turing degree of
$J_{e_n}(0)$. 

\begin{prop} For every $n$
$${\bf a}_{2n}\in H_n\sm H_{n-1}\rmand
{\bf a}_{2n+1}\in L_{n+1}\sm L_n.$$
\end{prop}
\proof

Note that 
$$\forall B\;\; (J_{f(e_0)}(B))^{(1)}\equiv 
J_{e_0}(J_{f(e_0)}(B))\equiv B^{(1)}$$
but $$(J_{f(e_0)}(B))^{(0)}\not\equiv B^{(0)}.$$
So applying the Propositions  \ref{prophigh} and \ref{proplow}
alternatingly, the result follows.
\qed

Note that in particular, ${\bf a}_2$ is a nontrivial high degree
and this proves Theorem \ref{high}.

\begin{theorem} (Martin, Lachlan, Sacks)
There exist a \re degree ${\bf a}$ such that
$${\bf a}\notin \bigcup_{n<\om}(L_n\cup H_n).$$
\end{theorem}
\proof
In Lemma \ref{psuedo} take $e_0$ to be fixed point for 
$f$ and hence $J_{e_0}(B)=J_{f(e_0)}(B)$ for every set $B$.
Define $H(B)=J_{e_0}(B)$ where $H$ is short for the Hop of $B$.
Then for every $A$ we have
$$B<_TH(B)<_T H^2(B)\equiv_T \jump(B)$$
i.e., two hops make a jump.  Hence if $A=H(0)$, then for
every $n$ we have that $A^{(n)}=H^{2n+1}(0)$ and so
$$0^{(n)}\equiv_T H^{2n}(0)<T H^{2n+1}(0)\equiv_T A^{(n)}<_T 
H^{2n+2}(0)\equiv_T 0^{(n+1)}.$$
\qed


M.Simpson found a proof of the Sack's Jump Theorem using the
psuedojump.  It appears in Soare.

\exer
Prove or disprove:  For any $e$ if $A\leq_T B$ then
$W_e^A\leq_TW_e^B$.


\section{First-order theories}

In this section we give two examples of first-order theories with
interesting properties.  All theories in this section are assumed
to be in a \recly presented language. 
Craig noted that 
being axiomatized by \anre set of sentences is equivalent to having a
\rec set of axioms. Given \anre list
$\theta_0,\theta_1,\ldots, $ replace it by the \rec list:
$$\theta_0,(\theta_0\wedge\theta_1),
\ldots,(\theta_0\wedge\theta_1\wedge\cdots\wedge\theta_n),\ldots$$


\begin{lemma}\label{shoenlemma}
(Shoenfield) There exist \anre set $B$ such that
\begin{enumerate}
\item $B<_T\jump(0)$,
\item $\forall e\in TOT\;\;\; B_e=^*\om$,
\item $\forall e\notin TOT\;\;\; B_e=^*\emp$, and
\item $\forall e,n \;\;\;\;n\in B_e\to \{e\}(n)\downarrow$.
\end{enumerate}
\end{lemma}
\proof

Recall that $e\in TOT$ iff $\{e\}$ is a total function.

By Theorem \ref{high} there exists \anre set $A<_T\jump(0)$
with $\jump(A)\equiv_T 0^{\pr\pr}$ and hence by Theorem
\ref{martindom} there exists $g\leq_T A$ such that for
every \rec $f$ we have $\forall^\infty n\;\; f(n)\leq g(n)$.
Let $A=\bigcup_s A_s$ be a \rec enumeration of $A$ and 
suppose $g=\{e_0\}^A$.

Using a permitting argument we will get $B\leq_T A$.  
Put
$$B_{s+1}=B_s\cup \{\la e,n\ra<s\st 
\{e_0\}^{A_s}_s(n)\downarrow =t \rmand \forall m\leq n\;\;
\{e\}_t(m)\downarrow\}.$$ 
It is easy to check that $B$ has properties (2),(3), and (4).

We show that $B\leq_T A$.  To decide whether $\la e,n\ra\in B$ find a stage
$s_0$ such that $\{e_0\}^{A_s}_s(n)\downarrow$ with use $u$ and $A_{s_0}\cap
[0,u]=A\cap [0,u]$. But this means that 
$\la e,n\ra\in B$ iff
$\la e,n\ra\in B_{s_0+1}$.
\qed

\begin{define}
For a first-order theory $T$ in a language containing a sequence
of terms $\underline{n}$ for $n<\om$ we say that
\begin{enumerate}
\item $R\su\om$ is weakly represented in $T$ iff there is 
a formula $\theta(x)$ such that 
$$\forall n\;\; (n\in R\rmiff T\proves \theta(\underline{n})).$$
\item $R\su\om$ is strongly represented in $T$ iff there is 
a formula $\theta(x)$ such that 
$$\forall n\;\; (n\in R \to T\proves \theta(\underline{n}))$$
and
$$ \forall n\;\; (n\notin R \to T\proves \neg\theta(\underline{n})).$$
\end{enumerate}
\end{define}

\begin{prop} Assume $T$ is \recly axiomatizable.
\begin{enumerate}
\item Strongly representable implies weakly representable.
\item Weakly representable sets are \recenum.
\item Strongly representable sets are \rec.
\item If every \rec set is weakly represented in $T$, then $T$ is undecidable.
\item If every \re set is weakly representable in $T$, then the
decision problem for $T$ is equivalent to $\jump(0)$.
\end{enumerate}
\end{prop}
\proof

(4)

If $T$ is decidable, then there is a \rec predicate $U\su\om\times\om$
which is universal for all $R\su\om$ which are weakly represented in $T$.
But then the \rec set $D=\{n\st \la n,n\ra\notin U\}$ cannot be
weakly represented in $T$.

(5)

By the decision problem for $T$ we mean the Turing degree of the
set:
$$\{\theta\st T\proves \theta\}.$$
This result is clear since $\jump(0)$ is weakly represented in $T$.

\qed

\begin{example}
(Shoenfield) 
There is a \recly axiomatizable theory $T$ in which every \rec set is
strongly represented but the decision problem
for $T$ is of degree strictly smaller than $\jump(0)$.
\end{example}
\proof
The language of $T$ consists of infinitely many constant symbols
$\underline{n}$  and unary predicate symbols $R_n$ for $n<\om$.
Let $B$ be the set from Lemma \ref{shoenlemma}.   The axioms
of $T$ are the following:
\begin{enumerate}
\item $\underline{n}\neq\underline{m}$ for $n<m<\om$,
\item $R_e(\underline{m})$ if $\la e,m\ra\in B$ and 
$\{e\}(m)\downarrow=1$,
\item $\neg R_e(\underline{m})$ if $\la e,m\ra\in B$ and
$\{e\}(m)\downarrow=0$, and
\item infinitely many axioms saying the predicates $R_e$ are
independent. i.e., for each pair of disjoint finite sets $G,H\su\om$:
$$\exists v\;(\bigwedge_{e\in G} R_e(v)
\;\;\wedge\;\;
\bigwedge_{e\in H}\neg R_e(v)).
$$
\end{enumerate}
This is \anre set but by Craig's trick $T$ is \recly axiomatizable.

Every \rec set is strongly represented in $T$.  If $R\su\om$ is
\rec, then for some $e$ we have that $\{e\}$ is the characteristic
function of $R$.  Since $B_e=^*\om$ we know
that the formula $R_e(v)$ almost represents $R$. It is easy to
tweak it to represent $R$.

The decision problem for $T$ is Turing reducible to $B$.
This follows from the fact that $T$ eliminates quantifiers.
\qed

\begin{define}
A set of sentences $\Sigma$ is independent iff $\Sigma\not\proves\theta$ 
for any $\theta\in\Sigma$.  
\end{define}

Tarski proved that any first-order 
theory in a countable language is independently
axiomatizable.  Reznikoff proved it for uncountable languages.

\begin{lemma}\label{klemma}
Suppose a theory $T$ can be axiomatized by an infinite 
\recenum independent set 
$\Sigma$.  Then for any \re set of sentences $\la \rho_n:n<\om\ra$ 
axiomatizing
$T$ there is a \rec function $f$ such that for every $n>0$:
$$
\bigwedge_{k < n}  \rho_{k}
\mbox{ does not imply }
\bigwedge_{k < f(n)} \rho_{k}.
$$
\end{lemma}

\begin{example}(Kreisel)
There is a \recly axiomatizable theory $T$ which cannot be axiomatized
by a \recenum independent set of sentences.
\end{example}
\proof
Robinson's theory $Q$ is a finite subset of Peano Arithmetic PA which
is in turn a subtheory of true arithmetic $(\om,+,\cdot,S,0)$, i.e.,
$$Q\su PA \su Th(\om,+,\cdot,S,0).$$
Every \re set is weakly represented in $Q$.   Let $H\su\om$ be any
hypersimple set and suppose $\theta(v)$ is a formula such that
$$\forall n\;\;\; (n\in H\rmiff Q\proves \theta(\underline{n})).$$
Let $T$ be the theory in the language of arithmetic plus one new
unary predicate symbol $R$ with the following set of axioms:
\begin{enumerate}
\item $\bigwedge Q$,
\item $\forall v \;\; (\theta(v)\to R(v))$, and
\item infinitely many axioms: $$R(\underline{n})$$ for each $n<\om$.
\end{enumerate}
The symbol $\underline{n}$ is shorthand for $S(S(\cdots S(0))\cdots)$
with $n$ many $S$'s.  Let $f$ be the \rec function from
Lemma \ref{klemma}.  Since $H$ is hypersimple there exists $n$ such
that $[n,f(n))\su H$.  But then for all k in $[n,f(n))$
$$Q\proves \theta(\underline{n}).$$
Hence 
$$[\bigwedge Q \;\;\wedge\;\;\forall v \;\; \theta(v)\to R(v)]
\;\;\;\proves\;\;\;
\bigwedge_{n\leq k<f(n)} R(\underline{n})$$
which is a contradiction.
\qed





\section{Analytic sets }

\begin{define}
$A\sq \om^\om$ is $\Sigma^1_1$ iff there exists a \rec $R\sq \om^{<\om} \times
\om^{<\om}$
such that
$$x\in A \equiv \exists y\in\om^\om\;\;\forall n\in\om
\;\; R(x\res n,y\res n).$$
Similarly $A\sq\om$ is $\Sigma^1_1$ iff there exists a \rec
$R\sq \om\times \om^{<\om}$ such that
$$k\in A \equiv \exists y\in\om^\om\;\;\forall n\in\om\;\; R(k,y\res n).$$
$\Pi^1_1$ sets are the complements of $\Sigma_1^1$ sets and
$\Delta^1_1=\Pi^1_1\cap\Sigma^1_1$.
\end{define}

We can give similar definitions of $\Sigma^1_1$
and $\Sigma_n^0$ and $\Pi_n^0$ for $\xx$ any finite product
$\xx=\prod_{i<N} X_i$ where each
$X_i$ is either $\om$ or $\om^\om$.

\begin{prop}
\begin{enumerate}
\item $\Pi^0_1\sq \Sigma^1_1$
\item If $A\sq \xx\times \om^\om$ is $\Sigma^1_1$ then $B$ is $\Sigma^1_1$
where
$$B(x)\rmiff \exists y\;\; A(x,y)$$
\item If $A$ and $B$ are $\Sigma^1_1$ then $A\conj B$ and
$A\disj B$ are $\Sigma^1_1$.
\item If $A\sq \om\times\xx$ is $\Sigma^1_1$ then both
\begin{enumerate}
  \item $B(x) \equiv \exists n\in\om\;\; A(n,x)$ and
  \item $C(x) \equiv \forall n\in\om\;\; A(n,x)$
\end{enumerate}
are $\Sigma^1_1$.
\end{enumerate}
\end{prop}
\proof

(1) trivial

(2) Suppose $\xx=\om^\om$ and
$$A(x,y)\equiv \exists z\;\;\forall n\;\; R(x\res n,y\res n,z\res n)$$
define
$$R^*(\si,\tau)\rmiff R(\si,\tau_0,\tau_1) \mbox{ where }
\tau(i)=\la\tau_0(i),\tau_1(i)\ra$$
Then
$$B(x)\equiv \exists u\;\;\forall n\;\; R^*(x\res n,u\res n)$$

(3) Suppose
$$A(x)\equiv \exists y\;\; C(x,y)$$
$$B(x)\equiv \exists z\;\; D(x,z)$$
where $C$ and $D$ are $\Pi_1^0$. Then
$$A(x)\disj B(x) \;\;\equiv\;\; \exists w\;\; (C(x,w)\disj D(x,w))$$
and
$$A(x)\conj B(x)\;\;\equiv\;\; \exists y\;\exists z \;\;(C(x,y)\conj D(x,z))$$

(4a) Suppose
$$A(n,x)\equiv \exists y\;\;\forall m\;\; R(n,x\res m,y\res m)$$
Define
$$R^*(x\res n,y\res n) \rmiff R(y(0),x\res (n-1), y^*\res (n-1))
\mbox{ where } y^*(i)=y(i+1)$$
Then
$$B(x)\equiv\exists n\; A(n,x)\equiv \exists y\;\;\forall m
\;\; R^*(x\res m,y\res m)$$

(4b) Suppose
$$A(n,x)\equiv \exists y\;\;\forall m\;\; R(n,x\res m,y\res m)$$
Define

$R^*(x\res m,z\res m)$ iff $R(i,x\res j, y_i\res j)$ for each
$\pair(i,j)<m$ and $y_i(j)=z(\pair(i,j))$.

Then
$$C(x)\equiv\forall n\; A(n,x)\equiv \exists z\;\;\forall m
\;\; R^*(x\res m,z\res m)$$

\qed


\begin{prop}
  Universal $\Sigma_1^1$ sets exists, hence $\Sigma_1^1\neq \Pi^1_1$.
\end{prop}
\proof
Let $U\sq \om\times \xx\times\om^\om$ be a universal $\Pi_1^0$ set
for subsets of $\xx\times\om^\om$, then
$$V(n,x)\equiv \exists y \;\; A(n,x,y)$$
is Universal $\Sigma^1_1$.
\qed

\begin{theorem}
(Tennenbaum) There exists a \rec linear order $(\om,\less)$ which
is isomorphic to $\om+\om^*$ with the property that every
nonempty \re subset of $\om$ has a $\less$-least and 
$\less$-greatest element.
\end{theorem}
\proof
Note that
$\om^*$ stands for reverse $\om$ or equivalently the order type
of the negative integers.
Let
$$L=\{x\in\om\st |\{y:y\lesss x\}|<\om\}
\rmand
R=\{x\in\om\st |\{y:x\lesss y\}|<\om\}
$$
In our construction we make sure that $\om=L\cup R$ and each is
infinite.  At stage $s$ we assume that we have (effectively)
determined the finite linear order
$\less \res ( s\times s)$ and just decide where to put the new element,
$s$, of 
$$s+1=\{0,1,2,\ldots,s\}.$$
Our requirements are:

\bigskip
$R_e\;\;\;\;\;\;\;\; W_e$ infinite $\implies W_e\cap L\neq\emp$ and
$W_e\cap R \neq\emp$.

\bigskip
We assume at stage $s$ in our construction that some requirements
$R_e$, say $e\in F_s\sq s$, have followers $l_e<s$ and $r_e<s$ which satisfy:
  
if $e<e^\pr$ and $e,e^\pr\in F_s$, then 
$l_e\lesss l_{e^\pr}\lesss r_{e^\pr}\lesss r_e$.
   
\noindent At stage $s+1$ we look for the smallest $e<s$ (if any) such that
\begin{enumerate}
\item $e\notin F_s$  (or equivalently $R_e$ has no followers)
\item there exists $l,r\in W_{e,s}$ such that
for every $e^\pr<e$ with $e^\pr\in F_s$ we have that
$$l_{e^\pr}\lesss l \lesss r\lesss r_{e^\pr}$$
\end{enumerate}
For the smallest such $e$ and smallest such pair $l,r$ we appoint
$l=l_e$ and $r=r_e$ the followers of $R_e$ and put
$$F_{s+1}=\{e^\pr<e \st e^\pr\in F_s\}\cup\{e\}$$
i.e., we unappoint all followers for $e^\pr>e$.
If there is no such $e$ we do not change any followers.


In either case, we put $s$ into the ordering
$\less \res ( s\times s)$ in the first gap above all the
$l_e$ for $e\in F_{s+1}$ (and therefore,
below all the $r_e$ for $e\in F_{s+1}$.)

\bigskip
\noindent
{\bf Claim.}  For each $e$ if $W_e$ is infinite, then
$R_e$ obtains permanent followers $l_e$ and $r_e$ and 
is met.
\proof
Suppose the Claim is true for all $e^\pr<e$.  Suppose $s_0$ is
a large enough stage so that no $e^\pr<e$ acts after stage $s_0$.
Let $e_0$ be the maximum element of $F_{s_0}$ below $e$.  Then
since $s>s_0$ are put between $l_{e_0}$ and $r_{e_0}$ and
$W_e$ is infinite, it must be that some followers are appointed
to $R_e$ if it doesn't already have them.  These followers are
permanent.
\qed
Since infinitely many $W_e$ are infinite and hence acquire permanent
followers, it must be that $L$ and $R$ are infinite
and therefore the order type we construct is
$\om+\om^*$.
\qed



\begin{cor}\label{jock}
(Jockusch) There exists a \rec function $f:[\om]^2\to 2$ such that
there is no infinite \rec $H\in[\om]^\om$ such that $f\res[H]^2$ is
constant.
\end{cor}
\proof
Define
$$f({x,y})=\left\{
\begin{array}{ll}
1 & \mbox{ if } x<y \implies x \lesss y \\
0 & \mbox{ if } x<y \implies y \lesss x \\
\end{array}\right.$$
\qed

\begin{define}
  $T\sq \om^{<\om}$ is a well-founded tree iff
\par (a) $\forall \si,\tau\;\; \si\sq\tau\in T\implies\si\in T$
\par (b) $T$ has no infinite branch, i.e.,
$[T]=\emp$ where
$$[T]=^{def}\{x\in\om^\om\st \forall n\;\; x\res n\in T\}.$$
\end{define}

\begin{define} (Kleene-Brouwer ordering)
  For $\si,\tau\in\om^{<\om}$
$$\si<_{KB}\tau \rmiff \si \supsetneq \tau
\rmor \exists n<\min(|\si|,|\tau|)\;\;
\si\res n=\tau\res n\rmand \si(n)<\tau(n)$$
$$\si\leq_{KB}\tau \rmiff \si<_{KB}\tau\rmor \si=\tau$$
\end{define}

\begin{prop}
$\leq_{KB}$ is a \rec linear ordering of $\om^{<\om}$.
\end{prop}

\begin{theorem}
  (Kleene-Brouwer) Given a tree $T\sq\om^{<\om}$ 
  
$T$  is well-founded iff
$(T,\leq_{KB})$ is a well-ordering.
\end{theorem}
\proof
Suppose that $T$ is not well-founded and $x\in [T]$. Then
for each $n$
$$x\res (n+1)<_{KB} x\res n$$
and so $(T,\leq_{KB})$ is not a well-ordering.

Conversely, suppose that $(T,\leq_{KB})$ is not a well-ordering and
$(\si_n\in T\st n<\om)$ is $<_{KB}$-descending, i.e.,
$$\si_{n+1}<_{KB}\si_n.$$
Then an easy induction
produces $x\in\om^\om$ with the property that
$$\forall n\;\; \forall^\infty m\;\;\;\; x\res n\sq \si_m.$$
It follows that $x\in [T]$ and so $T$  is not well-founded.
\qed

\begin{define}
  For $T\sq \om^{<\om}$ a tree and $\alpha$ an ordinal we
define $T_{\alpha}\sq T$ as follows:
\par (a) $\si\in T_0$ iff $\si\in T$ and $\forall n\;\;
\si n \notin T$.  (Terminal nodes of $T$.)
\par (b) $\si\in T_{\alpha}$ iff $\si\in T$ and $\forall n\;\;
(\si n\in T \implies \si n \in T_{<\alpha})$.  
\par (c) $T_{<\alpha}=^{def}\cup_{\beta<\alpha} T_\beta$.
\end{define}

\begin{define}  For $\si\in T$
\par  (a) $rank_T(\si)=\alpha$ where $\alpha$ is the smallest ordinal
with $\si\in T_{\alpha}$.
\par  (b) $rank_T(\si)=\infty$ if there is no such $\alpha$.
\end{define}

\begin{prop}
For $T\sq\om^{<\om}$ a tree, $T$ is well-founded iff
$rank_T(\la\ra)<\infty$, i.e., its an ordinal.
\end{prop}
\proof
Note that if $rank_T(\si)=\infty$, then there exists $n$ such
that $rank_T(\si n)=\infty$.  Hence, $rank_T(\la\ra)=\infty$
implies that $T$ has an infinite branch.  On the other hand
if $rank_T(\si)<\infty$, then for every $n$ with
$\si n \in T$ we have that
$$rank_T(\si n)<rank_T(\si )$$
Hence $T$ cannot have an infinite branch.
\qed

\begin{define}
$c:T\to\om$ is a hypcode iff $T\sq\om^{<\om}$ is a \rec well-founded
tree and $c$ is partial \rec map with domain $T$.
Given a hypecode $c$ we define the sets
$H(c,\si)$ as follows by induction on the rank of $\si$.
Fix $U\sq \om \times \xx$ a universal $\Sigma_1^0$ set.

\medskip
(a) for  $\si\in T_0$ a terminal node of $T$
$$H(c,\si)=U_{c(\si)}$$ 

(b)  for $\si\in T$ not terminal and $c(\si)=0$
$$H(c,\si)=\cup_{n, \si n\in T} H(c,\si n)$$

(c)  for
$\si\in T$ not terminal and $c(\si)>0$
$$H(c,\si)=\cap_{n, \si n\in T} H(c,\si n)$$

\medskip
$A\sq \xx$ is hyperarithmetic (HYP) iff there
exists a  hypcode $c$ and $$A=H(c)=^{def}H(c,\la\ra).$$
\end{define}

\begin{prop}
  HYP $\sq \Delta_1^1$.
\end{prop}
\proof
$x\in H(c)$ iff there exists $f:T\to \{0,1\}$ such that
\begin{enumerate}
  \item $\forall \si\in T_0$
 $$f(\si)=1 \rmiff x\in U_{c(\si)}$$
  \item $\forall \si\in T\sm T_0$ if $c(\si)=0$ then
 $$f(\si)=1\rmiff \exists n\;\; (\si n\in T\;\; \conj\;\;
f(\si n) =1)$$
  \item $\forall \si\in T\sm T_0$ if $c(\si)>0$ then
 $$f(\si)=1\rmiff \forall n\;\; (\si n\in T\implies
f(\si n) =1)$$
 \item $f(\la\ra)=1$
\end{enumerate}
It is easy to check that $1-4$ are all arithmetic predicates and
so $H(c)$ is $\Sigma^1_1$.  To see that the complement of
$H(c)$ is also $\Sigma^1_1$ just note that

\noindent $x\notin H(c)$ iff there exists $f:T\to \{0,1\}$ such that

1,2,3, and

$4^\pr$. $f(\la\ra)=0$.
\qed

\begin{theorem}
(Kleene-Souslin) 

Suppose $A$ and $B$ are disjoint $\Sigma_1^1$ sets.
Then they can be separated by a hyperarithmetic set $C$.  Hence
HYP $= \Delta_1^1$.
\end{theorem}
\proof
To simplify the notation we assume that $A,B\sq \om^\om$ although
essentially the same proof will work for $A,B\sq \om$ or any $\xx$.
Since $A,B$ are $\Sigma^1_1$ there are \rec trees
$$T^A,T^B\sq \cup_{n<\om}\om^n\times \om^n$$
such that
$$x\in A \rmiff \exists y\;\; \forall n \;\; (x\res n,y\res n)\in T^A$$
$$x\in B \rmiff \exists z\;\; \forall n \;\; (x\res n,z\res n)\in T^B$$
The fact that $A$ and $B$ are disjoint implies that it is impossible
to find $(x,y,z)$ such that $(x\res n,y\res n)\in T^A$
and $(x\res n,z\res n)\in T^B$  for all $n$.  This tells us how to
find our \rec well-founded tree $T$.


Given $\rho\in \om^{<\om}$ we determine a triple
$trip(\rho)= (\si,\tau_1,\tau_2)$ by the rule that
$\si(i)=\rho(3i)$,
$\tau_1(i)=\rho(3i+1)$, and
$\tau_2(i)=\rho(3i+2)$.   We take the natural length functions,
namely
\begin{itemize}
\item $|\si|=|\tau_1|=|\tau_2|=n$ if $|\rho|=3n$,
\item $|\si|=n+1,\;\; |\tau_1|=|\tau_2|=n$ if $|\rho|=3n+1$, and
\item $|\si|=|\tau_1|=n+1,\;\;|\tau_2|=n$ if $|\rho|=3n+2$.
\end{itemize}

Now we define the \rec well-founded tree $T\sq\om^{<\om}$
and hypcode $c:T\to\om$
as follows:
\begin{enumerate}
\item for $\rho\in \om^{<\om}$ with length $|\rho|=3n+2$ and
    $trip(\rho)=(\si,\tau_1,\tau_2)$ if
  \begin{enumerate}
     \item $(\si\res n,\tau_1\res n)\in T^A$,
     \item $(\si\res n,\tau_2)\in T^B$, and
     \item $(\si,\tau_1)\notin T^A$,
   \end{enumerate}
then $\rho$ is a terminal node of $T$ and put $c(\rho)=n_0$ 
where
$$U_{n_0}=\emp.$$


\item for $\rho\in \om^{<\om}$
 with length $|\rho|=3(n+1)$ and
    $trip(\rho)=(\si,\tau_1,\tau_2)$ if
  \begin{enumerate}
     \item $(\si,\tau_1)\in T^A$,
     \item $(\si\res n,\tau_2\res n)\in T^B$, and
     \item $(\si,\tau_2)\notin T^B$,
   \end{enumerate}
then $\rho$ is a terminal node of $T$ and put $c(\rho)=n_1$ where

$$U_{n_1}=[\si]=^{def}\{x\in \om^\om\st
\si\sq x\}.$$

\item For any other $\rho$ we put $\rho$ into $T$ iff
it is a proper subset of a terminal node of $T$.  For these
$\rho$ we put $c(\rho)=0$ if $|\rho|=3n$ or $|\rho|=3n+1$ and
put $c(\rho)=1$ if $|\rho|=3n+2$.
\end{enumerate}
Now
given $trip(\rho)=(\si,\tau_1,\tau_2)$
define the following sets:
$$A_{\rho}=\{x\in [\si]\st \exists y\supseteq \tau_1\;\;
\forall n \;\; (x\res n,y\res n)\in T^A\}$$

$$B_{\rho}=\{x\in [\si]\st \exists z\supseteq \tau_2\;\;
\forall n \;\; (x\res n,z\res n)\in T^B\}$$

To finish the proof we verify the following:

\bigskip
\noindent
{\bf Claim.} For each $\rho\in T$ let $trip(\rho)=(\si,\tau_1,\tau_2)$
then
$$A_{\rho}\sq H(c,\rho)\sq [\si]$$
and
$$B_{\rho}\sq [\si]\sm H(c,\rho)$$
\proof

\bigskip
Case $\rho$ a terminal node of $T$.  

\noindent Note that in case 1 of the definition of $T$, we have
that $A_\rho$ is the empty set and $c(\si)$ is a code for the
empty set and so its OK. In case 2 of the definition of $T$, we have that
$B_\rho$ is the empty set and $c(\si)$ is a code for
$[\si]$ and so its OK.

\bigskip
Case $|\rho|=3n$ and $\rho$ not terminal.

\noindent
Note that for nonterminal nodes $\rho$ we
have that for every $k$ that $\rho k\in T$.  In this case
$trip(\rho k)=(\si k, \tau_1,\tau_2)$. 
$$A_{\rho k}=[\si k]\cap A_\rho$$
$$B_{\rho k}=[\si k]\cap B_\rho$$
and by induction
$$A_\rho=\cup_{k<\om} A_{\rho k}
\sq \cup_{k<\om}H(c,\rho k)=^{def}H(c,\rho)\sq [\si]$$
($c(\rho)=0$, so we take unions)
$$B_\rho=\cup_{k<\om} B_{\rho k}
\sq \cup_{k<\om}([\si k]\sm H(c,\rho k))=
[\si]\sm H(c,\rho)$$
The last equality holds because each $H(c,\rho k)\sq [\si k]$ and
$([\si k]:k<\om)$ is a partition of $[\si]$.

\bigskip
Case $|\rho|=3n+1$ and $\rho$ not terminal.  

\noindent In this case
$trip(\rho k)=(\si , \tau_1 k,\tau_2)$, and also
$c(\rho)=0$, i.e., we take unions. Note that for every $k$ that
$B_{\rho k}=B_\rho$ since neither $\si$ nor $\tau_2$ change.
Also, by the definition of $A_\rho$ note that
$$A_\rho=\cup_{k<\om}A_{\rho k}.$$
Now by inductive hypothesis we have that
$$A_\rho=\cup_{k<\om}A_{\rho k}\sq \cup_{k<\om}H(c,\rho k)=^{def}H(c,\rho)$$
$$B_\rho\sq [\si]\sm H(c,\rho k)$$
for every $k$ so
$$B_\rho\sq [\si]\sm H(c,\rho)$$
as was to be proved.

\bigskip
Case $|\rho|=3n+2$ and $\rho$ not terminal.  

\noindent In this case
$trip(\rho k)=(\si , \tau_1 ,\tau_2 k)$, and
$c(\rho)=1$, i.e., take intersections. Note that for every $k$ that
$A_{\rho k}=A_\rho$ since neither $\si$ nor $\tau_1$ change.
Now by inductive hypothesis we have that
$$A_\rho\sq \cap_{k<\om}H(c,\rho k)=^{def}H(c,\rho)$$
$$B_\rho=\cup_{k<\om} B_{\rho k} \sq \cup_{k<\om} [\si]\sm H(c,\rho k)
=[\si]\sm H(c,\rho)$$
as was to be proved.

This proves the Claim. However since $A_{\la \ra}=A$ and
$B_{\la \ra}=B$ the Theorem follows.
\qed


\newpage

\addtocontents{toc}{\par\bigskip {\bf Appendix }\par}

\begin{center}
Appendix
\end{center}

\section{Turing machines\label{tur}}

In this section we define the notion of Turing computable function and
include Turing's analysis of why every effectively calculable
function should
be Turing computable.  We also sketch the proof of a universal
Turing machine.

A \dex{Turing machine} is a function $m$ such that for some
finite sets $A$ and
$S$ the   domain of $m$ is a subset of $S \times A$ and range of $m$
is a subset  of $S \times A \times \{l,r\}$.  We call $A$ the
alphabet and $S$ the states.\footnote{This section is taken from my book:
\par http://www.math.wisc.edu/$\sim$miller/res/index.html
\par see
\par Introduction to Mathematical Logic - Moore style}

For example, suppose  $S$ is the set of letters $\{a,b,c,\ldots,z\}$
and $A$ is the set of all integers less than seventeen, then
$m(a,4)=(b,6,l)$ would mean that when the machine $m$ is in state $a$
reading the
symbol $4$ it will go into state $b$, erase the symbol $4$ and
write the symbol $6$ on the tape square
where $4$ was, and then move left one square.

\bigskip
\noindent


\unitlength=1.00mm
\special{em:linewidth 0.4pt}
\linethickness{0.4pt}
\begin{picture}(69.00,30.00)
%\put(0,0){\framebox(69,30)[cc]{}}
\put(10.00,20.00){\framebox(10.00,10.00)[cc]{$\blank$}}
\put(20.00,20.00){\framebox(10.00,10.00)[cc]{$0$}}
\put(30.00,20.00){\framebox(10.00,10.00)[cc]{$3$}}
\put(40.00,20.00){\framebox(10.00,10.00)[cc]{$4$}}
\put(50.00,20.00){\framebox(10.00,10.00)[cc]{$\blank$}}
\put(40.00,0.00){\framebox(10.00,10.00)[cc]{}}
\put(45.00,2.00){\makebox(0,0)[cc]{head}}
\put(45.00,7.00){\makebox(0,0)[cc]{read}}
\put(45.00,10.00){\vector(0,1){10.00}}
\put(24.00,11.00){\makebox(0,0)[cc]{machine $m$}}
\put(24.00,4.00){\makebox(0,0)[cc]{in state $a$}}
\put(5.00,20.00){\line(1,0){5.00}}
\put(5.00,30.00){\line(1,0){5.00}}
\put(60.00,30.00){\line(1,0){5.00}}
\put(60.00,20.00){\line(1,0){5.00}}
\end{picture}

\bigskip

\unitlength=1.00mm
\special{em:linewidth 0.4pt}
\linethickness{0.4pt}
\begin{picture}(69.00,30.00)
%\put(0,0){\framebox(69,30)[cc]{}}
\put(10.00,20.00){\framebox(10.00,10.00)[cc]{$\blank$}}
\put(20.00,20.00){\framebox(10.00,10.00)[cc]{$\blank$}}
\put(30.00,20.00){\framebox(10.00,10.00)[cc]{$0$}}
\put(40.00,20.00){\framebox(10.00,10.00)[cc]{$3$}}
\put(50.00,20.00){\framebox(10.00,10.00)[cc]{$6$}}
\put(60.00,20.00){\framebox(10.00,10.00)[cc]{$\blank$}}
\put(40.00,0.00){\framebox(10.00,10.00)[cc]{}}
\put(45.00,2.00){\makebox(0,0)[cc]{head}}
\put(45.00,7.00){\makebox(0,0)[cc]{read}}
\put(45.00,10.00){\vector(0,1){10.00}}
\put(24.00,11.00){\makebox(0,0)[cc]{machine $m$}}
\put(24.00,4.00){\makebox(0,0)[cc]{in state $b$}}
\put(5.00,20.00){\line(1,0){5.00}}
\put(5.00,30.00){\line(1,0){5.00}}
\end{picture}


\bigskip
If $(a,4)$ is not in the domain of $m$, then the machine halts.
This is the only
way of stopping a calculation.  Let $A^{<\omega}$ be the set of
all finite strings
from the alphabet A.

The Turing machine $m$ gives rise to a partial function
$M$ from $A^{<\omega}$ to $A^{<\omega}$ as follows.  We suppose
that $A$ always contains
the blank
space symbol  $\blank$;  and $S$ contains the starting state $a$.
Given any word $w$
from $A^{<\omega}$ we
imagine a tape with $w$ written on it and blank symbols everywhere else.  We
start the machine in state $a$ and reading the leftmost symbol of $w$.
A configuration consists of what is written on the tape, which square of
tape is being read, and the state the machine is in.
 Successive
configurations are obtained according to rules determined by $m$, namely
if the machine is in state $q$ reading symbol $s$ and
 $m(q,s)=(q^\prime,s^\prime,d)$ then
the next configuration has the same tape except the square we were reading
now has the symbol $s^\prime$ on it, the new state is $q^\prime$,
and the square being
read is one to the left if $d=l$ and one to the right if $d=r$.
If $(q,s)$ is not in the domain of $m$, then the computation halts and
$M(w)=v$ where $v$ is what is written on the tape when the machine halts.


Suppose $B$ is a finite alphabet that does not contain the blank
space symbol $\blank $ then
a function $f:B^{<\omega}\to B^{<\omega}$
is a \dex{partial Turing computable function}
 iff there
is a Turing machine $m$ with an alphabet $A\supseteq B$
 such that $f = M\res B^{<\omega}$.  A partial Turing computable function
is \dex{Turing computable} iff it is total.  A function $f:\omega \to \omega$
is Turing computable if it is Turing computable when considered as a map
from $B^{<\omega}$ to $B^{<\omega}$
where
$B=\{1\}$.  Words in $B$ can be regarded as numbers written
in base one, hence we identify the number $x$ with $x$ ones written
on the tape.


For example, the identity function is Turing computable, since it is computed by
the empty machine. The successor function is Turing computable since it is
computed by the machine in Figure \ref{succfig}.

\begin{figure}
\unitlength=1.00mm
\special{em:linewidth 0.4pt}
\linethickness{0.4pt}
\begin{picture}(100.00,25.00)
%\put(0.00,0.00){\framebox(64.00,24.00)[cc]{}}
\put(20.00,7.00){\vector(1,0){30.00}}
\put(15.00,17.00){\vector(0,-1){4.00}}
\put(10.00,7.00){\line(-1,0){6.00}}
\put(4.00,7.00){\line(0,1){10.00}}
\put(4.00,17.00){\line(1,0){11.00}}
\put(18.00,19.00){\makebox(0,0)[cc]{1}}
\put(3.00,3.00){\makebox(0,0)[cc]{(1,r)}}
\put(24.00,10.00){\makebox(0,0)[cc]{$\;\tilde{}\;$}}
\put(44.00,10.00){\makebox(0,0)[cc]{(1,r)}}
\put(15.00,7.00){\circle{12.00}}
\put(55.00,7.00){\circle{12.00}}
\put(15.00,7.00){\makebox(0,0)[cc]{$a$}}
\put(55.00,7.00){\makebox(0,0)[cc]{$b$}}
\put(70,10){\shortstack[l]{ $m(a,1)=(a,1,r)$\\ $m(a,\blank)=(b,1,r)$}}
\end{picture}
\caption{Successor function \label{succfig}}
\end{figure}

In the diagram on the left, states  are represented by
little circles.  The arrows represent the \dex{state transition function} $m$.
For example, the horizontal arrow represents the fact that when
$m$ is in state $a$ and reads  $\blank$ then it
writes  $1$, moves right, and goes into state $b$.

The set of strings of zeros and ones with
an even number of ones is Turing computable.
Its characteristic function (parity checker) can be computed
by the machine in Figure \ref{parityfig}.

\begin{figure}
\unitlength=1.00mm
\special{em:linewidth 0.4pt}
\linethickness{0.4pt}
\begin{picture}(130.00,40.00)
%\put(00.00,000.00){\framebox(69.00,40.00)[cc]{}}
\put(15.00,025.00){\circle{10.00}}
\put(55.00,025.00){\circle{10.00}}
\put(35.00,009.00){\circle{10.00}}
\put(15.00,025.00){\makebox(0,0)[cc]{$a$}}
\put(55.00,025.00){\makebox(0,0)[cc]{$b$}}
\put(35.00,009.00){\makebox(0,0)[cc]{$c$}}
\put(20.00,028.00){\vector(1,0){30.00}}
\put(50.00,023.00){\vector(-1,0){30.00}}
\put(15.00,020.00){\vector(4,-3){15.00}}
\put(55.00,020.00){\vector(-4,-3){14.00}}
\put(15.00,030.00){\line(0,1){4.00}}
\put(15.00,034.00){\line(-1,0){10.00}}
\put(05.00,034.00){\line(0,-1){9.00}}
\put(05.00,025.00){\vector(1,0){5.00}}
\put(60.00,025.00){\line(1,0){6.00}}
\put(66.00,025.00){\line(0,1){9.00}}
\put(66.00,034.00){\line(-1,0){11.00}}
\put(55.00,034.00){\vector(0,-1){4.00}}
\put(18.00,035.00){\makebox(0,0)[cc]{$0$}}
\put(05.00,022.00){\makebox(0,0)[cc]{$(\blank,r)$}}
\put(24.00,031.00){\makebox(0,0)[cc]{$1$}}
\put(45.00,031.00){\makebox(0,0)[cc]{$(\blank,r)$}}
\put(45.00,021.00){\makebox(0,0)[cc]{$1$}}
\put(25.00,021.00){\makebox(0,0)[cc]{$(\blank,r)$}}
\put(13.00,015.00){\makebox(0,0)[cc]{$\blank$}}
\put(22.00,009.00){\makebox(0,0)[cc]{$(1,r)$}}
\put(47.00,009.00){\makebox(0,0)[cc]{$(\blank,r)$}}
\put(56.00,017.00){\makebox(0,0)[cc]{$\blank$}}
\put(63.00,022.00){\makebox(0,0)[cc]{$0$}}
\put(57.00,037.00){\makebox(0,0)[cc]{$(\blank,r)$}}
\put(80,10){\shortstack[l]{
$ m(a,0)=(a,\blank ,r)$       \\
$ m(a,1)=(b,\blank ,r)$       \\
$ m(b,0)=(b,\blank ,r)$       \\
$ m(b,1)=(a,\blank ,r)$       \\
$ m(a,\blank)=(c,1,r)$        \\
$ m(b,\blank)=(c,\blank,r)$   }}
\end{picture}
\caption{Parity checker \label{parityfig}}
\end{figure}


The following problems are concerned with Turing computable functions and
predicates on $\omega$.

\bigskip

\prob Show that any constant function is Turing computable.

\prob  A binary function $f:\omega\times\omega\to\omega$ is Turing computable
iff there is a machine such that for any $x,y\in\omega$ inputing
$x$ ones and $y$ ones separated by ``,'' the machine eventually halts
with $f(x,y)$ ones on the tape.
Show that $f(x,y) = x+y$ is Turing computable.

\prob Show that $g(x,y) = x y$ is Turing computable.

\prob Let $ x \dotminus y = max\{ 0,x-y \}.$ Show that $p(x)= x \dotminus 1$
is Turing computable.  Show that $ q(x,y)= x\dotminus y $ is Turing computable.

\prob Suppose $f(x)$ and $g(x)$ are Turing computable.  Show that $f(g(x))$
 is Turing computable.

\prob Formalize a notion of multitape Turing machine. Show that we get
the same set of Turing computable functions.

\prob Show that we get the same set of Turing computable functions even if we
restrict our notion of computation to allow only tapes that are infinite in one
direction.

\prob Show that the family of Turing computable functions is closed under 
arbitrary compositions, for example $f(g(x,y),h(x,z),z)$.  More generally, if
$f(y_1,\ldots,y_m)$, $g_1(x_1,\ldots,x_n),\ldots$, and $g_m(x_1,\ldots,x_n)$ are
all Turing computable, then so is
$$f(g_1(x_1,\ldots,x_n),\ldots,g_m(x_1,\ldots,x_n)).$$


\prob  A set is Turing computable iff its characteristic function is.
Show that the binary relation $x=y$ is Turing computable.  Show that the
binary relation $ x\leq y $ is Turing computable.

\prob Define
$$ sgn(n) = \left\{
\begin{array}{ll}
 0 & \mbox{ if } n=0 \\
 1 & \mbox{ otherwise}
\end{array}
\right.$$
Show it is Turing computable.

\prob Show that if $A \subseteq \omega$ is Turing computable then so is
$ \omega \setminus A.$ Show that if $A$ and $B$ are Turing computable so is
$ A \cap B$ and $ A \cup B$.

\prob Suppose g(x) and h(x) are Turing computable and A is a Turing 
computable set. Show
that f is Turing computable where:
$$ f(x) =
\left\{
\begin{array}{ll}
 g(x) & \mbox{ if } x \in A \\
 h(x) & \mbox{ if } x \notin A
\end{array}
\right.$$

\prob Show that the set of even numbers is Turing computable.  Show that the
set of primes is Turing computable.

\prob Show that $e(x,y)=x^y$ is Turing computable.  Show that $f(x)=x!$ is
Turing computable.

\prob Suppose that $h(z)$ and $g(x,y,z)$ are Turing computable. Define $f$ by
recursion, $f(0,z)=h(z)$ and $f(n+1,z) = g( n,z, f(n,z) )$.  Show that $f$ is
Turing computable.

\prob Prove that the set of partial Turing computable functions is
the same as the set of partial recursive functions.

\prob Prove that the halting problem for nonwritting Turing
machines is decidable.  A Turing machine m is nonwritting
iff whenever $m(s,a)=(s',a',d)$ then $a=a'$.
It is decidable whether or not $m$ halts when given
input $x=<x_1,\ldots,x_n>\in A^n$ started on $x_1$ in state $s_0$.


\begin{center}
Church-Turing Thesis
\end{center}

Here is an excerpt in support of Church's Thesis from
Alan M. Turing\footnote{
``On computable numbers, with an application to the Entscheidungsproblem'',
Proceedings of the London Mathematical Society,
2-32(1936), 230-265.}.  Note that Turing uses the word computer
for the person that is performing some effective procedure.


``   Computing is normally done writing certain symbols on paper. We
   may suppose this is divided into squares like a child's arithmetic
   book.  In elementary arithmetic the two-dimensional character of the
   paper is sometimes used.  But such a use is always avoidable, and I
   think that it will be agreed that the two-dimensional character
   of paper is no essential of computation.  I assume then that the
   computation is carried out on one-dimensional paper, i.e. on a tape divided
   into squares.  I shall also suppose that the number of symbols which may be
   printed is finite.  If we were to allow an infinity of symbols, then
   there would be symbols differing to an arbitrarily small extent.
   The effect of this restriction of the number of symbols is not very
   serious. It is always possible to use sequences of symbols in the place
   of single symbols.  Thus an Arabic numeral 17 or 9999999999999999999
   is normally treated as a single symbol.  Similarly in any European language
   words are treated as single symbols (Chinese, however, attempts to have
   an infinity of symbols).   The differences from our point of view between
   the single and compound symbols is that the compound symbols, if they
   are too lengthy, cannot be observed at one glance.  This is in accordance
   with experience.  We cannot tell at one glance whether
   9999999999999999999999999 and 99999999999999999999999999 are the same.

``   The behavior of the computer at any moment is determined by the symbols
   which he is observing, and his `state of mine' at that moment.  We
   may suppose that there is a bound $B$ to the number of symbols or
   squares which the computer can observe at one moment.  If  he wishes
   to observe more, he must use successive observations.  We will also
   suppose that the number of states of mind which need be taken into
   account is finite.  The reasons for this are of the same character as
   those which restrict the number of symbols.  If we admitted an infinity
   of states of mind, some of them will be `arbitrarily close' and will
   be confused.   Again, the restriction is not one which seriously affects
   computation, since the use of more complicated states of mind can be
   avoided by writing more symbols on the tape.

``   Let us imagine the operations performed by the computer to be split
   up into `simple operations' which are so elementary that it is not
   easy to imagine them further divided.   Every such operation consists
   of some change of the physical system consisting of the computer and
   his tape.  We know the state of the system if we know the sequence
   of symbols on the tape, which of these are observed by the computer
   (possibly with a special order), and the state of mind of the computer.
   We may suppose that in a simple operation not more than one symbol
   is altered.  Any other changes can be split up into simple changes of
   this kind.  The situation in regard to squares whose symbols may be
   altered in this way is the same as in regard to the observed squares.
   We may, therefore, without loss of generality, assume
   that the squares whose symbols are changed are always `observed'
   squares.

``   Besides these changes of symbols, the simple operations must include
   changes of distribution of observed squares.  The new observed squares
   must be immediately recognizable by the computer.  I think it is
   reasonable to suppose that they can only be squares whose distance
   from the closest of the immediately previously observed squares
   does not exceed a certain fixed amount....

``   The operation actually performed is determined, as has been suggested
   above, by the state of mind of the computer and the observed symbols.
   In particular, they determine the state of mind of the computer after
   the operation. ''

\begin{center}
{\bf Universal Turing Machine}
\end{center}

In his paper Turing also proved the following remarkable theorem.


\begin{theorem}
There is a partial Turing computable function
$f(n,m)$ such that for every partial Turing computable function $g(m)$
there is an $n$ such that for every $m$,  $f(n,m)=g(m)$.
Equality here means either both sides are
defined and equal or both sides are undefined.
\end{theorem}

\proof
Given the integer $n$ we first decode it as a sequence of integers
by taking its prime factorization,
$n=2^{k_1}3^{k_2}\cdots p_m^{k_m}$ ($p_m$ is the $m^{th}$ prime number).
Then we regard each integer $k_j$ as some character on the
typewriter (if $k_j$ too big we ignore it).
If the message coded by $n$ is a straight forward
description of a Turing machine, then we carry out the computation
this machine would do when presented with input $m$. If this
simulated computation halts with output $k$, then we halt with output $k$.
If it doesn't halt, then neither does our simulation.  If $n$ does not
in a straight forward way code the description of a Turing machine,
then we pretend its coding the empty function, i.e. we just never halt.
\qed


\section{Trees, Konig's Lemma, Low basis}

\begin{define} Recall:
\begin{enumerate}
\item A nonempty $T\sq 2^{<\om}$ is a tree iff 
$\si\su\tau\in T$ implies $\si\in T$.
\item For $T\sq 2^{<\om}$ a tree, define: 
$$[T]=\{b\in 2^\om: \forall n\;\; b\res n \in T\}$$ 
the infinite branches of $T$.
\item For $\si\in T$ define:
$$T(\si)=\{\rho\in T:\rho\su\si \rmor \si\su\rho\}.$$
\end{enumerate}
\end{define}

\begin{lemma}
(Konig's Lemma) If $T\su 2^{<\om}$ is an infinite tree,
then $[T]$ is nonempty.
\end{lemma}

\proof
Construct $b\res n$ by induction so that
$T(b\res n )$ is infinite.
\qed

\begin{example}
There exists an infinite \rec tree $T\su 2^{<\om}$ with no
\rec branch.
\end{example}
\proof
Let $K_0$ and $K_1$ be disjoint \recly inseparable sets.
Put $\si\in T$ iff for all $n<|\si|$ and $i=0,1$ if
$n\in K_{i,|\si|}$ then $\si(n)=i$.  Then the infinite branches
of $T$ are the characteristic functions of separating sets.
\qed

\begin{prop}
Suppose $T\su 2^{<\om}$ is a \rec tree, and $[T]$ is countable,
then there exists a \rec $b$ in $[T]$.
\end{prop}

\proof
There must be a $\si\in T$ such that
$[T(\si)]$ has exactly one element, otherwise $T$ contains a perfect
tree.  This one element $b$ must be \rec.  To see this, note that
if $\si\su\tau$ and $\tau\not\su b$, then the tree
$T(\tau)$ is finite.  Hence to determine $b\res n$ for any
$n>|si|$ we search for an $m>n$ such that
exactly one $\tau\in 2^n\cap T(\si)$ has an extension at level
$m$.
\qed

\begin{prop}
(Low basis, Jocusch and Soare) If $T\su 2^{<\om}$ is an infinite \rec tree,
then there exists $b\in [T]$ with $b^\pr\equiv_T 0^\pr$.
\end{prop}
\proof
Inductively construct \rec trees $T_e$ with $T_0=T$ as follows:
Given $T_e$ define the tree:
$$\hat{T}_e=\{\si\in T_e: \{e\}_{|\si|}^\si(e)\uparrow\}.$$

Case 1. $\hat{T}_e$ is infinite. Put $T_{e+1}=\hat{T}_e$.

Case 2. $\hat{T}_e$ is finite. Put $T_{e+1}={T}_e$.

Since $T_{e+1}\su T_e$ are all infinite trees, the set
$\bigcap_eT_e$ is an infinite tree. This is because
the intersection of trees is always a tree.  It is infinite
because for any $n<\om$ there must
be $\si\in 2^n$ which is in infinitely many $T_e$ and hence all.
By Konig's Lemma there exists $b\in \bigcap_e[T_e]$.

To see, that $b^\pr=0^\pr$, note that $e\in b^\pr$ iff
Case 2 occurred at step $e$ in the construction.  But this can
be answered uniformly by $0^\pr$.

\qed

\exer Find a \rec tree $T\su\om^{<\om}$ which is binary branching, and
such that $[T]=\{b\}$ where $b\equiv_T 0^\pr$.  Binary bran


\exer % qual 2005-1
Prove there exists an infinite \rec subtree $T\su
\om^{<\om}$ such that $T$ does not contain an infinite \rec
chain or an infinite \rec antichain.

$T$ is a subtree
of $\om^{<\om}$ means that $\si \su \tau\in T$ implies
$\si\in T$ for every $\si,\tau\in \om^{<\om}$.

$C\su T$ is a chain iff $\si\su \tau$ or
$\tau\su \si$ for every $\si,\tau\in C$.

$A\su T$
is an antichain iff $\si\su \tau$ for $\si,\tau\in T$ just
in case $\si=\tau$.





\end{document}






