

% Document Specific Preamble

\documentclass[12pt]{report}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{multicol}
\usepackage{fdsymbol}   % \Vdash symbol (alternative definition)

% \usepackage{mathabx} % Alternate \Dashv

\voffset=-20pt
\textheight=9.3in
\addtolength{\topmargin}{-1.2in}
\addtolength{\oddsidemargin}{-.875in}
\addtolength{\evensidemargin}{-.875in}
\addtolength{\textwidth}{1.0in}
\pagestyle{empty}

%
% Proof Systems, etc.
%
\def\PL{{\mathrm{PL}}}
\def\FO{{\mathrm{FO}}}
\def\PA{{\mathrm{PA}}}

%
% Logical syntax and symbols
%
\def\liff{\leftrightarrow}
\def\limplies{\rightarrow}
\def\tautEq{\vDash\Dashv}
\def\True{{\mathrm T}}
\def\False{{\mathrm F}}

\def\bigand{\bigwedge}
\def\bigor{\bigvee}

% Other symbols
\def\pprime{{\prime\prime}}
\def\mathfrakA{{\mathfrak A}}
\def\mathfrakB{{\mathfrak B}}
\def\mathfrakC{{\mathfrak C}}

%
% Provability with subscripts & superscripts
%
\newdimen\srbdimenA
\newcommand{\vdashsupsub}[2]{ \mathop{
  \setbox251 = \hbox{$\scriptstyle #1$}
  \setbox252 = \hbox{$\scriptstyle #2$}
  \ifdim \wd251<\wd252 \srbdimenA = \wd252 \else \srbdimenA = \wd251 \fi
  \setbox255 = \hbox {${\srbAvdash \vphantom( \kern -\srbdimenA \kern +.05em}
                  ^{\hbox to\srbdimenA{\hfill \box251\hfill}}
                  _{\hbox to\srbdimenA{\hfill \box252\hfill}}$}
  \box255 \kern .05em}}
\newcommand{\srbAvdash}{\hbox{ \vrule height1.4ex width0.02em
				\dimen255 = \srbdimenA
				\advance\dimen255 by 0.1em
                              \vbox{\hrule width\srbdimenA height0.02em
                                    \kern .65ex  }}}
\newcommand{\vdashsup}[1]{\vdashsupsub{{#1}}{\mbox{~}}}
\newcommand{\vdashsub}[1]{\vdashsupsub{\mbox{~}}{#1}}

%
% Text in mathematics
%
\def\FmlaName{\mathit}
\def\ConnectiveName{\mathit}
\def\TBook{{\FmlaName{Book}}}
\def\TLikes{{\FmlaName{Likes}}}
\def\TJazz{{\FmlaName{Jazz}}}
\def\TKpop{{\FmlaName{Kpop}}}
\def\TKnows{{\FmlaName{Knows}}}
\def\TJoan{{\FmlaName{Joan}}}
\def\TMother{{\FmlaName{Mother}}}
\def\TPrime{{\FmlaName{Prime}}}
\def\TPrimePower{{\FmlaName{PrimePower}}}
\def\TRead{{\FmlaName{Read}}}
\def\TDog{{\FmlaName{Dog}}}
\def\TCat{{\FmlaName{Cat}}}
\def\TPerson{{\FmlaName{Person}}}
\def\TTime{\FmlaName{Time}}
\def\Ptime{{\mathrm P}}
\def\NP{{\mathrm{NP}}}
\def\TCase{{\ConnectiveName{Case}}}
\def\TMaj{{\ConnectiveName{Maj}}}

\def\TAtMost{{\FmlaName{AtMost}}}
\def\TAtLeast{{\FmlaName{AtLeast}}}
\def\TExactly{{\FmlaName{Exactly}}}

%
% Spacing for compact truth tables
%
\def\cnspace{\hskip3pt}


\begin{document}


\begin{center}
{\bf Math 160B - Winter 2022 -
\bf Homework 3} \\  {\bf Due Wednesday, January 26, 11:00pm} \\
(Hand in by uploading to Gradescope)
\end{center}

\vskip -1.0em

% Set paragraph style: No indentation, skip one line.
\setlength{\parindent}{0em}
\setlength{\parskip}{\baselineskip}

% item environments
\setlist[itemize]{font=\rm,itemsep=3pt,parsep=0pt,topsep=0pt}
\setlist[enumerate]{font=\rm,itemsep=3pt,parsep=0pt,topsep=5pt}
\setlist[enumerate]{label=(\alph*)}
\setlist[description]{font=\em,itemsep=3pt,parsep=0pt,topsep=5pt}

You can also find these problems in the PDF text.

\noindent
{\bf 1.}
Let $R$ be a binary relation on~$\Sigma^*$. Define $S$ to
be the set 
\[
S ~:=~ \{ w\in \Sigma^* : \exists v \in \Sigma^*\, (\langle v,w\rangle \in R) \} .
\]
We call $S$ the \emph{projection} of~$R$ onto its second coordinate.
Suppose that $R$ is c.e.  Prove that $S$ is c.e.

\noindent
{\bf 2.}
Suppose $R$ and $S$ are $k$-relations on $\Sigma^*$. Define the
\emph{symmetric difference} $R\triangle S$ of $R$ and~$S$
to equal $(R\setminus S) \cup (S\setminus R)$.
Suppose that $R\triangle S$ is finite.
Prove that $R$ is decidable if and only if $S$ is decidable.
Prove that $R$ is c.e.\ if and only if $S$ is c.e.


\noindent{\bf 3.}
Suppose that $R \subseteq \mathbb N$ is enumerated by an algorithm~$M$
in increasing order. In other words, $M$~successively outputs $n_1,n_2,\ldots$
so that $R = \{ n_1,n_2,n_3,\ldots \}$ and $n_i < n_{i+1}$ for each~$i$.
Prove that $R$ is decidable.  What if the assumption is weakened
to the condition that $n_i \le n_{i+1}$. Must $R$ still be decidable?

\noindent
{\bf 4.}
Prove that a $k$-ary relation is computably enumerable if and only if it
is the domain of a partial computable function.

\noindent
{\bf 5.}Prove that a set is computably enumerable if and only if it
is empty or is the range of a recursive function.

\noindent
{\bf 6.} Prove Craig's Theorem:
\begin{enumerate}[nosep]
\item Suppose $\Gamma$ is c.e.\ set of propositional formulas.
Prove there is a decidable set~$\Pi$ of propositional formulas such
that $\Gamma \tautEq \Pi$.
\item Suppose $\Gamma$ is c.e.\ set of first-order sentences.
Prove there is a decidable set~$\Pi$ of first-order sentences such
that $\Gamma \tautEq \Pi$.
\end{enumerate}
Hint: The proofs for (a) and~(b) are identical.  One method
of proof is to enumerate $\Gamma$ as $A_1, A_2, \ldots$
and consider the formulas $A_1\land A_2 \land \cdots \land A_k$.

\end{document}
