

% Document Specific Preamble

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

% \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\FO{{\mathrm{FO}}}
\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 13 - Upload by 12:00pm (Noon), Sunday, December 5} \\
\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.0in}
Time limit 15 minutes, not counting download and upload. Please add explanation if over 17 minutes.
%\end{minipage}
~~~~ \hfill
%\begin{minipage}{4.2in}
%\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$
%
%\underline{FO axioms and inferences:}
%\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$
%\item[EQ1:] $x=x$
%\item[EQ2:] $x=y\limplies y=x$
%\item[EQ3:] $x=y \limplies y=z \limplies x=z$
%\item[EQ${}_f$:] $y_1 = z_1 \limplies \cdots \limplies y_k = z_k \limplies f(y_1,\ldots,y_k)=f(z_1,\ldots,z_k)$
%\item[EQ${}_P$:] $y_1 = z_1 \limplies \cdots \limplies y_k = z_k \limplies P(y_1,\ldots,y_k)\limplies %P(z_1,\ldots,z_k)$
%\item[UI:] $\forall x\, A(x) \limplies A(t)$.
%\item[MP:] $A\limplies B, ~ A ~/~ B$.
%\item[Gen:] $C \limplies A~/~ C \limplies \forall x\, A$
%($x$ not free in $C$)
%\end{description}
%$\bullet$ $A\lor B$, $A\land B$, and $\exists x \, A$ stand for $\lnot A \limplies B$, $\lnot(A\limplies \lnot B)$
%and $\lnot \forall x\, \lnot A$.
%\end{minipage}

{\bf There are two pages, the second with ``cheat'' sheet material. Only the first page needs to be turned in.}

\kern -0.5em

\noindent
{\bf 1.} Prove that there exists an $\FO$ proof of

\[
\forall x\, (P(x) \limplies Q(x)) \limplies \exists x\, P(x) \limplies \exists x\, Q(x).
\]

\vfill

\pagebreak

\begin{center}
\setlength{\fboxrule}{1pt}
\setlength{\fboxsep}{10pt}
\fbox{\begin{minipage}{0.92\textwidth}
\raggedright
%\vspace*{0.0em}
\begin{center}
{\bf Axioms and Inference Rules for $\FO$-proofs}
\end{center}

\begin{description}[font=\bf,nosep,itemsep=3pt]
\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$

\kern 3pt
\item[EQ1:] $x=x$
\item[EQ2:] $x=y\limplies y=x$
\item[EQ3:] $x=y \limplies y=z \limplies x=z$
\item[EQ${}_f$:] $y_1 = z_1 \limplies \cdots \limplies y_k = z_k \limplies f(y_1,\ldots,y_k)=f(z_1,\ldots,z_k)$
\item[EQ${}_P$:] $y_1 = z_1 \limplies \cdots \limplies y_k = z_k \limplies P(y_1,\ldots,y_k)\limplies P(z_1,\ldots,z_k)$

\kern 3pt
\item[Universal Instantiation (UI):] $\forall x\, A(x) \limplies A(t)$.

\kern 3pt
\item[Modus Ponens:] \AxiomC{$A$}\AxiomC{$A\limplies B$}\BinaryInfC{$B$}\DisplayProof.
\item[Generalization (Gen):]
\AxiomC{$C \limplies A$}
\RightLabel{~~~($x$ not free in $C$)}
\UnaryInfC{$C \limplies \forall x\, A$}
\DisplayProof
\end{description}

\medskip

$A\lor B$, $A\land B$, and $\exists x \, A$ abbreviate $\lnot A \limplies B$, $\lnot(A\limplies \lnot B)$
and $\lnot \forall x\, \lnot A$.

\end{minipage}
} % End of \fbox
\end{center}

\begin{center}
\setlength{\fboxrule}{1pt}
\setlength{\fboxsep}{10pt}
\fbox{\begin{minipage}{0.92\textwidth}
\raggedright
%\vspace*{0.0em}
\begin{center}
{\bf Constructing $\FO$-proofs}
\end{center}

\vspace*{-0.5em}
{\bf {Derived rules:}}

~~~~{\bf Propositional rules:} Modus Tollens, Hypothetical Syllogism and \hfill \\
~~~~~~~~~~~~~~~~~ more generally
Tautological Implication (TAUT).

\kern 0.4em

\AxiomC{$A$}
\LeftLabel{\bf Generalization:}
\UnaryInfC{$\forall x\, A$}
~~~~\DisplayProof

\kern 0.4em

~~~~If $t$ is substitutable for $x$ in~$A$:
\begin{center}
\AxiomC{$\forall x\,A(x)$}
\LeftLabel{\bf UI Rule:}
\UnaryInfC{$A(t)$}
\DisplayProof
\qquad
\AxiomC{$A(x)$}
\LeftLabel{\bf Substitution:}
\UnaryInfC{$A(t)$}
\DisplayProof
\end{center}

For Deduction/Contradiction/By Cases, assume $A$ is a sentence.

\kern 5pt


~~~~{\bf {Deduction Theorem}:} $\Gamma \vdash A\limplies B$ iff $\Gamma, A \vdash B$.
\vspace*{0.5em}

~~~~{\bf Proof by Contradiction:} \hfill \\[0.5em]
\hspace*{5em} $\Gamma \vdash A$ iff $\Gamma \cup \{ \lnot A \}$ is inconsistent. \hfill \\[0.25em]
\hspace*{5em} $\Gamma \vdash \lnot A$ iff $\Gamma \cup \{ A \}$ is inconsistent.

\vspace*{0.5em}

~~~~{\bf Proof by Cases:} If $\Gamma, A \vdash B$ and $\Gamma,\lnot A \vdash B$, then $\Gamma \vdash B$.

\kern 5pt

{\bf Theorem on Constants.} $c$ is a new constant symbol, not in $\Gamma$, $A$, $B$. \hfill \\[0.4em]
~~~~For $A(x)$ a formula, $\Gamma \vdash \forall x\, A(x)$ iff $\Gamma \vdash A(c)$.
      \hfill \\[0.25em]
~~~~If $\exists x\, A(x)$ is a sentence,
   $\Gamma \cup\{ \exists x\, A(x) \} \vdash B$ iff $\Gamma \cup\{ A(c) \} \vdash B$

\end{minipage}
}
\end{center}

\end{document}
