Topology (Munkres)

Standard Library: Relations

Definition 12
relation

$R$ is a relation iff for all $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ there exists $x, y$ such that $w = (x, y)$.

LaTeX source
\begin{definition}
\label{relation}
    $R$ is a relation iff
    for all $w\in R$ there exists $x, y$ such that $w = (x, y)$.
\end{definition}
Definition 13
comparable

$a$ is comparable with $b$ in $R$ iff $a\mathrel{R}b$ or $b\mathrel{R}a$.

LaTeX source
\begin{definition}
\label{comparable}
    $a$ is comparable with $b$ in $R$ iff $a\mathrel{R}b$ or $b\mathrel{R}a$.
\end{definition}
Proposition 177
relext

Let $R, S$ be relations.
Suppose for all $x,y$ we have $x\mathrel{R} y$ iff $x\mathrel{S} y$.
Then $R = S$.

LaTeX source
\begin{proposition}
\label{relext}
    Let $R, S$ be relations.
    Suppose for all $x,y$ we have $x\mathrel{R} y$ iff $x\mathrel{S} y$.
    Then $R = S$.
\end{proposition}
Proof

Follows by set extensionality.

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

$F$ is a family of relations iff every element of $F$ is a relation.

LaTeX source
\begin{abbreviation}
\label{family_of_relations}
    $F$ is a family of relations iff
    every element of $F$ is a relation.
\end{abbreviation}
Proposition 178
unions_of_family_of_relations_is_relation

Let $F$ be a family of relations.
Then $\unions{F}$ is a relation.

LaTeX source
\begin{proposition}
\label{unions_of_family_of_relations_is_relation}
    Let $F$ be a family of relations.
    Then $\unions{F}$ is a relation.
\end{proposition}
Proposition 179
inters_of_family_of_relations_is_relation

Let $F$ be a family of relations.
Then $\inters{F}$ is a relation.

LaTeX source
\begin{proposition}
\label{inters_of_family_of_relations_is_relation}
    Let $F$ be a family of relations.
    Then $\inters{F}$ is a relation.
\end{proposition}
Proposition 180
union_relations_is_relation

Let $R, S$ be relations.
Then $R\union S$ is a relation.

LaTeX source
\begin{proposition}
\label{union_relations_is_relation}
    Let $R, S$ be relations.
    Then $R\union S$ is a relation.
\end{proposition}
Proposition 181
union_relations_is_relation_type

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

LaTeX source
\begin{proposition}
\label{union_relations_is_relation_type}
    Suppose $R\subseteq A\times B$.
    Suppose $S\subseteq C\times D$.
    Then $R\union S\subseteq (A\union C)\times (B\union D)$.
\end{proposition}
Proof

Follows by Axiom 5, Definition 1, Proposition 48, Proposition 151.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,union_times_elim,union_iff,union_subseteq_union}.
\end{proof}
Proposition 182
inter_relations_is_relation

Let $R, S$ be relations.
Then $R\inter S$ is a relation.

LaTeX source
\begin{proposition}
\label{inter_relations_is_relation}
    Let $R, S$ be relations.
    Then $R\inter S$ is a relation.
\end{proposition}
Proposition 183
setminus_relations_is_relation

Let $R, S$ be relations.
Then $R\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} S$ is a relation.

LaTeX source
\begin{proposition}
\label{setminus_relations_is_relation}
    Let $R, S$ be relations.
    Then $R\setminus S$ is a relation.
\end{proposition}

Converse of a relation

Definition 14
converse_relation

$\converse{R} = \{ z\mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} w\class{latex-symbol-tip latex-symbol-id-in}{\in} R. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} x, y. w = (x, y)\class{latex-symbol-tip latex-symbol-id-land}{\land} z = (y, x)\}$.

LaTeX source
\begin{definition}
\label{converse_relation}
    $\converse{R} = \{ z\mid \exists w\in R. \exists x, y. w = (x, y)\land z = (y, x)\}$.
\end{definition}
Proposition 184
converse_intro

If $y\mathrel{R} x$, then $x\mathrel{\converse{R}} y$.

LaTeX source
\begin{proposition}
\label{converse_intro}
    If $y\mathrel{R} x$, then $x\mathrel{\converse{R}} y$.
\end{proposition}
Proposition 185
converse_elim

If $x\mathrel{\converse{R}} y$, then $y\mathrel{R} x$.

LaTeX source
\begin{proposition}
\label{converse_elim}
    If $x\mathrel{\converse{R}} y$, then $y\mathrel{R} x$.
\end{proposition}
Proposition 186
converse_iff

$x\mathrel{\converse{R}} y$ iff $y\mathrel{R} x$.

LaTeX source
\begin{proposition}
\label{converse_iff}
    $x\mathrel{\converse{R}} y$ iff $y\mathrel{R} x$.
\end{proposition}
Proposition 187
converse_is_relation

$\converse{R}$ is a relation.

LaTeX source
\begin{proposition}
\label{converse_is_relation}
    $\converse{R}$ is a relation.
\end{proposition}
Proposition 188
converse_converse_iff

$x \mathrel{\converse{\converse{R}}} y$ iff $x\mathrel{R} y$.

LaTeX source
\begin{proposition}
\label{converse_converse_iff}
    $x \mathrel{\converse{\converse{R}}} y$ iff $x\mathrel{R} y$.
\end{proposition}
Proposition 189
converse_converse_eq

Let $R$ be a relation.
Then $\converse{\converse{R}} = R$.

LaTeX source
\begin{proposition}
\label{converse_converse_eq}
    Let $R$ be a relation.
    Then $\converse{\converse{R}} = R$.
\end{proposition}
Proof

Follows by set extensionality.

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

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

LaTeX source
\begin{proposition}
\label{converse_type}
    Suppose $R\subseteq A\times B$.
    Then $\converse{R}\subseteq B\times A$.
\end{proposition}
Proof

It suffices to show that every element of $\converse{R}$ is an element of $B\class{latex-symbol-tip latex-symbol-id-times}{\times} A$ by Definition 1.
Fix $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{R}$.
Take $x, y$ such that $w = (y, x)$ and $x\mathrel{R} y$ by Definition 14.
Now $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$ by Definition 1.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ by Proposition 114.
Hence $(y,x)\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-times}{\times} A$ by Proposition 115.

LaTeX source
\begin{proof}
    It suffices to show that every element of $\converse{R}$ is an element of $B\times A$
        by \cref{subseteq}.
    Fix $w\in\converse{R}$.
    Take $x, y$ such that $w = (y, x)$ and $x\mathrel{R} y$ by \cref{converse_relation}.
    Now $(x,y)\in A\times B$ by \cref{subseteq}.
    Thus $x\in A$ and $y\in B$ by \cref{times_tuple_elim}.
    Hence $(y,x)\in B\times A$ by \cref{times_tuple_intro}.
\end{proof}
Proposition 191
converse_times

Then $\converse{B\class{latex-symbol-tip latex-symbol-id-times}{\times} A} = A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.

LaTeX source
\begin{proposition}
\label{converse_times}
    Then $\converse{B\times A} = A\times B$.
\end{proposition}
Proof

For all $w$ we have $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{B\class{latex-symbol-tip latex-symbol-id-times}{\times} A}$ iff $w\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$ by Definition 7, Definition 14, Proposition 114, Proposition 121.
Follows byAxiom 1 [Set extensionality].

LaTeX source
\begin{proof}
    For all $w$ we have $w\in\converse{B\times A}$ iff $w\in A\times B$
        by \cref{converse_relation,times,times_elem_is_tuple,times_tuple_elim}.
    Follows by\cref{setext}.
    
\end{proof}
Proposition 192
converse_emptyset

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

LaTeX source
\begin{proposition}
\label{converse_emptyset}
    Then $\converse{\emptyset} = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

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

Let $R$ be a relation.
If $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} S$, then $\converse{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\converse{S}$.

LaTeX source
\begin{proposition}
\label{converse_subseteq_intro}
    Let $R$ be a relation.
    If $R\subseteq S$, then $\converse{R}\subseteq\converse{S}$.
\end{proposition}
Proof

Follows by Definition 1, Definition 12, Definition 14.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,converse_relation,relation}.
\end{proof}
Proposition 194
converse_subseteq_elim

Let $R$ be a relation.
If $\converse{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\converse{S}$, then $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} S$.

LaTeX source
\begin{proposition}
\label{converse_subseteq_elim}
    Let $R$ be a relation.
    If $\converse{R}\subseteq\converse{S}$, then $R\subseteq S$.
\end{proposition}
Proof

Follows by Definition 1, Definition 12, Definition 14, Proposition 188, Proposition 193.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,converse_relation,relation,converse_subseteq_intro,converse_converse_iff}.
\end{proof}
Proposition 195
converse_subseteq_iff

Let $R$ be a relation.
$\converse{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\converse{S}$ iff $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} S$.

LaTeX source
\begin{proposition}
\label{converse_subseteq_iff}
    Let $R$ be a relation.
    $\converse{R}\subseteq\converse{S}$ iff $R\subseteq S$.
\end{proposition}
Proof

Follows by Proposition 193, Proposition 194.

LaTeX source
\begin{proof}
    Follows by \cref{converse_subseteq_elim,converse_subseteq_intro}.
\end{proof}
Proposition 196
converse_union

$\converse{(R\union S)} = \converse{R}\union\converse{S}$.

LaTeX source
\begin{proposition}
\label{converse_union}
    $\converse{(R\union S)} = \converse{R}\union\converse{S}$.
\end{proposition}
Proof

$\converse{(R\union S)}$ is a relation by Proposition 187.
$\converse{R}\union\converse{S}$ is a relation by Proposition 180, Proposition 187.
For all $a,b$ we have $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{(R\union S)}$ iff $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{R}\union\converse{S}$ by Axiom 5, Proposition 186.
Follows by Proposition 177.

LaTeX source
\begin{proof}
    $\converse{(R\union S)}$ is a relation by \cref{converse_is_relation}.
    $\converse{R}\union\converse{S}$ is a relation by \cref{converse_is_relation,union_relations_is_relation}.
    For all $a,b$ we have $(a,b)\in\converse{(R\union S)}$ iff $(a,b)\in\converse{R}\union\converse{S}$
        by \cref{union_iff,converse_iff}.
    Follows by \cref{relext}.
\end{proof}
Proposition 197
converse_inter

$\converse{(R\inter S)} = \converse{R}\inter\converse{S}$.

LaTeX source
\begin{proposition}
\label{converse_inter}
    $\converse{(R\inter S)} = \converse{R}\inter\converse{S}$.
\end{proposition}
Proof

$\converse{(R\inter S)}$ is a relation by Proposition 187.
$\converse{R}\inter\converse{S}$ is a relation by Proposition 182, Proposition 187.
For all $a,b$ we have $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{(R\inter S)}$ iff $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{R}\inter\converse{S}$ by Definition 5, Proposition 186.
Follows by Proposition 177.

LaTeX source
\begin{proof}
    $\converse{(R\inter S)}$ is a relation by \cref{converse_is_relation}.
    $\converse{R}\inter\converse{S}$ is a relation by \cref{converse_is_relation,inter_relations_is_relation}.
    For all $a,b$ we have $(a,b)\in\converse{(R\inter S)}$ iff $(a,b)\in\converse{R}\inter\converse{S}$
        by \cref{inter,converse_iff}.
    Follows by \cref{relext}.
\end{proof}
Proposition 198
converse_setminus

$\converse{(R\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} S)} = \converse{R}\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\converse{S}$.

LaTeX source
\begin{proposition}
\label{converse_setminus}
    $\converse{(R\setminus S)} = \converse{R}\setminus\converse{S}$.
\end{proposition}
Proof

$\converse{(R\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} S)}$ is a relation by Proposition 187.
$\converse{R}\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\converse{S}$ is a relation by Proposition 183, Proposition 187.
For all $a,b$ we have $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{(R\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} S)}$ iff $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{R}\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\converse{S}$.
Follows by Proposition 177.

LaTeX source
\begin{proof}
    $\converse{(R\setminus S)}$ is a relation by \cref{converse_is_relation}.
    $\converse{R}\setminus\converse{S}$ is a relation by \cref{converse_is_relation,setminus_relations_is_relation}.
    For all $a,b$ we have $(a,b)\in\converse{(R\setminus S)}$ iff $(a,b)\in\converse{R}\setminus\converse{S}$.
    Follows by \cref{relext}.
\end{proof}
Domain of a relation
Definition 15
dom

$\dom{R} = \{ x\mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} w\class{latex-symbol-tip latex-symbol-id-in}{\in} R. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} y. w = (x, y)\}$.

LaTeX source
\begin{definition}
\label{dom}
    $\dom{R} = \{ x\mid \exists w\in R. \exists y. w = (x, y)\}$.
\end{definition}
Proposition 199
dom_iff

$a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{R}$ iff there exists $b$ such that $a\mathrel{R} b$.

LaTeX source
\begin{proposition}
\label{dom_iff}
    $a\in\dom{R}$ iff there exists $b$ such that $a\mathrel{R} b$.
\end{proposition}
Proposition 200
dom_intro

Suppose $a\mathrel{R} b$.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{R}$.

LaTeX source
\begin{proposition}
\label{dom_intro}
    Suppose $a\mathrel{R} b$.
    Then $a\in\dom{R}$.
\end{proposition}
Proof

Follows by Proposition 199.

LaTeX source
\begin{proof}
    Follows by \cref{dom_iff}.
\end{proof}
Proposition 201
dom_emptyset

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

LaTeX source
\begin{proposition}
\label{dom_emptyset}
    $\dom{\emptyset} = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

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

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

LaTeX source
\begin{proposition}
\label{dom_times}
    $\dom{(A\times B)}\subseteq A$.
\end{proposition}
Proposition 203
dom_times_inhabited

Suppose $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
$\dom{(A\class{latex-symbol-tip latex-symbol-id-times}{\times} B)} = A$.

LaTeX source
\begin{proposition}
\label{dom_times_inhabited}
    Suppose $b\in B$.
    $\dom{(A\times B)} = A$.
\end{proposition}
Proof

Follows by set extensionality.

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

$\dom{\cons{(a,b)}{R}} = \cons{a}{\dom{R}}$.

LaTeX source
\begin{proposition}
\label{dom_cons}
    $\dom{\cons{(a,b)}{R}} = \cons{a}{\dom{R}}$.
\end{proposition}
Proof

Follows by set extensionality.

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

$\dom{(A\union B)} = \dom{A}\union\dom{B}$.

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

Follows by set extensionality.

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

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

LaTeX source
\begin{proposition}
\label{dom_inter}
    $\dom{(A\inter B)}\subseteq \dom{A}\inter\dom{B}$.
\end{proposition}
Proof

Follows by Definition 1, Definition 5, Proposition 199.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,inter,dom_iff}.
\end{proof}
Proposition 207
dom_setminus

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

LaTeX source
\begin{proposition}
\label{dom_setminus}
    $\dom{(A\setminus B)}\supseteq \dom{A}\setminus\dom{B}$.
\end{proposition}
Range of a relation
Definition 16
ran

$\ran{R} = \{ y\mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} w\class{latex-symbol-tip latex-symbol-id-in}{\in} R. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} x. w = (x, y)\}$.

LaTeX source
\begin{definition}
\label{ran}
    $\ran{R} = \{ y\mid \exists w\in R. \exists x. w = (x, y)\}$.
\end{definition}
Proposition 208
ran_iff

$b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{R}$ iff there exists $a$ such that $a\mathrel{R} b$.

LaTeX source
\begin{proposition}
\label{ran_iff}
    $b\in\ran{R}$ iff there exists $a$ such that $a\mathrel{R} b$.
\end{proposition}
Proposition 209
ran_intro

Suppose $a\mathrel{R} b$.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{R}$.

LaTeX source
\begin{proposition}
\label{ran_intro}
    Suppose $a\mathrel{R} b$.
    Then $b\in\ran{R}$.
\end{proposition}
Proof

Follows by Proposition 208.

LaTeX source
\begin{proof}
    Follows by \cref{ran_iff}.
\end{proof}
Proposition 210
ran_emptyset

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

LaTeX source
\begin{proposition}
\label{ran_emptyset}
    $\ran{\emptyset} = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

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

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

LaTeX source
\begin{proposition}
\label{ran_times}
    $\ran{(A\times B)}\subseteq B$.
\end{proposition}
Proposition 212
ran_times_inhabited

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
$\ran{(A\class{latex-symbol-tip latex-symbol-id-times}{\times} B)} = B$.

LaTeX source
\begin{proposition}
\label{ran_times_inhabited}
    Suppose $a\in A$.
    $\ran{(A\times B)} = B$.
\end{proposition}
Proof

Follows by set extensionality.

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

$\ran{(\cons{(a,b)}{R})} = \cons{b}{\ran{R}}$.

LaTeX source
\begin{proposition}
\label{ran_cons}
    $\ran{(\cons{(a,b)}{R})} = \cons{b}{\ran{R}}$.
\end{proposition}
Proof

Follows by set extensionality.

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

$\ran{(A\union B)} = \ran{A}\union\ran{B}$.

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

Follows by set extensionality.

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

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

LaTeX source
\begin{proposition}
\label{ran_inter}
    $\ran{(A\inter B)}\subseteq \ran{A}\inter\ran{B}$.
\end{proposition}
Proof

Follows by Definition 1, Definition 5, Proposition 208.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,inter,ran_iff}.
\end{proof}
Proposition 216
ran_setminus

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

LaTeX source
\begin{proposition}
\label{ran_setminus}
    $\ran{(A\setminus B)}\supseteq \ran{A}\setminus\ran{B}$.
\end{proposition}
Proof

Follows by Definition 1, Definition 6, Proposition 208.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,setminus,ran_iff}.
\end{proof}
Domain and range of converse
Proposition 217
dom_converse

$\dom{\converse{R}} = \ran{R}$.

LaTeX source
\begin{proposition}
\label{dom_converse}
    $\dom{\converse{R}} = \ran{R}$.
\end{proposition}
Proof

Follows by set extensionality.

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

$\ran{\converse{R}} = \dom{R}$.

LaTeX source
\begin{proposition}
\label{ran_converse}
    $\ran{\converse{R}} = \dom{R}$.
\end{proposition}
Proof

Follows by set extensionality.

LaTeX source
\begin{proof}
    Follows by set extensionality.
\end{proof}
Field of a relation
Definition 17
fld

$\fld{R} = \dom{R}\union\ran{R}$.

LaTeX source
\begin{definition}
\label{fld}
    $\fld{R} = \dom{R}\union\ran{R}$.
\end{definition}
Proposition 219
fld_iff

$c\class{latex-symbol-tip latex-symbol-id-in}{\in}\fld{R}$ iff there exists $d$ such that $c\mathrel{R}d$ or $d\mathrel{R}c$.

LaTeX source
\begin{proposition}
\label{fld_iff}
    $c\in\fld{R}$ iff there exists $d$ such that $c\mathrel{R}d$ or $d\mathrel{R}c$.
\end{proposition}
Proof

Follows by Axiom 5, Definition 17, Proposition 199, Proposition 208.

LaTeX source
\begin{proof}
    Follows by \cref{fld,dom_iff,ran_iff,union_iff}.
\end{proof}
Proposition 220
fld_intro_left

Suppose $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\fld{R}$.

LaTeX source
\begin{proposition}
\label{fld_intro_left}
    Suppose $(a,b)\in R$.
    Then $a\in\fld{R}$.
\end{proposition}
Proof

Follows by Axiom 5, Definition 15, Definition 17.

LaTeX source
\begin{proof}
    Follows by \cref{fld,dom,union_iff}.
\end{proof}
Proposition 221
fld_intro_right

Suppose $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\fld{R}$.

LaTeX source
\begin{proposition}
\label{fld_intro_right}
    Suppose $(a,b)\in R$.
    Then $b\in\fld{R}$.
\end{proposition}
Proof

Follows by Axiom 5, Definition 16, Definition 17.

LaTeX source
\begin{proof}
    Follows by \cref{fld,ran,union_iff}.
\end{proof}
Proposition 222
dom_subseteq_fld

Then $\dom{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\fld{R}$.

LaTeX source
\begin{proposition}
\label{dom_subseteq_fld}
    Then $\dom{R}\subseteq\fld{R}$.
\end{proposition}
Proof

Follows by Definition 17, Proposition 46.

LaTeX source
\begin{proof}
    Follows by \cref{fld,union_upper_left}.
\end{proof}
Proposition 223
ran_subseteq_fld

Then $\ran{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\fld{R}$.

LaTeX source
\begin{proposition}
\label{ran_subseteq_fld}
    Then $\ran{R}\subseteq\fld{R}$.
\end{proposition}
Proof

Follows by Definition 17, Proposition 47.

LaTeX source
\begin{proof}
    Follows by \cref{fld,union_upper_right}.
\end{proof}
Proposition 224
fld_times

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

LaTeX source
\begin{proposition}
\label{fld_times}
    $\fld{(A\times B)}\subseteq A\union B$.
\end{proposition}
Proof

Follows by Definition 17, Proposition 48, Proposition 202, Proposition 211.

LaTeX source
\begin{proof}
    Follows by \cref{fld,dom_times,ran_times,union_subseteq_union}.
\end{proof}
Proposition 225
relation_elem_times_fld

Let $R$ be a relation.
Suppose $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Then $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\fld{R}\class{latex-symbol-tip latex-symbol-id-times}{\times}\fld{R}$.

LaTeX source
\begin{proposition}
\label{relation_elem_times_fld}
    Let $R$ be a relation.
    Suppose $w\in R$.
    Then $w\in\fld{R}\times\fld{R}$.
\end{proposition}
Proof

Take $a,b$ such that $w = (a, b)$ by Definition 12.
Then $a,b\class{latex-symbol-tip latex-symbol-id-in}{\in}\fld{R}$ by Proposition 219.
Thus $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in}\fld{R}\class{latex-symbol-tip latex-symbol-id-times}{\times}\fld{R}$ by Proposition 115.

LaTeX source
\begin{proof}
    Take $a,b$ such that $w = (a, b)$ by \cref{relation}.
    Then $a,b\in\fld{R}$ by \cref{fld_iff}.
    Thus $(a,b)\in\fld{R}\times\fld{R}$ by \cref{times_tuple_intro}.
\end{proof}
Proposition 226
relation_subseteq_times_fld

Let $R$ be a relation.
Then $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\fld{R}\class{latex-symbol-tip latex-symbol-id-times}{\times}\fld{R}$.

LaTeX source
\begin{proposition}
\label{relation_subseteq_times_fld}
    Let $R$ be a relation.
    Then $R\subseteq\fld{R}\times\fld{R}$.
\end{proposition}
Proof

Follows by Definition 1, Proposition 225.

LaTeX source
\begin{proof}
    Follows by \cref{relation_elem_times_fld,subseteq}.
\end{proof}
Proposition 227
fld_universal

$\fld{(A\class{latex-symbol-tip latex-symbol-id-times}{\times} A)} = A$.

LaTeX source
\begin{proposition}
\label{fld_universal}
    $\fld{(A\times A)} = A$.
\end{proposition}
Proposition 228
fld_emptyset

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

LaTeX source
\begin{proposition}
\label{fld_emptyset}
    $\fld{\emptyset} = \emptyset$.
\end{proposition}
Proposition 229
fld_cons

$\fld{(\cons{(a,b)}{R})} = \cons{a}{\cons{b}{\fld{R}}}$.

LaTeX source
\begin{proposition}
\label{fld_cons}
    $\fld{(\cons{(a,b)}{R})} = \cons{a}{\cons{b}{\fld{R}}}$.
\end{proposition}
Proof

\begin{align*} \fld{(\cons{(a,b)}{R})} &= \dom{(\cons{(a,b)}{R})}\union\ran{(\cons{(a,b)}{R})} \explanation{by Definition 17}\\ &= \cons{a}{\dom{R}}\union\cons{b}{\ran{R}} \explanation{by Proposition 204, Proposition 213}\\ &= \cons{a}{\cons{b}{\dom{R}\union\ran{R}}} \explanation{by Proposition 41 [Commutativity of union], Proposition 57}\\ &= \cons{a}{\cons{b}{\fld{R}}} \explanation{by Definition 17} \end{align*}

LaTeX source
\begin{proof}
    \begin{align*}
        \fld{(\cons{(a,b)}{R})}
        &= \dom{(\cons{(a,b)}{R})}\union\ran{(\cons{(a,b)}{R})}
            \explanation{by \cref{fld}}\\
        &= \cons{a}{\dom{R}}\union\cons{b}{\ran{R}}
            \explanation{by \cref{dom_cons,ran_cons}}\\
        &= \cons{a}{\cons{b}{\dom{R}\union\ran{R}}}
            \explanation{by \cref{union_cons,union_comm}}\\
        &= \cons{a}{\cons{b}{\fld{R}}}
          \explanation{by \cref{fld}}
    \end{align*}
\end{proof}
Proposition 230
fld_union

$\fld{(A\union B)} = \fld{A}\union\fld{B}$.

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

\begin{align*} \fld{(A\union B)} &= \dom{(A\union B)}\union\ran{(A\union B)} \explanation{by Definition 17}\\ &= (\dom{A}\union\dom{B})\union(\ran{A}\union\ran{B}) \explanation{by Proposition 205, Proposition 214}\\ &= (\dom{A}\union\ran{A})\union(\dom{B}\union\ran{B}) \explanation{by Proposition 41 [Commutativity of union], Proposition 42 [Associativity of union]}\\ &= \fld{A}\union\fld{B} \explanation{by Definition 17} \end{align*}

LaTeX source
\begin{proof}
    \begin{align*}
        \fld{(A\union B)}
        &= \dom{(A\union B)}\union\ran{(A\union B)}
            \explanation{by \cref{fld}}\\
        &= (\dom{A}\union\dom{B})\union(\ran{A}\union\ran{B})
            \explanation{by \cref{dom_union,ran_union}}\\
        &= (\dom{A}\union\ran{A})\union(\dom{B}\union\ran{B})
            \explanation{by \cref{union_comm,union_assoc}}\\
        &= \fld{A}\union\fld{B}
        \explanation{by \cref{fld}}
    \end{align*}
\end{proof}
Proposition 231
fld_inter

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

LaTeX source
\begin{proposition}
\label{fld_inter}
    $\fld{(A\inter B)}\subseteq \fld{A}\inter\fld{B}$.
\end{proposition}
Proof

Follows by Definition 1, Proposition 72, Proposition 219.

LaTeX source
\begin{proof}
    
    Follows by \cref{subseteq,fld_iff,subseteq_inter_iff}.
\end{proof}
Proposition 232
fld_setminus

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

LaTeX source
\begin{proposition}
\label{fld_setminus}
    $\fld{(A\setminus B)}\supseteq \fld{A}\setminus\fld{B}$.
\end{proposition}
Proof

Follows by Definition 1, Definition 6, Proposition 97, Proposition 219.

LaTeX source
\begin{proof}
    Follows by \cref{setminus_subseteq,fld_iff,subseteq,setminus}.
\end{proof}
Proposition 233
fld_converse

$\fld{\converse{R}} = \fld{R}$.

LaTeX source
\begin{proposition}
\label{fld_converse}
    $\fld{\converse{R}} = \fld{R}$.
\end{proposition}
Proof

Follows by Definition 17, Proposition 41 [Commutativity of union], Proposition 217, Proposition 218.

LaTeX source
\begin{proof}
    Follows by \cref{fld,dom_converse,ran_converse,union_comm}.
\end{proof}

Image

Definition 18
img

$\img{R}{A} = \{b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{R} \mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} a\class{latex-symbol-tip latex-symbol-id-in}{\in} A. a\mathrel{R} b \}$.

LaTeX source
\begin{definition}
\label{img}
    $\img{R}{A} = \{b\in\ran{R} \mid \exists a\in A. a\mathrel{R} b \}$.
\end{definition}
Proposition 234
img_elem_intro

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $a\mathrel{R} b$.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\img{R}{A}$.

LaTeX source
\begin{proposition}
\label{img_elem_intro}
    Suppose $a\in A$ and $a\mathrel{R} b$.
    Then $b\in\img{R}{A}$.
\end{proposition}
Proof

Follows by Definition 16, Definition 18.

LaTeX source
\begin{proof}
    Follows by \cref{img,ran}.
\end{proof}
Proposition 235
img_iff

$b\class{latex-symbol-tip latex-symbol-id-in}{\in}\img{R}{A}$ iff there exists $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $a\mathrel{R} b$.

LaTeX source
\begin{proposition}
\label{img_iff}
    $b\in\img{R}{A}$ iff there exists $a\in A$ such that $a\mathrel{R} b$.
\end{proposition}
Proposition 236
img_subseteq

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

LaTeX source
\begin{proposition}
\label{img_subseteq}
    Suppose $A\subseteq B$.
    Then $\img{R}{A}\subseteq \img{R}{B}$.
\end{proposition}
Proof

Follows by Definition 1, Proposition 235.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,img_iff}.
\end{proof}
Proposition 237
img_subseteq_ran

Then $\img{R}{A}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \ran{R}$.

LaTeX source
\begin{proposition}
\label{img_subseteq_ran}
    Then $\img{R}{A}\subseteq \ran{R}$.
\end{proposition}
Proposition 238
img_dom

Then $\img{R}{\dom{R}} = \ran{R}$.

LaTeX source
\begin{proposition}
\label{img_dom}
    Then $\img{R}{\dom{R}} = \ran{R}$.
\end{proposition}
Proposition 239
img_union

$\img{R}{A\union B} = \img{R}{A}\union\img{R}{B}$.

LaTeX source
\begin{proposition}
\label{img_union}
    $\img{R}{A\union B} = \img{R}{A}\union\img{R}{B}$.
\end{proposition}
Proof

Follows by Axiom 1 [Set extensionality], Axiom 5, Proposition 235.

LaTeX source
\begin{proof}
    Follows by \cref{setext,union_iff,img_iff}.
\end{proof}
Proposition 240
img_inter

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

LaTeX source
\begin{proposition}
\label{img_inter}
    
    $\img{R}{A\inter B}\subseteq \img{R}{A}\inter\img{R}{B}$.
\end{proposition}
Proof

Follows by Definition 1, Definition 5, Proposition 235.

LaTeX source
\begin{proof}
    Follows by \cref{img_iff,subseteq,inter}.
\end{proof}
Proposition 241
img_setminus

$\img{R}{A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B}\class{latex-symbol-tip latex-symbol-id-supseteq}{\supseteq} \img{R}{A}\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\img{R}{B}$.

LaTeX source
\begin{proposition}
\label{img_setminus}
    
    $\img{R}{A\setminus B}\supseteq \img{R}{A}\setminus\img{R}{B}$.
\end{proposition}
Proof

Follows by Definition 1, Definition 6, Proposition 235.

LaTeX source
\begin{proof}
    Follows by \cref{img_iff,subseteq,setminus}.
\end{proof}
Proposition 242
img_singleton_iff

$b\class{latex-symbol-tip latex-symbol-id-in}{\in} \img{R}{\{a\}}$ iff $a\mathrel{R}b$.

LaTeX source
\begin{proposition}
\label{img_singleton_iff}
    $b\in \img{R}{\{a\}}$ iff $a\mathrel{R}b$.
\end{proposition}
Proposition 243
img_singleton_intro

Suppose $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\img{R}{\{a\}}$.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{R}$ and $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.

LaTeX source
\begin{proposition}
\label{img_singleton_intro}
    Suppose $b\in\img{R}{\{a\}}$.
    Then $b\in\ran{R}$ and $(a,b)\in R$.
\end{proposition}
Proof

Follows by Proposition 4, Proposition 22, Proposition 235, Proposition 237.

LaTeX source
\begin{proof}
    Follows by \cref{img_iff,singleton_iff,img_subseteq_ran,elem_subseteq}.
\end{proof}
Proposition 244
img_singleton

$\img{R}{\{a\}} = \{b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{R}\mid (a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} R \}$.

LaTeX source
\begin{proposition}
\label{img_singleton}
    $\img{R}{\{a\}} = \{b\in\ran{R}\mid (a,b)\in R \}$.
\end{proposition}
Proposition 245
img_emptyset

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

LaTeX source
\begin{proposition}
\label{img_emptyset}
    $\img{R}{\emptyset} = \emptyset$.
\end{proposition}
Proof

Follows by set extensionality.

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

Preimage

Definition 19
preimg

$\preimg{R}{B} = \{a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{R} \mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} b\class{latex-symbol-tip latex-symbol-id-in}{\in} B. a\mathrel{R} b \}$.

LaTeX source
\begin{definition}
\label{preimg}
    $\preimg{R}{B} = \{a\in\dom{R} \mid \exists b\in B. a\mathrel{R} b \}$.
\end{definition}
Proposition 246
preimg_iff

$a\class{latex-symbol-tip latex-symbol-id-in}{\in}\preimg{R}{B}$ iff there exists $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ such that $a\mathrel{R} b$.

LaTeX source
\begin{proposition}
\label{preimg_iff}
    $a\in\preimg{R}{B}$ iff there exists $b\in B$ such that $a\mathrel{R} b$.
\end{proposition}
Proposition 247
preim_eq_img_of_converse

$\preimg{R}{B} = \img{\converse{R}}{B}$.

LaTeX source
\begin{proposition}
\label{preim_eq_img_of_converse}
    $\preimg{R}{B} = \img{\converse{R}}{B}$.
\end{proposition}
Proof

Follows by set extensionality.

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

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

LaTeX source
\begin{proposition}
\label{preimg_subseteq}
    Suppose $A\subseteq B$.
    Then $\preimg{R}{A}\subseteq \preimg{R}{B}$.
\end{proposition}
Proposition 249
preimg_subseteq_dom

Then $\preimg{R}{A}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \dom{R}$.

LaTeX source
\begin{proposition}
\label{preimg_subseteq_dom}
    Then $\preimg{R}{A}\subseteq \dom{R}$.
\end{proposition}
Proposition 250
preimg_union

$\preimg{R}{A\union B} = \preimg{R}{A}\union\preimg{R}{B}$.

LaTeX source
\begin{proposition}
\label{preimg_union}
    $\preimg{R}{A\union B} = \preimg{R}{A}\union\preimg{R}{B}$.
\end{proposition}
Proof

Follows by set extensionality.

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

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

LaTeX source
\begin{proposition}
\label{preimg_inter}
    
    $\preimg{R}{A\inter B}\subseteq \preimg{R}{A}\inter\preimg{R}{B}$.
\end{proposition}
Proposition 252
preimg_setminus

$\preimg{R}{A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B}\class{latex-symbol-tip latex-symbol-id-supseteq}{\supseteq} \preimg{R}{A}\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\preimg{R}{B}$.

LaTeX source
\begin{proposition}
\label{preimg_setminus}
    
    $\preimg{R}{A\setminus B}\supseteq \preimg{R}{A}\setminus\preimg{R}{B}$.
\end{proposition}

Upward and downward closure

Definition 20
upward_closure

$\upward{R}{a} = \{b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{R} \mid a\mathrel{R}b \}$.

LaTeX source
\begin{definition}
\label{upward_closure}
    $\upward{R}{a} = \{b\in\ran{R} \mid a\mathrel{R}b \}$.
\end{definition}
Definition 21
downward_closure

$\downward{R}{b} = \{a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{R} \mid a\mathrel{R}b \}$.

LaTeX source
\begin{definition}
\label{downward_closure}
    $\downward{R}{b} = \{a\in\dom{R} \mid a\mathrel{R}b \}$.
\end{definition}
Proposition 253
downward_closure_iff

$a\class{latex-symbol-tip latex-symbol-id-in}{\in}\downward{R}{b}$ iff $a\mathrel{R}b$.

LaTeX source
\begin{proposition}
\label{downward_closure_iff}
    $a\in\downward{R}{b}$ iff $a\mathrel{R}b$.
\end{proposition}

Relation (and later also function) composition

Composition ignores the non-relational parts of sets. Note that the order is flipped from usual relation composition. This lets us use the same symbol for composition of functions.

Definition 22
circ

$S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R = \{ (x,z)\mid x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{R}, z\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{S}\mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} y.\ x\mathrel{R}y\mathrel{S}z \}$.

LaTeX source
\begin{definition}
\label{circ}
    $S\circ R = \{ (x,z)\mid x\in\dom{R}, z\in\ran{S}\mid \exists y.\  x\mathrel{R}y\mathrel{S}z \}$.
\end{definition}
Proposition 254
circ_is_relation

$S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R$ is a relation.

LaTeX source
\begin{proposition}
\label{circ_is_relation}
    $S\circ R$ is a relation.
\end{proposition}
Proposition 255
circ_elem_intro

Suppose $x\mathrel{R} y\mathrel{S} z$.
Then $x\mathrel{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)} z$.

LaTeX source
\begin{proposition}
\label{circ_elem_intro}
    Suppose $x\mathrel{R} y\mathrel{S} z$.
    Then $x\mathrel{(S\circ R)} z$.
\end{proposition}
Proof

$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{R}$ and $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{S}$.
Then $(x, z)\class{latex-symbol-tip latex-symbol-id-in}{\in} S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R$ by Definition 22.

LaTeX source
\begin{proof}
    $x\in\dom{R}$ and $z\in\ran{S}$.
    Then $(x, z)\in S\circ R$ by \cref{circ}.
\end{proof}
Proposition 256
circ_elem_elim

Suppose $x\mathrel{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)} z$.
Then there exists $y$ such that $x\mathrel{R} y\mathrel{S} z$.

LaTeX source
\begin{proposition}
\label{circ_elem_elim}
    Suppose $x\mathrel{(S\circ R)} z$.
    Then there exists $y$ such that $x\mathrel{R} y\mathrel{S} z$.
\end{proposition}
Proof

There exists $y$ such that $x\mathrel{R} y\mathrel{S} z$ by Axiom 6, Definition 22.
Follows by assumption.

LaTeX source
\begin{proof}
    
    There exists $y$ such that $x\mathrel{R} y\mathrel{S} z$ by \cref{circ,pair_eq_iff}.
    Follows by assumption.
\end{proof}
Proposition 257
circ_iff

$x\mathrel{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)} z$ iff there exists $y$ such that $x\mathrel{R} y\mathrel{S} z$.

LaTeX source
\begin{proposition}
\label{circ_iff}
    $x\mathrel{(S\circ R)} z$ iff there exists $y$ such that $x\mathrel{R} y\mathrel{S} z$.
\end{proposition}
Proposition 258
circ_assoc

$(T\class{latex-symbol-tip latex-symbol-id-circ}{\circ} S)\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R = T\class{latex-symbol-tip latex-symbol-id-circ}{\circ} (S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)$.

LaTeX source
\begin{proposition}
\label{circ_assoc}
    $(T\circ S)\circ R = T\circ (S\circ R)$.
\end{proposition}
Proof

For all $a, b$ we have $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} (T\class{latex-symbol-tip latex-symbol-id-circ}{\circ} S)\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R$ iff $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} T\class{latex-symbol-tip latex-symbol-id-circ}{\circ} (S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)$ by Proposition 257.
Now $(T\class{latex-symbol-tip latex-symbol-id-circ}{\circ} S)\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R$ is a relation and $T\class{latex-symbol-tip latex-symbol-id-circ}{\circ} (S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)$ is a relation by Proposition 254.
Follows by Proposition 177.

LaTeX source
\begin{proof}
    For all $a, b$ we have
        $(a,b)\in (T\circ S)\circ R$ iff $(a,b)\in T\circ (S\circ R)$
        by \cref{circ_iff}.
    Now $(T\circ S)\circ R$ is a relation and $T\circ (S\circ R)$ is a relation by
        \cref{circ_is_relation}.
    Follows by \cref{relext}.
\end{proof}
Proposition 259
circ_converse_intro_tuple

Suppose $(a, c) \class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{R}\class{latex-symbol-tip latex-symbol-id-circ}{\circ}\converse{S}$.
Then $(a,c)\class{latex-symbol-tip latex-symbol-id-in}{\in} \converse{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)}$.

LaTeX source
\begin{proposition}
\label{circ_converse_intro_tuple}
    Suppose $(a, c) \in\converse{R}\circ\converse{S}$.
    Then $(a,c)\in \converse{(S\circ R)}$.
\end{proposition}
Proof

Take $b$ such that $a\mathrel{\converse{S}} b\mathrel{\converse{R}} c$.
Now $c\mathrel{R}b\mathrel{S} a$ by Proposition 186.
Hence $c\mathrel{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)} a$.
Thus $a\mathrel{\converse{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)}} c$.

LaTeX source
\begin{proof}
    Take $b$ such that $a\mathrel{\converse{S}} b\mathrel{\converse{R}} c$.
    Now $c\mathrel{R}b\mathrel{S} a$ by \cref{converse_iff}.
    Hence $c\mathrel{(S\circ R)} a$.
    Thus $a\mathrel{\converse{(S\circ R)}} c$.
\end{proof}
Proposition 260
circ_converse_elim

Suppose $(a,c)\class{latex-symbol-tip latex-symbol-id-in}{\in} \converse{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)}$.
Then $(a, c) \class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{R}\class{latex-symbol-tip latex-symbol-id-circ}{\circ}\converse{S}$.

LaTeX source
\begin{proposition}
\label{circ_converse_elim}
    Suppose $(a,c)\in \converse{(S\circ R)}$.
    Then $(a, c) \in\converse{R}\circ\converse{S}$.
\end{proposition}
Proof

$c\mathrel{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)} a$.
Take $b$ such that $c\mathrel{R}b\mathrel{S} a$.
Now $a\mathrel{\converse{S}} b\mathrel{\converse{R}} c$.

LaTeX source
\begin{proof}
    $c\mathrel{(S\circ R)} a$.
    Take $b$ such that  $c\mathrel{R}b\mathrel{S} a$.
    Now $a\mathrel{\converse{S}} b\mathrel{\converse{R}} c$.
\end{proof}
Proposition 261
circ_converse

$\converse{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)} = \converse{R}\class{latex-symbol-tip latex-symbol-id-circ}{\circ}\converse{S}$.

LaTeX source
\begin{proposition}
\label{circ_converse}
    $\converse{(S\circ R)} = \converse{R}\circ\converse{S}$.
\end{proposition}
Proof

$\converse{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)}$ is a relation.
$\converse{R}\class{latex-symbol-tip latex-symbol-id-circ}{\circ}\converse{S}$ is a relation.
For all $x, y $ we have $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} \converse{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)}$ iff $(x, y) \class{latex-symbol-tip latex-symbol-id-in}{\in}\converse{R}\class{latex-symbol-tip latex-symbol-id-circ}{\circ}\converse{S}$.
Thus $\converse{(S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R)} = \converse{R}\class{latex-symbol-tip latex-symbol-id-circ}{\circ}\converse{S}$ by Proposition 177.

LaTeX source
\begin{proof}
    $\converse{(S\circ R)}$ is a relation.
    $\converse{R}\circ\converse{S}$ is a relation.
    For all $x, y $ we have $(x,y)\in \converse{(S\circ R)}$ iff $(x, y) \in\converse{R}\circ\converse{S}$.
    Thus $\converse{(S\circ R)} = \converse{R}\circ\converse{S}$ by \cref{relext}.
\end{proof}

Restriction

Definition 23
restrl

$\restrl{R}{X} = \{ w\class{latex-symbol-tip latex-symbol-id-in}{\in} R \mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} x, y. x\class{latex-symbol-tip latex-symbol-id-in}{\in} X \class{latex-symbol-tip latex-symbol-id-land}{\land} w = (x, y) \}$.

LaTeX source
\begin{definition}
\label{restrl}
    $\restrl{R}{X} = \{ w\in R \mid \exists x, y. x\in X \land w = (x, y) \}$.
\end{definition}
Proposition 262
restrl_iff

$a \mathrel{\restrl{R}{X}} b$ iff $a\mathrel{R}b$ and $a\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.

LaTeX source
\begin{proposition}
\label{restrl_iff}
    $a \mathrel{\restrl{R}{X}} b$ iff $a\mathrel{R}b$ and $a\in X$.
\end{proposition}
Proposition 263
restrl_subseteq

$\restrl{R}{X}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} R$.

LaTeX source
\begin{proposition}
\label{restrl_subseteq}
    $\restrl{R}{X}\subseteq R$.
\end{proposition}
Proposition 264
elem_dom_of_restrl_implies_elem_dom_and_restr

Suppose $x\class{latex-symbol-tip latex-symbol-id-in}{\in} \dom{\restrl{R}{X}}$.
Then $x\class{latex-symbol-tip latex-symbol-id-in}{\in} \dom{R}, X$.

LaTeX source
\begin{proposition}
\label{elem_dom_of_restrl_implies_elem_dom_and_restr}
    Suppose $x\in \dom{\restrl{R}{X}}$.
    Then $x\in \dom{R}, X$.
\end{proposition}
Proof

Take $y$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $(x, y)\class{latex-symbol-tip latex-symbol-id-in}{\in} \restrl{R}{X}$.
Then $(x, y)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{R}$.

LaTeX source
\begin{proof}
    Take $y$ such that $x\in X$ and $(x, y)\in \restrl{R}{X}$.
    Then $(x, y)\in R$. Thus $x\in\dom{R}$.
\end{proof}
Proposition 265
elem_dom_and_restr_implies_elem_of_restr

Suppose $x\class{latex-symbol-tip latex-symbol-id-in}{\in} \dom{R}, X$.
Then $x\class{latex-symbol-tip latex-symbol-id-in}{\in} \dom{\restrl{R}{X}}$.

LaTeX source
\begin{proposition}
\label{elem_dom_and_restr_implies_elem_of_restr}
    Suppose $x\in \dom{R}, X$.
    Then $x\in \dom{\restrl{R}{X}}$.
\end{proposition}
Proof

Take $y$ such that $(x, y)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ by Proposition 199.
Then $(x, y)\class{latex-symbol-tip latex-symbol-id-in}{\in} \restrl{R}{X}$.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{\restrl{R}{X}}$.

LaTeX source
\begin{proof}
    Take $y$ such that $(x, y)\in R$ by \cref{dom_iff}.
    Then $(x, y)\in \restrl{R}{X}$.
    Thus $x\in\dom{\restrl{R}{X}}$.
\end{proof}
Proposition 266
restrl_eq_inter

Suppose $R$ is a relation.
$\restrl{R}{X} = R\inter (X\class{latex-symbol-tip latex-symbol-id-times}{\times} \ran{R})$.

LaTeX source
\begin{proposition}
\label{restrl_eq_inter}
    Suppose $R$ is a relation.
    $\restrl{R}{X} = R\inter (X\times \ran{R})$.
\end{proposition}
Proof

For all $a$ we have $a\class{latex-symbol-tip latex-symbol-id-in}{\in} R\inter (X\class{latex-symbol-tip latex-symbol-id-times}{\times} \ran{R})$ iff $a\class{latex-symbol-tip latex-symbol-id-in}{\in} \restrl{R}{X}$ by Definition 5, Definition 23, Proposition 115, Proposition 121, Proposition 208.
Follows byAxiom 1 [Set extensionality].

LaTeX source
\begin{proof}
    For all $a$ we have $a\in R\inter (X\times \ran{R})$ iff $a\in \restrl{R}{X}$
        by \cref{inter,restrl,ran_iff,times_elem_is_tuple,times_tuple_intro}.
    Follows by\cref{setext}.
\end{proof}
Corollary 3
dom_of_restrl_eq_inter

Suppose $R$ is a relation.
$\dom{\restrl{R}{X}} = \dom{R}\inter X$.

LaTeX source
\begin{corollary}
\label{dom_of_restrl_eq_inter}
    Suppose $R$ is a relation.
    $\dom{\restrl{R}{X}} = \dom{R}\inter X$.
\end{corollary}
Proof

Follows by set extensionality.

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

Suppose $V\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$.
Then $\restrl{\restrl{R}{U}}{V} = \restrl{R}{V}$.

LaTeX source
\begin{proposition}
\label{restrl_restrl}
    Suppose $V\subseteq U$.
    Then $\restrl{\restrl{R}{U}}{V} = \restrl{R}{V}$.
\end{proposition}
Proof

For all $w$ we have $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\restrl{\restrl{R}{U}}{V}$ iff $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\restrl{R}{V}$ by Definition 1, Definition 23.
Follows byAxiom 1 [Set extensionality].

LaTeX source
\begin{proof}
    For all $w$ we have $w\in\restrl{\restrl{R}{U}}{V}$ iff $w\in\restrl{R}{V}$
        by \cref{restrl,subseteq}.
    Follows by\cref{setext}.
\end{proof}
Proposition 268
restrl_by_dom

Let $R$ be a relation.
Then $\restrl{R}{\dom{R}} = R$.

LaTeX source
\begin{proposition}
\label{restrl_by_dom}
    Let $R$ be a relation.
    Then $\restrl{R}{\dom{R}} = R$.
\end{proposition}
Proof

For all $w$ we have $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\restrl{R}{\dom{R}}$ iff $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ by Definition 12, Definition 15, Definition 23.
Follows byAxiom 1 [Set extensionality].

LaTeX source
\begin{proof}
    For all $w$ we have $w\in\restrl{R}{\dom{R}}$ iff $w\in R$
        by \cref{dom,restrl,relation}.
    Follows by\cref{setext}.
\end{proof}
Proposition 269
restrl_dom

Then $\dom{\restrl{R}{X}}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.

LaTeX source
\begin{proposition}
\label{restrl_dom}
    Then $\dom{\restrl{R}{X}}\subseteq X$.
\end{proposition}
Proposition 270
restrl_ran_elim

Suppose $X\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{R}$.
Let $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{\restrl{R}{X}}$.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\img{R}{X}$.

LaTeX source
\begin{proposition}
\label{restrl_ran_elim}
    Suppose $X\subseteq\dom{R}$.
    Let $b\in\ran{\restrl{R}{X}}$.
    Then $b\in\img{R}{X}$.
\end{proposition}
Proof

Take $a\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $(a, b)\class{latex-symbol-tip latex-symbol-id-in}{\in} \restrl{R}{X}$ by Definition 1, Definition 15, Definition 16, Proposition 269.
Then $a\mathrel{R} b$ and $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{R}$.
Thus $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\img{R}{X}$ by Definition 18.

LaTeX source
\begin{proof}
    Take $a\in X$ such that $(a, b)\in \restrl{R}{X}$
        by \cref{dom,ran,restrl_dom,subseteq}.
    Then $a\mathrel{R} b$ and $b\in\ran{R}$.
    Thus $b\in\img{R}{X}$ by \cref{img}.
\end{proof}
Proposition 271
restrl_ran_intro

Suppose $X\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{R}$.
Let $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\img{R}{X}$.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{\restrl{R}{X}}$.

LaTeX source
\begin{proposition}
\label{restrl_ran_intro}
    Suppose $X\subseteq\dom{R}$.
    Let $b\in\img{R}{X}$.
    Then $b\in\ran{\restrl{R}{X}}$.
\end{proposition}
Proof

Follows by Definition 18, Proposition 209, Proposition 262.

LaTeX source
\begin{proof}
    Follows by \cref{img,ran_intro,restrl_iff}.
\end{proof}
Proposition 272
restrl_ran

Suppose $X\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{R}$.
Then $\ran{\restrl{R}{X}} = \img{R}{X}$.

LaTeX source
\begin{proposition}
\label{restrl_ran}
    Suppose $X\subseteq\dom{R}$.
    Then $\ran{\restrl{R}{X}} = \img{R}{X}$.
\end{proposition}
Proof

Follows by set extensionality.

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

Suppose $X\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{R}$.
Then $\img{\restrl{R}{X}}{A} = \img{R}{X\inter A}$.

LaTeX source
\begin{proposition}
\label{restrl_img}
    Suppose $X\subseteq\dom{R}$.
    Then $\img{\restrl{R}{X}}{A} = \img{R}{X\inter A}$.
\end{proposition}
Proof

For all $b$ we have $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\img{\restrl{R}{X}}{A}$ iff $b\class{latex-symbol-tip latex-symbol-id-in}{\in} \img{R}{X\inter A}$ by Definition 5, Proposition 235, Proposition 262.
Follows byAxiom 1 [Set extensionality].

LaTeX source
\begin{proof}
    For all $b$ we have $b\in\img{\restrl{R}{X}}{A}$ iff $b\in \img{R}{X\inter A}$
        by \cref{restrl_iff,img_iff,inter}.
    Follows by\cref{setext}.
    
\end{proof}

Set of relations

Abbreviation 20
binary_relation_on

$R$ is a binary relation on $X$ iff $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$.

LaTeX source
\begin{abbreviation}
\label{binary_relation_on}
    $R$ is a binary relation on $X$ iff $R\subseteq X\times X$.
\end{abbreviation}
Proposition 274
relation_subseteq_intro_elem

Let $R$ be a relation.
Suppose $\ran{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Suppose $\dom{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.
Suppose $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Then $w\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.

LaTeX source
\begin{proposition}
\label{relation_subseteq_intro_elem}
    Let $R$ be a relation.
    Suppose $\ran{R}\subseteq B$.
    Suppose $\dom{R}\subseteq A$.
    Suppose $w\in R$.
    Then $w\in A\times B$.
\end{proposition}
Proof

Take $a, b$ such that $(a, b) = w$.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{R}$ and $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{R}$.
Thus $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
Thus $(a, b)\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.

LaTeX source
\begin{proof}
    Take $a, b$ such that $(a, b) = w$.
    Then $a\in\dom{R}$ and $b\in\ran{R}$.
    Thus $a\in A$ and $b\in B$.
    Thus $(a, b)\in A\times B$.
\end{proof}
Proposition 275
relation_subseteq_intro

Let $R$ be a relation.
Suppose $\ran{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Suppose $\dom{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.
Then $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.

LaTeX source
\begin{proposition}
\label{relation_subseteq_intro}
    Let $R$ be a relation.
    Suppose $\ran{R}\subseteq B$.
    Suppose $\dom{R}\subseteq A$.
    Then $R\subseteq A\times B$.
\end{proposition}
Proposition 276
relation_subseteq_implies_dom_subseteq_elem

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

LaTeX source
\begin{proposition}
\label{relation_subseteq_implies_dom_subseteq_elem}
    Suppose $R\subseteq A\times B$.
    Suppose $a\in\dom{R}$.
    Then $a\in A$.
\end{proposition}
Proof

Take $w, b$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ and $w = (a, b)$.
Follows by Definition 15, Proposition 4, Proposition 114.

LaTeX source
\begin{proof}
    Take $w, b$ such that $w\in R$ and $w = (a, b)$.
    Follows by \cref{dom,times_tuple_elim,elem_subseteq}.
\end{proof}
Proposition 277
relation_subseteq_implies_dom_subseteq

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

LaTeX source
\begin{proposition}
\label{relation_subseteq_implies_dom_subseteq}
    Suppose $R\subseteq A\times B$.
    Then $\dom{R}\subseteq A$.
\end{proposition}
Proof

Follows by Definition 1, Proposition 276.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,relation_subseteq_implies_dom_subseteq_elem}.
\end{proof}
Proposition 278
relation_subseteq_implies_ran_subseteq_elem

Suppose $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.
Suppose $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{R}$.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.

LaTeX source
\begin{proposition}
\label{relation_subseteq_implies_ran_subseteq_elem}
    Suppose $R\subseteq A\times B$.
    Suppose $b\in\ran{R}$.
    Then $b\in B$.
\end{proposition}
Proof

Take $w, a$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ and $w = (a, b)$.
Follows by Definition 16, Proposition 4, Proposition 114.

LaTeX source
\begin{proof}
    Take $w, a$ such that $w\in R$ and $w = (a, b)$.
    Follows by \cref{ran,elem_subseteq,times_tuple_elim}.
\end{proof}
Proposition 279
relation_subseteq_implies_ran_subseteq

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

LaTeX source
\begin{proposition}
\label{relation_subseteq_implies_ran_subseteq}
    Suppose $R\subseteq A\times B$.
    Then $\ran{R}\subseteq B$.
\end{proposition}
Proof

Follows by Definition 1, Proposition 278.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,relation_subseteq_implies_ran_subseteq_elem}.
\end{proof}
Definition 24
rels

$\rels{A}{B} = \pow{A\class{latex-symbol-tip latex-symbol-id-times}{\times} B}$.

LaTeX source
\begin{definition}
\label{rels}
    $\rels{A}{B} = \pow{A\times B}$.
\end{definition}
Proposition 280
rels_intro

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

LaTeX source
\begin{proposition}
\label{rels_intro}
    Suppose $R\subseteq A\times B$.
    Then $R\in\rels{A}{B}$.
\end{proposition}
Proposition 281
rels_intro_dom_and_ran

Let $R$ be a relation.
Suppose $\dom{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.
Suppose $\ran{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{B}$.

LaTeX source
\begin{proposition}
\label{rels_intro_dom_and_ran}
    Let $R$ be a relation.
    Suppose $\dom{R}\subseteq A$.
    Suppose $\ran{R}\subseteq B$.
    Then $R\in\rels{A}{B}$.
\end{proposition}
Proof

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

LaTeX source
\begin{proof}
    $R\subseteq A\times B$.
\end{proof}
Proposition 282
rels_elim

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

LaTeX source
\begin{proposition}
\label{rels_elim}
    Suppose $R\in\rels{A}{B}$.
    Then $R\subseteq A\times B$.
\end{proposition}
Proposition 283
rels_dom_subseteq

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

LaTeX source
\begin{proposition}
\label{rels_dom_subseteq}
    Suppose $R\in\rels{A}{B}$.
    Then $\dom{R}\subseteq A$.
\end{proposition}
Proof

Follows by Proposition 277, Proposition 282.

LaTeX source
\begin{proof}
    Follows by \cref{rels_elim,relation_subseteq_implies_dom_subseteq}.
\end{proof}
Proposition 284
rels_ran_subseteq

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

LaTeX source
\begin{proposition}
\label{rels_ran_subseteq}
    Suppose $R\in\rels{A}{B}$.
    Then $\ran{R}\subseteq B$.
\end{proposition}
Proof

Follows by Proposition 279, Proposition 282.

LaTeX source
\begin{proof}
    Follows by \cref{rels_elim,relation_subseteq_implies_ran_subseteq}.
\end{proof}
Proposition 285
rels_is_relation

Let $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{B}$.
Then $R$ is a relation.

LaTeX source
\begin{proposition}
\label{rels_is_relation}
    Let $R\in\rels{A}{B}$.
    Then $R$ is a relation.
\end{proposition}
Proof

It suffices to show that for all $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ there exists $x, y$ such that $w = (x, y)$.
Fix $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Now $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$ by Proposition 282.
Thus $w\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.

LaTeX source
\begin{proof}
    It suffices to show that for all $w\in R$ there exists $x, y$ such that $w = (x, y)$.
    Fix $w\in R$.
    Now $R\subseteq A\times B$ by \cref{rels_elim}.
    Thus $w\in A\times B$.
\end{proof}
Proposition 286
rels_weaken_dom

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

LaTeX source
\begin{proposition}
\label{rels_weaken_dom}
    Let $R\in\rels{A}{B}$.
    Suppose $A\subseteq C$.
    Then $R\in\rels{C}{B}$.
\end{proposition}
Proof

$R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} 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$.
Thus $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.

LaTeX source
\begin{proof}
    $R\subseteq A\times B\subseteq C\times B$.
    Thus $R\subseteq C\times B$.
\end{proof}
Proposition 287
rels_weaken_codom

Let $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{B}$.
Suppose $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} D$.
Then $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{D}$.

LaTeX source
\begin{proposition}
\label{rels_weaken_codom}
    Let $R\in\rels{A}{B}$.
    Suppose $B\subseteq D$.
    Then $R\in\rels{A}{D}$.
\end{proposition}
Proof

$R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} 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$.
Thus $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-times}{\times} D$.

LaTeX source
\begin{proof}
    $R\subseteq A\times B\subseteq A\times D$.
    Thus $R\subseteq A\times D$.
\end{proof}
Proposition 288
rels_type

Let $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{B}$.
Suppose $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Then $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$.

LaTeX source
\begin{proposition}
\label{rels_type}
    Let $R\in\rels{A}{B}$.
    Suppose $(a,b)\in R$.
    Then $(a,b)\in A\times B$.
\end{proposition}
Proof

$R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-times}{\times} B$ by Proposition 282.

LaTeX source
\begin{proof}
    $R\subseteq A\times B$ by \cref{rels_elim}.
\end{proof}
Proposition 289
rels_type_dom

Let $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{B}$.
Suppose $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

LaTeX source
\begin{proposition}
\label{rels_type_dom}
    Let $R\in\rels{A}{B}$.
    Suppose $(a,b)\in R$.
    Then $a\in A$.
\end{proposition}
Proof

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

LaTeX source
\begin{proof}
    $(a,b)\in A\times B$ by \cref{rels_type}.
\end{proof}
Proposition 290
rels_type_ran

Let $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{B}$.
Suppose $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.

LaTeX source
\begin{proposition}
\label{rels_type_ran}
    Let $R\in\rels{A}{B}$.
    Suppose $(a,b)\in R$.
    Then $b\in B$.
\end{proposition}
Proof

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

LaTeX source
\begin{proof}
    $(a,b)\in A\times B$ by \cref{rels_type}.
\end{proof}
Proposition 291
rels_restrict_dom

Let $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{B}$.
Then $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{\dom{R}}{B}$.

LaTeX source
\begin{proposition}
\label{rels_restrict_dom}
    Let $R\in\rels{A}{B}$.
    Then $R\in\rels{\dom{R}}{B}$.
\end{proposition}
Proof

$R$ is a relation by Proposition 285.
$\dom{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \dom{R}$ by Proposition 2.
$\ran{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Follows by Proposition 281.

LaTeX source
\begin{proof}
    $R$ is a relation by \cref{rels_is_relation}.
    $\dom{R}\subseteq \dom{R}$ by \cref{subseteq_refl}.
    $\ran{R}\subseteq B$.
    Follows by \cref{rels_intro_dom_and_ran}.
\end{proof}
Proposition 292
rels_restrict_ran

Let $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{B}$.
Then $R\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{\ran{R}}$.

LaTeX source
\begin{proposition}
\label{rels_restrict_ran}
    Let $R\in\rels{A}{B}$.
    Then $R\in\rels{A}{\ran{R}}$.
\end{proposition}
Proof

$R$ is a relation by Proposition 285.
$\dom{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$.
$\ran{R}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \ran{R}$ by Proposition 2.
Follows by Proposition 281.

LaTeX source
\begin{proof}
    $R$ is a relation by \cref{rels_is_relation}.
    $\dom{R}\subseteq A$.
    $\ran{R}\subseteq \ran{R}$ by \cref{subseteq_refl}.
    Follows by \cref{rels_intro_dom_and_ran}.
\end{proof}

Identity relation

Definition 25
id

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

LaTeX source
\begin{definition}
\label{id}
    $\identity{A} = \{(a,a)\mid a\in A\}$.
\end{definition}
Proposition 293
id_iff

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

LaTeX source
\begin{proposition}
\label{id_iff}
    $a\mathrel{\identity{A}}b$ iff $a = b\in A$.
\end{proposition}
Proof

Follows by Axiom 6, Definition 25.

LaTeX source
\begin{proof}
    Follows by \cref{id,pair_eq_iff}.
\end{proof}
Proposition 294
id_elem_intro

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Then $(a, a) \class{latex-symbol-tip latex-symbol-id-in}{\in}\identity{A}$.

LaTeX source
\begin{proposition}
\label{id_elem_intro}
    Suppose $a\in A$.
    Then $(a, a) \in\identity{A}$.
\end{proposition}
Proof

Follows by Definition 25.

LaTeX source
\begin{proof}
    Follows by \cref{id}.
\end{proof}
Proposition 295
id_elem_inspect

Suppose $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\identity{A}$.
Then there exists $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $w = (a, a)$.

LaTeX source
\begin{proposition}
\label{id_elem_inspect}
    Suppose $w\in\identity{A}$.
    Then there exists $a\in A$ such that $w = (a, a)$.
\end{proposition}
Proof

Follows by Definition 25.

LaTeX source
\begin{proof}
    Follows by \cref{id}.
\end{proof}
Proposition 296
id_is_relation

$\identity{A}$ is a relation.

LaTeX source
\begin{proposition}
\label{id_is_relation}
    $\identity{A}$ is a relation.
\end{proposition}
Proposition 297
id_dom

$\dom{\identity{A}} = A$.

LaTeX source
\begin{proposition}
\label{id_dom}
    $\dom{\identity{A}} = A$.
\end{proposition}
Proof

For every $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $(a, a)\class{latex-symbol-tip latex-symbol-id-in}{\in} \identity{A}$.
$\dom{\identity{A}} = A$ by set extensionality.

LaTeX source
\begin{proof}
    For every $a\in A$ we have $(a, a)\in \identity{A}$.
    $\dom{\identity{A}} = A$ by set extensionality.
\end{proof}
Proposition 298
id_ran

$\ran{\identity{A}} = A$.

LaTeX source
\begin{proposition}
\label{id_ran}
    $\ran{\identity{A}} = A$.
\end{proposition}
Proof

For every $a$ we have $a\class{latex-symbol-tip latex-symbol-id-in}{\in} \ran{\identity{A}}$ iff $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Proposition 208, Proposition 293.
For every $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $(a, a)\class{latex-symbol-tip latex-symbol-id-in}{\in} \identity{A}$.
$\ran{\identity{A}} = A$ by set extensionality.

LaTeX source
\begin{proof}
    For every $a$ we have $a\in \ran{\identity{A}}$ iff $a\in A$
        by \cref{ran_iff,id_iff}.
    For every $a\in A$ we have $(a, a)\in \identity{A}$.
    $\ran{\identity{A}} = A$ by set extensionality.
\end{proof}
Proposition 299
id_img

$\img{\identity{A}}{B} = A\inter B$.

LaTeX source
\begin{proposition}
\label{id_img}
    $\img{\identity{A}}{B} = A\inter B$.
\end{proposition}
Proof

Follows by set extensionality.

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

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

LaTeX source
\begin{proposition}
\label{id_elem_rels}
    $\identity{A}\in\rels{A}{A}$.
\end{proposition}

Membership relation

Definition 26
memrel

$\memrel{A} = \{(a, b)\mid a\class{latex-symbol-tip latex-symbol-id-in}{\in} A, b\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{memrel}
    $\memrel{A} = \{(a, b)\mid a\in A, b\in A \mid a\in b\}$.
\end{definition}
Proposition 301
memrel_elem_intro

Suppose $a, b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} b$.
Then $(a, b) \class{latex-symbol-tip latex-symbol-id-in}{\in}\memrel{A}$.

LaTeX source
\begin{proposition}
\label{memrel_elem_intro}
    Suppose $a, b\in A$.
    Suppose $a\in b$.
    Then $(a, b) \in\memrel{A}$.
\end{proposition}
Proposition 302
memrel_elem_inspect

Suppose $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\memrel{A}$.
Then there exists $a, b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $w = (a, b)$ and $a\class{latex-symbol-tip latex-symbol-id-in}{\in} b$.

LaTeX source
\begin{proposition}
\label{memrel_elem_inspect}
    Suppose $w\in\memrel{A}$.
    Then there exists $a, b\in A$ such that $w = (a, b)$ and $a\in b$.
\end{proposition}
Proof

Follows by Definition 26.

LaTeX source
\begin{proof}
    Follows by \cref{memrel}.
\end{proof}
Proposition 303
memrel_is_relation

$\memrel{A}$ is a relation.

LaTeX source
\begin{proposition}
\label{memrel_is_relation}
    $\memrel{A}$ is a relation.
\end{proposition}

Subset relation

Definition 27
subseteqrel

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

LaTeX source
\begin{definition}
\label{subseteqrel}
    $\subseteqrel{A} = \{(a, b)\mid a\in A, b\in A \mid a\subseteq b\}$.
\end{definition}
Proposition 304
subseteqrel_is_relation

$\subseteqrel{A}$ is a relation.

LaTeX source
\begin{proposition}
\label{subseteqrel_is_relation}
    $\subseteqrel{A}$ is a relation.
\end{proposition}

Properties of relations

Definition 28
left_quasireflexive

$R$ is left quasireflexive iff for all $x, y$ such that $x\mathrel{R} y$ we have $x\mathrel{R}x$.

LaTeX source
\begin{definition}
\label{left_quasireflexive}
    $R$ is left quasireflexive iff
    for all $x, y$ such that $x\mathrel{R} y$
    we have $x\mathrel{R}x$.
\end{definition}
Definition 29
right_quasireflexive

$R$ is right quasireflexive iff for all $x, y$ such that $x\mathrel{R} y$ we have $y\mathrel{R}y$.

LaTeX source
\begin{definition}
\label{right_quasireflexive}
    $R$ is right quasireflexive iff
    for all $x, y$ such that $x\mathrel{R} y$
    we have $y\mathrel{R}y$.
\end{definition}
Definition 30
quasireflexive

$R$ is quasireflexive iff for all $x, y$ such that $x\mathrel{R} y$ we have $x\mathrel{R}x$ and $y\mathrel{R}y$.

LaTeX source
\begin{definition}
\label{quasireflexive}
    $R$ is quasireflexive iff
    for all $x, y$ such that $x\mathrel{R} y$
    we have $x\mathrel{R}x$ and $y\mathrel{R}y$.
\end{definition}
Definition 31
coreflexive

$R$ is coreflexive iff for all $x, y$ such that $x\mathrel{R} y$ we have $x = y$.

LaTeX source
\begin{definition}
\label{coreflexive}
    $R$ is coreflexive iff
    for all $x, y$ such that $x\mathrel{R} y$
    we have $x = y$.
\end{definition}
Definition 32
reflexive_on

$R$ is reflexive on $X$ iff for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $x\mathrel{R}x$.

LaTeX source
\begin{definition}
\label{reflexive_on}
    $R$ is reflexive on $X$ iff
    for all $x\in X$
    we have $x\mathrel{R}x$.
\end{definition}
Definition 33
irreflexive

$R$ is irreflexive iff for all $x$ we have $(x,x)\class{latex-symbol-tip latex-symbol-id-notin}{\notin} R$.

LaTeX source
\begin{definition}
\label{irreflexive}
    $R$ is irreflexive iff
    for all $x$ we have $(x,x)\notin R$.
\end{definition}
Proposition 305
quasireflexive_implies_reflexive_on_fld

Suppose $R$ is quasireflexive.
Then $R$ is reflexive on $\fld{R}$.

LaTeX source
\begin{proposition}
\label{quasireflexive_implies_reflexive_on_fld}
    Suppose $R$ is quasireflexive.
    Then $R$ is reflexive on $\fld{R}$.
\end{proposition}
Proposition 306
reflexive_on_fld_impliesquasireflexive

Suppose $R$ is reflexive on $\fld{R}$.
Then $R$ is quasireflexive.

LaTeX source
\begin{proposition}
\label{reflexive_on_fld_impliesquasireflexive}
    Suppose $R$ is reflexive on $\fld{R}$.
    Then $R$ is quasireflexive.
\end{proposition}
Proposition 307
inters_of_family_of_reflexive_relations_is_reflexive

Let $F$ be an inhabited family of relations.
Suppose every element of $F$ is reflexive on $A$.
Then $\inters{F}$ is reflexive on $A$.

LaTeX source
\begin{proposition}
\label{inters_of_family_of_reflexive_relations_is_reflexive}
    Let $F$ be an inhabited family of relations.
    Suppose every element of $F$ is reflexive on $A$.
    Then $\inters{F}$ is reflexive on $A$.
\end{proposition}
Proof

For all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have for all $R\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $a\mathrel{R} a$.
Thus for all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $a\mathrel{(\inters{F})} a$.

LaTeX source
\begin{proof}
    For all $a\in A$ we have for all $R\in F$ we have $a\mathrel{R} a$.
    Thus for all $a\in A$ we have $a\mathrel{(\inters{F})} a$.
\end{proof}
Definition 34
antisymmetric

$R$ is antisymmetric iff for all $x, y$ such that $x\mathrel{R}y\mathrel{R}x$ we have $x = y$.

LaTeX source
\begin{definition}
\label{antisymmetric}
    $R$ is antisymmetric iff
    for all $x, y$ such that $x\mathrel{R}y\mathrel{R}x$
    we have $x = y$.
\end{definition}
Definition 35 [Symmetry]
symmetric

$R$ is symmetric iff for all $x, y$ we have $x\mathrel{R} y \class{latex-symbol-tip latex-symbol-id-iff}{\iff} y\mathrel{R}x$.

LaTeX source
\begin{definition}
[Symmetry]\label{symmetric}
    $R$ is symmetric iff
    for all $x, y$ we have
    $x\mathrel{R} y \iff y\mathrel{R}x$.
\end{definition}
Definition 36
asymmetric

$R$ is asymmetric iff for all $x, y$ such that $x\mathrel{R} y$ we have $y\not\mathrel{R}x$.

LaTeX source
\begin{definition}
\label{asymmetric}
    $R$ is asymmetric iff
    for all $x, y$ such that
    $x\mathrel{R} y$ we have $y\not\mathrel{R}x$.
\end{definition}
Proposition 308
asymmetric_implies_irreflexive

Suppose $R$ is asymmetric.
Then $R$ is irreflexive.

LaTeX source
\begin{proposition}
\label{asymmetric_implies_irreflexive}
    Suppose $R$ is asymmetric.
    Then $R$ is irreflexive.
\end{proposition}
Proposition 309
asymmetric_implies_antisymmetric

Suppose $R$ is asymmetric.
Then $R$ is antisymmetric.

LaTeX source
\begin{proposition}
\label{asymmetric_implies_antisymmetric}
    Suppose $R$ is asymmetric.
    Then $R$ is antisymmetric.
\end{proposition}
Proposition 310
antisymmetric_and_irreflexive_implies_asymmetric

Suppose $R$ is antisymmetric.
Suppose $R$ is irreflexive.
Then $R$ is asymmetric.

LaTeX source
\begin{proposition}
\label{antisymmetric_and_irreflexive_implies_asymmetric}
    Suppose $R$ is antisymmetric.
    Suppose $R$ is irreflexive.
    Then $R$ is asymmetric.
\end{proposition}
Definition 37 [Transitivity]
transitive

$R$ is transitive iff for all $x, y, z$ such that $x\mathrel{R}y\mathrel{R}z$ we have $x\mathrel{R} z$.

LaTeX source
\begin{definition}
[Transitivity]\label{transitive}
    $R$ is transitive iff
    for all $x, y, z$ such that $x\mathrel{R}y\mathrel{R}z$
        we have $x\mathrel{R} z$.
\end{definition}
Proposition 311
transitive_downward_elem

Suppose $R$ is transitive.
Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\downward{R}{b}$.
Suppose $c\class{latex-symbol-tip latex-symbol-id-in}{\in}\downward{R}{a}$.
Then $c\class{latex-symbol-tip latex-symbol-id-in}{\in} \downward{R}{b}$.

LaTeX source
\begin{proposition}
\label{transitive_downward_elem}
    Suppose $R$ is transitive.
    Suppose $a\in\downward{R}{b}$.
    Suppose $c\in\downward{R}{a}$.
    Then $c\in \downward{R}{b}$.
\end{proposition}
Proof

$c\mathrel{R} a\mathrel{R}b$.
Thus $c\mathrel{R} b$ by Definition 37 [Transitivity].

LaTeX source
\begin{proof}
    $c\mathrel{R} a\mathrel{R}b$.
    Thus $c\mathrel{R} b$ by \cref{transitive}.
\end{proof}
Proposition 312
transitive_downward_subseteq

Suppose $R$ is transitive.
Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\downward{R}{b}$.
Then $\downward{R}{a}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \downward{R}{b}$.

LaTeX source
\begin{proposition}
\label{transitive_downward_subseteq}
    Suppose $R$ is transitive.
    Suppose $a\in\downward{R}{b}$.
    Then $\downward{R}{a}\subseteq \downward{R}{b}$.
\end{proposition}
Definition 38
dense

$R$ is dense iff for all $x, z$ such that $x\mathrel{R}z$ there exists $y$ such that $x\mathrel{R}y\mathrel{R}z$.

LaTeX source
\begin{definition}
\label{dense}
    $R$ is dense iff
    for all $x, z$ such that $x\mathrel{R}z$
        there exists $y$ such that $x\mathrel{R}y\mathrel{R}z$.
\end{definition}
Definition 39
quasiconnex

$R$ is quasiconnex iff for all $x, y\class{latex-symbol-tip latex-symbol-id-in}{\in}\fld{R}$ such that $x\class{latex-symbol-tip latex-symbol-id-neq}{\neq} y$ we have $x\mathrel{R}y$ or $y\mathrel{R}x$.

LaTeX source
\begin{definition}
\label{quasiconnex}
    $R$ is quasiconnex iff
    for all $x, y\in\fld{R}$ such that $x\neq y$ we have
        $x\mathrel{R}y$ or $y\mathrel{R}x$.
\end{definition}
Definition 40
connex

$R$ is connex on $X$ iff for all $x, y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $x\class{latex-symbol-tip latex-symbol-id-neq}{\neq} y$ we have $x\mathrel{R}y$ or $y\mathrel{R}x$.

LaTeX source
\begin{definition}
\label{connex}
    $R$ is connex on $X$ iff
    for all $x, y\in X$ such that $x\neq y$ we have
        $x\mathrel{R}y$ or $y\mathrel{R}x$.
\end{definition}
Definition 41
strongly_quasiconnex

$R$ is strongly quasiconnex iff for all $x, y\class{latex-symbol-tip latex-symbol-id-in}{\in}\fld{R}$ we have $x\mathrel{R}y$ or $y\mathrel{R}x$.

LaTeX source
\begin{definition}
\label{strongly_quasiconnex}
    $R$ is strongly quasiconnex iff
    for all $x, y\in\fld{R}$ we have
        $x\mathrel{R}y$ or $y\mathrel{R}x$.
\end{definition}
Definition 42
strongly_connex

$R$ is strongly connex on $X$ iff for all $x, y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $x\mathrel{R}y$ or $y\mathrel{R}x$.

LaTeX source
\begin{definition}
\label{strongly_connex}
    $R$ is strongly connex on $X$ iff
    for all $x, y\in X$ we have
        $x\mathrel{R}y$ or $y\mathrel{R}x$.
\end{definition}
Proposition 313
strongly_quasiconnex_iff_quasiconnex_and_quasireflexive

$R$ is strongly quasiconnex iff $R$ is quasiconnex and quasireflexive.

LaTeX source
\begin{proposition}
\label{strongly_quasiconnex_iff_quasiconnex_and_quasireflexive}
    $R$ is strongly quasiconnex iff
    $R$ is quasiconnex and quasireflexive.
\end{proposition}
Proof

Follows by Definition 17, Definition 32, Definition 39, Definition 41, Proposition 305, Proposition 306.

LaTeX source
\begin{proof}
    Follows by \cref{quasiconnex,strongly_quasiconnex,quasireflexive_implies_reflexive_on_fld,reflexive_on,fld,reflexive_on_fld_impliesquasireflexive}.
\end{proof}
Proposition 314
connex_reaches_all_or_all_but_one

Suppose $R$ is connex on $A$.
Let $a, b\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\ran{R}$.
Then $a = b$.

LaTeX source
\begin{proposition}
\label{connex_reaches_all_or_all_but_one}
    Suppose $R$ is connex on $A$.
    Let $a, b\in A\setminus\ran{R}$.
    Then $a = b$.
\end{proposition}
Proof

Suppose not.
$a, b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Then $(a, b)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ or $(b,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ by Definition 40.
$(a, b)\class{latex-symbol-tip latex-symbol-id-notin}{\notin} R$.
$(b, a)\class{latex-symbol-tip latex-symbol-id-notin}{\notin} R$.
Thus $a = b$.

LaTeX source
\begin{proof}
    Suppose not.
    $a, b\in A$.
    Then $(a, b)\in R$ or $(b,a)\in R$ by \cref{connex}.
    $(a, b)\notin R$.
    $(b, a)\notin R$.
    Thus $a = b$.
\end{proof}
Definition 43
righteuclidean

$R$ is right Euclidean iff for all $a,b,c$ such that $a\mathrel{R}b,c$ we have $b\mathrel{R}c$.

LaTeX source
\begin{definition}
\label{righteuclidean}
    $R$ is right Euclidean iff
    for all $a,b,c$ such that $a\mathrel{R}b,c$ we have $b\mathrel{R}c$.
\end{definition}
Definition 44
lefteuclidean

$R$ is left Euclidean iff for all $a,b,c$ such that $a,b\mathrel{R}c$ we have $a\mathrel{R}b$.

LaTeX source
\begin{definition}
\label{lefteuclidean}
    $R$ is left Euclidean iff
    for all $a,b,c$ such that $a,b\mathrel{R}c$ we have $a\mathrel{R}b$.
\end{definition}

Quasiorders

Abbreviation 21
quasiorder

$R$ is a quasiorder iff $R$ is quasireflexive and transitive.

LaTeX source
\begin{abbreviation}
\label{quasiorder}
    $R$ is a quasiorder iff
    $R$ is quasireflexive and transitive.
\end{abbreviation}
Abbreviation 22
quasiorder_on

$R$ is a quasiorder on $A$ iff $R$ is a binary relation on $A$ and $R$ is reflexive on $A$ and transitive.

LaTeX source
\begin{abbreviation}
\label{quasiorder_on}
    $R$ is a quasiorder on $A$ iff
        $R$ is a binary relation on $A$ and
        $R$ is reflexive on $A$ and transitive.
\end{abbreviation}
Struct 1
quasiordered_set

A quasiordered set $X$ is a onesorted structure equipped with

  1. $\lt$

such that

  1. \label{quasiorder_type} $\lt[X]$ is a binary relation on $\carrier[X]$.

  2. \label{quasiorder_refl} $\lt[X]$ is reflexive on $\carrier[X]$.

  3. \label{quasiorder_tran} $\lt[X]$ is transitive.

LaTeX source
\begin{struct}
\label{quasiordered_set}
    A quasiordered set $X$ is a onesorted structure
    equipped with
        \begin{enumerate}
            \item $\lt$
        \end{enumerate}
    such that
    \begin{enumerate}
        \item\label{quasiorder_type} $\lt[X]$ is a binary relation on $\carrier[X]$.
        \item\label{quasiorder_refl} $\lt[X]$ is reflexive on $\carrier[X]$.
        \item\label{quasiorder_tran} $\lt[X]$ is transitive.
    \end{enumerate}
\end{struct}
Lemma 1
quasiorder_transitive_double

Let $X$ be a quasiordered set.
Let $a, b, c, d \class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Suppose $a\mathrel{\lt[X]} b\mathrel{\lt[X]} c\mathrel{\lt[X]} d$.
Then $a\mathrel{\lt[X]} d$.

LaTeX source
\begin{lemma}
\label{quasiorder_transitive_double}
    Let $X$ be a quasiordered set.
    Let $a, b, c, d \in X$.
    Suppose $a\mathrel{\lt[X]} b\mathrel{\lt[X]} c\mathrel{\lt[X]} d$.
    Then $a\mathrel{\lt[X]} d$.
\end{lemma}
Proof

$\lt[X]$ is transitive.
Thus $a\mathrel{\lt[X]} c\mathrel{\lt[X]} d$ by Definition 37 [Transitivity].
Hence $a\mathrel{\lt[X]} d$ by Definition 37 [Transitivity].

LaTeX source
\begin{proof}
    $\lt[X]$ is transitive.
    Thus $a\mathrel{\lt[X]} c\mathrel{\lt[X]} d$ by \cref{transitive}.
    Hence $a\mathrel{\lt[X]} d$ by \cref{transitive}.
\end{proof}
Proposition 315
subseteqrel_is_quasiorder

$\subseteqrel{A}$ is a quasiorder on $A$.

LaTeX source
\begin{proposition}
\label{subseteqrel_is_quasiorder}
    $\subseteqrel{A}$ is a quasiorder on $A$.
\end{proposition}
Proof

$\subseteqrel{A}$ is reflexive on $A$.
$\subseteqrel{A}$ is transitive.

LaTeX source
\begin{proof}
    $\subseteqrel{A}$ is reflexive on $A$.
    $\subseteqrel{A}$ is transitive.
\end{proof}

Equivalences

Abbreviation 23
partialequivalence

$E$ is a partial equivalence iff $E$ is transitive and symmetric.

LaTeX source
\begin{abbreviation}
\label{partialequivalence}
    $E$ is a partial equivalence iff
    $E$ is transitive and symmetric.
\end{abbreviation}
Proposition 316
partialequivalence_is_quasireflexive

Let $E$ be a partial equivalence.
Then $E$ is quasireflexive.

LaTeX source
\begin{proposition}
\label{partialequivalence_is_quasireflexive}
    Let $E$ be a partial equivalence.
    Then $E$ is quasireflexive.
\end{proposition}
Abbreviation 24
equivalence

$E$ is an equivalence iff $E$ is a symmetric quasiorder.

LaTeX source
\begin{abbreviation}
\label{equivalence}
    $E$ is an equivalence iff
    $E$ is a symmetric quasiorder.
\end{abbreviation}
Abbreviation 25
equivalence_on

$E$ is an equivalence on $A$ iff $E$ is a symmetric quasiorder on $A$.

LaTeX source
\begin{abbreviation}
\label{equivalence_on}
    $E$ is an equivalence on $A$ iff
    $E$ is a symmetric quasiorder on $A$.
\end{abbreviation}
Proposition 317
inters_of_family_of_equivalences_is_equivalence

Let $F$ be a family of relations.
Suppose every element of $F$ is an equivalence.
Then $\inters{F}$ is an equivalence.

LaTeX source
\begin{proposition}
\label{inters_of_family_of_equivalences_is_equivalence}
    Let $F$ be a family of relations.
    Suppose every element of $F$ is an equivalence.
    Then $\inters{F}$ is an equivalence.
\end{proposition}
Proof

$\inters{F}$ is quasireflexive by Definition 30, Proposition 30, Proposition 32.
$\inters{F}$ is symmetric by Definition 35 [Symmetry], Proposition 30, Proposition 32.
$\inters{F}$ is transitive by Definition 37 [Transitivity], Proposition 30, Proposition 32.

LaTeX source
\begin{proof}
    $\inters{F}$ is quasireflexive by \cref{quasireflexive,inters_destr,inters_iff_forall}.
    $\inters{F}$ is symmetric by \cref{symmetric,inters_iff_forall,inters_destr}.
    $\inters{F}$ is transitive by \cref{transitive,inters_iff_forall,inters_destr}.
\end{proof}
Proposition 318
inters_of_family_of_equivalences_on_a_set_is_equivalence_on_that_set

Let $F$ be an inhabited family of relations.
Suppose every element of $F$ is an equivalence on $A$.
Then $\inters{F}$ is an equivalence on $A$.

LaTeX source
\begin{proposition}
\label{inters_of_family_of_equivalences_on_a_set_is_equivalence_on_that_set}
    Let $F$ be an inhabited family of relations.
    Suppose every element of $F$ is an equivalence on $A$.
    Then $\inters{F}$ is an equivalence on $A$.
\end{proposition}
Proof

$\inters{F}$ is reflexive on $A$ by Proposition 307.
$\inters{F}$ is symmetric.
$\inters{F}$ is transitive.

LaTeX source
\begin{proof}
    $\inters{F}$ is reflexive on $A$ by \cref{inters_of_family_of_reflexive_relations_is_reflexive}.
    $\inters{F}$ is symmetric.
    $\inters{F}$ is transitive.
\end{proof}
Equivalence classes
Abbreviation 26
equiv_class

$\equivalenceClass{E}{a} = \downward{E}{a}$.

LaTeX source
\begin{abbreviation}
\label{equiv_class}
    $\equivalenceClass{E}{a} = \downward{E}{a}$.
\end{abbreviation}
Abbreviation 27
equivclass_abbr

The $E$-equivalence class of $a$ is $\equivalenceClass{E}{a}$.

LaTeX source
\begin{abbreviation}
\label{equivclass_abbr}
    The $E$-equivalence class of $a$ is $\equivalenceClass{E}{a}$.
\end{abbreviation}
Proposition 319
equivclasses_inhabited

Let $E$ be an equivalence.
Let $a\class{latex-symbol-tip latex-symbol-id-in}{\in} \fld{E}$.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\equivalenceClass{E}{a}$.

LaTeX source
\begin{proposition}
\label{equivclasses_inhabited}
    Let $E$ be an equivalence.
    Let $a\in \fld{E}$.
    Then $a\in\equivalenceClass{E}{a}$.
\end{proposition}
Proof

$a\mathrel{E} a$ by Definition 32, Proposition 305.

LaTeX source
\begin{proof}
    $a\mathrel{E} a$ by \cref{reflexive_on,quasireflexive_implies_reflexive_on_fld}.
\end{proof}
Proposition 320
equivclasses_inhabited_equivalenceon

Let $E$ be an equivalence on $A$.
Let $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\equivalenceClass{E}{a}$.

LaTeX source
\begin{proposition}
\label{equivclasses_inhabited_equivalenceon}
    Let $E$ be an equivalence on $A$.
    Let $a\in A$.
    Then $a\in\equivalenceClass{E}{a}$.
\end{proposition}
Proof

$a\mathrel{E} a$ by Definition 32.

LaTeX source
\begin{proof}
    $a\mathrel{E} a$ by \cref{reflexive_on}.
\end{proof}
Proposition 321
equiv_implies_equivanlence_classes_eq

Let $E$ be an equivalence on $A$.
Let $a, b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Suppose $a\mathrel{E} b$.
Then $\equivalenceClass{E}{a} = \equivalenceClass{E}{b}$.

LaTeX source
\begin{proposition}
\label{equiv_implies_equivanlence_classes_eq}
    Let $E$ be an equivalence on $A$.
    Let $a, b\in A$.
    Suppose $a\mathrel{E} b$.
    Then $\equivalenceClass{E}{a} = \equivalenceClass{E}{b}$.
\end{proposition}
Proof

Follows by set extensionality.

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

Let $E$ be an equivalence on $A$.
Let $a, b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Suppose $\equivalenceClass{E}{a} = \equivalenceClass{E}{b}$.
Then $a\mathrel{E} b$.

LaTeX source
\begin{proposition}
\label{equivclasses_eq_implies_equiv}
    Let $E$ be an equivalence on $A$.
    Let $a, b\in A$.
    Suppose $\equivalenceClass{E}{a} = \equivalenceClass{E}{b}$.
    Then $a\mathrel{E} b$.
\end{proposition}
Proposition 323
equiv_iff_equivclasses_eq

Let $E$ be an equivalence on $A$.
Let $a, b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Then $a\mathrel{E} b$ iff $\equivalenceClass{E}{a} = \equivalenceClass{E}{b}$.

LaTeX source
\begin{proposition}
\label{equiv_iff_equivclasses_eq}
    Let $E$ be an equivalence on $A$.
    Let $a, b\in A$.
    Then $a\mathrel{E} b$ iff $\equivalenceClass{E}{a} = \equivalenceClass{E}{b}$.
\end{proposition}
Proposition 324
equivclasses_diseq_implies_disjoint

Let $E$ be a partial equivalence.
Suppose $\equivalenceClass{E}{a}\class{latex-symbol-tip latex-symbol-id-neq}{\neq} \equivalenceClass{E}{b}$.
Then $\equivalenceClass{E}{a}$ is disjoint from $\equivalenceClass{E}{b}$.

LaTeX source
\begin{proposition}
\label{equivclasses_diseq_implies_disjoint}
    Let $E$ be a partial equivalence.
    Suppose $\equivalenceClass{E}{a}\neq \equivalenceClass{E}{b}$.
    Then $\equivalenceClass{E}{a}$ is disjoint from $\equivalenceClass{E}{b}$.
\end{proposition}
Proof

Suppose not.
Take $c$ such that $c\class{latex-symbol-tip latex-symbol-id-in}{\in} \equivalenceClass{E}{a},\equivalenceClass{E}{b}$.
Then $c\mathrel{E} a$ and $c\mathrel{E} b$.
$E$ is symmetric.
Thus $a\mathrel{E} c$ by Definition 35 [Symmetry].
$E$ is transitive.
Thus $a\mathrel{E} b$ by Definition 37 [Transitivity].
Then $b\mathrel{E} a$ by Definition 35 [Symmetry].

Thus $a\class{latex-symbol-tip latex-symbol-id-in}{\in} \equivalenceClass{E}{b}$ and $b\class{latex-symbol-tip latex-symbol-id-in}{\in} \equivalenceClass{E}{a}$ by Proposition 253.
Hence $\equivalenceClass{E}{a}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \equivalenceClass{E}{b}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \equivalenceClass{E}{a}$ by Proposition 312.
Contradiction by Proposition 3.

LaTeX source
\begin{proof}
    Suppose not.
    Take $c$ such that $c\in \equivalenceClass{E}{a},\equivalenceClass{E}{b}$.
    Then $c\mathrel{E} a$ and
         $c\mathrel{E} b$.
    $E$ is symmetric.
    Thus $a\mathrel{E} c$ by \cref{symmetric}.
    $E$ is transitive.
    Thus $a\mathrel{E} b$ by \cref{transitive}.
    Then $b\mathrel{E} a$ by \cref{symmetric}.
    
    Thus $a\in \equivalenceClass{E}{b}$ and $b\in \equivalenceClass{E}{a}$
        by \cref{downward_closure_iff}.
    Hence $\equivalenceClass{E}{a}\subseteq \equivalenceClass{E}{b}\subseteq \equivalenceClass{E}{a}$
        by \cref{transitive_downward_subseteq}.
    Contradiction by \cref{subseteq_antisymmetric}.
\end{proof}
Corollary 4
equivalence_equivclasses_diseq_implies_disjoint

Let $E$ be an equivalence.
Suppose $\equivalenceClass{E}{a}\class{latex-symbol-tip latex-symbol-id-neq}{\neq} \equivalenceClass{E}{b}$.
Then $\equivalenceClass{E}{a}$ is disjoint from $\equivalenceClass{E}{b}$.

LaTeX source
\begin{corollary}
\label{equivalence_equivclasses_diseq_implies_disjoint}
    Let $E$ be an equivalence.
    Suppose $\equivalenceClass{E}{a}\neq \equivalenceClass{E}{b}$.
    Then $\equivalenceClass{E}{a}$ is disjoint from $\equivalenceClass{E}{b}$.
\end{corollary}
Proof

Follows by Proposition 324.

LaTeX source
\begin{proof}
    Follows by \cref{equivclasses_diseq_implies_disjoint}.
\end{proof}
Corollary 5
equivalenceon_equivclasses_diseq_implies_disjoint

Let $E$ be an equivalence on $A$.
Suppose $\equivalenceClass{E}{a}\class{latex-symbol-tip latex-symbol-id-neq}{\neq} \equivalenceClass{E}{b}$.
Then $\equivalenceClass{E}{a}$ is disjoint from $\equivalenceClass{E}{b}$.

LaTeX source
\begin{corollary}
\label{equivalenceon_equivclasses_diseq_implies_disjoint}
    Let $E$ be an equivalence on $A$.
    Suppose $\equivalenceClass{E}{a}\neq \equivalenceClass{E}{b}$.
    Then $\equivalenceClass{E}{a}$ is disjoint from $\equivalenceClass{E}{b}$.
\end{corollary}
Proof

Follows by Proposition 324.

LaTeX source
\begin{proof}
    Follows by \cref{equivclasses_diseq_implies_disjoint}.
\end{proof}
Quotients
Definition 45
quotient

$\quotient{A}{E} = \{\equivalenceClass{E}{a}\mid a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\}$.

LaTeX source
\begin{definition}
\label{quotient}
    $\quotient{A}{E} = \{\equivalenceClass{E}{a}\mid a\in A\}$.
\end{definition}
Proposition 325
quotient_emptyset

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

LaTeX source
\begin{proposition}
\label{quotient_emptyset}
    $\quotient{\emptyset}{\emptyset} = \emptyset$.
\end{proposition}
Proposition 326
quotient_elems_disjoint

Let $E$ be an equivalence on $A$.
Suppose $B,C\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{E}$ and $B\class{latex-symbol-tip latex-symbol-id-neq}{\neq} C$.
Then $B$ is disjoint from $C$.

LaTeX source
\begin{proposition}
\label{quotient_elems_disjoint}
    Let $E$ be an equivalence on $A$.
    Suppose $B,C\in\quotient{A}{E}$ and $B\neq C$.
    Then $B$ is disjoint from $C$.
\end{proposition}
Proof

Take $b$ such that $B = \equivalenceClass{E}{b}$.
Take $c$ such that $C = \equivalenceClass{E}{c}$.
Then $B$ is disjoint from $C$ by Corollary 5.

LaTeX source
\begin{proof}
    Take $b$ such that $B = \equivalenceClass{E}{b}$.
    Take $c$ such that $C = \equivalenceClass{E}{c}$.
    Then $B$ is disjoint from $C$ by \cref{equivalenceon_equivclasses_diseq_implies_disjoint}.
\end{proof}
Proposition 327
quotient_elems_inhabited

Let $E$ be an equivalence on $A$.
Suppose $C\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{E}$.
Then $C$ is inhabited.

LaTeX source
\begin{proposition}
\label{quotient_elems_inhabited}
    Let $E$ be an equivalence on $A$.
    Suppose $C\in\quotient{A}{E}$.
    Then $C$ is inhabited.
\end{proposition}
Proof

Take $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $C = \equivalenceClass{E}{a}$.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in} \equivalenceClass{E}{a}$.
$C$ is inhabited by Definition 45, Proposition 319.

LaTeX source
\begin{proof}
    Take $a\in A$ such that $C = \equivalenceClass{E}{a}$.
    Then $a\in \equivalenceClass{E}{a}$.
    $C$ is inhabited by \cref{quotient,equivclasses_inhabited}.
\end{proof}
Proposition 328
quotient_elems_type

Let $E$ be an equivalence on $A$.
Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} C\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{E}$.
Then $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

LaTeX source
\begin{proposition}
\label{quotient_elems_type}
    Let $E$ be an equivalence on $A$.
    Suppose $a\in C\in\quotient{A}{E}$.
    Then $a\in A$.
\end{proposition}
Proof

Take $b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $C = \equivalenceClass{E}{b}$ by Definition 45.
Then $a\mathrel{E} b$.
Thus $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 1, Proposition 114.

LaTeX source
\begin{proof}
    Take $b\in A$ such that $C = \equivalenceClass{E}{b}$
        by \cref{quotient}.
    Then $a\mathrel{E} b$.
    Thus $a\in A$ by \cref{times_tuple_elim,subseteq}.
\end{proof}
Corollary 6
quotient_notni_emptyset

Let $E$ be an equivalence on $A$.
$\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\quotient{A}{E}$.

LaTeX source
\begin{corollary}
\label{quotient_notni_emptyset}
    Let $E$ be an equivalence on $A$.
    $\emptyset\notin\quotient{A}{E}$.
\end{corollary}
Proposition 329
quotient_partition

Let $E$ be an equivalence on $A$.
$\quotient{A}{E}$ is a partition.

LaTeX source
\begin{proposition}
\label{quotient_partition}
    Let $E$ be an equivalence on $A$.
    $\quotient{A}{E}$ is a partition.
\end{proposition}
Proof

$\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\quotient{A}{E}$.
For all $B, C\class{latex-symbol-tip latex-symbol-id-in}{\in} \quotient{A}{E}$ such that $B\class{latex-symbol-tip latex-symbol-id-neq}{\neq} C$ we have $B$ is disjoint from $C$.

LaTeX source
\begin{proof}
    $\emptyset\notin\quotient{A}{E}$.
    For all $B, C\in \quotient{A}{E}$ such that $B\neq C$ we have $B$ is disjoint from $C$.
\end{proof}
Proposition 330
quotient_partition_of

Let $E$ be an equivalence on $A$.
$\quotient{A}{E}$ is a partition of $A$.

LaTeX source
\begin{proposition}
\label{quotient_partition_of}
    Let $E$ be an equivalence on $A$.
    $\quotient{A}{E}$ is a partition of $A$.
\end{proposition}
Proof

$\unions{(\quotient{A}{E})} = A$ by set extensionality.

LaTeX source
\begin{proof}
    $\unions{(\quotient{A}{E})} = A$ by set extensionality.
\end{proof}
Definition 46
equivalence_from_partition

$\equivfrompartition{P}{A} = \{(a, b)\mid a\class{latex-symbol-tip latex-symbol-id-in}{\in} A, b\class{latex-symbol-tip latex-symbol-id-in}{\in} A\mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} C\class{latex-symbol-tip latex-symbol-id-in}{\in} P.\ a, b\class{latex-symbol-tip latex-symbol-id-in}{\in} C\}$.

LaTeX source
\begin{definition}
\label{equivalence_from_partition}
    $\equivfrompartition{P}{A} = \{(a, b)\mid a\in A, b\in A\mid \exists C\in P.\ a, b\in C\}$.
\end{definition}
Proposition 331
equivalence_from_partition_intro

Let $P$ be a partition of $A$.
Let $a,b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Suppose $a,b\class{latex-symbol-tip latex-symbol-id-in}{\in} C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$.
Then $a\mathrel{\equivfrompartition{P}{A}} b$.

LaTeX source
\begin{proposition}
\label{equivalence_from_partition_intro}
    Let $P$ be a partition of $A$.
    Let $a,b\in A$.
    Suppose $a,b\in C\in P$.
    Then $a\mathrel{\equivfrompartition{P}{A}} b$.
\end{proposition}
Proposition 332
equivalence_from_partition_reflexive

Let $P$ be a partition of $A$.
$\equivfrompartition{P}{A}$ is reflexive on $A$.

LaTeX source
\begin{proposition}
\label{equivalence_from_partition_reflexive}
    Let $P$ be a partition of $A$.
    $\equivfrompartition{P}{A}$ is reflexive on $A$.
\end{proposition}
Proposition 333
equivalence_from_partition_symmetric

Let $P$ be a partition.
$\equivfrompartition{P}{A}$ is symmetric.

LaTeX source
\begin{proposition}
\label{equivalence_from_partition_symmetric}
    Let $P$ be a partition.
    $\equivfrompartition{P}{A}$ is symmetric.
\end{proposition}
Proof

It suffices to show that for all $a,b$ we have $a\mathrel{\equivfrompartition{P}{A}}b$ iff $b\mathrel{\equivfrompartition{P}{A}}a$ by Definition 35 [Symmetry].
Fix $a$.
Fix $b$.

Claim: If $a\mathrel{\equivfrompartition{P}{A}}b$ then $b\mathrel{\equivfrompartition{P}{A}}a$.

Assume $a\mathrel{\equivfrompartition{P}{A}}b$.
$a,b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Axiom 6, Definition 46.
Take $C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ such that $a,b\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Axiom 6, Definition 46.
Then $b,a\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Thus $b\mathrel{\equivfrompartition{P}{A}}a$ by Definition 46.

Claim: If $b\mathrel{\equivfrompartition{P}{A}}a$ then $a\mathrel{\equivfrompartition{P}{A}}b$.

Assume $b\mathrel{\equivfrompartition{P}{A}}a$.
$b,a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Axiom 6, Definition 46.
Take $C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ such that $b,a\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Axiom 6, Definition 46.
Then $a,b\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Thus $a\mathrel{\equivfrompartition{P}{A}}b$ by Definition 46.

LaTeX source
\begin{proof}
    It suffices to show that for all $a,b$ we have
        $a\mathrel{\equivfrompartition{P}{A}}b$ iff
        $b\mathrel{\equivfrompartition{P}{A}}a$
        by \cref{symmetric}.
    Fix $a$.
    Fix $b$.
    Show if $a\mathrel{\equivfrompartition{P}{A}}b$ then
        $b\mathrel{\equivfrompartition{P}{A}}a$.
    \begin{subproof}
        Assume $a\mathrel{\equivfrompartition{P}{A}}b$.
        $a,b\in A$ by \cref{equivalence_from_partition,pair_eq_iff}.
        Take $C\in P$ such that $a,b\in C$
            by \cref{equivalence_from_partition,pair_eq_iff}.
        Then $b,a\in C$.
        Thus $b\mathrel{\equivfrompartition{P}{A}}a$
            by \cref{equivalence_from_partition}.
    \end{subproof}
    Show if $b\mathrel{\equivfrompartition{P}{A}}a$ then
        $a\mathrel{\equivfrompartition{P}{A}}b$.
    \begin{subproof}
        Assume $b\mathrel{\equivfrompartition{P}{A}}a$.
        $b,a\in A$ by \cref{equivalence_from_partition,pair_eq_iff}.
        Take $C\in P$ such that $b,a\in C$
            by \cref{equivalence_from_partition,pair_eq_iff}.
        Then $a,b\in C$.
        Thus $a\mathrel{\equivfrompartition{P}{A}}b$
            by \cref{equivalence_from_partition}.
    \end{subproof}
\end{proof}
Proposition 334
equivalence_from_partition_transitive

Let $P$ be a partition.
$\equivfrompartition{P}{A}$ is transitive.

LaTeX source
\begin{proposition}
\label{equivalence_from_partition_transitive}
    Let $P$ be a partition.
    $\equivfrompartition{P}{A}$ is transitive.
\end{proposition}
Proof

It suffices to show that for all $a,b,c$ such that $a\mathrel{\equivfrompartition{P}{A}}b \mathrel{\equivfrompartition{P}{A}}c$ we have $a\mathrel{\equivfrompartition{P}{A}}c$ by Definition 37 [Transitivity].
Fix $a$.
Fix $b$.
Fix $c$.
Assume $a\mathrel{\equivfrompartition{P}{A}}b \mathrel{\equivfrompartition{P}{A}}c$.
$a,b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Axiom 6, Definition 46.
$b,c\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Axiom 6, Definition 46.
Take $C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ such that $a,b\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Axiom 6, Definition 46.
Take $D\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ such that $b,c\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ by Axiom 6, Definition 46.

Claim: $C=D$.

Suppose not.
$C$ is disjoint from $D$ by Definition 10.
Thus $b\class{latex-symbol-tip latex-symbol-id-notin}{\notin} D$ by Definition 3.
Contradiction.

Hence $a,c\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Thus $a\mathrel{\equivfrompartition{P}{A}}c$ by Definition 46.

LaTeX source
\begin{proof}
    It suffices to show that for all $a,b,c$ such that
        $a\mathrel{\equivfrompartition{P}{A}}b
        \mathrel{\equivfrompartition{P}{A}}c$
        we have $a\mathrel{\equivfrompartition{P}{A}}c$
        by \cref{transitive}.
    Fix $a$.
    Fix $b$.
    Fix $c$.
    Assume $a\mathrel{\equivfrompartition{P}{A}}b
        \mathrel{\equivfrompartition{P}{A}}c$.
    $a,b\in A$ by \cref{equivalence_from_partition,pair_eq_iff}.
    $b,c\in A$ by \cref{equivalence_from_partition,pair_eq_iff}.
    Take $C\in P$ such that $a,b\in C$
        by \cref{equivalence_from_partition,pair_eq_iff}.
    Take $D\in P$ such that $b,c\in D$
        by \cref{equivalence_from_partition,pair_eq_iff}.
    Show $C=D$.
    \begin{subproof}
        Suppose not.
        $C$ is disjoint from $D$ by \cref{partition}.
        Thus $b\notin D$ by \cref{disjoint}.
        Contradiction.
    \end{subproof}
    Hence $a,c\in C$.
    Thus $a\mathrel{\equivfrompartition{P}{A}}c$
        by \cref{equivalence_from_partition}.
\end{proof}
Proposition 335
equivalence_from_partition_is_equivalence

Let $P$ be a partition of $A$.
$\equivfrompartition{P}{A}$ is an equivalence on $A$.

LaTeX source
\begin{proposition}
\label{equivalence_from_partition_is_equivalence}
    Let $P$ be a partition of $A$.
    $\equivfrompartition{P}{A}$ is an equivalence on $A$.
\end{proposition}
Proof

$\equivfrompartition{P}{A}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A\class{latex-symbol-tip latex-symbol-id-times}{\times} A$ by Axiom 6, Definition 1, Definition 46, Proposition 115.
Thus $\equivfrompartition{P}{A}$ is a binary relation on $A$.
$\equivfrompartition{P}{A}$ is reflexive on $A$ by Proposition 332.
$\equivfrompartition{P}{A}$ is transitive by Proposition 334.
$\equivfrompartition{P}{A}$ is symmetric by Proposition 333.

LaTeX source
\begin{proof}
    $\equivfrompartition{P}{A}\subseteq A\times A$
        by \cref{equivalence_from_partition,subseteq,times_tuple_intro,pair_eq_iff}.
    Thus $\equivfrompartition{P}{A}$ is a binary relation on $A$.
    $\equivfrompartition{P}{A}$ is reflexive on $A$
        by \cref{equivalence_from_partition_reflexive}.
    $\equivfrompartition{P}{A}$ is transitive
        by \cref{equivalence_from_partition_transitive}.
    $\equivfrompartition{P}{A}$ is symmetric
        by \cref{equivalence_from_partition_symmetric}.
\end{proof}
Proposition 336
equivalence_from_quotient

Let $E$ be an equivalence on $A$.
Then $\equivfrompartition{\quotient{A}{E}}{A} = E$.

LaTeX source
\begin{proposition}
\label{equivalence_from_quotient}
    Let $E$ be an equivalence on $A$.
    Then $\equivfrompartition{\quotient{A}{E}}{A} = E$.
\end{proposition}
Proof

$E$ is a binary relation on $A$.
Hence $E\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{A}$ by Proposition 280.
Thus $E$ is a relation by Proposition 285.
$\quotient{A}{E}$ is a partition of $A$ by Proposition 330.
Hence $\equivfrompartition{\quotient{A}{E}}{A}$ is an equivalence on $A$ by Proposition 335.
Thus $\equivfrompartition{\quotient{A}{E}}{A}$ is a binary relation on $A$.
Hence $\equivfrompartition{\quotient{A}{E}}{A}\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{A}{A}$ by Proposition 280.
Thus $\equivfrompartition{\quotient{A}{E}}{A}$ is a relation by Proposition 285.
It suffices to show that for all $a,b$ we have $a\mathrel{\equivfrompartition{\quotient{A}{E}}{A}}b$ iff $a\mathrel{E}b$ by Proposition 177.
Fix $a$.
Fix $b$.

Claim: If $a\mathrel{\equivfrompartition{\quotient{A}{E}}{A}}b$ then $a\mathrel{E}b$.

Assume $a\mathrel{\equivfrompartition{\quotient{A}{E}}{A}}b$.
Take $C\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{E}$ such that $a,b\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Axiom 6, Definition 46.
Take $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $C=\equivalenceClass{E}{c}$ by Definition 45.
Then $a\mathrel{E}c$ and $b\mathrel{E}c$ by Proposition 253.
$E$ is symmetric and transitive.
Thus $c\mathrel{E}b$ by Definition 35 [Symmetry].
Hence $a\mathrel{E}b$ by Definition 37 [Transitivity].

Claim: If $a\mathrel{E}b$ then $a\mathrel{\equivfrompartition{\quotient{A}{E}}{A}}b$.

Assume $a\mathrel{E}b$.
Then $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} A\class{latex-symbol-tip latex-symbol-id-times}{\times} A$ by Definition 1.
Hence $a,b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Proposition 114.
Let $C=\equivalenceClass{E}{b}$.
$C\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{E}$ by Definition 45.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Proposition 253.
$b\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Proposition 320.
Thus $a\mathrel{\equivfrompartition{\quotient{A}{E}}{A}}b$ by Proposition 331.

LaTeX source
\begin{proof}
    $E$ is a binary relation on $A$.
    Hence $E\in\rels{A}{A}$ by \cref{rels_intro}.
    Thus $E$ is a relation by \cref{rels_is_relation}.
    $\quotient{A}{E}$ is a partition of $A$
        by \cref{quotient_partition_of}.
    Hence $\equivfrompartition{\quotient{A}{E}}{A}$ is an equivalence on $A$
        by \cref{equivalence_from_partition_is_equivalence}.
    Thus $\equivfrompartition{\quotient{A}{E}}{A}$ is a binary relation on $A$.
    Hence $\equivfrompartition{\quotient{A}{E}}{A}\in\rels{A}{A}$
        by \cref{rels_intro}.
    Thus $\equivfrompartition{\quotient{A}{E}}{A}$ is a relation
        by \cref{rels_is_relation}.
    It suffices to show that for all $a,b$ we have
        $a\mathrel{\equivfrompartition{\quotient{A}{E}}{A}}b$ iff
        $a\mathrel{E}b$
        by \cref{relext}.
    Fix $a$.
    Fix $b$.
    Show if $a\mathrel{\equivfrompartition{\quotient{A}{E}}{A}}b$ then
        $a\mathrel{E}b$.
    \begin{subproof}
        Assume $a\mathrel{\equivfrompartition{\quotient{A}{E}}{A}}b$.
        Take $C\in\quotient{A}{E}$ such that $a,b\in C$
            by \cref{equivalence_from_partition,pair_eq_iff}.
        Take $c\in A$ such that $C=\equivalenceClass{E}{c}$
            by \cref{quotient}.
        Then $a\mathrel{E}c$ and $b\mathrel{E}c$
            by \cref{downward_closure_iff}.
        $E$ is symmetric and transitive.
        Thus $c\mathrel{E}b$ by \cref{symmetric}.
        Hence $a\mathrel{E}b$ by \cref{transitive}.
    \end{subproof}
    Show if $a\mathrel{E}b$ then
        $a\mathrel{\equivfrompartition{\quotient{A}{E}}{A}}b$.
    \begin{subproof}
        Assume $a\mathrel{E}b$.
        Then $(a,b)\in A\times A$ by \cref{subseteq}.
        Hence $a,b\in A$ by \cref{times_tuple_elim}.
        Let $C=\equivalenceClass{E}{b}$.
        $C\in\quotient{A}{E}$ by \cref{quotient}.
        $a\in C$ by \cref{downward_closure_iff}.
        $b\in C$ by \cref{equivclasses_inhabited_equivalenceon}.
        Thus $a\mathrel{\equivfrompartition{\quotient{A}{E}}{A}}b$
            by \cref{equivalence_from_partition_intro}.
    \end{subproof}
\end{proof}
Lemma 2
partition_blocks_meeting_eq

Let $P$ be a partition.
Suppose $C,D\class{latex-symbol-tip latex-symbol-id-in}{\in} P$.
Suppose $c\class{latex-symbol-tip latex-symbol-id-in}{\in} C,D$.
Then $C=D$.

LaTeX source
\begin{lemma}
\label{partition_blocks_meeting_eq}
    Let $P$ be a partition.
    Suppose $C,D\in P$.
    Suppose $c\in C,D$.
    Then $C=D$.
\end{lemma}
Proof

Suppose not.
$C$ is disjoint from $D$ by Definition 10.
Thus $c\class{latex-symbol-tip latex-symbol-id-notin}{\notin} D$ by Definition 3.
Contradiction.

LaTeX source
\begin{proof}
    Suppose not.
    $C$ is disjoint from $D$ by \cref{partition}.
    Thus $c\notin D$ by \cref{disjoint}.
    Contradiction.
\end{proof}
Lemma 3
partition_block_is_equivalence_class

Let $P$ be a partition of $A$.
Suppose $C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$.
Suppose $b\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Then $\equivalenceClass{\equivfrompartition{P}{A}}{b}=C$.

LaTeX source
\begin{lemma}
\label{partition_block_is_equivalence_class}
    Let $P$ be a partition of $A$.
    Suppose $C\in P$.
    Suppose $b\in C$.
    Then $\equivalenceClass{\equivfrompartition{P}{A}}{b}=C$.
\end{lemma}
Proof

$b\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{P}$ by Proposition 27.
Hence $b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
It suffices to show that for all $x$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\equivalenceClass{\equivfrompartition{P}{A}}{b}$ iff $x\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Axiom 1 [Set extensionality].
Fix $x$.

Claim: If $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\equivalenceClass{\equivfrompartition{P}{A}}{b}$ then $x\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.

Assume $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\equivalenceClass{\equivfrompartition{P}{A}}{b}$.
Then $x\mathrel{\equivfrompartition{P}{A}}b$ by Proposition 253.
Take $D\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ such that $x,b\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ by Axiom 6, Definition 46.
$D=C$ by Lemma 2.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.

Claim: If $x\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ then $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\equivalenceClass{\equivfrompartition{P}{A}}{b}$.

Assume $x\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{P}$ by Proposition 27.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Thus $x\mathrel{\equivfrompartition{P}{A}}b$ by Proposition 331.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\equivalenceClass{\equivfrompartition{P}{A}}{b}$ by Proposition 253.

LaTeX source
\begin{proof}
    $b\in\unions{P}$ by \cref{unions_intro}.
    Hence $b\in A$.
    It suffices to show that for all $x$ we have
        $x\in\equivalenceClass{\equivfrompartition{P}{A}}{b}$ iff $x\in C$
        by \cref{setext}.
    Fix $x$.
    Show if $x\in\equivalenceClass{\equivfrompartition{P}{A}}{b}$ then $x\in C$.
    \begin{subproof}
        Assume $x\in\equivalenceClass{\equivfrompartition{P}{A}}{b}$.
        Then $x\mathrel{\equivfrompartition{P}{A}}b$
            by \cref{downward_closure_iff}.
        Take $D\in P$ such that $x,b\in D$
            by \cref{equivalence_from_partition,pair_eq_iff}.
        $D=C$ by \cref{partition_blocks_meeting_eq}.
        Thus $x\in C$.
    \end{subproof}
    Show if $x\in C$ then
        $x\in\equivalenceClass{\equivfrompartition{P}{A}}{b}$.
    \begin{subproof}
        Assume $x\in C$.
        $x\in\unions{P}$ by \cref{unions_intro}.
        Hence $x\in A$.
        Thus $x\mathrel{\equivfrompartition{P}{A}}b$
            by \cref{equivalence_from_partition_intro}.
        Hence $x\in\equivalenceClass{\equivfrompartition{P}{A}}{b}$
            by \cref{downward_closure_iff}.
    \end{subproof}
\end{proof}
Proposition 337
partition_eq_quotient_by_equivalence_from_partition

Let $P$ be a partition of $A$.
Then $\quotient{A}{\equivfrompartition{P}{A}} = P$.

LaTeX source
\begin{proposition}
\label{partition_eq_quotient_by_equivalence_from_partition}
    Let $P$ be a partition of $A$.
    Then $\quotient{A}{\equivfrompartition{P}{A}} = P$.
\end{proposition}
Proof

It suffices to show that for all $C$ we have $C\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{\equivfrompartition{P}{A}}$ iff $C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ by Axiom 1 [Set extensionality].
Fix $C$.

Claim: If $C\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{\equivfrompartition{P}{A}}$ then $C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$.

Assume $C\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{\equivfrompartition{P}{A}}$.
Take $b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $C=\equivalenceClass{\equivfrompartition{P}{A}}{b}$ by Definition 45.
Then $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{P}$.
Take $D\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ such that $b\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ by Axiom 4.
$\equivalenceClass{\equivfrompartition{P}{A}}{b}=D$ by Lemma 3.
Thus $C=D$.
Hence $C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$.

Claim: If $C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$ then $C\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{\equivfrompartition{P}{A}}$.

Assume $C\class{latex-symbol-tip latex-symbol-id-in}{\in} P$.
$C\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Definition 10.
Take $b$ such that $b\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Proposition 10.
$b\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{P}$ by Proposition 27.
Hence $b\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Let $D=\equivalenceClass{\equivfrompartition{P}{A}}{b}$.
$D\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{\equivfrompartition{P}{A}}$ by Definition 45.
$D=C$ by Lemma 3.
Thus $C\class{latex-symbol-tip latex-symbol-id-in}{\in}\quotient{A}{\equivfrompartition{P}{A}}$.

LaTeX source
\begin{proof}
    It suffices to show that for all $C$ we have
        $C\in\quotient{A}{\equivfrompartition{P}{A}}$ iff $C\in P$
        by \cref{setext}.
    Fix $C$.
    Show if $C\in\quotient{A}{\equivfrompartition{P}{A}}$ then $C\in P$.
    \begin{subproof}
        Assume $C\in\quotient{A}{\equivfrompartition{P}{A}}$.
        Take $b\in A$ such that
            $C=\equivalenceClass{\equivfrompartition{P}{A}}{b}$
            by \cref{quotient}.
        Then $b\in\unions{P}$.
        Take $D\in P$ such that $b\in D$ by \cref{unions_iff}.
        $\equivalenceClass{\equivfrompartition{P}{A}}{b}=D$
            by \cref{partition_block_is_equivalence_class}.
        Thus $C=D$.
        Hence $C\in P$.
    \end{subproof}
    Show if $C\in P$ then
        $C\in\quotient{A}{\equivfrompartition{P}{A}}$.
    \begin{subproof}
        Assume $C\in P$.
        $C\neq\emptyset$ by \cref{partition}.
        Take $b$ such that $b\in C$ by \cref{nonempty_inhabited}.
        $b\in\unions{P}$ by \cref{unions_intro}.
        Hence $b\in A$.
        Let $D=\equivalenceClass{\equivfrompartition{P}{A}}{b}$.
        $D\in\quotient{A}{\equivfrompartition{P}{A}}$ by \cref{quotient}.
        $D=C$ by \cref{partition_block_is_equivalence_class}.
        Thus $C\in\quotient{A}{\equivfrompartition{P}{A}}$.
    \end{subproof}
\end{proof}

Closure operations on relations

Definition 47
reflexive_closure

$\reflexiveClosure{X}{R} = R\union\identity{X}$.

LaTeX source
\begin{definition}
\label{reflexive_closure}
    $\reflexiveClosure{X}{R} = R\union\identity{X}$.
\end{definition}
Proposition 338
reflexive_closure_is_reflexive

$\reflexiveClosure{X}{R}$ is reflexive on $X$.

LaTeX source
\begin{proposition}
\label{reflexive_closure_is_reflexive}
    $\reflexiveClosure{X}{R}$ is reflexive on $X$.
\end{proposition}
Definition 48
reflexive_reduction

$\reflexiveReduction{X}{R} = R\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\identity{X}$.

LaTeX source
\begin{definition}
\label{reflexive_reduction}
    $\reflexiveReduction{X}{R} = R\setminus\identity{X}$.
\end{definition}
Definition 49
symmetric_closure

$\symmetricClosure{R} = R\union\converse{R}$.

LaTeX source
\begin{definition}
\label{symmetric_closure}
    $\symmetricClosure{R} = R\union\converse{R}$.
\end{definition}

Injective relations

Definition 50
injective

$R$ is injective iff for all $a,a',b$ such that $a, a'\mathrel{R} b$ we have $a = a'$.

LaTeX source
\begin{definition}
\label{injective}
    $R$ is injective iff for all $a,a',b$ such that $a, a'\mathrel{R} b$ we have $a = a'$.
\end{definition}
Abbreviation 28
leftunique

$R$ is left-unique iff $R$ is injective.

LaTeX source
\begin{abbreviation}
\label{leftunique}
    $R$ is left-unique iff $R$ is injective.
\end{abbreviation}
Proposition 339
subseteq_of_injective_is_injective

Suppose $S\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} R$.
Suppose $R$ is injective.
Then $S$ is injective.

LaTeX source
\begin{proposition}
\label{subseteq_of_injective_is_injective}
    Suppose $S\subseteq R$.
    Suppose $R$ is injective.
    Then $S$ is injective.
\end{proposition}
Proposition 340
restrl_injective

Suppose $R$ is injective.
Then $\restrl{R}{A}$ is injective.

LaTeX source
\begin{proposition}
\label{restrl_injective}
    Suppose $R$ is injective.
    Then $\restrl{R}{A}$ is injective.
\end{proposition}
Proof

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

LaTeX source
\begin{proof}
    $\restrl{R}{A}\subseteq R$.
\end{proof}
Proposition 341
circ_injective

Suppose $R$ and $S$ are injective.
Then $S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R$ is injective.

LaTeX source
\begin{proposition}
\label{circ_injective}
    Suppose $R$ and $S$ are injective.
    Then $S\circ R$ is injective.
\end{proposition}
Proposition 342
identity_injective

Then $\identity{A}$ is injective.

LaTeX source
\begin{proposition}
\label{identity_injective}
    Then $\identity{A}$ is injective.
\end{proposition}

Right-unique relations

Definition 51
rightunique

$R$ is right-unique iff for all $a,b,b'$ such that $a\mathrel{R} b, b'$ we have $b = b'$.

LaTeX source
\begin{definition}
\label{rightunique}
    $R$ is right-unique iff
    for all $a,b,b'$ such that $a\mathrel{R} b, b'$ we have $b = b'$.
\end{definition}
Abbreviation 29
onetoone

$R$ is one-to-one iff $R$ is right-unique and injective.

LaTeX source
\begin{abbreviation}
\label{onetoone}
    $R$ is one-to-one iff $R$ is right-unique and injective.
\end{abbreviation}
Proposition 343
subseteq_of_rightunique_is_rightunique

Suppose $S\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} R$.
Suppose $R$ is right-unique.
Then $S$ is right-unique.

LaTeX source
\begin{proposition}
\label{subseteq_of_rightunique_is_rightunique}
    Suppose $S\subseteq R$.
    Suppose $R$ is right-unique.
    Then $S$ is right-unique.
\end{proposition}
Proposition 344
circ_rightunique

Suppose $R$ and $S$ are right-unique.
Then $S\class{latex-symbol-tip latex-symbol-id-circ}{\circ} R$ is right-unique.

LaTeX source
\begin{proposition}
\label{circ_rightunique}
    Suppose $R$ and $S$ are right-unique.
    Then $S\circ R$ is right-unique.
\end{proposition}

Left-total relations

Definition 52
lefttotal

$R$ is left-total on $A$ iff for all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ there exists $b$ such that $a\mathrel{R} b$.

LaTeX source
\begin{definition}
\label{lefttotal}
    $R$ is left-total on $A$ iff
    for all $a\in A$ there exists $b$ such that $a\mathrel{R} b$.
\end{definition}

Right-total relations

Definition 53
righttotal

$R$ is right-total on $B$ iff for all $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ there exists $a$ such that $a\mathrel{R} b$.

LaTeX source
\begin{definition}
\label{righttotal}
    $R$ is right-total on $B$ iff
    for all $b\in B$ there exists $a$ such that $a\mathrel{R} b$.
\end{definition}
Abbreviation 30
surjective

$R$ is surjective on $B$ iff $R$ is right-total on $B$.

LaTeX source
\begin{abbreviation}
\label{surjective}
    $R$ is surjective on $B$ iff $R$ is right-total on $B$.
\end{abbreviation}