

% Document Specific Preamble

\documentclass[12pt]{report}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{multicol}

% \usepackage{mathabx} % Alternate \Dashv

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

%
% Proof Systems, etc.
%
\def\PL{{\mathrm{PL}}}
\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\TDog{{\FmlaName{Dog}}}
\def\TCat{{\FmlaName{Cat}}}
\def\TLikes{{\FmlaName{Likes}}}
\def\TMother{{\FmlaName{Mother}}}
\def\TPrime{{\FmlaName{Prime}}}
\def\TRead{{\FmlaName{Read}}}
\def\Ptime{{\mathrm P}}
\def\NP{{\mathrm{NP}}}
\def\TCase{{\ConnectiveName{Case}}}
\def\TMaj{{\ConnectiveName{Maj}}}

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

% 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}

\begin{document}

\begin{center}
{\bf Math 160A - Fall 2021 -
\bf Quiz 8 - Upload by 9:30am, Wednesday, November 3} \\
\end{center}

\kern -1em

\noindent
\begin{tabbing}
{\bf Start Time:} \hspace*{1.2in}\={\bf Your name:}\\[0.5ex]
{\bf Stop Time:} \> {\bf Integrity signature:}
\end{tabbing}

\vskip -1em

\noindent
%\begin{minipage}{2.5in}
Time limit 15 minutes, not counting download and upload. Please add explanation if over 17 minutes.
%\end{minipage}
%~~~~ \hfill
%\begin{minipage}{3.5in}
%\footnotesize
%\underline{PL axioms:}
%\begin{description}[font=\rm,nosep]
%\item[PL1:] $A \limplies B \limplies A$
%\item[PL2:] $(A \limplies B\limplies C) \limplies (A\limplies B) \limplies (A\limplies C)$
%\item[PL3:] $\lnot A \limplies A \limplies B$
%\item[PL4:] $(\lnot A \limplies A) \limplies A$
%\end{description}
%$\bullet$ $A\lor B$ and $A\land B$ stand for $\lnot A \limplies B$ and $\lnot(A\limplies \lnot B)$.
%\end{minipage}

\noindent
{\bf 1.} Use unary predicates $\TDog(x)$ and $\TCat(x)$, the binary predicate
$\TLikes(x,y)$, the constant symbol \hbox{\it Spot}, the unary function $\TMother(x)$
and the equality sign~$=$
to express the following English sentences in first-order logic.  $\TDog(x)$ means ``$x$~is a dog''
and $\TCat(x)$ means ``$x$~is a cat''.  $\TLikes(x,y)$ means ``$x$ likes~$y$''.
$\TMother(x)$ denotes the mother of~$x$.  Variables ranges over the universe of
all dogs and cats.

\kern -1em

\begin{enumerate}[itemsep=2.3em]
\item All dogs (including Spot) like Spot.
\item Some dog (possibly it is Spot) likes Spot.
\item Every dog likes the mother of some cat.
\item There is a cat whose mother likes all dogs.
\end{enumerate}
\vfill

{\bf 2.} let $P$ be a unary predicate, $Q$ a binary predicate, $f$ a
unary function, $g$~a binary function, and $c$~a constant symbol. Consider the following expressions:
\begin{multicols}{3}
\begin{enumerate}[nosep]
\item $c$
\item $x_3$
\item $g(c, x_3)$
\item $g(c, x_3) = $
\item $c= g(f(x_2),x_3)$
\item $g(f(x_1),c)=g(f(x_1))$
\item $P(c= g(f(x_2),x_3))$
\item $f(c)=\lnot g(x_1, x_1)$
\item $Q(c,x_1)=P(c)$
\item $\forall x_1 (P(x_1) \limplies Q(x_1,x_1))$
\item $\forall x_1 {\in} P(x_1)\, ( Q(x_1,x_1))$
\item $\forall x_1 (Q(x_1,x_1) \land x_1=c$
\end{enumerate}
\end{multicols}
\begin{enumerate}[label=(\roman*)]
\item Which of these are syntactically correct terms?
\item Which of these are syntactically correct atomic formulas?
\item Which of these are syntactically correct formulas? (A formula still counts as syntactically correct if some parentheses are omitted or extra parentheses added.)
\end{enumerate}

{\bf 3.}  In the following formula, mark which occurrences of $x_1$ are free occurrences and which are bound occurrences.
\begin{center}
$\forall x_1 (x_1=f(x_1) \limplies \exists x_1 ( c=x_1 ) ) \land x_1=f(x_1) \limplies c=x_1.$
\end{center}


\end{document}
