2023-05-06 21:30:18 -07:00
|
|
|
\section{Quantifiers}
|
|
|
|
|
|
|
|
Recall the logical symbols we introduced earlier: $(), \land, \lor, \lnot, \rightarrow$ \par
|
|
|
|
We will now add two more: $\forall$ (for all) and $\exists$ (exists).
|
|
|
|
|
|
|
|
\definition{}
|
2024-05-23 12:40:43 -07:00
|
|
|
$\forall$ and $\exists$ are \textit{quantifiers}. They allow us to make statements about arbitrary symbols. \par
|
2024-05-25 10:10:55 -07:00
|
|
|
\note{Quantifiers are aptly named: they tell us \textit{how many} symbols satisfy a certain sentence.}
|
2024-05-23 12:40:43 -07:00
|
|
|
|
2023-05-06 21:30:18 -07:00
|
|
|
|
|
|
|
\vspace{2mm}
|
|
|
|
|
2024-05-23 12:40:43 -07:00
|
|
|
Let's look at $\forall$ first. If $\varphi(x)$ is a formula, \par
|
|
|
|
the formula $\forall x ~ \varphi(x)$ is true only if $\varphi$ is true for all $x$ in our universe.
|
2023-05-06 21:30:18 -07:00
|
|
|
|
|
|
|
\vspace{1mm}
|
|
|
|
|
|
|
|
For example, take the formula $\forall x ~ (0 < x)$. \par
|
2023-07-27 18:58:45 -07:00
|
|
|
In English, this means \say{For any $x$, $x$ is bigger than zero,} or simply \say{Any $x$ is positive.}
|
2023-05-06 21:30:18 -07:00
|
|
|
|
|
|
|
\vspace{3mm}
|
|
|
|
|
2024-05-23 12:40:43 -07:00
|
|
|
$\exists$ is very similar: the formula $\exists x ~ \varphi(x)$ is true if ther is at least one $x$ for which $\varphi(x)$ is true. \par
|
|
|
|
For example, $\exists ~ (0 < x)$ means \say{there is a positive number in our set.}
|
2023-05-06 21:30:18 -07:00
|
|
|
|
|
|
|
\vspace{4mm}
|
|
|
|
|
|
|
|
\problem{}
|
2024-05-25 10:10:55 -07:00
|
|
|
Which of the following are true in $\mathbb{Z}$? Which are true in $\mathbb{R}^+_0$? \par
|
|
|
|
\note{$\mathbb{R}^+_0$ is the set of positive real numbers and zero.}
|
2023-05-06 21:30:18 -07:00
|
|
|
|
|
|
|
\begin{itemize}[itemsep = 1mm]
|
|
|
|
\item $\forall x ~ (x \geq 0)$
|
|
|
|
\item $\lnot (\exists x ~ (x = 0))$
|
|
|
|
\item $\forall x ~ [\exists y ~ (y \times y = x)]$
|
2024-05-25 10:10:55 -07:00
|
|
|
\item $\forall xy ~ \exists z ~ (x < z < y)$ \tab
|
|
|
|
\note{This is a compact way to write $\forall x ~ (\forall y ~ (\exists z ~ (x < z < y)))$}
|
|
|
|
\item $\lnot \exists x ~ ( \forall y ~ (x < y) )$
|
2023-05-06 21:30:18 -07:00
|
|
|
\end{itemize}
|
|
|
|
|
2024-05-25 10:10:55 -07:00
|
|
|
\begin{solution}
|
|
|
|
\begin{itemize}
|
|
|
|
\item \say{all $x$ are positive} \tab $\mathbb{R}^+_0$
|
|
|
|
\item \say{zero doesn't exist} \tab neither
|
|
|
|
\item \say{square roots exist} \tab $\mathbb{R}^+_0$
|
|
|
|
\item \say{this set is dense} \tab\null\tab $\mathbb{R}^+_0$
|
|
|
|
\item \say{there is no minimum} \tab $\mathbb{Z}$
|
|
|
|
\end{itemize}
|
|
|
|
\end{solution}
|
|
|
|
|
2023-05-14 19:49:13 -07:00
|
|
|
%\begin{examplesolution}
|
|
|
|
% Here is a solution to the last part: $\lnot \exists x ~ ( \forall y ~ (x < y) )$ \par
|
|
|
|
%
|
|
|
|
% \vspace{4mm}
|
|
|
|
%
|
|
|
|
% Reading this term-by-term, we get \tab \say{not exists $x$ where (for all $y$ ($x$ smaller than $y$))} \par
|
|
|
|
% If we add some grammar, we get \tab \say{There isn't an $x$ where all $y$ are bigger than $x$} \par
|
|
|
|
% which we can rephrase as \tab~\tab \say{There isn't a minimum value} \par
|
|
|
|
%
|
|
|
|
% \vspace{4mm}
|
|
|
|
%
|
|
|
|
% Which is true in $\mathbb{Z}$ and false in $\mathbb{R}^+_0$
|
|
|
|
%\end{examplesolution}
|
2023-05-06 21:30:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
\vfill
|
|
|
|
\pagebreak
|
|
|
|
|
2024-05-25 10:10:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-11 20:05:02 -07:00
|
|
|
\problem{}
|
|
|
|
Does the order of $\forall$ and $\exists$ in a formula matter? \par
|
2023-08-02 13:11:14 -07:00
|
|
|
What's the difference between $\exists x ~ \forall y ~ (x \leq y)$ and $\forall y ~ \exists x ~ (x \leq y)$? \par
|
2024-05-25 10:10:55 -07:00
|
|
|
\hint{
|
|
|
|
Consider $\mathbb{R}^+$\hspace{-1.3ex},\hspace{0.8ex} the set of positive reals. Zero is not positive. \par
|
|
|
|
Which of the above formulas is true in $\mathbb{R}^+$\hspace{-1.3ex},\hspace{0.8ex} and which is false?
|
|
|
|
}
|
2023-05-11 20:05:02 -07:00
|
|
|
|
2023-08-02 13:11:14 -07:00
|
|
|
\begin{solution}
|
2024-05-23 12:40:43 -07:00
|
|
|
If $\exists x$ is inside $\forall y$, $x$ depends on $y$. We may pick a different value of $x$ for every $y$. \par
|
2023-08-02 13:11:14 -07:00
|
|
|
If $\exists x$ is outside, $x$ is fixed \textit{before} we check all $y$.
|
|
|
|
\end{solution}
|
|
|
|
|
|
|
|
|
2023-05-11 20:05:02 -07:00
|
|
|
\vfill
|
2023-05-09 21:23:09 -07:00
|
|
|
|
|
|
|
\problem{}
|
|
|
|
Define 0 in $\Bigl( \mathbb{Z} ~\big|~ \{\times\} \Bigr)$
|
|
|
|
|
2024-05-25 10:10:55 -07:00
|
|
|
\begin{solution}
|
|
|
|
$\varphi(x) \coloneqq \bigl[~ \forall y ~ x \times y = x ~\bigr]$
|
|
|
|
\end{solution}
|
2023-05-09 21:23:09 -07:00
|
|
|
|
|
|
|
\vfill
|
|
|
|
|
|
|
|
|
|
|
|
\problem{}
|
|
|
|
Define 1 in $\Bigl( \mathbb{Z} ~\big|~ \{\times\} \Bigr)$
|
|
|
|
|
2024-05-25 10:10:55 -07:00
|
|
|
\begin{solution}
|
|
|
|
$\varphi(x) \coloneqq \bigl[~ \forall y ~ x \times y = y ~\bigr]$
|
|
|
|
\end{solution}
|
|
|
|
|
2023-05-09 21:23:09 -07:00
|
|
|
|
|
|
|
\vfill
|
2023-05-11 20:05:02 -07:00
|
|
|
\pagebreak
|
2023-05-09 21:23:09 -07:00
|
|
|
|
|
|
|
|
2023-05-06 21:30:18 -07:00
|
|
|
\problem{}
|
2023-05-09 21:23:09 -07:00
|
|
|
Define $-1$ in $\Bigl( \mathbb{Z} ~\big|~ \{0, <\} \Bigr)$
|
|
|
|
|
2024-05-25 10:10:55 -07:00
|
|
|
\begin{solution}
|
|
|
|
$\varphi(x) \coloneqq \bigl[~ (x<0) \land \lnot \exists y ~ (x < y < 0) ~\bigr]$
|
|
|
|
\end{solution}
|
|
|
|
|
2023-05-09 21:23:09 -07:00
|
|
|
\vfill
|
|
|
|
|
2023-05-11 20:05:02 -07:00
|
|
|
%\problem{}
|
|
|
|
%Define $2$ in $\Bigl( \mathbb{Z} ~\big|~ \{0, <\} \Bigr)$
|
2023-05-09 21:23:09 -07:00
|
|
|
|
2023-05-11 20:05:02 -07:00
|
|
|
%\vfill
|
2023-05-09 21:23:09 -07:00
|
|
|
|
|
|
|
\problem{}
|
|
|
|
Let $\varphi(x)$ be a formula. \par
|
2024-05-25 10:10:55 -07:00
|
|
|
Write a formula equivalent to $\forall x ~ \varphi(x)$ using only logical symbols and $\exists$.
|
2023-05-09 21:23:09 -07:00
|
|
|
|
|
|
|
\begin{solution}
|
2024-05-25 10:10:55 -07:00
|
|
|
$\forall x ~ \varphi(x)$ is true if and only if $\lnot \exists x ~ \lnot \varphi(x)$ is true.
|
2023-05-09 21:23:09 -07:00
|
|
|
\end{solution}
|
2023-05-06 21:30:18 -07:00
|
|
|
|
|
|
|
\vfill
|
|
|
|
\pagebreak
|