

% 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\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 160A - Fall 2021 -
\bf Homework 7} \\  {\bf Due Wednesday, November 17, 11:00am
 --- DUE IN THE MORNING! } \\ (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}

\noindent
{\bf 1.} Work in the language with a unary predicate~$P(x)$ and
(as usual) the equality sign~$=$.
For $k\ge 0$, let $\TAtMost_k$, $\TAtLeast_k$ and $\TExactly_k$
be the assertions that there are at most $k$,
at least~$k$, and exactly~$k$ (respectively) many objects~$x$ satisfying
the property~$P(x)$.
\begin{enumerate}[nosep]
\item Give general constructions, for arbitrary fixed~$k$,
of first-order sentences that express the
assertions $\TAtMost_k$, $\TAtLeast_k$ and $\TExactly_k$.
\item Analyze the sizes of the sentences you constructed
for $\TAtMost_k$, $\TAtLeast_k$ and $\TExactly_k$. Do they
use $O(k^2)$ many symbols? Do they use $O(k)$~many symbols?\footnote{$O(k)$
and $O(k^2)$ are ``big-Oh notation''  $O(k)$ means having
size bounded by $c\cdot k$ for some constant~$c$. $O(k^2)$ means having
size bounded by $c\cdot k^2$ for some constant~$c$.}
\end{enumerate}
(The most
straightforward constructions use $O(k^2)$ many symbols, but
it is not too hard to express them using only $O(k)$ many symbols. For size $O(k)$,
the suggestion is to start with $\TAtMost_k$.)
\medskip

\noindent
{\bf 2.} Suppose $x$ is not free in a formula~$A$. Prove that $A \vDash \Dashv \forall x\, A$
and that $A \vDash \Dashv \exists x\, A$. [Part of this was already done in the
previous homework assignment. There is an easy way to do the second part from the first
part, by replacing subformulas with equivalent formulas using the fact that, loosely speaking,
``$\lnot \forall \lnot$'' is logically equivalent to ``$\exists$'', see Theorems IV.33 and IV.48 (was number IV.47
in the earlier PDF draft).]

\medskip

\noindent
{\bf 3.} Let $A$ and $B$ be arbitrary formulas. Prove that
$\forall x \, (A\land B)$ is logically equivalent to $\forall x\, A \land \forall x\, B$.
Then prove that $\exists x \, (A\lor B) \vDash \Dashv \exists x\, A \lor \exists x\, B$.
(Again, the second part can be proved from the first part, now using the
equivalence of $\lnot \forall \lnot$ and $\exists$, and De Morgan's laws.)

\medskip

\noindent
{\bf 4.} Suppose $x$ is not free in~$C$. Prove that
\begin{enumerate}[nosep]
\item
$\forall x (A \land C) \vDash\Dashv \forall x A \land C$. (Hint: this one
follows readily from problems 2 and 3.)
\item
$\exists x (A \land C) \vDash\Dashv \exists x A \land C$.
(Hint: This needs a new proof. Split into cases depending on whether or not
$\mathfrak A \vDash C[\sigma]$ holds. {\bf Extra Hint:} Example IV.38 of the PDF text
shows a similar proof.)
\end{enumerate}

\medskip

\noindent
{\bf 5.} Again suppose $x$ is not free in~$C$. Prove that
\begin{enumerate}[nosep]
\item $\forall x (A \lor C) \vDash\Dashv \forall x A \lor C$
\item $\exists x (A \lor C) \vDash\Dashv \exists x A \lor C$
\end{enumerate}
(Hint: use the equivalence of $\lnot \exists \lnot$ and $\forall$,
De Morgan's laws, and problem~4.)
\medskip

\end{document}
