\s{Unions and Intersections}

So, we've talked briefly about sets. We're going to talk more about them a
little bit, then move on to a very special set.

First, some notation. For now, we are going to denote ``the set of sets'' as
$\Set$. That is, for any set $A$, $A \in \Set$ is \truenm. It's also true that
$\Set \in \Set$, which is pretty weird, but we'll get to that later.

First, there's a trivial set, called $\nil$, which is just a set with no
elements. It's obviously true that

\begin{displaymath}
  \nil \subeq A \sfall A \in \Set
\end{displaymath}

We're going to define two operations here. The first is the ``union:''

\begin{alignedmath}
  \cup : \Set \to \Set \to \Set \\
  \cup = \ld{A, B} \mset{x \mid \parens{x \in A} \lor \parens{x \in B}} \\
\end{alignedmath}

The $\cup$ looks vaguely like a U, so that's a mnemonic way you could think of
it. You can also think of it as a ``cup'', and everything in either of the sets
falls into the cup. Typically, we'll write $\evalat{\cup}{A, B}$ as $A \cup B$,
which should be read ``$A$ union $B$''.

The other thing is for the intersect. 

\begin{alignedmath}
  \cap : \Set \to \Set \to \Set \\
  \cap = \ld{A, B} \mset{x \mid \parens{x \in A} \land \parens{x \in B}} \\
\end{alignedmath}

It has the items that are in \xtb{both} of the sets. That is, if an item is in
one set, but not the other, it's not in $A \cap B$, but it would be in
$A \cup B$. $A \cap B$ should be read ``$A$ intersect $B$.''

\begin{ExcList}
  \Exercise{$\nil \Qin \nil$}
  \Answer{No, because $\nil$ does not have any elements. To be even more
    general, there is no $x$ such that $x \in \nil$. Therefore,
    $\nil \notin \nil$.}

  \Exercise{$\nil \Qsubof A \sfall A \in \Set$}
  \Answer{No, because $\nil \notsubof \nil$, and $\nil \in \Set$.}

  \Exercise{$\parens{A \cap B} \Qsubeq \parens{A \cup B} \sfall A,B \in \Set$}
  \Answer{Yes. It's possible that there are elements in $A \cup B$ not in
    $A \cap B$, but it's not possible for something to be in $A \cap B$ but not
    in $A \cup B$.}
\end{ExcList}
