\section{Definable 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 may be written as follows: \begin{equation*} \{ x ~|~ \varphi(x) \} \end{equation*} This is read \say{The set of $x$ where $\varphi$ is true} or \say{The set of $x$ that satisfy $\varphi$.} \vspace{2mm} For example, take the formula $\varphi(x) = \exists y ~ (y + y = x)$. \par The set of all even integers can then be written as $$ \{ x ~|~ \exists y ~ (y + y = x) \} $$ \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 \par that is true for some $x$ if and only if $M$ contains $x$. \vspace{4mm} 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{} The empty set is definable in any structure. How? \begin{solution} Always: $\{ x ~|~ \lnot (x = x) \}$ \end{solution} \vfill \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{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} \vfill \problem{} 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