diff --git a/Advanced/Definable Sets/main.tex b/Advanced/Definable Sets/main.tex index 969aa20..b443741 100755 --- a/Advanced/Definable Sets/main.tex +++ b/Advanced/Definable Sets/main.tex @@ -9,6 +9,7 @@ % for \coloneqq, a centered := \usepackage{mathtools} +\usepackage{units} \uptitlel{Advanced 2} \uptitler{\smallurl{}} diff --git a/Advanced/Definable Sets/parts/0 logic.tex b/Advanced/Definable Sets/parts/0 logic.tex index 7c687a2..fb82d01 100644 --- a/Advanced/Definable Sets/parts/0 logic.tex +++ b/Advanced/Definable Sets/parts/0 logic.tex @@ -81,13 +81,33 @@ Evaluate the following. \item $\texttt{F} \lor \texttt{T}$ \item $\texttt{T} \land \texttt{T}$ \item $(\texttt{T} \land \texttt{F}) \lor \texttt{T}$ - \item $(\texttt{T} \land \texttt{F}) \lor \texttt{T}$ - \item $(\lnot (\texttt{F} \lor \lnot \texttt{T}) ) \rightarrow \texttt{T}$ + \item $(\lnot (\texttt{F} \lor \lnot \texttt{T}) ) \rightarrow \lnot \texttt{T}$ \item $(\texttt{F} \rightarrow \texttt{T}) \rightarrow (\lnot \texttt{F} \lor \lnot \texttt{T})$ \end{itemize} +\begin{solution} + \texttt{F} + \texttt{T} + \texttt{T} + \texttt{T} + \texttt{F} + \texttt{T} +\end{solution} + \vfill \pagebreak + + + + + + + + + + + + \begin{instructornote} We can also think of $[x \geq 0] \rightarrow b$ as follows: if $x$ isn't the kind of object we care about, we evaluate true and @@ -117,8 +137,18 @@ Evaluate the following. \item $(A \rightarrow B) \rightarrow (\lnot B \rightarrow \lnot A)$ for any $A, B$ \end{itemize} +\begin{instructornote} + Note that the last formula is the contrapositive of $A \rightarrow B$. +\end{instructornote} + +\begin{solution} + All are true. +\end{solution} + \vfill +% Show that A -> B ^ B -> A = T iff A = B + \problem{} Show that $\lnot (A \rightarrow \lnot B)$ is equivalent to $A \land B$. \par That is, show that these expressions always evaluate to the same value given diff --git a/Advanced/Definable Sets/parts/1 structures.tex b/Advanced/Definable Sets/parts/1 structures.tex index dfc5a8e..8929f15 100644 --- a/Advanced/Definable Sets/parts/1 structures.tex +++ b/Advanced/Definable Sets/parts/1 structures.tex @@ -22,7 +22,7 @@ Symbols come in three types: \item \textit{Function symbols}, which let us navigate between elements of our universe. \par Examples: $+, \times, \sin{x}, \sqrt{x}$ \par - \note{In this handout, symbols we usually call \say{operators} are also called functions. \par + \note{Note that symbols we usually call \say{operators} are functions under this definition. \par The only difference between $a + b$ and $+(a, b)$ is notation.} \vspace{2mm} @@ -31,7 +31,7 @@ Symbols come in three types: \vspace{2mm} \end{itemize} -The equality check $=$ is \textbf{not} a relation symbol. It is included in every structure by default. \par +The equality check $=$ is \textit{not} a relation symbol. It is included in every structure by default. \par By definition, $a = b$ is true if and only if $a$ and $b$ are the same element of our universe. @@ -61,10 +61,15 @@ others, we must define them using the tools this structure offers. \vspace{2mm} +% NOTE: this is a great example for typesetting. +% The line breaks here are ugly without a centered sentence. To \say{define} an element of a set, we need to write a sentence that is only true for that element. \par -For example, if we want to define 2 in the structure above, \par -we could use the sentence \say{$2$ is the $x$ that satisfies $[1 + 1 = x]$.} \par -This is a valid definition because $2$ is the \textbf{only} element of $\mathbb{Z}$ for which $[1 + 1 = x]$ +If we want to define 2 in the structure above, +we could use the following sentence: +\begin{center} + \say{$2$ is the $x$ that satisfies $[1 + 1 = x]$.} \par +\end{center} +This is a valid definition because $2$ is the \textit{only} element of $\mathbb{Z}$ for which $[1 + 1 = x]$ evaluates to \texttt{true}. @@ -81,6 +86,9 @@ Define $-1$ in $\Bigl( \mathbb{Z} ~\big|~ \{0, 1, +, -, <\} \Bigr)$. + + + Let us formalize what we found in the previous two problems. \par \definition{Formulas} @@ -89,31 +97,51 @@ of constants, functions, relations, \par and logical operators. \vspace{2mm} -You already know what a \say{well-formed} string is: $1 + 1$ is fine, $\sqrt{+}$ is nonsense. \par -For the sake of time, I will not provide a formal definition. It isn't particularly interesting. +You already know what a \say{well-formed string} is: $1 + 1$ is fine, $\sqrt{+}$ is nonsense. \par +For the sake of time, I will not provide a formal definition --- it isn't particularly interesting. \vspace{2mm} -As a quick example, the formula $\phi(x) = [1 + 1 = x]$ evaluates to \texttt{true} when $x$ is 2 \par -and to \texttt{false} otherwise. +As a quick example, the formula $\psi \coloneqq [\lnot (1 = 1)]$ is always false, \par +and $\varphi(x) \coloneqq [1 + 1 = x]$ evaluates to \texttt{true} only when $x$ is 2. + + + \definition{Free Variables} A formula can contain one or more \textit{free variables.} These are denoted $\varphi{(a, b, ...)}$. \par -Formulas with free variables let us define \say{properties} that certain objects have. \par - -For example, $x$ is a free variable in the formula above. \par -$\varphi(2)$ is \texttt{true} and $\varphi(-3)$ is \texttt{false}. \par +Formulas with free variables let us define \say{properties} that certain objects have. \vspace{2mm} -This \say{free variable} notation is much like the function notation we are used to: \par -$\varphi(x) = [x > 0]$ is similar to $f(x) = x + 1$, since the values of $\varphi(x)$ and $f(x)$ depend on $x$. +For example, consider the two formulas from the previous definition, $\psi$ and $\varphi$: +\begin{itemize} + \item $\psi \coloneqq [\lnot (1 = 1)]$ \par + There are no free variables in this formula. \par + In any structure, $\psi$ is always either \texttt{true} or \texttt{false}. + + \vspace{2mm} + + \item $\varphi(x) \coloneqq [1 + 1 = x]$ \par + This formula has one free variable, labeled $x$. \par + The value of $\varphi(x)$ depends on the $x$ we're talking about: \par + $\varphi(72)$ is false, and $\varphi(2)$ is true. +\end{itemize} + +\vspace{2mm} + +\note{ + This \say{free variable} notation is very similar to the function notation we are used to: \par + The values of both $\varphi(x) \coloneqq [x > 0]$ and $f(x) = x + 1$ depend on $x$. +} + + \definition{Definable Elements} -Say $S$ is a structure with a universe $U$. \par -We say an element $e \in U$ is \textit{definable in $S$} if we can write a formula that only $e$ satisfies. +Let $S$ be a structure over a universe $U$. \par +We say an element $x \in U$ is \textit{definable in $S$} if we can write a formula $\varphi(x)$ that only $x$ satisfies. \problem{} @@ -121,10 +149,16 @@ Define 2 in the structure $\Bigl( \mathbb{Z^+} ~\big|~ \{4, \times \} \Bigr)$. \ \hint{$\mathbb{Z}^+ = \{1, 2, 3, ...\}$. Also, $2 \times 2 = 4$.} \begin{solution} - $2$ is the only element in $\mathbb{Z}^+$ that satisfies $\varphi(x) = [x \times x = 4]$. + $2$ is the only element in $\mathbb{Z}^+$ that satisfies $\varphi(x) \coloneqq [x \times x = 4]$. \end{solution} + \vfill +\pagebreak + + + + \problem{} @@ -132,8 +166,10 @@ Try to define 2 in the structure $\Bigl( \mathbb{Z} ~\big|~ \{4, \times \} \Bigr Why can't you do it? \begin{solution} - This isn't possible. We could try $\varphi(x) = [x \times x = 4]$, but this is satisfied by both $2$ and $-2$. \par - We have no way to distinguish between negative and positive numbers. + We could try $\varphi(x) \coloneqq [x \times x = 4]$, but this is satisfied by both $2$ and $-2$. \par + We have no way to distinguish between negative and positive numbers. \par + + \note{This problem is intentionally hand-wavy. We don't have the tools to write a proper proof.} \begin{instructornote} Actually, it is. Bonus problem: how? \par @@ -145,12 +181,21 @@ Why can't you do it? \problem{} -What numbers are definable in the structure $\Bigl( \mathbb{R}^+_0 ~\big|~ \{1, 2, \div \} \Bigr)$? +Consider the structure $\Bigl( \mathbb{R}^+_0 ~\big|~ \{1, 2, \div \} \Bigr)$ + +\begin{itemize} + \item Define $2^2$ + \item Define $2^n$ for all positive integers $n$ + \item Define $2^{-n}$ for all positive integers $n$ + + \item What other numbers can we define in this structure? \par + \hint{There is at least one more \say{class} of numbers we can define.} +\end{itemize} + \begin{solution} - We can define powers of two, positive and negative. - - If you're clever, you can define many more: $\sqrt{2}, \sqrt[3]{2}, ...$. + As far as I've seen, we can define any $2^{\nicefrac{a}{b}}$ for $a, b \in \mathbb{Z}$. \par + For example, $\phi(x) \coloneqq [2 = x \div (1 \div x)]$ defines $\sqrt{2}$. \end{solution} \vfill diff --git a/Advanced/Definable Sets/parts/2 quantifiers.tex b/Advanced/Definable Sets/parts/2 quantifiers.tex index 19fcf50..01af858 100644 --- a/Advanced/Definable Sets/parts/2 quantifiers.tex +++ b/Advanced/Definable Sets/parts/2 quantifiers.tex @@ -5,7 +5,7 @@ We will now add two more: $\forall$ (for all) and $\exists$ (exists). \definition{} $\forall$ and $\exists$ are \textit{quantifiers}. They allow us to make statements about arbitrary symbols. \par -\hint{Quantifiers are aptly named: they tell us \textit{how many} symbols satisfy a certain sentence.} +\note{Quantifiers are aptly named: they tell us \textit{how many} symbols satisfy a certain sentence.} \vspace{2mm} @@ -26,22 +26,28 @@ For example, $\exists ~ (0 < x)$ means \say{there is a positive number in our se \vspace{4mm} \problem{} -Which of the following are true in $\mathbb{Z}$? \par -Which are true in $\mathbb{R}^+_0$? \par -\hint{$\mathbb{R}^+_0$ is the set of positive real numbers and zero.} \par +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.} \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)]$ - - \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) )$ %\tab~\tab \note{Solution is below.} + \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) )$ \end{itemize} +\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} + %\begin{examplesolution} % Here is a solution to the last part: $\lnot \exists x ~ ( \forall y ~ (x < y) )$ \par % @@ -60,10 +66,22 @@ Which are true in $\mathbb{R}^+_0$? \par \vfill \pagebreak + + + + + + + + + \problem{} Does the order of $\forall$ and $\exists$ in a formula matter? \par What's the difference between $\exists x ~ \forall y ~ (x \leq y)$ and $\forall y ~ \exists x ~ (x \leq y)$? \par -\hint{In $\mathbb{R}^+$, the first is false and the second is true. $\mathbb{R}^+$ does not contain zero.} +\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? +} \begin{solution} If $\exists x$ is inside $\forall y$, $x$ depends on $y$. We may pick a different value of $x$ for every $y$. \par @@ -76,6 +94,9 @@ What's the difference between $\exists x ~ \forall y ~ (x \leq y)$ and $\forall \problem{} Define 0 in $\Bigl( \mathbb{Z} ~\big|~ \{\times\} \Bigr)$ +\begin{solution} + $\varphi(x) \coloneqq \bigl[~ \forall y ~ x \times y = x ~\bigr]$ +\end{solution} \vfill @@ -83,6 +104,10 @@ Define 0 in $\Bigl( \mathbb{Z} ~\big|~ \{\times\} \Bigr)$ \problem{} Define 1 in $\Bigl( \mathbb{Z} ~\big|~ \{\times\} \Bigr)$ +\begin{solution} + $\varphi(x) \coloneqq \bigl[~ \forall y ~ x \times y = y ~\bigr]$ +\end{solution} + \vfill \pagebreak @@ -91,6 +116,10 @@ Define 1 in $\Bigl( \mathbb{Z} ~\big|~ \{\times\} \Bigr)$ \problem{} Define $-1$ in $\Bigl( \mathbb{Z} ~\big|~ \{0, <\} \Bigr)$ +\begin{solution} + $\varphi(x) \coloneqq \bigl[~ (x<0) \land \lnot \exists y ~ (x < y < 0) ~\bigr]$ +\end{solution} + \vfill %\problem{} @@ -100,10 +129,10 @@ Define $-1$ in $\Bigl( \mathbb{Z} ~\big|~ \{0, <\} \Bigr)$ \problem{} Let $\varphi(x)$ be a formula. \par -Write a formula equivalent to $[~ \forall x ~ \varphi(x) ~]$ using only logical symbols and $\exists$. +Write a formula equivalent to $\forall x ~ \varphi(x)$ using only logical symbols and $\exists$. \begin{solution} - $[~ \forall x ~ \varphi(x) ~]$ is true if and only if $[~ \lnot \exists x ~ \lnot \varphi(x) ~]$ is true. + $\forall x ~ \varphi(x)$ is true if and only if $\lnot \exists x ~ \lnot \varphi(x)$ is true. \end{solution} \vfill diff --git a/Advanced/Definable Sets/parts/3 sets.tex b/Advanced/Definable Sets/parts/3 sets.tex index 0fa5a1a..09af3d4 100644 --- a/Advanced/Definable Sets/parts/3 sets.tex +++ b/Advanced/Definable Sets/parts/3 sets.tex @@ -1,10 +1,10 @@ \section{Definable Sets} -Armed with $(), \land, \lor, \lnot, \rightarrow, \forall,$ and $\exists$, we have enough tools to define sets. +Armed with $(), \land, \lor, \lnot, \rightarrow, \forall,$ and $\exists$, we have the tools to define sets. \definition{Set-Builder Notation} Say we have a sentence $\varphi(x)$. \par -The set of all elements that satisfy that sentence can be written as follows: +The set of all elements that satisfy that sentence may be written as follows: \begin{equation*} \{ x ~|~ \varphi(x) \} \end{equation*} @@ -20,20 +20,18 @@ $$ \definition{Definable Sets} Let $S$ be a structure with a universe $U$. \par -We say a subset $M$ of $U$ is \textit{definable} if we -can write a formula that is true for some $x$ iff $x \in M$. +We say a subset $M$ of $U$ is \textit{definable} if we can write a formula \par +that is true for some $x$ if and only if $M$ contains $x$. \vspace{4mm} -For example, consider the structure $\big\langle~ \mathbb{Z} ~\big|~ \{+\} ~\big\rangle$ \par - -Only even numbers satisfy the formula $\varphi(x) = \exists y ~ (y + y = x)$, \par +For example, consider the structure $\bigl( \mathbb{Z} ~\big|~ \{+\} \bigr)$. \par +Only even numbers satisfy the formula $\varphi(x) \coloneqq \bigl[\exists y ~ (y + y = x)\bigr]$, \par so we can define \say{the set of even numbers} as $\{ x ~|~ \exists y ~ (y + y = x) \}$. \par Remember---we can only use symbols that are available in our structure! \problem{} -When is the empty set definable? - +The empty set is definable in any structure. How? \begin{solution} Always: $\{ x ~|~ \lnot (x = x) \}$ \end{solution} @@ -43,18 +41,31 @@ When is the empty set definable? \problem{} Define $\{0, 1\}$ in $\Bigl( \mathbb{Z}^+_0 ~\big|~ \{<\} \Bigr)$ +\hint{Define 0 and 1 as elements first, and remember that we can use logical symbols.} -\begin{instructornote} - Here's an interesting fact: +\begin{solution} + $\varphi_0(x) \coloneqq \bigl[~ \lnot \exists y ~ y < x ~\bigr]$ \par + $\varphi_1(x) \coloneqq \bigl[~ (0 < x) ~\land~ \lnot \exists y ~ (x < y < 0) ~\bigr]$ + + \vspace{2mm} + + Our final solution is $\{ x ~|~ \varphi_0(x) \lor \varphi_1(x) \}$. + + \note{A finite set of definable elements is always definable. \par + An infinite set of definable elements might not be definable.} +\end{solution} - A finite set of definable elements is always definable. \note{(Why?)} \par - An infinite set of definable elements might not be definable. -\end{instructornote} \vfill \problem{} -Define the set of prime numbers in $\Bigl( \mathbb{Z} ~\big|~ \{\times, \div, <\} \Bigr)$ +Define the set of prime numbers in $\Bigl( \mathbb{Z} ~\big|~ \{\times, \div, <\} \Bigr)$. \par +\hint{A prime number is an integer that is positive and is only divisible by 1 and itself.} + +\begin{solution} + $\psi(x) \coloneqq \bigl[~ \exists y ~ (0