Topology (Munkres)

Standard Library: Sets

Abbreviation 1
ni

$A\ni a$ iff $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

LaTeX source
\begin{abbreviation}
\label{ni}
    $A\ni a$ iff $a\in A$.
\end{abbreviation}

Extensionality

The axiom of set extensionality says that sets are determined by their \textit{extension}, that is, two sets are equal iff they have the same elements.

Axiom 1 [Set extensionality]
setext

Suppose for all $a$ we have $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ iff $a\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
Then $A = B$.

LaTeX source
\begin{axiom}
[Set extensionality]\label{setext}
    Suppose for all $a$ we have $a\in A$ iff $a\in B$.
    Then $A = B$.
\end{axiom}

This axiom is also available as the justification “{\ldots\ by set extensionality}”, which applies it to goals of the form “$A = B$” and “$A \class{latex-symbol-tip latex-symbol-id-neq}{\neq} B$”.

Proposition 1 [Witness for disequality]
neq_witness

Suppose $A\class{latex-symbol-tip latex-symbol-id-neq}{\neq} B$.
Then there exists $c$ such that either $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $c\not\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ or $c\not\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $c\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.

LaTeX source
\begin{proposition}
[Witness for disequality]
\label{neq_witness}
    Suppose $A\neq B$.
    Then there exists $c$ such that
    either $c\in A$ and $c\not\in B$
    or $c\not\in A$ and $c\in B$.
\end{proposition}
Proof

Suppose not.
Then $A = B$ by set extensionality.
Contradiction.

LaTeX source
\begin{proof}
    Suppose not. Then $A = B$ by set extensionality. Contradiction.
\end{proof}

Subsets

Definition 1
subseteq

$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$ iff for all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $a\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.

LaTeX source
\begin{definition}
\label{subseteq}
    $A\subseteq B$ iff
    for all $a\in A$ we have $a\in B$.
\end{definition}
Abbreviation 2
is_subset

$A$ is a subset of $B$ iff $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.

LaTeX source
\begin{abbreviation}
\label{is_subset}
    $A$ is a subset of $B$ iff $A\subseteq B$.
\end{abbreviation}
Abbreviation 3
supseteq

$B\class{latex-symbol-tip latex-symbol-id-supseteq}{\supseteq} A$ iff $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.

LaTeX source
\begin{abbreviation}
\label{supseteq}
    $B\supseteq A$ iff $A\subseteq B$.
\end{abbreviation}
Proposition 2
subseteq_refl

$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.

LaTeX source
\begin{proposition}
\label{subseteq_refl}
    $A\subseteq A$.
\end{proposition}
Proposition 3
subseteq_antisymmetric

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.
Then $A = B$.

LaTeX source
\begin{proposition}
\label{subseteq_antisymmetric}
    Suppose $A\subseteq B\subseteq A$.
    Then $A = B$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 4
elem_subseteq

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.

LaTeX source
\begin{proposition}
\label{elem_subseteq}
    Suppose $a\in A\subseteq B$.
    Then $a\in B$.
\end{proposition}
Proposition 5
not_in_subseteq

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$ and $c\class{latex-symbol-tip latex-symbol-id-notin}{\notin} B$.
Then $c\class{latex-symbol-tip latex-symbol-id-notin}{\notin} A$.

LaTeX source
\begin{proposition}
\label{not_in_subseteq}
    Suppose $A\subseteq B$ and $c\notin B$.
    Then $c\notin A$.
\end{proposition}
Proposition 6
subseteq_transitive

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.
Then $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.

LaTeX source
\begin{proposition}
\label{subseteq_transitive}
    Suppose $A\subseteq B\subseteq C$.
    Then $A\subseteq C$.
\end{proposition}
Definition 2
subset

$A\class{latex-symbol-tip latex-symbol-id-subset}{\subset} B$ iff $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$ and $A\class{latex-symbol-tip latex-symbol-id-neq}{\neq} B$.

LaTeX source
\begin{definition}
\label{subset}
    $A\subset B$ iff
    $A\subseteq B$ and $A\neq B$.
\end{definition}
Proposition 7
subset_irrefl

$A\not\class{latex-symbol-tip latex-symbol-id-subset}{\subset} A$.

LaTeX source
\begin{proposition}
\label{subset_irrefl}
    $A\not\subset A$.
\end{proposition}
Proposition 8
subset_transitive

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.
Then $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.

LaTeX source
\begin{proposition}
\label{subset_transitive}
    Suppose $A\subseteq B\subseteq C$.
    Then $A\subseteq C$.
\end{proposition}
Proposition 9
subset_witness

Suppose $A\class{latex-symbol-tip latex-symbol-id-subset}{\subset} B$.
Then there exists $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ such that $b\class{latex-symbol-tip latex-symbol-id-notin}{\notin} A$.

LaTeX source
\begin{proposition}
\label{subset_witness}
    Suppose $A\subset B$.
    Then there exists $b\in B$ such that $b\notin A$.
\end{proposition}
Proof

$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$ and $A\class{latex-symbol-tip latex-symbol-id-neq}{\neq} B$.

LaTeX source
\begin{proof}
    $A\subseteq B$ and $A\neq B$.
\end{proof}
Abbreviation 4
family_of_subsets

$F$ is a family of subsets of $X$ iff for all $A\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.

LaTeX source
\begin{abbreviation}
\label{family_of_subsets}
    $F$ is a family of subsets of $X$ iff
    for all $A\in F$ we have $A\subseteq X$.
\end{abbreviation}

The empty set

Axiom 2
emptyset

For all $a$ we have $a\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{axiom}
\label{emptyset}
    For all $a$ we have $a\notin\emptyset$.
\end{axiom}
Abbreviation 5
inhabited

$A$ is inhabited iff there exists $a$ such that $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

LaTeX source
\begin{abbreviation}
\label{inhabited}
    $A$ is inhabited iff
    there exists $a$ such that $a\in A$.
\end{abbreviation}
Abbreviation 6
empty

$A$ is empty iff for all $x$ we have $x\class{latex-symbol-tip latex-symbol-id-notin}{\notin} A$.

LaTeX source
\begin{abbreviation}
\label{empty}
    $A$ is empty iff for all $x$ we have $x\notin A$.
\end{abbreviation}
Proposition 10
nonempty_inhabited

Suppose $A\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then $A$ is inhabited.

LaTeX source
\begin{proposition}
\label{nonempty_inhabited}
    Suppose $A\neq\emptyset$. Then $A$ is inhabited.
\end{proposition}
Proposition 11
emptyset_subseteq

For all $a$ we have $\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} a$.

LaTeX source
\begin{proposition}
\label{emptyset_subseteq}
    For all $a$ we have $\emptyset \subseteq a$.
\end{proposition}
Proposition 12
subseteq_emptyset_iff

$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ iff $A = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{subseteq_emptyset_iff}
    $A\subseteq \emptyset$ iff $A = \emptyset$.
\end{proposition}

Disjointness of sets

Definition 3
disjoint

$A$ is disjoint from $B$ iff there exists no $a$ such that $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A, B$.

LaTeX source
\begin{definition}
\label{disjoint}
    $A$ is disjoint from $B$ iff there exists no $a$ such that $a\in A, B$.
\end{definition}
Abbreviation 7
notmeets

$A\notmeets B$ iff $A$ is disjoint from $B$.

LaTeX source
\begin{abbreviation}
\label{notmeets}
    $A\notmeets B$ iff $A$ is disjoint from $B$.
\end{abbreviation}
Abbreviation 8
meets

$A\meets B$ iff $A$ is not disjoint from $B$.

LaTeX source
\begin{abbreviation}
\label{meets}
    $A\meets B$ iff $A$ is not disjoint from $B$.
\end{abbreviation}
Proposition 13
disjoint_symmetric

If $A$ is disjoint from $B$, then $B$ is disjoint from $A$.

LaTeX source
\begin{proposition}
\label{disjoint_symmetric}
    If $A$ is disjoint from $B$, then $B$ is disjoint from $A$.
\end{proposition}

Unordered pairing and set adjunction

Finite set expressions are desugared to iterated application of $\operatorname{\textsf{cons}}$ to $\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Thus $\{x,y,z\}$ is an abbreviaton of $\cons{x}{\cons{y}{\cons{z}{\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}}}}$. The $\operatorname{\textsf{cons}}$ operation is determined by the following axiom:

Axiom 3
cons_iff

$x\class{latex-symbol-tip latex-symbol-id-in}{\in} \cons{y}{X}$ iff $x = y$ or $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.

LaTeX source
\begin{axiom}
\label{cons_iff}
    $x\in \cons{y}{X}$ iff $x = y$ or $x\in X$.
\end{axiom}
Proposition 14
cons_left

$x\class{latex-symbol-tip latex-symbol-id-in}{\in} \cons{x}{X}$.

LaTeX source
\begin{proposition}
\label{cons_left}
    $x\in \cons{x}{X}$.
\end{proposition}
Proposition 15
cons_right

If $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$, then $y\class{latex-symbol-tip latex-symbol-id-in}{\in} \cons{x}{X}$.

LaTeX source
\begin{proposition}
\label{cons_right}
    If $y\in X$, then $y\in \cons{x}{X}$.
\end{proposition}
Proposition 16
upair_intro_left

$a\class{latex-symbol-tip latex-symbol-id-in}{\in}\{a,b\}$.

LaTeX source
\begin{proposition}
\label{upair_intro_left}
    $a\in\{a,b\}$.
\end{proposition}
Proposition 17
upair_intro_right

$b\class{latex-symbol-tip latex-symbol-id-in}{\in}\{a,b\}$.

LaTeX source
\begin{proposition}
\label{upair_intro_right}
    $b\in\{a,b\}$.
\end{proposition}
Proposition 18
upair_elim

Suppose $c\class{latex-symbol-tip latex-symbol-id-in}{\in}\{a,b\}$.
Then $a = c$ or $b = c$.

LaTeX source
\begin{proposition}
\label{upair_elim}
    Suppose $c\in\{a,b\}$. Then $a = c$ or $b = c$.
\end{proposition}
Proposition 19
upair_iff

$c\class{latex-symbol-tip latex-symbol-id-in}{\in}\{a,b\}$ iff $a = c$ or $b = c$.

LaTeX source
\begin{proposition}
\label{upair_iff}
    $c\in\{a,b\}$ iff $a = c$ or $b = c$.
\end{proposition}
Proposition 20
singleton_intro

$a\class{latex-symbol-tip latex-symbol-id-in}{\in}\{a\}$.

LaTeX source
\begin{proposition}
\label{singleton_intro}
    $a\in\{a\}$.
\end{proposition}
Proposition 21
singleton_elim

If $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\{b\}$, then $a = b$.

LaTeX source
\begin{proposition}
\label{singleton_elim}
    If $a\in\{b\}$, then $a = b$.
\end{proposition}
Proposition 22
singleton_iff

$a\class{latex-symbol-tip latex-symbol-id-in}{\in}\{b\}$ iff $a = b$.

LaTeX source
\begin{proposition}
\label{singleton_iff}
    $a\in\{b\}$ iff $a = b$.
\end{proposition}
Abbreviation 9
subsingleton

$A$ is a subsingleton iff for all $a, b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $a = b$.

LaTeX source
\begin{abbreviation}
\label{subsingleton}
    $A$ is a subsingleton iff for all $a, b\in A$ we have $a = b$.
\end{abbreviation}
Proposition 23
singleton_inhabited

$\{a\}$ is inhabited.

LaTeX source
\begin{proposition}
\label{singleton_inhabited}
    $\{a\}$ is inhabited.
\end{proposition}
Proposition 24
singleton_iff_inhabited_subsingleton

Let $A$ be a subsingleton.
Let $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Then $A = \{a\}$.

LaTeX source
\begin{proposition}
\label{singleton_iff_inhabited_subsingleton}
    Let $A$ be a subsingleton.
    Let $a\in A$.
    Then $A = \{a\}$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 25
singleton_subset_intro

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Then $\{a\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.

LaTeX source
\begin{proposition}
\label{singleton_subset_intro}
    Suppose $a\in C$.
    Then $\{a\}\subseteq C$.
\end{proposition}
Proposition 26
singleton_subset_elim

Suppose $\{a\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.

LaTeX source
\begin{proposition}
\label{singleton_subset_elim}
    Suppose $\{a\}\subseteq C$.
    Then $a\in C$.
\end{proposition}

Union and intersection

Union of a set
Axiom 4
unions_iff

$z\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{X}$ iff there exists $Y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

LaTeX source
\begin{axiom}
\label{unions_iff}
    $z\in\unions{X}$ iff there exists $Y\in X$ such that $z\in Y$.
\end{axiom}
Proposition 27
unions_intro

Suppose $A\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Then $A\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{C}$.

LaTeX source
\begin{proposition}
\label{unions_intro}
    Suppose $A\in B\in C$.
    Then $A\in\unions{C}$.
\end{proposition}
Proof

Follows by Axiom 4.

LaTeX source
\begin{proof}
    Follows by \cref{unions_iff}.
\end{proof}
Proposition 28
unions_emptyset

$\unions{\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}} = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{unions_emptyset}
    $\unions{\emptyset} = \emptyset$.
\end{proposition}
Proposition 29
unions_family

Let $F$ be a family of subsets of $X$.
Then $\unions{F}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.

LaTeX source
\begin{proposition}
\label{unions_family}
    Let $F$ be a family of subsets of $X$.
    Then $\unions{F}\subseteq X$.
\end{proposition}
Abbreviation 10
closedunderunions

$T$ is closed under arbitrary unions iff for every subset $M$ of $T$ we have $\unions{M}\class{latex-symbol-tip latex-symbol-id-in}{\in} T$.

LaTeX source
\begin{abbreviation}
\label{closedunderunions}
    $T$ is closed under arbitrary unions
    iff for every subset $M$ of $T$ we have $\unions{M}\in T$.
\end{abbreviation}
Intersection of a set
Definition 4
inters

$\inters{A} = \{ x\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{A}\mid \text{for all $a\in A$ we have $x\in a$} \}$.

LaTeX source
\begin{definition}
\label{inters}
    $\inters{A} = \{ x\in\unions{A}\mid \text{for all $a\in A$ we have $x\in a$} \}$.
\end{definition}
Proposition 30
inters_iff_forall

$z\class{latex-symbol-tip latex-symbol-id-in}{\in}\inters{X}$ iff $X$ is inhabited and for all $Y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $z\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

LaTeX source
\begin{proposition}
\label{inters_iff_forall}
    $z\in\inters{X}$ iff $X$ is inhabited and for all $Y\in X$ we have $z\in Y$.
\end{proposition}
Proposition 31
inters_intro

Suppose $C$ is inhabited.
Suppose for all $B\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ we have $A\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
Then $A\class{latex-symbol-tip latex-symbol-id-in}{\in}\inters{C}$.

LaTeX source
\begin{proposition}
\label{inters_intro}
    Suppose $C$ is inhabited.
    Suppose for all $B\in C$ we have $A\in B$.
    Then $A\in\inters{C}$.
\end{proposition}
Proposition 32
inters_destr

Suppose $A\class{latex-symbol-tip latex-symbol-id-in}{\in}\inters{C}$.
Suppose $B\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Then $A\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.

LaTeX source
\begin{proposition}
\label{inters_destr}
    Suppose $A\in\inters{C}$.
    Suppose $B\in C$.
    Then $A\in B$.
\end{proposition}
Proposition 33
inters_greatest

Suppose $A$ is inhabited.
Suppose for all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} a$.
Then $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\inters{A}$.

LaTeX source
\begin{proposition}
\label{inters_greatest}
    Suppose $A$ is inhabited.
    Suppose for all $a\in A$ we have $C\subseteq a$.
    Then $C\subseteq\inters{A}$.
\end{proposition}
Proposition 34
subseteq_inters_iff

Suppose $A$ is inhabited.
Then $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\inters{A}$ iff for all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} a$.

LaTeX source
\begin{proposition}
\label{subseteq_inters_iff}
    Suppose $A$ is inhabited.
    Then $C\subseteq\inters{A}$ iff for all $a\in A$ we have $C\subseteq a$.
\end{proposition}
Proposition 35
inters_subseteq_elem

Let $B\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Then $\inters{A}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.

LaTeX source
\begin{proposition}
\label{inters_subseteq_elem}
    Let $B\in A$.
    Then $\inters{A}\subseteq B$.
\end{proposition}
Proposition 36
inters_singleton

$\inters{\{a\}} = a$.

LaTeX source
\begin{proposition}
\label{inters_singleton}
    $\inters{\{a\}} = a$.
\end{proposition}
Proof

Every element of $a$ is an element of $\inters{\{a\}}$ by Proposition 22, Proposition 23, Proposition 30.
Follows by set extensionality.

LaTeX source
\begin{proof}
    Every element of $a$ is an element of $\inters{\{a\}}$
        by \cref{inters_iff_forall,singleton_iff,singleton_inhabited}.
    Follows by set extensionality.
\end{proof}
Proposition 37
inters_emptyset

$\inters{\{\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}\}} = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{inters_emptyset}
    $\inters{\{\emptyset\}} = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Binary union
Axiom 5
union_iff

Let $A, B$ be sets.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\union B$ iff $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ or $a\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.

LaTeX source
\begin{axiom}
\label{union_iff}
    Let $A, B$ be sets.
    $a\in A\union B$ iff $a\in A$ or $a\in B$.
\end{axiom}
Proposition 38
union_intro_left

If $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A$, then $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A\union B$.

LaTeX source
\begin{proposition}
\label{union_intro_left}
    If $c\in A$, then $c\in A\union B$.
\end{proposition}
Proposition 39
union_intro_right

If $c\class{latex-symbol-tip latex-symbol-id-in}{\in} B$, then $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A\union B$.

LaTeX source
\begin{proposition}
\label{union_intro_right}
    If $c\in B$, then $c\in A\union B$.
\end{proposition}
Proposition 40
union_as_unions

$\unions{\{x,y\}} = x\union y$.

LaTeX source
\begin{proposition}
\label{union_as_unions}
    $\unions{\{x,y\}} = x\union y$.
\end{proposition}
Proof

For all $z$ we have \begin{align*} z\in \unions{\{x,y\}} &\iff \exists Z\in\{x,y\}. z\in Z &\iff z\in x \lor z\in y &\iff z\in x\union y. \end{align*} Follows by Axiom 1 [Set extensionality].

LaTeX source
\begin{proof}
    For all $z$ we have
    \begin{align*}
        z\in \unions{\{x,y\}}
        &\iff \exists Z\in\{x,y\}. z\in Z
        &\iff z\in x \lor z\in y
        &\iff z\in x\union y.
    \end{align*}
    Follows by \cref{setext}.
    
\end{proof}
Proposition 41 [Commutativity of union]
union_comm

$A\union B = B\union A$.

LaTeX source
\begin{proposition}
[Commutativity of union]
\label{union_comm}
    $A\union B = B\union A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 42 [Associativity of union]
union_assoc

$(A\union B)\union C = A\union (B\union C)$.

LaTeX source
\begin{proposition}
[Associativity of union]
\label{union_assoc}
    $(A\union B)\union C = A\union (B\union C)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 43 [Idempotence of union]
union_idempotent

$A\union A = A$.

LaTeX source
\begin{proposition}
[Idempotence of union]
\label{union_idempotent}
    $A\union A = A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 44
union_subsets_is_subset

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.
Then $A\union B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.

LaTeX source
\begin{proposition}
\label{union_subsets_is_subset}
    Suppose $A\subseteq C$ and $B\subseteq C$.
    Then $A\union B\subseteq C$.
\end{proposition}
Proposition 45
subseteq_union_iff

$A\union B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ iff $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.

LaTeX source
\begin{proposition}
\label{subseteq_union_iff}
    $A\union B\subseteq C$ iff $A\subseteq C$ and $B\subseteq C$.
\end{proposition}
Proposition 46
union_upper_left

$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\union B$.

LaTeX source
\begin{proposition}
\label{union_upper_left}
    $A\subseteq A\union B$.
\end{proposition}
Proposition 47
union_upper_right

$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\union B$.

LaTeX source
\begin{proposition}
\label{union_upper_right}
    $B\subseteq A\union B$.
\end{proposition}
Proposition 48
union_subseteq_union

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} D$.
Then $A\union B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C\union D$.

LaTeX source
\begin{proposition}
\label{union_subseteq_union}
    Suppose $A\subseteq C$ and $B\subseteq D$.
    Then $A\union B\subseteq C\union D$.
\end{proposition}
Proposition 49
union_emptyset

$A\union\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset} = A$.

LaTeX source
\begin{proposition}
\label{union_emptyset}
    $A\union\emptyset = A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 50
union_emptyset_intro

Suppose $A = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $B = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then $A\union B = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{union_emptyset_intro}
    Suppose $A = \emptyset$ and $B = \emptyset$. Then $A\union B = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 51
union_emptyset_elim_left

Suppose $A\union B = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then $A = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{union_emptyset_elim_left}
    Suppose $A\union B = \emptyset$. Then $A = \emptyset$.
\end{proposition}
Proof

We have $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Proposition 46.
Follows by Proposition 12.

LaTeX source
\begin{proof}
    We have $A\subseteq\emptyset$ by \cref{union_upper_left}.
    Follows by \cref{subseteq_emptyset_iff}.
\end{proof}
Proposition 52
union_emptyset_elim_right

Suppose $A\union B = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then $B = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{union_emptyset_elim_right}
    Suppose $A\union B = \emptyset$. Then $B = \emptyset$.
\end{proposition}
Proof

We have $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Proposition 47.
Follows by Proposition 12.

LaTeX source
\begin{proof}
    We have $B\subseteq\emptyset$ by \cref{union_upper_right}.
    Follows by \cref{subseteq_emptyset_iff}.
\end{proof}
Proposition 53
union_absorb_subseteq_left

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $A\union B = B$.

LaTeX source
\begin{proposition}
\label{union_absorb_subseteq_left}
    Suppose $A\subseteq B$. Then $A\union B = B$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 54
union_absorb_subseteq_right

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $B\union A = B$.

LaTeX source
\begin{proposition}
\label{union_absorb_subseteq_right}
    Suppose $A\subseteq B$. Then $B\union A = B$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 55
union_eq_self_implies_subseteq

If $A\union B = B$, then $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.

LaTeX source
\begin{proposition}
\label{union_eq_self_implies_subseteq}
    If $A\union B = B$, then $A\subseteq B$.
\end{proposition}
Proposition 56
unions_cons

$\unions{\cons{b}{A}} = b\union\unions{A}$.

LaTeX source
\begin{proposition}
\label{unions_cons}
    $\unions{\cons{b}{A}} = b\union\unions{A}$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 57
union_cons

$\cons{b}{A} \union C = \cons{b}{A\union C}$.

LaTeX source
\begin{proposition}
\label{union_cons}
    $\cons{b}{A} \union C = \cons{b}{A\union C}$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 58
union_absorb_left

$A\union (A\union B) = A\union B$.

LaTeX source
\begin{proposition}
\label{union_absorb_left}
    $A\union (A\union B) = A\union B$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 59
union_absorb_right

$(A\union B)\union B = A\union B$.

LaTeX source
\begin{proposition}
\label{union_absorb_right}
    $(A\union B)\union B = A\union B$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 60
union_comm_left

$A\union (B\union C) = B\union (A\union C)$.

LaTeX source
\begin{proposition}
\label{union_comm_left}
    $A\union (B\union C) = B\union (A\union C)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Abbreviation 11
closedunderunion

$T$ is closed under binary unions iff for every $U,V\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ we have $U\union V\class{latex-symbol-tip latex-symbol-id-in}{\in} T$.

LaTeX source
\begin{abbreviation}
\label{closedunderunion}
    $T$ is closed under binary unions
    iff for every $U,V\in T$ we have $U\union V\in T$.
\end{abbreviation}
Binary intersection
Definition 5
inter

$A\inter B = \{ a \class{latex-symbol-tip latex-symbol-id-in}{\in} A \mid a\class{latex-symbol-tip latex-symbol-id-in}{\in} B\}$.

LaTeX source
\begin{definition}
\label{inter}
    $A\inter B = \{ a \in A \mid a\in B\}$.
\end{definition}
Proposition 61
inter_intro

If $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A, B$, then $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A\inter B$.

LaTeX source
\begin{proposition}
\label{inter_intro}
    If $c\in A, B$, then $c\in A\inter B$.
\end{proposition}
Proposition 62
inter_elim_left

If $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A\inter B$, then $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

LaTeX source
\begin{proposition}
\label{inter_elim_left}
    If $c\in A\inter B$, then $c\in A$.
\end{proposition}
Proposition 63
inter_elim_right

If $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A\inter B$, then $c\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.

LaTeX source
\begin{proposition}
\label{inter_elim_right}
    If $c\in A\inter B$, then $c\in B$.
\end{proposition}
Proposition 64
inter_as_inters

$\inters{\{A,B\}} = A\inter B$.

LaTeX source
\begin{proposition}
\label{inter_as_inters}
    $\inters{\{A,B\}} = A\inter B$.
\end{proposition}
Proof

$\{A,B\}$ is inhabited.
Thus for all $c$ we have $c\class{latex-symbol-tip latex-symbol-id-in}{\in}\inters{\{A,B\}}$ iff $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A\inter B$ by Definition 5, Proposition 19, Proposition 30.
Follows by Axiom 1 [Set extensionality].

LaTeX source
\begin{proof}
    $\{A,B\}$ is inhabited.
    Thus for all $c$ we have $c\in\inters{\{A,B\}}$ iff $c\in A\inter B$
        by \cref{inters_iff_forall,inter,upair_iff}.
    Follows by \cref{setext}.  
\end{proof}
Proposition 65 [Commutativity of intersection]
inter_comm

$A\inter B = B\inter A$.

LaTeX source
\begin{proposition}
[Commutativity of intersection]
\label{inter_comm}
    $A\inter B = B\inter A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 66 [Associativity of intersection]
inter_assoc

$(A\inter B)\inter C = A\inter (B\inter C)$.

LaTeX source
\begin{proposition}
[Associativity of intersection]
\label{inter_assoc}
    $(A\inter B)\inter C = A\inter (B\inter C)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 67 [Idempotence of intersection]
inter_idempotent

$A\inter A = A$.

LaTeX source
\begin{proposition}
[Idempotence of intersection]
\label{inter_idempotent}
    $A\inter A = A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 68
inter_emptyset

$A\inter\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset} = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{inter_emptyset}
    $A\inter\emptyset = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 69
inter_absorb_supseteq_right

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $A\inter B = A$.

LaTeX source
\begin{proposition}
\label{inter_absorb_supseteq_right}
    Suppose $A\subseteq B$. Then $A\inter B = A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 70
inter_absorb_supseteq_left

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $B\inter A = A$.

LaTeX source
\begin{proposition}
\label{inter_absorb_supseteq_left}
    Suppose $A\subseteq B$. Then $B\inter A = A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 71
inter_eq_left_implies_subseteq

Suppose $A\inter B = A$.
Then $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.

LaTeX source
\begin{proposition}
\label{inter_eq_left_implies_subseteq}
    Suppose $A\inter B = A$. Then $A\subseteq B$.
\end{proposition}
Proposition 72
subseteq_inter_iff

$C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\inter B$ iff $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.

LaTeX source
\begin{proposition}
\label{subseteq_inter_iff}
    $C\subseteq A\inter B$ iff $C\subseteq A$ and $C\subseteq B$.
\end{proposition}
Proposition 73
inter_lower_left

$A\inter B \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.

LaTeX source
\begin{proposition}
\label{inter_lower_left}
    $A\inter B \subseteq A$.
\end{proposition}
Proposition 74
inter_lower_right

$A\inter B \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.

LaTeX source
\begin{proposition}
\label{inter_lower_right}
    $A\inter B \subseteq B$.
\end{proposition}
Proposition 75
inter_absorb_left

$A\inter (A\inter B) = A\inter B$.

LaTeX source
\begin{proposition}
\label{inter_absorb_left}
    $A\inter (A\inter B) = A\inter B$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
 Follows by set extensionality. 
\end{proof}
Proposition 76
inter_absorb_right

$(A\inter B) \inter B = A\inter B$.

LaTeX source
\begin{proposition}
\label{inter_absorb_right}
    $(A\inter B) \inter B = A\inter B$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
 Follows by set extensionality. 
\end{proof}
Proposition 77
inter_comm_left

$A\inter (B\inter C) = B\inter (A\inter C)$.

LaTeX source
\begin{proposition}
\label{inter_comm_left}
    $A\inter (B\inter C) = B\inter (A\inter C)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 78
inter_subseteq

Suppose $A,B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.
Then $A\inter B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.

LaTeX source
\begin{proposition}
\label{inter_subseteq}
    Suppose $A,B\subseteq C$.
    Then $A\inter B\subseteq C$.
\end{proposition}
Abbreviation 12
closedunderinter

$T$ is closed under binary intersections iff for every $U,V\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ we have $U\inter V\class{latex-symbol-tip latex-symbol-id-in}{\in} T$.

LaTeX source
\begin{abbreviation}
\label{closedunderinter}
    $T$ is closed under binary intersections
    iff for every $U,V\in T$ we have $U\inter V\in T$.
\end{abbreviation}
Interaction of union and intersection
Proposition 79 [Binary intersection over binary union]
inter_distrib_union

$A\inter (B\union C) = (A\inter B)\union (A\inter C)$.

LaTeX source
\begin{proposition}
[Binary intersection over binary union]
\label{inter_distrib_union}
    $A\inter (B\union C) = (A\inter B)\union (A\inter C)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 80 [Binary union over binary intersection]
union_distrib_inter

$x\union (y\inter z) = (x\union y)\inter (x\union z)$.

LaTeX source
\begin{proposition}
[Binary union over binary intersection]
\label{union_distrib_inter}
    $x\union (y\inter z) = (x\union y)\inter (x\union z)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 81
union_inter_assoc_intro

Suppose $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.
Then $A\inter (B\union C) = (A\inter B)\union C$.

LaTeX source
\begin{proposition}
\label{union_inter_assoc_intro}
    Suppose $C\subseteq A$.
    Then $A\inter (B\union C) = (A\inter B)\union C$.
\end{proposition}
Proof

\begin{align*} A\inter (B\union C) &= (A\inter B)\union (A\inter C) \explanation{by Proposition 79 [Binary intersection over binary union]}\\ &= (A\inter B)\union C \explanation{by Proposition 70} \end{align*}

LaTeX source
\begin{proof}
    \begin{align*}
        A\inter (B\union C) &= (A\inter B)\union (A\inter C) \explanation{by \cref{inter_distrib_union}}\\
        &= (A\inter B)\union C \explanation{by \cref{inter_absorb_supseteq_left}}
    \end{align*}
\end{proof}
Proposition 82
union_inter_assoc_elim

Suppose $(A\inter B)\union C = A\inter (B\union C)$.
Then $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.

LaTeX source
\begin{proposition}
\label{union_inter_assoc_elim}
    Suppose $(A\inter B)\union C = A\inter (B\union C)$.
    Then $C\subseteq A$.
\end{proposition}
Proof

Follows by Proposition 3, Proposition 45, Proposition 46, Proposition 47, Proposition 72.

LaTeX source
\begin{proof}
    Follows by \cref{union_upper_right,union_upper_left,subseteq_union_iff,subseteq_antisymmetric,subseteq_inter_iff}.
\end{proof}
Proposition 83
union_inter_crazy

$(A\inter B)\union (B\inter C)\union (C\inter A) = (A\union B)\inter (B\union C)\inter (C\union A)$.

LaTeX source
\begin{proposition}
\label{union_inter_crazy}
    $(A\inter B)\union (B\inter C)\union (C\inter A)
    =
    (A\union B)\inter (B\union C)\inter (C\union A)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 84 [Intersection over binary union]
inters_distrib_union

Suppose $A$ and $B$ are inhabited.
Then $\inters{A\union B} = (\inters{A})\inter\inters{B}$.

LaTeX source
\begin{proposition}
[Intersection over binary union]\label{inters_distrib_union}
    Suppose $A$ and $B$ are inhabited.
    Then $\inters{A\union B} = (\inters{A})\inter\inters{B}$.
\end{proposition}
Proof

$A\union B$ is inhabited.
Thus for all $c$ we have $c\class{latex-symbol-tip latex-symbol-id-in}{\in}\inters{A\union B}$ iff $c\class{latex-symbol-tip latex-symbol-id-in}{\in}(\inters{A})\inter\inters{B}$ by Axiom 5, Definition 5, Proposition 30.
Follows by Axiom 1 [Set extensionality].

LaTeX source
\begin{proof}
    $A\union B$ is inhabited.
    Thus for all $c$ we have $c\in\inters{A\union B}$ iff $c\in(\inters{A})\inter\inters{B}$
        by \cref{inter,union_iff,inters_iff_forall}.
    Follows by \cref{setext}. 
\end{proof}

Set difference

Definition 6
setminus

$A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B = \{ a \class{latex-symbol-tip latex-symbol-id-in}{\in} A \mid a\not\class{latex-symbol-tip latex-symbol-id-in}{\in} B\}$.

LaTeX source
\begin{definition}
\label{setminus}
    $A\setminus B = \{ a \in A \mid a\not\in B\}$.
\end{definition}
Proposition 85
setminus_intro

If $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $a\class{latex-symbol-tip latex-symbol-id-notin}{\notin} B$, then $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B$.

LaTeX source
\begin{proposition}
\label{setminus_intro}
    If $a\in A$ and $a\notin B$, then $a\in A\setminus B$.
\end{proposition}
Proposition 86
setminus_elim_left

If $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B$, then $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

LaTeX source
\begin{proposition}
\label{setminus_elim_left}
    If $a\in A\setminus B$, then $a\in A$.
\end{proposition}
Proposition 87
setminus_elim_right

If $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B$, then $a\class{latex-symbol-tip latex-symbol-id-notin}{\notin} B$.

LaTeX source
\begin{proposition}
\label{setminus_elim_right}
    If $a\in A\setminus B$, then $a\notin B$.
\end{proposition}
Proposition 88
setminus_emptyset

$x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset} = x$.

LaTeX source
\begin{proposition}
\label{setminus_emptyset}
    $x\setminus \emptyset = x$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 89
emptyset_setminus

$\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} x = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{emptyset_setminus}
    $\emptyset\setminus x = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 90
setminus_self

$x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} x = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{setminus_self}
    $x\setminus x = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 91
setminus_setminus

$x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} (x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} y) = x\inter y$.

LaTeX source
\begin{proposition}
\label{setminus_setminus}
    $x\setminus (x\setminus y) = x\inter y$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 92
double_relative_complement

Suppose $y\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} x$.
$x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} (x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} y) = y$.

LaTeX source
\begin{proposition}
\label{double_relative_complement}
    Suppose $y\subseteq x$.
    $x\setminus (x\setminus y) = y$.
\end{proposition}
Proof

Follows by Proposition 70, Proposition 91.

LaTeX source
\begin{proof}
    Follows by \cref{setminus_setminus,inter_absorb_supseteq_left}.
\end{proof}
Proposition 93
setminus_inter

$x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} (y\inter z) = (x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} y)\union (x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} z)$.

LaTeX source
\begin{proposition}
\label{setminus_inter}
    $x\setminus (y\inter z) = (x\setminus y)\union (x\setminus z)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 94
setminus_union

$x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} (y\union z) = (x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} y)\inter (x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} z)$.

LaTeX source
\begin{proposition}
\label{setminus_union}
    $x\setminus (y\union z) = (x\setminus y)\inter (x\setminus z)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 95
inter_setminus

$x\inter (y\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} z) = (x\inter y)\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} (x\inter z)$.

LaTeX source
\begin{proposition}
\label{inter_setminus}
    $x\inter (y\setminus z) = (x\inter y)\setminus (x\inter z)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 96
difference_with_proper_subset_is_inhabited

Let $A, B$ be sets.
Suppose $A\class{latex-symbol-tip latex-symbol-id-subset}{\subset} B$.
Then $B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A$ is inhabited.

LaTeX source
\begin{proposition}
\label{difference_with_proper_subset_is_inhabited}
    Let $A, B$ be sets.
    Suppose $A\subset B$.
    Then $B\setminus A$ is inhabited.
\end{proposition}
Proof

Take $b$ such that $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ and $b\class{latex-symbol-tip latex-symbol-id-notin}{\notin} A$.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A$.

LaTeX source
\begin{proof}
    Take $b$ such that $b\in B$ and $b\notin A$.
    Then $b\in B\setminus A$.
\end{proof}
Proposition 97
setminus_subseteq

$B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.

LaTeX source
\begin{proposition}
\label{setminus_subseteq}
    $B\setminus A\subseteq B$.
\end{proposition}
Proposition 98
subseteq_setminus

Suppose $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.
Suppose $C\inter B = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B$.

LaTeX source
\begin{proposition}
\label{subseteq_setminus}
    Suppose $C\subseteq A$.
    Suppose $C\inter B = \emptyset$.
    Then $C\subseteq A\setminus B$.
\end{proposition}
Proposition 99
subseteq_implies_setminus_supseteq

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $C\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A\class{latex-symbol-tip latex-symbol-id-supseteq}{\supseteq} C\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B$.

LaTeX source
\begin{proposition}
\label{subseteq_implies_setminus_supseteq}
    Suppose $A\subseteq B$.
    Then $C\setminus A\supseteq C\setminus B$.
\end{proposition}
Proposition 100
setminus_absorb_right

Suppose $A\inter B = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then $A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B = A$.

LaTeX source
\begin{proposition}
\label{setminus_absorb_right}
    Suppose $A\inter B = \emptyset$.
    Then $A\setminus B = A$.
\end{proposition}
Proposition 101
setminus_eq_emptyset_iff_subseteq

$A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ iff $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.

LaTeX source
\begin{proposition}
\label{setminus_eq_emptyset_iff_subseteq}
    $A\setminus B = \emptyset$ iff $A\subseteq B$.
\end{proposition}
Proposition 102
subseteq_setminus_cons_intro

Suppose $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} C$ and $c\class{latex-symbol-tip latex-symbol-id-notin}{\notin} B$.
Then $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\cons{c}{C}$.

LaTeX source
\begin{proposition}
\label{subseteq_setminus_cons_intro}
    Suppose $B\subseteq A\setminus C$ and $c\notin B$. Then $B\subseteq A\setminus\cons{c}{C}$.
\end{proposition}
Proposition 103
subseteq_setminus_cons_elim

Suppose $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\cons{c}{C}$.
Then $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} C$ and $c\class{latex-symbol-tip latex-symbol-id-notin}{\notin} B$.

LaTeX source
\begin{proposition}
\label{subseteq_setminus_cons_elim}
    Suppose $B\subseteq A\setminus\cons{c}{C}$. Then $B\subseteq A\setminus C$ and $c\notin B$.
\end{proposition}
Proposition 104
setminus_cons

$A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} \cons{a}{B} = (A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} \{a\})\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B$.

LaTeX source
\begin{proposition}
\label{setminus_cons}
    $A\setminus \cons{a}{B} = (A\setminus \{a\})\setminus B$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 105
setminus_cons_flip

$A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} \cons{a}{B} = (A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B)\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} \{a\}$.

LaTeX source
\begin{proposition}
\label{setminus_cons_flip}
    $A\setminus \cons{a}{B} = (A\setminus B)\setminus \{a\}$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 106
setminus_disjoint

$A\inter (B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A) = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{setminus_disjoint}
    $A\inter (B\setminus A) = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 107
setminus_partition

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
$A\union (B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A) = B$.

LaTeX source
\begin{proposition}
\label{setminus_partition}
    Suppose $A\subseteq B$.
    $A\union (B\setminus A) = B$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 108
subseteq_union_setminus

$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B\union (A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B)$.

LaTeX source
\begin{proposition}
\label{subseteq_union_setminus}
    $A\subseteq B\union (A\setminus B)$.
\end{proposition}
Proposition 109
double_complement

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.
Then $B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} (C\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A) = A$.

LaTeX source
\begin{proposition}
\label{double_complement}
    Suppose $A\subseteq B\subseteq C$.
    Then $B\setminus (C\setminus A) = A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 110
double_complement_union

Then $(A\union B)\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} (B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A) = A$.

LaTeX source
\begin{proposition}
\label{double_complement_union}
    Then $(A\union B)\setminus (B\setminus A) = A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 111
setminus_eq_inter_complement

Suppose $A, B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.
Then $A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B = A\inter (C\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B)$.

LaTeX source
\begin{proposition}
\label{setminus_eq_inter_complement}
    Suppose $A, B\subseteq C$.
    Then $A\setminus B = A\inter (C\setminus B)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}

Tuples

As with unordered pairs, orderd pairs are a primitive construct and $n$-tuples desugar to iterated applications of the primitive operator $({-},{-})$. For example $(a, b, c, d)$ equals $(a, (b, (c, d)))$ by definition. While ordered pairs could be encoded set-theoretically, we simply postulate the defining property to prevent misguiding proof automation.

Axiom 6
pair_eq_iff

$(a, b) = (a', b')$ iff $a = a'\class{latex-symbol-tip latex-symbol-id-land}{\land} b = b'$.

LaTeX source
\begin{axiom}
\label{pair_eq_iff}
    $(a, b) = (a', b')$ iff $a = a'\land b = b'$.
\end{axiom}
Axiom 7
pair_neq_emptyset

$(a, b) \class{latex-symbol-tip latex-symbol-id-neq}{\neq} \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{axiom}
\label{pair_neq_emptyset}
    $(a, b) \neq \emptyset$.
\end{axiom}
Axiom 8
pair_neq_fst

$(a, b) \class{latex-symbol-tip latex-symbol-id-neq}{\neq} a$.

LaTeX source
\begin{axiom}
\label{pair_neq_fst}
    $(a, b) \neq a$.
\end{axiom}
Axiom 9
pair_neq_snd

$(a, b) \class{latex-symbol-tip latex-symbol-id-neq}{\neq} b$.

LaTeX source
\begin{axiom}
\label{pair_neq_snd}
    $(a, b) \neq b$.
\end{axiom}

Repeated application of the defining property of pairs yields the defining property of all tuples.

Proposition 112
triple_eq_iff

$(a, b, c) = (a', b', c')$ iff $a = a' \class{latex-symbol-tip latex-symbol-id-land}{\land} b = b'\class{latex-symbol-tip latex-symbol-id-land}{\land} c = c'$.

LaTeX source
\begin{proposition}
\label{triple_eq_iff}
    $(a, b, c) = (a', b', c')$ iff $a = a' \land b = b'\land c = c'$.
\end{proposition}

There are primitive projections $\fst{}$ and $\snd{}$ that satisfy the following axioms.

Axiom 10
fst_eq

$\fst{(a, b)} = a$.

LaTeX source
\begin{axiom}
\label{fst_eq}
    $\fst{(a, b)} = a$.
\end{axiom}
Axiom 11
snd_eq

$\snd{(a, b)} = b$.

LaTeX source
\begin{axiom}
\label{snd_eq}
    $\snd{(a, b)} = b$.
\end{axiom}
Proposition 113
pair_eq_pair_of_proj

$(a, b) = (\fst{(a,b)},\snd{(a,b)})$.

LaTeX source
\begin{proposition}
\label{pair_eq_pair_of_proj}
    $(a, b) = (\fst{(a,b)},\snd{(a,b)})$.
\end{proposition}
Definition 7
times

$A\class{latex-symbol-tip latex-symbol-id-times}{\times} B = \{ (a,b) \mid a\class{latex-symbol-tip latex-symbol-id-in}{\in} A, b\class{latex-symbol-tip latex-symbol-id-in}{\in} B \}$.

LaTeX source
\begin{definition}
\label{times}
    $A\times B = \{ (a,b) \mid a\in A, b\in B \}$.
\end{definition}
Proposition 114
times_tuple_elim

Suppose $(x, y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} Y$.
Then $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

LaTeX source
\begin{proposition}
\label{times_tuple_elim}
    Suppose $(x, y)\in X\times Y$. Then $x\in X$ and $y\in Y$.
\end{proposition}
Proof

Take $x', y'$ such that $x'\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-land}{\land} y'\class{latex-symbol-tip latex-symbol-id-in}{\in} Y \class{latex-symbol-tip latex-symbol-id-land}{\land} (x, y) = (x', y')$ by Definition 7.
Then $x = x'$ and $y = y'$ by Axiom 6.

LaTeX source
\begin{proof}
    Take $x', y'$ such that $x'\in X\land y'\in Y \land (x, y) = (x', y')$
        by \cref{times}.
    Then $x = x'$ and $y = y'$ by \cref{pair_eq_iff}.
\end{proof}
Proposition 115
times_tuple_intro

Suppose $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.
Then $(x, y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} Y$.

LaTeX source
\begin{proposition}
\label{times_tuple_intro}
    Suppose $x\in X$ and $y\in Y$. Then $(x, y)\in X\times Y$.
\end{proposition}
Proposition 116
times_empty_left

$\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}\class{latex-symbol-tip latex-symbol-id-times}{\times} Y = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{times_empty_left}
    $\emptyset\times Y = \emptyset$.
\end{proposition}
Proposition 117
times_empty_right

$X\class{latex-symbol-tip latex-symbol-id-times}{\times} \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset} = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{times_empty_right}
    $X\times \emptyset = \emptyset$.
\end{proposition}
Proposition 118
times_empty_iff

$X\class{latex-symbol-tip latex-symbol-id-times}{\times} Y$ is empty iff $X$ is empty or $Y$ is empty.

LaTeX source
\begin{proposition}
\label{times_empty_iff}
    $X\times Y$ is empty iff $X$ is empty or $Y$ is empty.
\end{proposition}
Proof

Follows by Definition 7.

LaTeX source
\begin{proof}
    Follows by \cref{times}.
\end{proof}
Proposition 119
fst_type

Suppose $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.
Then $\fst{c}\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

LaTeX source
\begin{proposition}
\label{fst_type}
    Suppose $c\in A\times B$. Then $\fst{c}\in A$.
\end{proposition}
Proof

Take $a, b$ such that $c = (a, b)$ and $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 7.
Follows by Axiom 10.

LaTeX source
\begin{proof}
    Take $a, b$ such that $c = (a, b)$ and $a\in A$
        by \cref{times}.
    Follows by \cref{fst_eq}.
    
\end{proof}
Proposition 120
snd_type

Suppose $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.
Then $\snd{c}\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.

LaTeX source
\begin{proposition}
\label{snd_type}
    Suppose $c\in A\times B$. Then $\snd{c}\in B$.
\end{proposition}
Proof

Take $a, b$ such that $c = (a, b)$ and $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ by Definition 7.
Follows by Axiom 11.

LaTeX source
\begin{proof}
    Take $a, b$ such that $c = (a, b)$ and $b\in B$
        by \cref{times}.
    Follows by \cref{snd_eq}.
    
\end{proof}
Proposition 121
times_elem_is_tuple

Suppose $p\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} Y$.
Then there exist $x, y$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ and $p = (x, y)$.

LaTeX source
\begin{proposition}
\label{times_elem_is_tuple}
    Suppose $p\in X\times Y$. Then there exist $x, y$
    such that $x\in X$ and $y\in Y$ and $p = (x, y)$.
\end{proposition}
Proposition 122
times_proj_elim

Suppose $p\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} Y$.
Then $\fst{p}\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $\snd{p}\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

LaTeX source
\begin{proposition}
\label{times_proj_elim}
    Suppose $p\in X\times Y$. Then $\fst{p}\in X$ and $\snd{p}\in Y$.
\end{proposition}

Additional results about cons

Proposition 123
cons_subseteq_intro

Suppose $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Suppose $Y\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.
Then $\cons{x}{Y}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.

LaTeX source
\begin{proposition}
\label{cons_subseteq_intro}
    Suppose $x\in X$.
    Suppose $Y\subseteq X$.
    Then $\cons{x}{Y}\subseteq X$.
\end{proposition}
Proposition 124
cons_subseteq_elim

Suppose $\cons{x}{Y}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.
Then $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $Y\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.

LaTeX source
\begin{proposition}
\label{cons_subseteq_elim}
    Suppose $\cons{x}{Y}\subseteq X$.
    Then $x\in X$ and $Y\subseteq X$.
\end{proposition}
Proposition 125
cons_subseteq_iff

$\cons{x}{Y}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ iff $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $Y\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.

LaTeX source
\begin{proposition}
\label{cons_subseteq_iff}
    $\cons{x}{Y}\subseteq X$ iff $x\in X$ and $Y\subseteq X$.
\end{proposition}
Proposition 126
subseteq_cons_right

If $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$, then $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \cons{a}{B}$.

LaTeX source
\begin{proposition}
\label{subseteq_cons_right}
    If $C\subseteq B$, then $C\subseteq \cons{a}{B}$.
\end{proposition}
Corollary 1
subseteq_cons_self

$X\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \cons{y}{X}$.

LaTeX source
\begin{corollary}
\label{subseteq_cons_self}
    $X\subseteq \cons{y}{X}$.
\end{corollary}
Abbreviation 13
remove_point

$\remove{a}{B} = B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\{a\}$.

LaTeX source
\begin{abbreviation}
\label{remove_point}
    $\remove{a}{B} = B\setminus\{a\}$.
\end{abbreviation}
Proposition 127
subseteq_cons_intro_left

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} C \class{latex-symbol-tip latex-symbol-id-land}{\land} \remove{a}{C} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \cons{a}{B}$.

LaTeX source
\begin{proposition}
\label{subseteq_cons_intro_left}
    Suppose $a\in C \land \remove{a}{C} \subseteq B$.
    Then $C\subseteq \cons{a}{B}$.
\end{proposition}
Proof

Follows by Proposition 101, Proposition 104.

LaTeX source
\begin{proof}
    Follows by \cref{setminus_cons,setminus_eq_emptyset_iff_subseteq}.
\end{proof}
Proposition 128
subseteq_cons_intro_right

Suppose $C \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \cons{a}{B}$.

LaTeX source
\begin{proposition}
\label{subseteq_cons_intro_right}
    Suppose $C \subseteq B$.
    Then $C\subseteq \cons{a}{B}$.
\end{proposition}
Proposition 129
subseteq_cons_elim

Suppose $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \cons{a}{B}$.
Then $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B \class{latex-symbol-tip latex-symbol-id-lor}{\lor} (a\class{latex-symbol-tip latex-symbol-id-in}{\in} C \class{latex-symbol-tip latex-symbol-id-land}{\land} \remove{a}{C} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B)$.

LaTeX source
\begin{proposition}
\label{subseteq_cons_elim}
    Suppose $C\subseteq \cons{a}{B}$.
    Then $C\subseteq B \lor (a\in C \land \remove{a}{C} \subseteq B)$.
\end{proposition}
Proof

Follows by Axiom 3, Definition 1, Proposition 101, Proposition 104.

LaTeX source
\begin{proof}
    Follows by \cref{setminus_cons,subseteq,cons_iff,setminus_eq_emptyset_iff_subseteq}.
\end{proof}
Proposition 130
subseteq_cons_iff

$C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \cons{a}{B}$ iff $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B \class{latex-symbol-tip latex-symbol-id-lor}{\lor} (a\class{latex-symbol-tip latex-symbol-id-in}{\in} C \class{latex-symbol-tip latex-symbol-id-land}{\land} \remove{a}{C}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B)$.

LaTeX source
\begin{proposition}
\label{subseteq_cons_iff}
    $C\subseteq \cons{a}{B}$ iff $C\subseteq B \lor (a\in C \land \remove{a}{C}\subseteq B)$.
\end{proposition}
Proposition 131
remove_point_eq_setminus_singleton

$\remove{a}{B} = B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\{a\}$.

LaTeX source
\begin{proposition}
\label{remove_point_eq_setminus_singleton}
    $\remove{a}{B} = B\setminus\{a\}$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 132
union_eq_cons

$\{a\}\union B = \cons{a}{B}$.

LaTeX source
\begin{proposition}
\label{union_eq_cons}
    $\{a\}\union B = \cons{a}{B}$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 133
cons_comm

$\cons{a}{\cons{b}{C}} = \cons{b}{\cons{a}{C}}$.

LaTeX source
\begin{proposition}
\label{cons_comm}
    $\cons{a}{\cons{b}{C}} = \cons{b}{\cons{a}{C}}$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 134
cons_absorb

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Then $\cons{a}{A} = A$.

LaTeX source
\begin{proposition}
\label{cons_absorb}
    Suppose $a\in A$.
    Then $\cons{a}{A} = A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 135
cons_remove

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Then $\cons{a}{A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\{a\}} = A$.

LaTeX source
\begin{proposition}
\label{cons_remove}
    Suppose $a\in A$.
    Then $\cons{a}{A\setminus\{a\}} = A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 136
cons_idempotent

Then $\cons{a}{\cons{a}{B}} = \cons{a}{B}$.

LaTeX source
\begin{proposition}
\label{cons_idempotent}
    Then $\cons{a}{\cons{a}{B}} = \cons{a}{B}$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 137
inters_cons

Suppose $B$ is inhabited.
Then $\inters{\cons{a}{B}} = a\inter\inters{B}$.

LaTeX source
\begin{proposition}
\label{inters_cons}
    Suppose $B$ is inhabited.
    Then $\inters{\cons{a}{B}} = a\inter\inters{B}$.
\end{proposition}
Proof

$\cons{a}{B}$ is inhabited.
Thus for all $c$ we have $c\class{latex-symbol-tip latex-symbol-id-in}{\in}\inters{\cons{a}{B}}$ iff $c\class{latex-symbol-tip latex-symbol-id-in}{\in} a\inter \inters{B}$ by Axiom 3, Definition 5, Proposition 30.
Follows byAxiom 1 [Set extensionality].

LaTeX source
\begin{proof}
    $\cons{a}{B}$ is inhabited.
    Thus for all $c$ we have $c\in\inters{\cons{a}{B}}$ iff $c\in a\inter \inters{B}$
        by \cref{inters_iff_forall,cons_iff,inter}.
    Follows by\cref{setext}.
\end{proof}

Symmetric difference

Definition 8
symdiff

$x\symdiff y = (x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} y)\union (y\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} x)$.

LaTeX source
\begin{definition}
\label{symdiff}
    $x\symdiff y = (x\setminus y)\union (y\setminus x)$.
\end{definition}
Proposition 138
symdiff_as_setdiff

$x\symdiff y = (x\union y)\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} (y\inter x)$.

LaTeX source
\begin{proposition}
\label{symdiff_as_setdiff}
    $x\symdiff y = (x\union y)\setminus (y\inter x)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 139
symdiff_implies_xor_in

If $z\class{latex-symbol-tip latex-symbol-id-in}{\in} x\symdiff y$, then either $z\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ or $z\class{latex-symbol-tip latex-symbol-id-in}{\in} y$.

LaTeX source
\begin{proposition}
\label{symdiff_implies_xor_in}
    If $z\in x\symdiff y$, then either $z\in x$ or $z\in y$.
\end{proposition}
Proposition 140
xor_in_implies_symdiff

If either $z\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ or $z\class{latex-symbol-tip latex-symbol-id-in}{\in} y$, then $z\class{latex-symbol-tip latex-symbol-id-in}{\in} x\symdiff y$.

LaTeX source
\begin{proposition}
\label{xor_in_implies_symdiff}
    If either $z\in x$ or $z\in y$, then $z\in x\symdiff y$.
\end{proposition}
Proof

If $z\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ and $z\not\class{latex-symbol-tip latex-symbol-id-in}{\in} y$, then $z\class{latex-symbol-tip latex-symbol-id-in}{\in} x\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} y$.
If $z\not\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ and $z\class{latex-symbol-tip latex-symbol-id-in}{\in} y$, then $z\class{latex-symbol-tip latex-symbol-id-in}{\in} y\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} x$.

LaTeX source
\begin{proof}
    If $z\in x$ and $z\not\in y$, then $z\in x\setminus y$.
    If $z\not\in x$ and $z\in y$, then $z\in y\setminus x$.
\end{proof}
Proposition 141
symdiff_assoc

$x\symdiff (y\symdiff z) = (x\symdiff y)\symdiff z$.

LaTeX source
\begin{proposition}
\label{symdiff_assoc}
    $x\symdiff (y\symdiff z) = (x\symdiff y)\symdiff z$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 142
symdiff_comm

$x\symdiff y = y\symdiff x$.

LaTeX source
\begin{proposition}
\label{symdiff_comm}
    $x\symdiff y = y\symdiff x$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 143
times_subseteq_left

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.
Then $A\class{latex-symbol-tip latex-symbol-id-times}{\times} B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.

LaTeX source
\begin{proposition}
\label{times_subseteq_left}
    Suppose $A\subseteq C$. Then $A\times B\subseteq C\times B$.
\end{proposition}
Proof

It suffices to show that for all $w\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$ we have $w\class{latex-symbol-tip latex-symbol-id-in}{\in} C\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.

LaTeX source
\begin{proof}
    It suffices to show that for all $w\in A\times B$ we have $w\in C\times B$.
\end{proof}
Proposition 144
times_subseteq_right

Suppose $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} D$.
Then $A\class{latex-symbol-tip latex-symbol-id-times}{\times} B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-times}{\times} D$.

LaTeX source
\begin{proposition}
\label{times_subseteq_right}
    Suppose $B\subseteq D$. Then $A\times B\subseteq A\times D$.
\end{proposition}
Proof

It suffices to show that for all $w\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$ we have $w\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} D$.

LaTeX source
\begin{proof}
    It suffices to show that for all $w\in A\times B$ we have $w\in A\times D$.
\end{proof}
Proposition 145
inter_times_intro

Suppose $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(A\inter B)\class{latex-symbol-tip latex-symbol-id-times}{\times} (C\inter D)$.
Then $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(A\class{latex-symbol-tip latex-symbol-id-times}{\times} C)\inter (B\class{latex-symbol-tip latex-symbol-id-times}{\times} D)$.

LaTeX source
\begin{proposition}
\label{inter_times_intro}
    Suppose $w\in(A\inter B)\times (C\inter D)$.
    Then $w\in(A\times C)\inter (B\times D)$.
\end{proposition}
Proof

Take $a,c$ such that $w = (a, c)$ by Proposition 121.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A, B$ and $c\class{latex-symbol-tip latex-symbol-id-in}{\in} C,D$ by Definition 5, Proposition 114.
Thus $w\class{latex-symbol-tip latex-symbol-id-in}{\in} (A\class{latex-symbol-tip latex-symbol-id-times}{\times} C), (B\class{latex-symbol-tip latex-symbol-id-times}{\times} D)$.

LaTeX source
\begin{proof}
    Take $a,c$ such that $w = (a, c)$
        by \cref{times_elem_is_tuple}.
    Then $a\in A, B$ and $c\in C,D$
        by \cref{times_tuple_elim,inter}.
    Thus $w\in (A\times C), (B\times D)$.
\end{proof}
Proposition 146
inter_times_elim

Suppose $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(A\class{latex-symbol-tip latex-symbol-id-times}{\times} C)\inter (B\class{latex-symbol-tip latex-symbol-id-times}{\times} D)$.
Then $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(A\inter B)\class{latex-symbol-tip latex-symbol-id-times}{\times} (C\inter D)$.

LaTeX source
\begin{proposition}
\label{inter_times_elim}
    Suppose $w\in(A\times C)\inter (B\times D)$.
    Then $w\in(A\inter B)\times (C\inter D)$.
\end{proposition}
Proof

$w\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} C$.
Take $a, c$ such that $w = (a, c)$.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} A, B$ by Definition 5, Proposition 114.
$c\class{latex-symbol-tip latex-symbol-id-in}{\in} C, D$ by Definition 5, Proposition 114.
Thus $(a,c) \class{latex-symbol-tip latex-symbol-id-in}{\in} (A\inter B)\class{latex-symbol-tip latex-symbol-id-times}{\times} (C\inter D)$ by Definition 7, Proposition 61.

LaTeX source
\begin{proof}
    $w\in A\times C$.
    Take $a, c$ such that $w = (a, c)$.
    $a\in A, B$ by \cref{inter,times_tuple_elim}.
    $c\in C, D$ by \cref{inter,times_tuple_elim}.
    Thus $(a,c) \in (A\inter B)\times (C\inter D)$ by \cref{times,inter_intro}.
\end{proof}
Proposition 147
inter_times

$(A\inter B)\class{latex-symbol-tip latex-symbol-id-times}{\times} (C\inter D) = (A\class{latex-symbol-tip latex-symbol-id-times}{\times} C)\inter (B\class{latex-symbol-tip latex-symbol-id-times}{\times} D)$.

LaTeX source
\begin{proposition}
\label{inter_times}
    $(A\inter B)\times (C\inter D) = (A\times C)\inter (B\times D)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 148
inter_times_right

$(X\inter Y)\class{latex-symbol-tip latex-symbol-id-times}{\times} Z = (X\class{latex-symbol-tip latex-symbol-id-times}{\times} Z)\inter (Y\class{latex-symbol-tip latex-symbol-id-times}{\times} Z)$.

LaTeX source
\begin{proposition}
\label{inter_times_right}
    $(X\inter Y)\times Z = (X\times Z)\inter (Y\times Z)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 149
inter_times_left

$X\class{latex-symbol-tip latex-symbol-id-times}{\times} (Y\inter Z) = (X\class{latex-symbol-tip latex-symbol-id-times}{\times} Y)\inter (X\class{latex-symbol-tip latex-symbol-id-times}{\times} Z)$.

LaTeX source
\begin{proposition}
\label{inter_times_left}
    $X\times (Y\inter Z) = (X\times Y)\inter (X\times Z)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 150
union_times_intro

Suppose $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(A\union B)\class{latex-symbol-tip latex-symbol-id-times}{\times} (C\union D)$.
Then $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(A\class{latex-symbol-tip latex-symbol-id-times}{\times} C)\union (B\class{latex-symbol-tip latex-symbol-id-times}{\times} D)\union (A\class{latex-symbol-tip latex-symbol-id-times}{\times} D)\union (B\class{latex-symbol-tip latex-symbol-id-times}{\times} C)$.

LaTeX source
\begin{proposition}
\label{union_times_intro}
    Suppose $w\in(A\union B)\times (C\union D)$.
    Then $w\in(A\times C)\union (B\times D)\union (A\times D)\union (B\times C)$.
\end{proposition}
Proof

Take $a,c$ such that $w = (a, c)$.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ or $a\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ by Axiom 5, Proposition 114.
$c\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ or $c\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ by Axiom 5, Proposition 114.
Thus $(a, c)\class{latex-symbol-tip latex-symbol-id-in}{\in} (A\class{latex-symbol-tip latex-symbol-id-times}{\times} C)$ or $(a, c)\class{latex-symbol-tip latex-symbol-id-in}{\in} (B\class{latex-symbol-tip latex-symbol-id-times}{\times} D)$ or $(a, c)\class{latex-symbol-tip latex-symbol-id-in}{\in} (A\class{latex-symbol-tip latex-symbol-id-times}{\times} D)$ or $(a, c)\class{latex-symbol-tip latex-symbol-id-in}{\in} (B\class{latex-symbol-tip latex-symbol-id-times}{\times} C)$.
Thus $(a, c)\class{latex-symbol-tip latex-symbol-id-in}{\in} (A\class{latex-symbol-tip latex-symbol-id-times}{\times} C)\union (B\class{latex-symbol-tip latex-symbol-id-times}{\times} D)\union (A\class{latex-symbol-tip latex-symbol-id-times}{\times} D)\union (B\class{latex-symbol-tip latex-symbol-id-times}{\times} C)$.

LaTeX source
\begin{proof}
    Take $a,c$ such that $w = (a, c)$.
    $a\in A$ or $a\in B$ by \cref{union_iff,times_tuple_elim}.
    $c\in C$ or $c\in D$ by \cref{union_iff,times_tuple_elim}.
    Thus $(a, c)\in (A\times C)$ or $(a, c)\in (B\times D)$ or $(a, c)\in (A\times D)$ or $(a, c)\in (B\times C)$.
    Thus $(a, c)\in (A\times C)\union (B\times D)\union (A\times D)\union (B\times C)$.
\end{proof}
Proposition 151
union_times_elim

Suppose $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(A\class{latex-symbol-tip latex-symbol-id-times}{\times} C)\union (B\class{latex-symbol-tip latex-symbol-id-times}{\times} D)\union (A\class{latex-symbol-tip latex-symbol-id-times}{\times} D)\union (B\class{latex-symbol-tip latex-symbol-id-times}{\times} C)$.
Then $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(A\union B)\class{latex-symbol-tip latex-symbol-id-times}{\times} (C\union D)$.

LaTeX source
\begin{proposition}
\label{union_times_elim}
    Suppose $w\in(A\times C)\union (B\times D)\union (A\times D)\union (B\times C)$.
    Then $w\in(A\union B)\times (C\union D)$.
\end{proposition}
Proof
Case. $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(A\class{latex-symbol-tip latex-symbol-id-times}{\times} C)$.

Take $a, c$ such that $w = (a, c) \class{latex-symbol-tip latex-symbol-id-land}{\land} a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-land}{\land} c\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Definition 7.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\union B$ and $c\class{latex-symbol-tip latex-symbol-id-in}{\in} C\union D$.
Follows by Proposition 115.

Case. $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(B\class{latex-symbol-tip latex-symbol-id-times}{\times} D)$.

Take $b, d$ such that $w = (b, d) \class{latex-symbol-tip latex-symbol-id-land}{\land} b\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-land}{\land} d\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ by Definition 7.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in} A\union B$ and $d\class{latex-symbol-tip latex-symbol-id-in}{\in} C\union D$.
Follows by Proposition 115.

Case. $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(A\class{latex-symbol-tip latex-symbol-id-times}{\times} D)$.

Take $a, d$ such that $w = (a, d) \class{latex-symbol-tip latex-symbol-id-land}{\land} a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-land}{\land} d\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ by Definition 7.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\union B$ and $d\class{latex-symbol-tip latex-symbol-id-in}{\in} C\union D$.
Follows by Proposition 115.

Case. $w\class{latex-symbol-tip latex-symbol-id-in}{\in}(B\class{latex-symbol-tip latex-symbol-id-times}{\times} C)$.

Take $b, c$ such that $w = (b, c) \class{latex-symbol-tip latex-symbol-id-land}{\land} b\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-land}{\land} c\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Definition 7.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in} A\union B$ and $c\class{latex-symbol-tip latex-symbol-id-in}{\in} C\union D$.
Follows by Proposition 115.

LaTeX source
\begin{byCase}
        \caseOf{$w\in(A\times C)$.}
            Take $a, c$ such that $w = (a, c) \land a\in A\land c\in C$ by \cref{times}.
            Then $a\in A\union B$ and $c\in C\union D$.
            Follows by \cref{times_tuple_intro}.
        \caseOf{$w\in(B\times D)$.}
            Take $b, d$ such that $w = (b, d) \land b\in B\land d\in D$ by \cref{times}.
            Then $b\in A\union B$ and $d\in C\union D$.
            Follows by \cref{times_tuple_intro}.
        \caseOf{$w\in(A\times D)$.}
            Take $a, d$ such that $w = (a, d) \land a\in A\land d\in D$ by \cref{times}.
            Then $a\in A\union B$ and $d\in C\union D$.
            Follows by \cref{times_tuple_intro}.
        \caseOf{$w\in(B\times C)$.}
            Take $b, c$ such that $w = (b, c) \land b\in B\land c\in C$ by \cref{times}.
            Then $b\in A\union B$ and $c\in C\union D$.
            Follows by \cref{times_tuple_intro}.
    
\end{byCase}
LaTeX source
\begin{proof}
    \begin{byCase}
        \caseOf{$w\in(A\times C)$.}
            Take $a, c$ such that $w = (a, c) \land a\in A\land c\in C$ by \cref{times}.
            Then $a\in A\union B$ and $c\in C\union D$.
            Follows by \cref{times_tuple_intro}.
        \caseOf{$w\in(B\times D)$.}
            Take $b, d$ such that $w = (b, d) \land b\in B\land d\in D$ by \cref{times}.
            Then $b\in A\union B$ and $d\in C\union D$.
            Follows by \cref{times_tuple_intro}.
        \caseOf{$w\in(A\times D)$.}
            Take $a, d$ such that $w = (a, d) \land a\in A\land d\in D$ by \cref{times}.
            Then $a\in A\union B$ and $d\in C\union D$.
            Follows by \cref{times_tuple_intro}.
        \caseOf{$w\in(B\times C)$.}
            Take $b, c$ such that $w = (b, c) \land b\in B\land c\in C$ by \cref{times}.
            Then $b\in A\union B$ and $c\in C\union D$.
            Follows by \cref{times_tuple_intro}.
    \end{byCase}
\end{proof}
Proposition 152
union_times

$(A\union B)\class{latex-symbol-tip latex-symbol-id-times}{\times} (C\union D) = (A\class{latex-symbol-tip latex-symbol-id-times}{\times} C)\union (B\class{latex-symbol-tip latex-symbol-id-times}{\times} D)\union (A\class{latex-symbol-tip latex-symbol-id-times}{\times} D)\union (B\class{latex-symbol-tip latex-symbol-id-times}{\times} C)$.

LaTeX source
\begin{proposition}
\label{union_times}
    $(A\union B)\times (C\union D) = (A\times C)\union (B\times D)\union (A\times D)\union (B\times C)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 153
union_times_left

$(X\union Y)\class{latex-symbol-tip latex-symbol-id-times}{\times} Z = (X\class{latex-symbol-tip latex-symbol-id-times}{\times} Z)\union (Y\class{latex-symbol-tip latex-symbol-id-times}{\times} Z)$.

LaTeX source
\begin{proposition}
\label{union_times_left}
    $(X\union Y)\times Z = (X\times Z)\union (Y\times Z)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 154
union_times_right

$X\class{latex-symbol-tip latex-symbol-id-times}{\times} (Y\union Z) = (X\class{latex-symbol-tip latex-symbol-id-times}{\times} Y)\union (X\class{latex-symbol-tip latex-symbol-id-times}{\times} Z)$.

LaTeX source
\begin{proposition}
\label{union_times_right}
    $X\times (Y\union Z) = (X\times Y)\union (X\times Z)$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}

Powerset

Abbreviation 14
powerset_of

The powerset of $X$ denotes $\pow{X}$.

LaTeX source
\begin{abbreviation}
\label{powerset_of}
    The powerset of $X$ denotes $\pow{X}$.
\end{abbreviation}
Axiom 12
pow_iff

$B\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{A}$ iff $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.

LaTeX source
\begin{axiom}
\label{pow_iff}
    $B\in\pow{A}$ iff $B\subseteq A$.
\end{axiom}
Proposition 155
powerset_intro

Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $A\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{B}$.

LaTeX source
\begin{proposition}
\label{powerset_intro}
    Suppose $A\subseteq B$.
    Then $A\in\pow{B}$.
\end{proposition}
Proposition 156
powerset_elim

Let $A\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{B}$.
Then $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.

LaTeX source
\begin{proposition}
\label{powerset_elim}
    Let $A\in\pow{B}$.
    Then $A\subseteq B$.
\end{proposition}
Proposition 157
powerset_bottom

$\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{A}$.

LaTeX source
\begin{proposition}
\label{powerset_bottom}
    $\emptyset\in\pow{A}$.
\end{proposition}
Proposition 158
powerset_top

$A\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{A}$.

LaTeX source
\begin{proposition}
\label{powerset_top}
    $A\in\pow{A}$.
\end{proposition}
Proposition 159
unions_subseteq_of_powerset_is_subseteq

Let $A$ be a set.
Let $B$ be a subset of $\pow{A}$.
Then $\unions{B}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.

LaTeX source
\begin{proposition}
\label{unions_subseteq_of_powerset_is_subseteq}
    Let $A$ be a set.
    Let $B$ be a subset of $\pow{A}$.
    Then $\unions{B}\subseteq A$.
\end{proposition}
Proof

Follows by Axiom 4, Definition 1, Proposition 156.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,powerset_elim,unions_iff}.
\end{proof}
Corollary 2
powerset_closed_unions

Let $A$ be a set.
Let $B$ be a subset of $\pow{A}$.
Then $\unions{B}\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{A}$.

LaTeX source
\begin{corollary}
\label{powerset_closed_unions}
    Let $A$ be a set.
    Let $B$ be a subset of $\pow{A}$.
    Then $\unions{B}\in\pow{A}$.
\end{corollary}
Proof

Follows by Axiom 12, Proposition 159.

LaTeX source
\begin{proof}
    Follows by \cref{pow_iff,unions_subseteq_of_powerset_is_subseteq}.
\end{proof}
Proposition 160
inter_powerset

Let $A,B\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{C}$.
Then $A\inter B\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{C}$.

LaTeX source
\begin{proposition}
\label{inter_powerset}
    Let $A,B\in\pow{C}$.
    Then $A\inter B\in\pow{C}$.
\end{proposition}
Proof

We have $A,B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ by Axiom 12.
$A\inter B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ by Proposition 78.
Follows by Axiom 12.

LaTeX source
\begin{proof}
    We have $A,B\subseteq C$ by \cref{pow_iff}.
    $A\inter B\subseteq C$ by \cref{inter_subseteq}.
    Follows by \cref{pow_iff}.
\end{proof}
Proposition 161
unions_powerset

$\unions{\pow{A}} = A$.

LaTeX source
\begin{proposition}
\label{unions_powerset}
    $\unions{\pow{A}} = A$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 162
inters_powerset

$\inters{\pow{A}} = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{inters_powerset}
    $\inters{\pow{A}} = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 163
union_powersets_subseteq

$\pow{A}\union\pow{B} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \pow{A\union B}$.

LaTeX source
\begin{proposition}
\label{union_powersets_subseteq}
    $\pow{A}\union\pow{B} \subseteq \pow{A\union B}$.
\end{proposition}
Proof

$\pow{A}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \pow{A}\union\pow{B}$ by Proposition 46.
$\pow{B}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \pow{A}\union\pow{B}$ by Proposition 47.
Follows by Axiom 5, Axiom 12, Definition 1, Proposition 8, Proposition 156.

LaTeX source
\begin{proof}
    $\pow{A}\subseteq \pow{A}\union\pow{B}$ by \cref{union_upper_left}.
    $\pow{B}\subseteq \pow{A}\union\pow{B}$ by \cref{union_upper_right}.
    Follows by \cref{subseteq,pow_iff,powerset_elim,union_iff,subset_transitive}.
\end{proof}
Proposition 164
powerset_emptyset

$\pow{\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}} = \{\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}\}$.

LaTeX source
\begin{proposition}
\label{powerset_emptyset}
    $\pow{\emptyset} = \{\emptyset\}$.
\end{proposition}
Proposition 165
powerset_union_subseteq

$\pow{A}\union\pow{B}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \pow{A\union B}$.

LaTeX source
\begin{proposition}
\label{powerset_union_subseteq}
    $\pow{A}\union\pow{B}\subseteq \pow{A\union B}$.
\end{proposition}
Proposition 166
subseteq_pow_unions

$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\pow{\unions{A}}$.

LaTeX source
\begin{proposition}
\label{subseteq_pow_unions}
    $A\subseteq\pow{\unions{A}}$.
\end{proposition}
Proof

Follows by Axiom 12, Definition 1, Proposition 27.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,pow_iff,unions_intro}.
\end{proof}
Proposition 167
unions_pow

$\unions{\pow{A}} = A$.

LaTeX source
\begin{proposition}
\label{unions_pow}
    $\unions{\pow{A}} = A$.
\end{proposition}
Proposition 168
unions_elem_pow_iff

$\unions{A}\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{B}$ iff $A\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{\pow{B}}$.

LaTeX source
\begin{proposition}
\label{unions_elem_pow_iff}
    $\unions{A}\in\pow{B}$ iff $A\in\pow{\pow{B}}$.
\end{proposition}
Proposition 169
pow_inter

$\pow{A\inter B} = \pow{A}\inter\pow{B}$.

LaTeX source
\begin{proposition}
\label{pow_inter}
    $\pow{A\inter B} = \pow{A}\inter\pow{B}$.
\end{proposition}
Proof

Follows by Axiom 1 [Set extensionality], Axiom 12, Definition 5, Proposition 72.

LaTeX source
\begin{proof}
    Follows by \cref{setext,inter,pow_iff,subseteq_inter_iff}.
\end{proof}

Bipartitions

Abbreviation 15
bipartitions

$C$ is partitioned by $A$ and $B$ iff $A,B\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $A$ is disjoint from $B$ and $A\union B = C$.

LaTeX source
\begin{abbreviation}
\label{bipartitions}
    $C$ is partitioned by $A$ and $B$ iff $A,B\neq\emptyset$ and $A$ is disjoint from $B$ and $A\union B = C$.
\end{abbreviation}
Definition 9
bipartitions_of_a_set

$\bipartitions{X} = \{ p\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}\class{latex-symbol-tip latex-symbol-id-times}{\times}\pow{X}\mid \text{$X$ is partitioned by $\fst{p}$ and $\snd{p}$}\}$.

LaTeX source
\begin{definition}
\label{bipartitions_of_a_set}
    $\bipartitions{X} = \{ p\in\pow{X}\times\pow{X}\mid \text{$X$ is partitioned by $\fst{p}$ and $\snd{p}$}\}$.
\end{definition}
Abbreviation 16
is_a_bipartition_of

$P$ is a bipartition of $X$ iff $P\class{latex-symbol-tip latex-symbol-id-in}{\in}\bipartitions{X}$.

LaTeX source
\begin{abbreviation}
\label{is_a_bipartition_of}
    $P$ is a bipartition of $X$ iff $P\in\bipartitions{X}$.
\end{abbreviation}
Proposition 170
bipartition_intro

Suppose $C$ is partitioned by $A$ and $B$.
Then $(A, B)$ is a bipartition of $C$.

LaTeX source
\begin{proposition}
\label{bipartition_intro}
    Suppose $C$ is partitioned by $A$ and $B$.
    Then $(A, B)$ is a bipartition of $C$.
\end{proposition}
Proof

$(A,B)\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{C}\class{latex-symbol-tip latex-symbol-id-times}{\times}\pow{C}$.
$C$ is partitioned by $\fst{(A,B)}$ and $\snd{(A,B)}$.
Thus $(A, B)$ is a bipartition of $C$ by Definition 9.

LaTeX source
\begin{proof}
    $(A,B)\in\pow{C}\times\pow{C}$.
    $C$ is partitioned by $\fst{(A,B)}$ and $\snd{(A,B)}$.
    Thus $(A, B)$ is a bipartition of $C$ by \cref{bipartitions_of_a_set}.
\end{proof}
Proposition 171
bipartition_elim

Suppose $(A, B)$ is a bipartition of $C$.
Then $C$ is partitioned by $A$ and $B$.

LaTeX source
\begin{proposition}
\label{bipartition_elim}
    Suppose $(A, B)$ is a bipartition of $C$.
    Then $C$ is partitioned by $A$ and $B$.
\end{proposition}
Proof

$\fst{(A, B)} = A$.
$\snd{(A, B)} = B$.

LaTeX source
\begin{proof}
    $\fst{(A, B)} = A$.
    $\snd{(A, B)} = B$.
\end{proof}
Proposition 172
bipartitions_emptyset

$\bipartitions{\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}}$ is empty.

LaTeX source
\begin{proposition}
\label{bipartitions_emptyset}
    $\bipartitions{\emptyset}$ is empty.
\end{proposition}
Proposition 173
union_eq_cons_implies_union_remove_eq

Suppose $d\class{latex-symbol-tip latex-symbol-id-notin}{\notin} C$.
Suppose $A\union B = \cons{d}{C}$.
Suppose $A, B\class{latex-symbol-tip latex-symbol-id-neq}{\neq} \{d\}$.
Then $\remove{d}{A}\union \remove{d}{B} = C$.

LaTeX source
\begin{proposition}
\label{union_eq_cons_implies_union_remove_eq}
    Suppose $d\notin C$.
    Suppose $A\union B = \cons{d}{C}$.
    Suppose $A, B\neq \{d\}$.
    Then $\remove{d}{A}\union \remove{d}{B} = C$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Proposition 174
bipartitions_cons

Suppose $d\class{latex-symbol-tip latex-symbol-id-notin}{\notin} C$.
Suppose $\cons{d}{C}$ is partitioned by $A$ and $B$.
Suppose $A, B\class{latex-symbol-tip latex-symbol-id-neq}{\neq} \{d\}$.
Then $C$ is partitioned by $\remove{d}{A}$ and $\remove{d}{B}$.

LaTeX source
\begin{proposition}
\label{bipartitions_cons}
    Suppose $d\notin C$.
    Suppose $\cons{d}{C}$ is partitioned by $A$ and $B$.
    Suppose $A, B\neq \{d\}$.
    Then $C$ is partitioned by $\remove{d}{A}$ and $\remove{d}{B}$.
\end{proposition}
Proof

$\remove{d}{A},\remove{d}{B}\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
$\remove{d}{A}\union \remove{d}{B} = C$ by Proposition 173.

LaTeX source
\begin{proof}
    $\remove{d}{A},\remove{d}{B}\neq\emptyset$.
    $\remove{d}{A}\union \remove{d}{B} = C$ by \cref{union_eq_cons_implies_union_remove_eq}.
\end{proof}

Partitions

Definition 10
partition

$P$ is a partition iff $\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}\class{latex-symbol-tip latex-symbol-id-notin}{\notin} P$ and for all $B, C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ such that $B\class{latex-symbol-tip latex-symbol-id-neq}{\neq} C$ we have $B$ is disjoint from $C$.

LaTeX source
\begin{definition}
\label{partition}
    $P$ is a partition iff
    $\emptyset\notin P$ and
    for all $B, C\in P$ such that $B\neq C$ we have $B$ is disjoint from $C$.
\end{definition}
Abbreviation 17
partition_of

$P$ is a partition of $A$ iff $P$ is a partition and $\unions{P} = A$.

LaTeX source
\begin{abbreviation}
\label{partition_of}
    $P$ is a partition of $A$ iff
    $P$ is a partition and
    $\unions{P} = A$.
\end{abbreviation}
Proposition 175
partition_emptyset

$\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ is a partition of $\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{proposition}
\label{partition_emptyset}
    $\emptyset$ is a partition of $\emptyset$.
\end{proposition}
Definition 11
partition_refinement

$P'$ is a refinement of $P$ iff for every $A'\class{latex-symbol-tip latex-symbol-id-in}{\in} P'$ there exists $A\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ such that $A'\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.

LaTeX source
\begin{definition}
\label{partition_refinement}
    $P'$ is a refinement of $P$ iff
    for every $A'\in P'$ there exists
    $A\in P$ such that $A'\subseteq A$.
\end{definition}
Abbreviation 18
partition_refines

$P'\refines P$ iff $P'$ is a refinement of $P$.

LaTeX source
\begin{abbreviation}
\label{partition_refines}
    $P'\refines P$ iff
    $P'$ is a refinement of $P$.
\end{abbreviation}
Proposition 176
partition_refinement_transitive

Suppose $P''\refines P'\refines P$.
Then $P''\refines P$.

LaTeX source
\begin{proposition}
\label{partition_refinement_transitive}
    Suppose $P''\refines P'\refines P$.
    Then $P''\refines P$.
\end{proposition}
Proof

It suffices to show that for all $A''\class{latex-symbol-tip latex-symbol-id-in}{\in} P''$ there exists $A\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ such that $A''\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.
Fix $A''\class{latex-symbol-tip latex-symbol-id-in}{\in} P''$.
Take $A'\class{latex-symbol-tip latex-symbol-id-in}{\in} P'$ such that $A''\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A'$ by Definition 11.
Take $A\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ such that $A'\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.
Then $A''\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.
Follows by definition.

LaTeX source
\begin{proof}
    It suffices to show that for all $A''\in P''$ there exists $A\in P$ such that $A''\subseteq A$.
    Fix $A''\in P''$.
    Take $A'\in P'$ such that $A''\subseteq A'$
        by \cref{partition_refinement}.
    Take $A\in P$ such that $A'\subseteq A$.
    Then $A''\subseteq A$.
    Follows by definition. 
\end{proof}