bookshelf/Bookshelf/Enderton/Set.tex

1275 lines
33 KiB
TeX

\documentclass{report}
\input{../../preamble}
\makeleancommands{../..}
\begin{document}
\header{Elements of Set Theory}{Herbert B. Enderton}
\tableofcontents
\begingroup
\renewcommand\thechapter{R}
\setcounter{chapter}{0}
\addtocounter{chapter}{-1}
\chapter{Reference}%
\label{chap:reference}
\section{\defined{Empty Set Axiom}}%
\label{ref:empty-set-axiom}
There is a set having no members:
$$\exists B, \forall x, x \not\in B.$$
\begin{axiom}
\lean*{Mathlib/Init/Set}{Set.emptyCollection}
\end{axiom}
\section{\defined{Extensionality Axiom}}%
\label{ref:extensionality-axiom}
If two sets have exactly the same members, then they are equal:
$$\forall A, \forall B,
\left[\forall x, (x \in A \iff x \in B) \Rightarrow A = B\right].$$
\begin{axiom}
\lean*{Mathlib/Init/Set}{Set.ext}
\end{axiom}
\section{\defined{Pair Set}}%
\label{ref:pair-set}
For any sets $u$ and $v$, the \textbf{pair set $\{u, v\}$} is the set whose
only members are $u$ and $v$.
\begin{definition}
\statementpadding
\lean*{Mathlib/Init/Set}{Set.insert}
\lean*{Mathlib/Init/Set}{Set.singleton}
\end{definition}
\section{\defined{Pairing Axiom}}%
\label{ref:pairing-axiom}
For any sets $u$ and $v$, there is a set having as members just $u$ and $v$:
$$\forall u, \forall v, \exists B, \forall x,
(x \in B \iff x = u \text{ or } x = v).$$
\begin{axiom}
\statementpadding
\lean*{Mathlib/Init/Set}{Set.insert}
\lean*{Mathlib/Init/Set}{Set.singleton}
\end{axiom}
\section{\defined{Power Set}}%
\label{ref:power-set}
For any set $a$, the \textbf{power set $\powerset{a}$} is the set whose members
are exactly the subsets of $a$.
\begin{definition}
\lean*{Mathlib/Init/Set}{Set.powerset}
\end{definition}
\section{\defined{Power Set Axiom}}%
\label{ref:power-set-axiom}
For any set $a$, there is a set whose members are exactly the subsets of $a$:
$$\forall a, \exists B, \forall x, (x \in B \iff x \subseteq a).$$
\begin{axiom}
\lean*{Mathlib/Init/Set}{Set.powerset}
\end{axiom}
\section{\defined{Subset Axioms}}%
\label{ref:subset-axioms}
For each formula $\phi$ not containing $B$, the following is an axiom:
$$\forall t_1, \cdots \forall t_k, \forall c,
\exists B, \forall x, (x \in B \iff x \in c \land \phi).$$
\begin{axiom}
\lean*{Mathlib/Init/Set}{Set.Subset}
\end{axiom}
\section{\defined{Union Axiom}}%
\label{ref:union-axiom}
For any set $A$, there exists a set $B$ whose elements are exactly the members
of the members of $A$:
$$\forall A, \exists B, \forall x \left[ x \in B \iff (\exists b \in A) x \in b \right]$$
\begin{axiom}
\lean*{Mathlib/Data/Set/Lattice}{Set.sUnion}
\end{axiom}
\section{\defined{Union Axiom, Preliminary Form}}%
\label{ref:union-axiom-preliminary-form}
For any sets $a$ and $b$, there is a set whose members are those sets belonging
either to $a$ or to $b$ (or both):
$$\forall a, \forall b, \exists B, \forall x,
(x \in B \iff x \in a \text{ or } x \in b).$$
\begin{axiom}
\lean*{Mathlib/Init/Set}{Set.union}
\end{axiom}
\endgroup
\chapter{Introduction}%
\label{chap:introduction}
\section{Baby Set Theory}%
\label{sec:baby-set-theory}
\subsection{\verified{Exercise 1.1}}%
\label{sub:exercise-1.1}
Which of the following become true when "$\in$" is inserted in place of the
blank?
Which become true when "$\subseteq$" is inserted?
\subsubsection{\verified{Exercise 1.1a}}%
\label{ssub:exercise-1.1a}
$\{\emptyset\} \_\_\_\_ \{\emptyset, \{\emptyset\}\}$.
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_1\_1a}
Because the \textit{object} $\{\emptyset\}$ is a member of the right-hand set,
the statement is \textbf{true} in the case of "$\in$".
Because the \textit{members} of $\{\emptyset\}$ are all members of the
right-hand set, the statement is also \textbf{true} in the case of
"$\subseteq$".
\end{proof}
\subsubsection{\verified{Exercise 1.1b}}%
\label{ssub:exercise-1.11b}
$\{\emptyset\} \_\_\_\_ \{\emptyset, \{\{\emptyset\}\}\}$.
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_1\_1b}
Because the \textit{object} $\{\emptyset\}$ is not a member of the right-hand
set, the statement is \textbf{false} in the case of "$\in$".
Because the \textit{members} of $\{\emptyset\}$ are all members of the
right-hand set, the statement is \textbf{true} in the case of "$\subseteq$".
\end{proof}
\subsubsection{\verified{Exercise 1.1c}}%
\label{ssub:exercise-1.1c}
$\{\{\emptyset\}\} \_\_\_\_ \{\emptyset, \{\emptyset\}\}$.
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_1\_1c}
Because the \textit{object} $\{\{\emptyset\}\}$ is not a member of the
right-hand set, the statement is \textbf{false} in the case of "$\in$".
Because the \textit{members} of $\{\{\emptyset\}\}$ are all members of the
right-hand set, the statement is \textbf{true} in the case of "$\subseteq$".
\end{proof}
\subsubsection{\verified{Exercise 1.1d}}%
\label{ssub:exercise-1.1d}
$\{\{\emptyset\}\} \_\_\_\_ \{\emptyset, \{\{\emptyset\}\}\}$.
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_1\_1d}
Because the \textit{object} $\{\{\emptyset\}\}$ is a member of the right-hand
set, the statement is \textbf{true} in the case of "$\in$".
Because the \textit{members} of $\{\{\emptyset\}\}$ are not all members of the
right-hand set, the statement is \textbf{false} in the case of
"$\subseteq$".
\end{proof}
\subsubsection{\verified{Exercise 1.1e}}%
\label{ssub:exercise-1.1e}
$\{\{\emptyset\}\} \_\_ \{\emptyset, \{\emptyset, \{\emptyset\}\}\}$.
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_1\_1e}
Because the \textit{object} $\{\{\emptyset\}\}$ is not a member of the
right-hand set, the statement is \textbf{false} in the case of "$\in$".
Because the \textit{members} of $\{\{\emptyset\}\}$ are not all members of the
right-hand set, the statement is \textbf{false} in the case of
"$\subseteq$".
\end{proof}
\subsection{\verified{Exercise 1.2}}%
\label{sub:exercise-1.2}
Show that no two of the three sets $\emptyset$, $\{\emptyset\}$, and
$\{\{\emptyset\}\}$ are equal to each other.
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_1\_2}
By the \nameref{ref:extensionality-axiom}, $\emptyset$ is only equal to
$\emptyset$.
This immediately shows it is not equal to the other two.
Now consider object $\emptyset$.
This object is a member of $\{\emptyset\}$ but is not a member of
$\{\{\emptyset\}\}$.
Again, by the \nameref{ref:extensionality-axiom}, these two sets must be
different.
\end{proof}
\subsection{\verified{Exercise 1.3}}%
\label{sub:exercise-1.3}
Show that if $B \subseteq C$, then $\powerset{B} \subseteq \powerset{C}$.
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_1\_3}
Let $x \in \powerset{B}$.
By definition of the \nameref{ref:power-set}, $x$ is a subset of $B$.
By hypothesis, $B \subseteq C$.
Then $x \subseteq C$.
Again by definition of the \nameref{ref:power-set}, it follows
$x \in \powerset{C}$.
\end{proof}
\subsection{\verified{Exercise 1.4}}%
\label{sub:exercise-1.4}
Assume that $x$ and $y$ are members of a set $B$.
Show that $\{\{x\}, \{x, y\}\} \in \powerset{\powerset{B}}.$
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_1\_4}
Let $x$ and $y$ be members of set $B$.
Then $\{x\}$ and $\{x, y\}$ are subsets of $B$.
By definition of the \nameref{ref:power-set}, $\{x\}$ and $\{x, y\}$ are
members of $\powerset{B}$.
Then $\{\{x\}, \{x, y\}\}$ is a subset of $\powerset{B}$.
By definition of the \nameref{ref:power-set}, $\{\{x\}, \{x, y\}\}$ is a
member of $\powerset{\powerset{B}}$.
\end{proof}
\section{Sets - An Informal View}%
\label{sec:sets-informal-view}
\subsection{\partial{Exercise 2.1}}%
\label{sub:exercise-2.1}
Define the rank of a set $c$ to be the least $\alpha$ such that
$c \subseteq V_\alpha$.
Compute the rank of $\{\{\emptyset\}\}$.
Compute the rank of
$\{\emptyset, \{\emptyset\}, \{\emptyset, \{\emptyset\}\}\}$.
\begin{proof}
We first compute the values of $V_n$ for $0 \leq n \leq 3$ under the
assumption the set of atoms $A$ at the bottom of the hierarchy is empty.
\begin{align*}
V_0 & = \emptyset \\
V_1 & = V_0 \cup \powerset{V_0} \\
& = \emptyset \cup \{\emptyset\} \\
& = \{\emptyset\} \\
V_2 & = V_1 \cup \powerset{V_1} \\
& = \{\emptyset\} \cup \powerset{\{\emptyset\}} \\
& = \{\emptyset\} \cup \{\emptyset, \{\emptyset\}\} \\
& = \{\emptyset, \{\emptyset\}\} \\
V_3 & = V_2 \cup \powerset{V_2} \\
& = \{\emptyset, \{\emptyset\}\} \cup
\powerset{\{\emptyset, \{\emptyset\}\}} \\
& = \{\emptyset, \{\emptyset\}\} \cup
\{\emptyset,
\{\emptyset\},
\{\{\emptyset\}\},
\{\emptyset, \{\emptyset\}\}\} \\
& = \{\emptyset,
\{\emptyset\},
\{\{\emptyset\}\},
\{\emptyset, \{\emptyset\}\}\}
\end{align*}
It then immediately follows $\{\{\emptyset\}\}$ has rank $2$ and
$\{\emptyset, \{\emptyset\}, \{\emptyset, \{\emptyset\}\}\}$ has rank $3$.
\end{proof}
\subsection{\partial{Exercise 2.2}}%
\label{sub:exercise-2.2}
We have stated that $V_{\alpha + 1} = A \cup \powerset{V_\alpha}$.
Prove this at least for $\alpha < 3$.
\begin{proof}
Let $A$ be the set of atoms in our set hierarchy.
Let $P(n)$ be the predicate, "$V_{n + 1} = A \cup \powerset{V_n}$."
We prove $P(n)$ holds true for all natural numbers $n \geq 1$ via induction.
\paragraph{Base Case}%
Let $n = 1$.
By definition, $V_1 = V_0 \cup \powerset{V_0}$.
By definition, $V_0 = A$.
Therefore $V_1 = A \cup \powerset{V_0}$.
This proves $P(1)$ holds true.
\paragraph{Induction Step}%
Suppose $P(n)$ holds true for some $n \geq 1$.
Consider $V_{n+1}$.
By definition, $V_{n+1} = V_n \cup \powerset{V_n}$.
Therefore, by the induction hypothesis,
\begin{align}
V_{n+1}
& = V_n \cup \powerset{V_n}
\nonumber \\
& = (A \cup \powerset{V_{n-1}}) \cup \powerset{V_n}
\nonumber \\
& = A \cup (\powerset{V_{n-1}} \cup \powerset{V_n})
\label{sub:exercise-2.2-eq1}
\end{align}
But $V_{n-1}$ is a subset of $V_n$.
\nameref{sub:exercise-1.3} then implies
$\powerset{V_{n-1}} \subseteq \powerset{V_n}$.
This means \eqref{sub:exercise-2.2-eq1} can be simplified to
$$V_{n+1} = A \cup \powerset{V_n},$$
proving $P(n+1)$ holds true.
\paragraph{Conclusion}%
By mathematical induction, it follows for all $n \geq 1$, $P(n)$ is true.
\end{proof}
\subsection{\partial{Exercise 2.3}}%
\label{sub:exercise-2.3}
List all the members of $V_3$.
List all the members of $V_4$.
(It is to be assumed here that there are no atoms.)
\begin{proof}
As seen in the proof of \nameref{sub:exercise-2.1},
$$V_3 = \{
\emptyset,
\{\emptyset\},
\{\{\emptyset\}\},
\{\emptyset, \{\emptyset\}\}
\}.$$
By \nameref{sub:exercise-2.2}, $V_4 = \powerset{V_3}$ (since it is assumed
there are no atoms).
Thus
\begin{align*}
& V_4 = \{ \\
& \qquad \emptyset, \\
& \qquad \{\emptyset\}, \\
& \qquad \{\{\emptyset\}\}, \\
& \qquad \{\{\{\emptyset\}\}\}, \\
& \qquad \{\{\emptyset, \{\emptyset\}\}\}, \\
& \qquad \{\emptyset, \{\emptyset\}\}, \\
& \qquad \{\emptyset, \{\{\emptyset\}\}\}, \\
& \qquad \{\emptyset, \{\emptyset, \{\emptyset\}\}\}, \\
& \qquad \{\{\emptyset\}, \{\{\emptyset\}\}\}, \\
& \qquad \{\{\emptyset\}, \{\emptyset, \{\emptyset\}\}\}, \\
& \qquad \{\{\{\emptyset\}\}, \{\emptyset, \{\emptyset\}\}\}, \\
& \qquad \{\emptyset, \{\emptyset\}, \{\{\emptyset\}\}\}, \\
& \qquad \{\emptyset, \{\emptyset\}, \{\emptyset, \{\emptyset\}\}\}, \\
& \qquad \{\emptyset, \{\{\emptyset\}\}, \{\emptyset, \{\emptyset\}\}\} \\
& \qquad \{\{\emptyset\}, \{\{\emptyset\}\}, \{\emptyset, \{\emptyset\}\}\}, \\
& \qquad \{\emptyset, \{\emptyset\}, \{\{\emptyset\}\}, \{\emptyset, \{\emptyset\}\}\} \\
& \}.
\end{align*}
\end{proof}
\chapter{Axioms and Operations}%
\label{chap:axioms-operations}
\section{Axioms}%
\label{sec:axioms}
\subsection{\partial{Theorem 2A}}%
\label{sub:theorem-2a}
\begin{theorem}[2A]
There is no set to which every set belongs.
\note{This was revisited after reading Enderton's proof prior.}
\end{theorem}
\begin{proof}
Let $A$ be an arbitrary set.
Define $B = \{ x \in A \mid x \not\in x \}$.
By the \nameref{ref:subset-axioms}, $B$ is a set.
Then $$B \in B \iff B \in A \land B \not\in B.$$
If $B \in A$, then $B \in B \iff B \not\in B$, a contradiction.
Thus $B \not\in A$.
Since this process holds for any set $A$, there must exist no set to which
every set belongs.
\end{proof}
\subsection{\partial{Theorem 2B}}%
\label{sub:theorem-2b}
\begin{theorem}[2B]
For any nonempty set $A$, there exists a unique set $B$ such that for any
$x$, $$x \in B \iff x \text{ belongs to every member of } A.$$
\end{theorem}
\begin{proof}
Suppose $A$ is a nonempty set.
This ensures the statement we are trying to prove does not vacuously hold for
all sets $x$ (which would yield a contradiction due to
\nameref{sub:theorem-2b}).
By the \nameref{ref:union-axiom}, $\bigcup A$ is a set.
Define $$B = \{ x \in \bigcup A \mid (\forall b \in A), x \in b \}.$$
By the \nameref{ref:subset-axioms}, $B$ is indeed a set.
By construction,
$$\forall x, x \in B \iff x \text{ belongs to every member of } A.$$
By the \nameref{ref:extensionality-axiom}, $B$ is unique.
\end{proof}
\section{Exercises 3}%
\label{sec:exercises-3}
\subsection{\verified{Exercise 3.1}}%
\label{sub:exercise-3.1}
Assume that $A$ is the set of integers divisible by $4$.
Similarly assume that $B$ and $C$ are the sets of integers divisible by $9$ and
$10$, respectively.
What is in $A \cap B \cap C$?
\begin{answer}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_1}
The set of integers divisible by $4$, $9$, and $10$.
\end{answer}
\subsection{\verified{Exercise 3.2}}%
\label{sub:exercise-3.2}
Give an example of sets $A$ and $B$ for which $\bigcup A = \bigcup B$ but
$A \neq B$.
\begin{answer}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_2}
Let $A = \{\{1\}, \{2\}\}$ and $B = \{\{1, 2\}\}$.
\end{answer}
\subsection{\verified{Exercise 3.3}}%
\label{sub:exercise-3.3}
Show that every member of a set $A$ is a subset of $\bigcup A$.
(This was stated as an example in this section.)
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_3}
Let $x \in A$.
By definition, $$\bigcup A = \{ y \mid (\exists b \in A) y \in b\}.$$
Then $\{ y \mid y \in x\} \subseteq \bigcup A$.
But $\{ y \mid y \in x\} = x$.
Thus $x \subseteq \bigcup A$.
\end{proof}
\subsection{\verified{Exercise 3.4}}%
\label{sub:exercise-3.4}
Show that if $A \subseteq B$, then $\bigcup A \subseteq \bigcup B$.
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_4}
Let $A$ and $B$ be sets such that $A \subseteq B$.
Let $x \in \bigcup A$.
By definition of the union, there exists some $b \in A$ such that $x \in b$.
By definition of the subset, $b \in B$.
This immediatley implies $x \in \bigcup B$.
Since this holds for all $x \in \bigcup A$, it follows
$\bigcup A \subseteq \bigcup B$.
\end{proof}
\subsection{\verified{Exercise 3.5}}%
\label{sub:exercise-3.5}
Assume that every member of $\mathscr{A}$ is a subset of $B$.
Show that $\bigcup \mathscr{A} \subseteq B$.
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_5}
Let $x \in \bigcup \mathscr{A}$.
By definition,
$$\bigcup \mathscr{A} = \{ y \mid (\exists b \in A)y \in b \}.$$
Then there exists some $b \in A$ such that $x \in b$.
By hypothesis, $b \subseteq B$.
Thus $x$ must also be a member of $B$.
Since this holds for all $x \in \bigcup \mathscr{A}$, it follows
$\bigcup \mathscr{A} \subseteq B$.
\end{proof}
\subsection{\verified{Exercise 3.6a}}%
\label{sub:exercise-3.6a}
Show that for any set $A$, $\bigcup \powerset{A} = A$.
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_6a}
We prove that (i) $\bigcup \powerset{A} \subseteq A$ and (ii)
$A \subseteq \bigcup \powerset{A}$.
\paragraph{(i)}%
\label{par:exercise-3.6a-i}
By definition, the \nameref{ref:power-set} of $A$ is the set of all subsets
of $A$.
In other words, every member of $\powerset{A}$ is a subset of $A$.
By \nameref{sub:exercise-3.5}, $\bigcup \powerset{A} \subseteq A$.
\paragraph{(ii)}%
\label{par:exercise-3.6a-ii}
Let $x \in A$.
By definition of the power set of $A$, $\{x\} \in \powerset{A}$.
By definition of the union,
$$\bigcup \powerset{A} =
\{ y \mid (\exists b \in \powerset{A}), y \in b).$$
Since $x \in \{x\}$ and $\{x\} \in \powerset{A}$, it follows
$x \in \bigcup \powerset{A}$.
Thus $A \subseteq \bigcup \powerset{A}$.
\paragraph{Conclusion}%
By \nameref{par:exercise-3.6a-i} and \nameref{par:exercise-3.6a-ii},
$\bigcup \powerset{A} = A$.
\end{proof}
\subsection{\verified{Exercise 3.6b}}%
\label{sub:exercise-3.6b}
Show that $A \subseteq \powerset{\bigcup A}$.
Under what conditions does equality hold?
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_6b}
Let $x \in A$.
By \nameref{sub:exercise-3.3}, $x$ is a subset of $\bigcup A$.
By the definition of the \nameref{ref:power-set},
$$\powerset{\bigcup A} = \{ y \mid y \subseteq \bigcup A \}.$$
Therefore $x \in \powerset{\bigcup A}$.
Since this holds for all $x \in A$, $A \subseteq \powerset{\bigcup A}$.
\suitdivider
We show equality holds if and only if there exists some set $B$ such that
$A = \powerset{B}$.
\paragraph{($\Rightarrow$)}%
\label{par:exercise-3.6b-right}
Suppose $A = \powerset{\bigcup A}$.
Then our statement immediately follows by settings $B = \bigcup A$.
\paragraph{($\Leftarrow$)}%
\label{par:exercise-3.6b-left}
Suppose there exists some set $B$ such that $A = \powerset{B}$.
Therefore
\begin{align*}
\powerset{\bigcup A}
& = \powerset{\left(\bigcup {\powerset {B}}\right)} \\
& = \powerset{B} & \textref{sub:exercise-3.6a} \\
& = A.
\end{align*}
\paragraph{Conclusion}%
By \nameref{par:exercise-3.6b-right} and \nameref{par:exercise-3.6b-left},
$A = \powerset{\bigcup A}$ if and only if there exists some set $B$ such
that $A = \powerset{B}$.
\end{proof}
\subsection{\verified{Exercise 3.7a}}%
\label{sub:exercise-3.7a}
Show that for any sets $A$ and $B$,
$$\powerset{A} \cap \powerset{B} = \powerset{(A \cap B)}.$$
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_7a}
Let $A$ and $B$ be arbitrary sets. We show that
$\powerset{A} \cap \powerset{B} \subseteq \powerset{(A \cap B)}$ and then
show that $\powerset{A} \cap \powerset{B} \supseteq \powerset{(A \cap B)}$.
\paragraph{($\subseteq$)}%
Let $x \in \powerset{A} \cap \powerset{B}$.
That is, $x \in \powerset{A}$ and $x \in \powerset{B}$.
By the definition of the \nameref{ref:power-set},
\begin{align*}
\powerset{A} & = \{ y \mid y \subseteq A \} \\
\powerset{B} & = \{ y \mid y \subseteq B \}
\end{align*}
Thus $x \subseteq A$ and $x \subseteq B$, meaning $x \subseteq A \cap B$.
But then $x \in \powerset{(A \cap B)}$, the set of all subsets of
$A \cap B$.
Since this holds for all $x \in \powerset{A} \cap \powerset{B}$, it follows
$$\powerset{A} \cap \powerset{B} \subseteq \powerset{(A \cap B)}.$$
\paragraph{($\supseteq$)}%
Let $x \in \powerset{(A \cap B)}$.
By the definition of the \nameref{ref:power-set},
$$\powerset{(A \cap B)} = \{ y \mid y \subseteq A \cap B \}.$$
Thus $x \subseteq A \cap B$, meaning $x \subseteq A$ and $x \subseteq B$.
But this implies $x \in \powerset{A}$, the set of all subsets of $A$.
Likewise $x \in \powerset{B}$, the set of all subsets of $B$.
Thus $x \in \powerset{A} \cap \powerset{B}$.
Since this holds for all $x \in \powerset{(A \cap B)}$, it follows
$$\powerset{(A \cap B)} \subseteq \powerset{A} \cap \powerset{B}.$$
\paragraph{Conclusion}%
Since each side of our identity is a subset of the other,
$$\powerset{(A \cap B)} = \powerset{A} \cap \powerset{B}.$$
\end{proof}
\subsection{\verified{Exercise 3.7b}}%
\label{sub:exercise-3.7b}
Show that $\powerset{A} \cup \powerset{B} \subseteq \powerset{(A \cup B)}$.
Under what conditions does equality hold?
\begin{proof}
\statementpadding
\lean*{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_7b\_i}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_7b\_ii}
Let $x \in \powerset{A} \cup \powerset{B}$.
By definition, $x \in \powerset{A}$ or $x \in \powerset{B}$ (or both).
By the definition of the \nameref{ref:power-set},
\begin{align*}
\powerset{A} &= \{ y \mid y \subseteq A \} \\
\powerset{B} &= \{ y \mid y \subseteq B \}.
\end{align*}
Thus $x \subseteq A$ or $x \subseteq B$.
Therefore $x \subseteq A \cup B$.
But then $x \in \powerset{(A \cup B)}$, the set of all subsets of $A \cup B$.
\suitdivider
We show equality holds if and only if one of $A$ or $B$ is a subset of the
other.
\paragraph{($\Rightarrow$)}%
\label{par:exercise-3.7b-right}
Suppose
\begin{equation}
\label{sub:exercise-3.7b-eq1}
\powerset{A} \cup \powerset{B} = \powerset{(A \cup B)}.
\end{equation}
By the definition of the \nameref{ref:power-set},
$A \cup B \in \powerset{(A \cup B)}$.
Then \eqref{sub:exercise-3.7b-eq1} implies
$A \cup B \in \powerset{A} \cup \powerset{B}$.
That is, $A \cup B \in \powerset{A}$ or $A \cup B \in \powerset{B}$ (or
both).
For the sake of contradiction, suppose $A \not\subseteq B$ and
$B \not\subseteq A$.
Then there exists an element $x \in A$ such that $x \not\in B$ and there
exists an element $y \in B$ such that $y \not\in A$.
But then $A \cup B \not\in \powerset{A}$ since $y$ cannot be a member of a
member of $\powerset{A}$.
Likewise, $A \cup B \not\in \powerset{B}$ since $x$ cannot be a member of a
member of $\powerset{B}$.
Therefore our assumption is incorrect.
In other words, $A \subseteq B$ or $B \subseteq A$.
\paragraph{($\Leftarrow$)}%
\label{par:exercise-3.7b-left}
WLOG, suppose $A \subseteq B$.
Then, by \nameref{sub:exercise-1.3}, $\powerset{A} \subseteq \powerset{B}$.
Thus
\begin{align*}
\powerset{A} \cup \powerset{B}
& = \powerset{B} \\
& = \powerset{A \cup B}.
\end{align*}
\paragraph{Conclusion}%
By \nameref{par:exercise-3.7b-right} and \nameref{par:exercise-3.7b-left},
it follows
$\powerset{A} \cup \powerset{B} \subseteq \powerset{(A \cup B)}$ if and
only if $A \subseteq B$ or $B \subseteq A$.
\end{proof}
\subsection{\partial{Exercise 3.8}}%
\label{sub:exercise-3.8}
Show that there is no set to which every singleton (that is, every set of the
form $\{x\}$) belongs.
[\textit{Suggestion}: Show that from such a set, we could construct a set to
which every set belonged.]
\begin{proof}
We proceed by contradiction.
Suppose there existed a set $A$ consisting of every singleton.
Then the \nameref{ref:union-axiom} suggests $\bigcup A$ is a set.
But this set is precisely the class of all sets, which is \textit{not} a set.
Thus our original assumption was incorrect.
That is, there is no set to which every singleton belongs.
\end{proof}
\subsection{\verified{Exercise 3.9}}%
\label{sub:exercise-3.9}
Give an example of sets $a$ and $B$ for which $a \in B$ but
$\powerset{a} \not\in \powerset{B}$.
\begin{answer}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_9}
Let $a = \{1\}$ and $B = \{\{1\}\}$.
Then
\begin{align*}
\powerset{a} & = \{\emptyset, \{1\}\} \\
\powerset{B} & = \{\emptyset, \{\{1\}\}\}.
\end{align*}
It immediately follows that $\powerset{a} \not\in \powerset{B}$.
\end{answer}
\subsection{\verified{Exercise 3.10}}%
\label{sub:exercise-3.10}
Show that if $a \in B$, then $\powerset{a} \in \powerset{\powerset{\bigcup B}}$.
[\textit{Suggestion}: If you need help, look in the Appendix.]
\begin{proof}
\lean{Bookshelf/Enderton/Set/Chapter\_1}
{Enderton.Set.Chapter\_1.exercise\_3\_10}
Suppose $a \in B$.
By \nameref{sub:exercise-3.3}, $a \subseteq \bigcup B$.
By \nameref{sub:exercise-1.3}, $\powerset{a} \subseteq \powerset{\bigcup B}$.
By the definition of the \nameref{ref:power-set},
$$\powerset{\powerset{\bigcup B}} =
\{ y \mid y \subseteq \powerset{\bigcup B} \}.$$
Therefore $\powerset{a} \in \powerset{\powerset{\bigcup B}}$.
\end{proof}
\section{Algebra of Sets}%
\label{sec:algebra-sets}
\subsection{\verified{Commutative Laws}}%
\label{sub:commutative-laws}
For any sets $A$ and $B$,
\begin{align*}
A \cup B = B \cup A \\
A \cap B = B \cap A
\end{align*}
\begin{proof}
\statementpadding
\lean*{Mathlib/Data/Set/Basic}{Set.union\_comm}
\lean{Mathlib/Data/Set/Basic}{Set.inter\_comm}
Let $A$ and $B$ be sets.
We show (i) $A \cup B = B \cup A$ and then (ii) $A \cap B = B \cap A$.
\paragraph{(i)}%
By the definition of the union of sets,
$A \cup B = \{ x \mid x \in A \lor x \in B \}$.
Since $\lor$ is commutative, it follows
\begin{align*}
A \cup B
& = \{ x \mid x \in A \lor x \in B \} \\
& = \{ x \mid x \in B \lor x \in A \} \\
& = B \cup A,
\end{align*}
where the last equality follows again from the definition of the union of
sets.
\paragraph{(ii)}%
By the definition of the intersection of sets,
$A \cap B = \{ x \mid x \in A \land x \in B \}$.
Since $\land$ is commutative, it follows
\begin{align*}
A \cap B
& = \{ x \mid x \in A \land x \in B \} \\
& = \{ x \mid x \in B \land x \in A \} \\
& = B \land A,
\end{align*}
where the last equality follows again from the definition of the
intersection of sets.
\end{proof}
\subsection{\unverified{Associative Laws}}%
\label{sub:associative-laws}
For any sets $A$, $B$ and $C$,
\begin{align*}
A \cup (B \cup C) & = (A \cup B) \cup C \\
(A \cup B) \cup C & = A \cup (B \cup C)
\end{align*}
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Distributive Laws}}%
\label{sub:distributive-laws}
For any sets $A$, $B$, and $C$,
\begin{align*}
A \cap (B \cup C) & = (A \cap B) \cup (A \cap C) \\
A \cup (B \cap C) & = (A \cup B) \cap (A \cup C)
\end{align*}
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{De Morgan's Laws}}%
\label{sub:de-morgans-laws}
For any sets $A$, $B$, and $C$,
\begin{align*}
C - (A \cup B) & = (C - A) \cap (C - B) \\
C - (A \cap B) & = (C - A) \cup (C - B)
\end{align*}
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{
Identities Involving \texorpdfstring{$\emptyset$}{the Empty Set}}}%
\label{sub:identitives-involving-empty-set}
For any set $A$,
\begin{align*}
A \cup \emptyset & = A \\
A \cap \emptyset & = \emptyset \\
A \cap (C - A) & = \emptyset
\end{align*}
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Monotonicity}}%
\label{sub:monotonicity}
For any sets $A$, $B$, and $C$,
\begin{align*}
A \subseteq B & \Rightarrow A \cup C \subseteq B \cup C \\
A \subseteq B & \Rightarrow A \cap C \subseteq B \cap C \\
A \subseteq B & \Rightarrow \bigcup A \subseteq \bigcup B
\end{align*}
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Anti-monotonicity}}%
\label{sub:anti-monotonicity}
For any sets $A$, $B$, and $C$,
\begin{align*}
A \subseteq B & \Rightarrow C - B \subseteq C - A \\
\emptyset \neq A \subseteq B & \Rightarrow \bigcap B \subseteq \bigcap A.
\end{align*}
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{General Distributive Laws}}%
\label{sub:general-distributive-laws}
For any sets $A$ and $\mathscr{B}$,
\begin{align*}
A \cup \bigcap \mathscr{B} & =
\bigcap\; \{ A \cup X \mid X \in \mathscr{B} \}
\quad\text{for}\quad \mathscr{B} \neq \emptyset \\
A \cap \bigcup \mathscr{B} & =
\bigcup\; \{ A \cap X \mid X \in \mathscr{B} \}
\end{align*}
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{General De Morgan's Laws}}%
\label{sub:general-de-morgans-laws}
For any set $C$ and $\mathscr{A} \neq \emptyset$,
\begin{align*}
C - \bigcup \mathscr{A} & = \bigcap\; \{ C - X \mid X \in \mathscr{A} \} \\
C - \bigcap \mathscr{A} & = \bigcup\; \{ C - X \mid X \in \mathscr{A} \}
\end{align*}
\begin{proof}
TODO
\end{proof}
\section{Exercises 4}%
\label{sec:exercises-4}
\subsection{\unverified{Exercise 4.11}}%
\label{sub:exercise-4.11}
Show that for any sets $A$ and $B$,
$$A = (A \cap B) \cup (A - B) \quad\text{and}\quad
A \cup (B - A) = A \cup B.$$
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.12}}%
\label{sub:exercise-4.12}
Verify the following identity (one of De Morgan's laws):
$$C - (A \cap B) = (C - A) \cup (C - B).$$
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.13}}%
\label{sub:exercise-4.13}
Show that if $A \subseteq B$, then $C - B \subseteq C - A$.
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.14}}%
\label{sub:exercise-4.14}
Show by example that for some sets $A$, $B$, and $C$, the set $A - (B - C)$ is
different from $(A - B) - C$.
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.15}}%
\label{sub:exercise-4.15}
Define the symmetric difference $A + B$ of sets $A$ and $B$ to be the set
$(A - B) \cup (B - A)$.
\subsubsection{\unverified{Exercise 4.15a}}%
\label{ssub:exercise-4.15a}
Show that $A \cap (B + C) = (A \cap B) + (A \cap C)$.
\begin{proof}
TODO
\end{proof}
\subsubsection{\unverified{Exercise 4.15b}}%
\label{ssub:exercise-4.15b}
Show that $A + (B + C) = (A + B) + C$.
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.16}}%
\label{sub:exercise-4.16}
Simplify:
$$[(A \cup B \cup C) \cap (A \cup B)] - [(A \cup (B - C)) \cap A].$$
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.17}}%
\label{sub:exercise-4.17}
Show that the following four conditions are equivalent.
\begin{enumerate}[(a)]
\item $A \subseteq B$,
\item $A - B = \emptyset$,
\item $A \cup B = B$,
\item $A \cap B = A$.
\end{enumerate}
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.18}}%
\label{sub:exercise-4.18}
Assume that $A$ and $B$ are subsets of $S$.
List all of the different sets that can be made from these three by use of the
binary operations $\cup$, $\cap$, and $-$.
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.19}}%
\label{sub:exercise-4.19}
Is $\powerset{(A - B)}$ always equal to $\powerset{A} - \powerset{B}$?
Is it ever equal to $\powerset{A} - \powerset{B}$?
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.20}}%
\label{sub:exercise-4.20}
Let $A$, $B$, and $C$ be sets such that $A \cup B = A \cup C$ and
$A \cap B = A \cap C$.
Show that $B = C$.
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.21}}%
\label{sub:exercise-4.21}
Show that $\bigcup (A \cup B) = \bigcup A \cup \bigcup B$.
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.22}}%
\label{sub:exercise-4.22}
Show that if $A$ and $B$ are nonempty sets, then
$\bigcap (A \cup B) = \bigcap A \cap \bigcap B$.
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.23}}%
\label{sub:exercise-4.23}
Show that if $\mathscr{B}$ is nonempty, then
$A \cup \bigcap \mathscr{B} = \bigcap\; \{A \cup X \mid X \in \mathscr{B} \}$.
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.24a}}%
\label{sub:exercise-4.24a}
Show that if $\mathscr{A}$ is nonempty, then
$\powerset{\bigcap A} = \bigcap\; \{\powerset{X} \mid X \in \mathscr{A} \}$.
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.24b}}%
\label{sub:exercise-4.24b}
Show that
$$\bigcup\; \{ \powerset{X} \mid X \in \mathscr{A} \} \subseteq
\powerset{\bigcup A}.$$
Under what conditions does equality hold?
\begin{proof}
TODO
\end{proof}
\subsection{\unverified{Exercise 4.25}}%
\label{sub:exercise-4.25}
Is $A \cup \bigcup \mathscr{B}$ always the same as
$\bigcup\; \{ A \cup X \mid X \in \mathscr{B} \}$?
If not, then under what conditions does equality hold?
\begin{proof}
TODO
\end{proof}
\end{document}