Topology (Munkres)

Standard Library: Axiom of Choice and Consequences

Axiom 54
axiom_of_choice

Suppose $R$ is a relation.
Suppose for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ there exists $y$ such that $x\mathrel{R} y$.
Then there exists $f$ such that $f$ is a function on $A$ and for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $x\mathrel{R} f(x)$.

LaTeX source
\begin{axiom}
\label{axiom_of_choice}
    Suppose $R$ is a relation.
    Suppose for all $x\in A$ there exists $y$ such that $x\mathrel{R} y$.
    Then there exists $f$ such that $f$ is a function on $A$ and for all $x\in A$ we have $x\mathrel{R} f(x)$.
\end{axiom}
Definition 91
finite_intersection_property

$C$ has the finite intersection property iff $C$ is inhabited and for all $F$ such that $F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $F$ is finite and inhabited we have $\inters{F}\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{definition}
\label{finite_intersection_property}
    $C$ has the finite intersection property iff
        $C$ is inhabited and
        for all $F$ such that $F\subseteq C$ and $F$ is finite and inhabited
        we have $\inters{F}\neq\emptyset$.
\end{definition}
Definition 92
maximal_finite_intersection_property_on

$D$ is maximal with respect to the finite intersection property on $X$ iff $D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\pow{X}$ and $D$ has the finite intersection property and for all $E$ such that $D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} E\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\pow{X}$ and $E$ has the finite intersection property we have $E = D$.

LaTeX source
\begin{definition}
\label{maximal_finite_intersection_property_on}
    $D$ is maximal with respect to the finite intersection property on $X$ iff
        $D\subseteq\pow{X}$ and
        $D$ has the finite intersection property and
        for all $E$ such that $D\subseteq E\subseteq\pow{X}$ and $E$ has the finite intersection property
            we have $E = D$.
\end{definition}
Definition 93
chain_in_relation

$C$ is a chain in $P$ with respect to $Q$ iff $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} P$ and for all $x,y\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ we have $x = y$ or $x\mathrel{Q}y$ or $y\mathrel{Q}x$.

LaTeX source
\begin{definition}
\label{chain_in_relation}
    $C$ is a chain in $P$ with respect to $Q$ iff
        $C\subseteq P$ and
        for all $x,y\in C$ we have $x = y$ or $x\mathrel{Q}y$ or $y\mathrel{Q}x$.
\end{definition}
Definition 94
maximal_chain_in_relation

$C$ is a maximal chain in $P$ with respect to $Q$ iff $C$ is a chain in $P$ with respect to $Q$ and for all $D$ such that $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} D$ and $D$ is a chain in $P$ with respect to $Q$ we have $D = C$.

LaTeX source
\begin{definition}
\label{maximal_chain_in_relation}
    $C$ is a maximal chain in $P$ with respect to $Q$ iff
        $C$ is a chain in $P$ with respect to $Q$ and
        for all $D$ such that $C\subseteq D$ and $D$ is a chain in $P$ with respect to $Q$
            we have $D = C$.
\end{definition}
Definition 95
foundational_ordering

$R$ is a foundational ordering on $B$ iff $R$ is a binary relation on $B$ and $R$ is transitive and $R$ is asymmetric and $R$ is connex on $B$ and for all $C$ such that $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$ and $C\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ there exists $c\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ such that for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ we have $c\mathrel{R}x$ or $c = x$.

LaTeX source
\begin{definition}
\label{foundational_ordering}
    $R$ is a foundational ordering on $B$ iff
        $R$ is a binary relation on $B$ and
        $R$ is transitive and
        $R$ is asymmetric and
        $R$ is connex on $B$ and
        for all $C$ such that $C\subseteq B$ and $C\neq\emptyset$
            there exists $c\in C$ such that for all $x\in C$ we have $c\mathrel{R}x$ or $c = x$.
\end{definition}
Definition 96
generated_well_ordering

$R$ is a well ordering generated by $f$ on $B$ iff $R$ is a foundational ordering on $B$ and for all $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $f(\downward{R}{b}) = b$.

LaTeX source
\begin{definition}
\label{generated_well_ordering}
    $R$ is a well ordering generated by $f$ on $B$ iff
        $R$ is a foundational ordering on $B$ and
        for all $b\in B$ we have $f(\downward{R}{b}) = b$.
\end{definition}
Definition 97
common_initial_segment

$I$ is a common initial segment of $R$ on $B$ and $S$ on $C$ iff $I\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B\inter C$ and for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ we have $\downward{R}{i} = \downward{S}{i}$ and $\downward{R}{i}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} I$ and $\downward{S}{i}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} I$.

LaTeX source
\begin{definition}
\label{common_initial_segment}
    $I$ is a common initial segment of $R$ on $B$ and $S$ on $C$ iff
        $I\subseteq B\inter C$ and
        for all $i\in I$ we have
            $\downward{R}{i} = \downward{S}{i}$ and
            $\downward{R}{i}\subseteq I$ and
            $\downward{S}{i}\subseteq I$.
\end{definition}
Lemma 66
empty_common_initial_segment

$\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ is a common initial segment of $R$ on $B$ and $S$ on $C$.

LaTeX source
\begin{lemma}
\label{empty_common_initial_segment}
    $\emptyset$ is a common initial segment of $R$ on $B$ and $S$ on $C$.
\end{lemma}
Proof

Follows by Axiom 2, Definition 97, Proposition 11.

LaTeX source
\begin{proof}
    Follows by \cref{common_initial_segment,emptyset_subseteq,emptyset}.
\end{proof}
Lemma 67
union_common_initial_segments

Suppose every element of $K$ is a common initial segment of $R$ on $B$ and $S$ on $C$.
Then $\unions{K}$ is a common initial segment of $R$ on $B$ and $S$ on $C$.

LaTeX source
\begin{lemma}
\label{union_common_initial_segments}
    Suppose every element of $K$ is a common initial segment of $R$ on $B$ and $S$ on $C$.
    Then $\unions{K}$ is a common initial segment of $R$ on $B$ and $S$ on $C$.
\end{lemma}
Proof

Follows by Axiom 4, Definition 1, Definition 97, Proposition 6, Proposition 29.

LaTeX source
\begin{proof}
    Follows by \cref{common_initial_segment,unions_family,unions_iff,subseteq,subseteq_transitive}.
\end{proof}
Lemma 68
generated_well_orderings_compatible

Suppose $R$ is a well ordering generated by $f$ on $B$.
Suppose $S$ is a well ordering generated by $f$ on $C$.
Then $B$ is a common initial segment of $R$ on $B$ and $S$ on $C$ or $C$ is a common initial segment of $R$ on $B$ and $S$ on $C$.

LaTeX source
\begin{lemma}
\label{generated_well_orderings_compatible}
    Suppose $R$ is a well ordering generated by $f$ on $B$.
    Suppose $S$ is a well ordering generated by $f$ on $C$.
    Then $B$ is a common initial segment of $R$ on $B$ and $S$ on $C$
    or $C$ is a common initial segment of $R$ on $B$ and $S$ on $C$.
\end{lemma}
Proof

Let $K = \{I\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{B\inter C}\mid \text{$I$ is a common initial segment of $R$ on $B$ and $S$ on $C$}\}$.
Let $I = \unions{K}$.
$I$ is a common initial segment of $R$ on $B$ and $S$ on $C$ by Lemma 67.

Claim: $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} I$ or $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} I$.

Suppose not.
Take $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} I$ such that for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} I$ we have $b\mathrel{R}x$ or $b=x$ by Definition 95, Definition 96, Proposition 97, Proposition 101.
Take $c\class{latex-symbol-tip latex-symbol-id-in}{\in} C\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} I$ such that for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} C\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} I$ we have $c\mathrel{S}x$ or $c=x$ by Definition 95, Definition 96, Proposition 97, Proposition 101.

Claim: $\downward{R}{b}=I$.
Claim: $\downward{S}{c}=I$.

Let $J=\cons{b}{I}$.
Contradiction by Axiom 3, Axiom 4, Axiom 12, Definition 6, Definition 96, Definition 97, Proposition 6, Proposition 14, Proposition 61, Proposition 123, Corollary 1.

Case. $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} I$.
Case. $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} I$.
LaTeX source
\begin{byCase}
    \caseOf{$B\subseteq I$.}
        Follows by \cref{common_initial_segment,inter_elim_left,inter_elim_right,subseteq,subseteq_antisymmetric}.
    \caseOf{$C\subseteq I$.}
        Follows by \cref{common_initial_segment,inter_elim_left,inter_elim_right,subseteq,subseteq_antisymmetric}.
    
\end{byCase}
LaTeX source
\begin{proof}
    Let $K = \{I\in\pow{B\inter C}\mid \text{$I$ is a common initial segment of $R$ on $B$ and $S$ on $C$}\}$.
    Let $I = \unions{K}$.
    $I$ is a common initial segment of $R$ on $B$ and $S$ on $C$
        by \cref{union_common_initial_segments}.

    Show $B\subseteq I$ or $C\subseteq I$.
    \begin{subproof}
        Suppose not.
        Take $b\in B\setminus I$ such that for all $x\in B\setminus I$
            we have $b\mathrel{R}x$ or $b=x$ by \cref{setminus_eq_emptyset_iff_subseteq,generated_well_ordering,foundational_ordering,setminus_subseteq}.
        Take $c\in C\setminus I$ such that for all $x\in C\setminus I$
            we have $c\mathrel{S}x$ or $c=x$ by \cref{setminus_eq_emptyset_iff_subseteq,generated_well_ordering,foundational_ordering,setminus_subseteq}.

        Show $\downward{R}{b}=I$.
        \begin{subproof}
            Every element of $I$ is an element of $\downward{R}{b}$
                by \cref{common_initial_segment,inter_elim_left,subseteq,setminus,generated_well_ordering,foundational_ordering,connex,dom_intro,downward_closure}.
            Follows by \cref{generated_well_ordering,foundational_ordering,subseteq,times_tuple_elim,downward_closure,setminus,asymmetric,setext}.
        \end{subproof}

        Show $\downward{S}{c}=I$.
        \begin{subproof}
            Every element of $I$ is an element of $\downward{S}{c}$
                by \cref{common_initial_segment,inter_elim_right,subseteq,setminus,generated_well_ordering,foundational_ordering,connex,dom_intro,downward_closure}.
            Follows by \cref{generated_well_ordering,foundational_ordering,subseteq,times_tuple_elim,downward_closure,setminus,asymmetric,setext}.
        \end{subproof}

        Let $J=\cons{b}{I}$.
        Contradiction by \cref{generated_well_ordering,common_initial_segment,setminus,inter_intro,cons_subseteq_intro,cons_iff,subseteq_cons_self,subseteq_transitive,pow_iff,cons_left,unions_iff}.
    \end{subproof}

    \begin{byCase}
    \caseOf{$B\subseteq I$.}
        Follows by \cref{common_initial_segment,inter_elim_left,inter_elim_right,subseteq,subseteq_antisymmetric}.
    \caseOf{$C\subseteq I$.}
        Follows by \cref{common_initial_segment,inter_elim_left,inter_elim_right,subseteq,subseteq_antisymmetric}.
    \end{byCase}
\end{proof}
Lemma 69
empty_generated_well_ordering

$\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ is a well ordering generated by $f$ on $\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

LaTeX source
\begin{lemma}
\label{empty_generated_well_ordering}
    $\emptyset$ is a well ordering generated by $f$ on $\emptyset$.
\end{lemma}
Proof

Follows by Axiom 2, Definition 36, Definition 37 [Transitivity], Definition 40, Definition 95, Definition 96, Proposition 11, Proposition 12.

LaTeX source
\begin{proof}
    Follows by \cref{generated_well_ordering,foundational_ordering,transitive,asymmetric,connex,emptyset,emptyset_subseteq,subseteq_emptyset_iff}.
\end{proof}
Lemma 70
generated_well_ordering_adjoin

Suppose $R$ is a well ordering generated by $f$ on $B$.
Suppose $c\class{latex-symbol-tip latex-symbol-id-notin}{\notin} B$ and $f(B)=c$.
Suppose $S=R\union(B\class{latex-symbol-tip latex-symbol-id-times}{\times}\{c\})$.
Then $S$ is a well ordering generated by $f$ on $\cons{c}{B}$.

LaTeX source
\begin{lemma}
\label{generated_well_ordering_adjoin}
    Suppose $R$ is a well ordering generated by $f$ on $B$.
    Suppose $c\notin B$ and $f(B)=c$.
    Suppose $S=R\union(B\times\{c\})$.
    Then $S$ is a well ordering generated by $f$ on $\cons{c}{B}$.
\end{lemma}
Proof

Let $C=\cons{c}{B}$.
$R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B\class{latex-symbol-tip latex-symbol-id-times}{\times} B$ by Definition 95, Definition 96.
$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $c\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Proposition 14, Corollary 1.
$S$ is connex on $C$ by Axiom 3, Axiom 5, Axiom 6, Definition 7, Definition 40, Definition 95, Definition 96.

Claim: For all $D$ such that $D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $D\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ there exists $d\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ such that for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ we have $d\mathrel{S}x$ or $d=x$.

Fix $D$.
Assume $D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $D\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

Case. $D\inter B\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

Take $d\class{latex-symbol-tip latex-symbol-id-in}{\in} D\inter B$ such that for all $b\class{latex-symbol-tip latex-symbol-id-in}{\in} D\inter B$ we have $d\mathrel{R}b$ or $d=b$ by Definition 95, Definition 96, Proposition 74.
Follows by Axiom 3, Axiom 5, Axiom 6, Definition 1, Definition 7, Proposition 61, Proposition 62, Proposition 63.

Case. $D\inter B=\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
LaTeX source
\begin{byCase}
        \caseOf{$D\inter B\neq\emptyset$.}
            Take $d\in D\inter B$ such that for all $b\in D\inter B$
                we have $d\mathrel{R}b$ or $d=b$
                by \cref{generated_well_ordering,foundational_ordering,inter_lower_right}.
            Follows by \cref{inter_elim_left,subseteq,cons_iff,inter_intro,inter_elim_right,union_iff,times,pair_eq_iff}.
        \caseOf{$D\inter B=\emptyset$.}
            Follows by \cref{subseteq,cons_iff,inter_intro,emptyset,singleton_iff,nonempty_inhabited}.
        
\end{byCase}

Thus $S$ is a foundational ordering on $C$ by Axiom 5, Definition 1, Definition 36, Definition 37 [Transitivity], Definition 95, Definition 96, Proposition 6, Proposition 20, Proposition 22, Proposition 25, Proposition 44, Proposition 114, Proposition 115, Proposition 143, Proposition 144.

For all $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $\downward{S}{b}=\downward{R}{b}$ by Axiom 5, Definition 1, Definition 21, Proposition 3, Proposition 22, Proposition 114, Proposition 200.

$\downward{S}{c}=B$ by Axiom 5, Definition 1, Definition 21, Proposition 3, Proposition 20, Proposition 114, Proposition 115, Proposition 200.

Follows by Axiom 3, Definition 96.

LaTeX source
\begin{proof}
    Let $C=\cons{c}{B}$.
    $R\subseteq B\times B$ by \cref{generated_well_ordering,foundational_ordering}.
    $B\subseteq C$ and $c\in C$ by \cref{subseteq_cons_self,cons_left}.
    $S$ is connex on $C$
        by \cref{connex,generated_well_ordering,foundational_ordering,cons_iff,union_iff,times,pair_eq_iff}.
    Show that for all $D$ such that $D\subseteq C$ and $D\neq\emptyset$
        there exists $d\in D$ such that for all $x\in D$ we have $d\mathrel{S}x$ or $d=x$.
    \begin{subproof}
        Fix $D$.
        Assume $D\subseteq C$ and $D\neq\emptyset$.
        \begin{byCase}
        \caseOf{$D\inter B\neq\emptyset$.}
            Take $d\in D\inter B$ such that for all $b\in D\inter B$
                we have $d\mathrel{R}b$ or $d=b$
                by \cref{generated_well_ordering,foundational_ordering,inter_lower_right}.
            Follows by \cref{inter_elim_left,subseteq,cons_iff,inter_intro,inter_elim_right,union_iff,times,pair_eq_iff}.
        \caseOf{$D\inter B=\emptyset$.}
            Follows by \cref{subseteq,cons_iff,inter_intro,emptyset,singleton_iff,nonempty_inhabited}.
        \end{byCase}
    \end{subproof}

    Thus $S$ is a foundational ordering on $C$
        by \cref{singleton_subset_intro,times_subseteq_left,times_subseteq_right,subseteq_transitive,union_subsets_is_subset,transitive,asymmetric,union_iff,generated_well_ordering,foundational_ordering,subseteq,times_tuple_elim,times_tuple_intro,singleton_iff,singleton_intro}.

    For all $b\in B$ we have $\downward{S}{b}=\downward{R}{b}$
        by \cref{subseteq,downward_closure,union_iff,times_tuple_elim,singleton_iff,dom_intro,subseteq_antisymmetric}.

    $\downward{S}{c}=B$
        by \cref{subseteq,downward_closure,union_iff,times_tuple_elim,times_tuple_intro,singleton_intro,dom_intro,subseteq_antisymmetric}.

    Follows by \cref{cons_iff,generated_well_ordering}.
\end{proof}
Lemma 71
common_initial_segment_relation_subseteq

Suppose $R$ is a well ordering generated by $f$ on $B$.
Suppose $S$ is a well ordering generated by $f$ on $C$.
Suppose $B$ is a common initial segment of $R$ on $B$ and $S$ on $C$.
Then $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} S$.

LaTeX source
\begin{lemma}
\label{common_initial_segment_relation_subseteq}
    Suppose $R$ is a well ordering generated by $f$ on $B$.
    Suppose $S$ is a well ordering generated by $f$ on $C$.
    Suppose $B$ is a common initial segment of $R$ on $B$ and $S$ on $C$.
    Then $R\subseteq S$.
\end{lemma}
Proof

Follows by Definition 1, Definition 21, Definition 95, Definition 96, Definition 97, Proposition 121, Proposition 200.

LaTeX source
\begin{proof}
    Follows by \cref{subseteq,generated_well_ordering,foundational_ordering,times_elem_is_tuple,dom_intro,downward_closure,common_initial_segment}.
\end{proof}
Lemma 72
common_initial_segment_symmetric

Suppose $I$ is a common initial segment of $R$ on $B$ and $S$ on $C$.
Then $I$ is a common initial segment of $S$ on $C$ and $R$ on $B$.

LaTeX source
\begin{lemma}
\label{common_initial_segment_symmetric}
    Suppose $I$ is a common initial segment of $R$ on $B$ and $S$ on $C$.
    Then $I$ is a common initial segment of $S$ on $C$ and $R$ on $B$.
\end{lemma}
Proof

Follows by Definition 97, Proposition 65 [Commutativity of intersection].

LaTeX source
\begin{proof}
    Follows by \cref{common_initial_segment,inter_comm}.
\end{proof}
Lemma 73
union_generated_well_orderings

Suppose $G$ is inhabited.
Suppose for all $p\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ we have $\snd{p}$ is a well ordering generated by $f$ on $\fst{p}$.
Suppose $U=\{\fst{p}\mid p\class{latex-symbol-tip latex-symbol-id-in}{\in} G\}$ and $V=\{\snd{p}\mid p\class{latex-symbol-tip latex-symbol-id-in}{\in} G\}$.
Suppose $B=\unions{U}$ and $S=\unions{V}$.
Then $S$ is a well ordering generated by $f$ on $B$.

LaTeX source
\begin{lemma}
\label{union_generated_well_orderings}
    Suppose $G$ is inhabited.
    Suppose for all $p\in G$ we have $\snd{p}$ is a well ordering generated by $f$ on $\fst{p}$.
    Suppose $U=\{\fst{p}\mid p\in G\}$ and $V=\{\snd{p}\mid p\in G\}$.
    Suppose $B=\unions{U}$ and $S=\unions{V}$.
    Then $S$ is a well ordering generated by $f$ on $B$.
\end{lemma}
Proof

For all $p\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ we have for all $q\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ $\snd{p}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\snd{q}$ or $\snd{q}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\snd{p}$ by Lemma 68, Lemma 71, Lemma 72.

$S\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B\class{latex-symbol-tip latex-symbol-id-times}{\times} B$ by Axiom 4, Definition 1, Definition 95, Definition 96, Proposition 6, Proposition 143, Proposition 144.

Claim: $S$ is connex on $B$.

It suffices to show that for all $x,y$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ and $x\class{latex-symbol-tip latex-symbol-id-neq}{\neq} y$ we have $x\mathrel{S}y$ or $y\mathrel{S}x$ by Definition 40.
Fix $x$.
Fix $y$.
Assume $x\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ and $x\class{latex-symbol-tip latex-symbol-id-neq}{\neq} y$.
Take $p\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\fst{p}$ by Axiom 4.
Take $q\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\fst{q}$ by Axiom 4.

Case. $\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.
Case. $\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.
LaTeX source
\begin{byCase}
        \caseOf{$\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
            Follows by \cref{common_initial_segment,inter_elim_right,subseteq,generated_well_ordering,foundational_ordering,connex,unions_iff}.
        \caseOf{$\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
            Follows by \cref{common_initial_segment,inter_elim_left,subseteq,generated_well_ordering,foundational_ordering,connex,unions_iff}.
        
\end{byCase}
Claim: For all $D$ such that $D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$ and $D\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ there exists $d\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ such that for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ we have $d\mathrel{S}x$ or $d=x$.

Fix $D$.
Assume $D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$ and $D\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Take $p\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ such that $D\inter\fst{p}\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Axiom 2, Axiom 4, Definition 1, Proposition 10, Proposition 61.
Take $d\class{latex-symbol-tip latex-symbol-id-in}{\in} D\inter\fst{p}$ such that for all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} D\inter\fst{p}$ we have $d\mathrel{\snd{p}}a$ or $d=a$ by Definition 95, Definition 96, Proposition 74.

Claim: For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ we have $d\mathrel{S}y$ or $d=y$.

Fix $y\class{latex-symbol-tip latex-symbol-id-in}{\in} D$.
Take $q\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\fst{q}$ by Axiom 4, Definition 1.

Case. $\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.
Claim: $d\mathrel{S}y$ or $d=y$.
Case. $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\fst{p}$.

Follows by Axiom 4, Proposition 61.

Case. $y\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\fst{p}$.
LaTeX source
\begin{byCase}
                    \caseOf{$y\in\fst{p}$.}
                        Follows by \cref{inter_intro,unions_iff}.
                    \caseOf{$y\notin\fst{p}$.}
                        Follows by \cref{common_initial_segment,inter_elim_right,inter_elim_left,subseteq,generated_well_ordering,foundational_ordering,connex,dom_intro,downward_closure,unions_iff}.
                    
\end{byCase}
Case. $\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.
LaTeX source
\begin{byCase}
            \caseOf{$\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                Show $d\mathrel{S}y$ or $d=y$.
                \begin{subproof}
                    \begin{byCase}
                    \caseOf{$y\in\fst{p}$.}
                        Follows by \cref{inter_intro,unions_iff}.
                    \caseOf{$y\notin\fst{p}$.}
                        Follows by \cref{common_initial_segment,inter_elim_right,inter_elim_left,subseteq,generated_well_ordering,foundational_ordering,connex,dom_intro,downward_closure,unions_iff}.
                    \end{byCase}
                \end{subproof}
            \caseOf{$\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                Follows by \cref{common_initial_segment,inter_elim_left,inter_intro,subseteq,unions_iff}.
            
\end{byCase}

Follows by Proposition 62.

Claim: For all $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $f(\downward{S}{b})=b$.

Fix $b\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
Take $p\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ such that $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\fst{p}$ by Axiom 4.

Claim: $\downward{S}{b}=\downward{\snd{p}}{b}$.
Claim: $\downward{S}{b}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\downward{\snd{p}}{b}$.

It suffices to show that every element of $\downward{S}{b}$ is an element of $\downward{\snd{p}}{b}$ by Definition 1.
Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\downward{S}{b}$.
Take $q\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ such that $(x,b)\class{latex-symbol-tip latex-symbol-id-in}{\in}\snd{q}$ by Axiom 4, Definition 21.

Case. $\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.
Case. $\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.
LaTeX source
\begin{byCase}
                \caseOf{$\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                    Follows by \cref{common_initial_segment,dom_intro,downward_closure}.
                \caseOf{$\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                    Follows by \cref{common_initial_segment_symmetric,common_initial_segment_relation_subseteq,subseteq,dom_intro,downward_closure}.
                
\end{byCase}

Follows by Axiom 4, Definition 1, Definition 21, Proposition 3, Proposition 200.

Follows by Definition 96.

Follows by Axiom 4, Definition 1, Definition 36, Definition 37 [Transitivity], Definition 95, Definition 96.

LaTeX source
\begin{proof}
    For all $p\in G$ we have for all $q\in G$
        $\snd{p}\subseteq\snd{q}$ or $\snd{q}\subseteq\snd{p}$
        by \cref{generated_well_orderings_compatible,common_initial_segment_symmetric,common_initial_segment_relation_subseteq}.

    $S\subseteq B\times B$
        by \cref{subseteq,unions_iff,generated_well_ordering,foundational_ordering,times_subseteq_left,times_subseteq_right,subseteq_transitive}.

    Show $S$ is connex on $B$.
    \begin{subproof}
        It suffices to show that for all $x,y$ such that $x\in B$ and $y\in B$ and $x\neq y$
            we have $x\mathrel{S}y$ or $y\mathrel{S}x$ by \cref{connex}.
        Fix $x$.
        Fix $y$.
        Assume $x\in B$ and $y\in B$ and $x\neq y$.
        Take $p\in G$ such that $x\in\fst{p}$ by \cref{unions_iff}.
        Take $q\in G$ such that $y\in\fst{q}$ by \cref{unions_iff}.
        \begin{byCase}
        \caseOf{$\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
            Follows by \cref{common_initial_segment,inter_elim_right,subseteq,generated_well_ordering,foundational_ordering,connex,unions_iff}.
        \caseOf{$\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
            Follows by \cref{common_initial_segment,inter_elim_left,subseteq,generated_well_ordering,foundational_ordering,connex,unions_iff}.
        \end{byCase}
    \end{subproof}

    Show that for all $D$ such that $D\subseteq B$ and $D\neq\emptyset$
        there exists $d\in D$ such that for all $x\in D$ we have $d\mathrel{S}x$ or $d=x$.
    \begin{subproof}
        Fix $D$.
        Assume $D\subseteq B$ and $D\neq\emptyset$.
        Take $p\in G$ such that $D\inter\fst{p}\neq\emptyset$
            by \cref{nonempty_inhabited,subseteq,unions_iff,inter_intro,emptyset}.
        Take $d\in D\inter\fst{p}$ such that for all $a\in D\inter\fst{p}$
            we have $d\mathrel{\snd{p}}a$ or $d=a$
            by \cref{generated_well_ordering,foundational_ordering,inter_lower_right}.
        Show that for all $y\in D$ we have $d\mathrel{S}y$ or $d=y$.
        \begin{subproof}
            Fix $y\in D$.
            Take $q\in G$ such that $y\in\fst{q}$ by \cref{subseteq,unions_iff}.
            \begin{byCase}
            \caseOf{$\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                Show $d\mathrel{S}y$ or $d=y$.
                \begin{subproof}
                    \begin{byCase}
                    \caseOf{$y\in\fst{p}$.}
                        Follows by \cref{inter_intro,unions_iff}.
                    \caseOf{$y\notin\fst{p}$.}
                        Follows by \cref{common_initial_segment,inter_elim_right,inter_elim_left,subseteq,generated_well_ordering,foundational_ordering,connex,dom_intro,downward_closure,unions_iff}.
                    \end{byCase}
                \end{subproof}
            \caseOf{$\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                Follows by \cref{common_initial_segment,inter_elim_left,inter_intro,subseteq,unions_iff}.
            \end{byCase}
        \end{subproof}
        Follows by \cref{inter_elim_left}.
    \end{subproof}

    Show that for all $b\in B$ we have $f(\downward{S}{b})=b$.
    \begin{subproof}
        Fix $b\in B$.
        Take $p\in G$ such that $b\in\fst{p}$ by \cref{unions_iff}.
        Show $\downward{S}{b}=\downward{\snd{p}}{b}$.
        \begin{subproof}
            Show $\downward{S}{b}\subseteq\downward{\snd{p}}{b}$.
            \begin{subproof}
                It suffices to show that every element of $\downward{S}{b}$ is an element of $\downward{\snd{p}}{b}$
                    by \cref{subseteq}.
                Fix $x\in\downward{S}{b}$.
                Take $q\in G$ such that $(x,b)\in\snd{q}$ by \cref{downward_closure,unions_iff}.
                \begin{byCase}
                \caseOf{$\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                    Follows by \cref{common_initial_segment,dom_intro,downward_closure}.
                \caseOf{$\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                    Follows by \cref{common_initial_segment_symmetric,common_initial_segment_relation_subseteq,subseteq,dom_intro,downward_closure}.
                \end{byCase}
            \end{subproof}
            Follows by \cref{subseteq,downward_closure,unions_iff,dom_intro,subseteq_antisymmetric}.
        \end{subproof}
        Follows by \cref{generated_well_ordering}.
    \end{subproof}

    Follows by \cref{transitive,asymmetric,unions_iff,subseteq,foundational_ordering,generated_well_ordering}.
\end{proof}
Lemma 74
hausdorff_maximal_chain

Suppose $Q$ is a binary relation on $P$.
Suppose $Q$ is transitive and asymmetric.
Then there exists $C$ such that $C$ is a maximal chain in $P$ with respect to $Q$.

LaTeX source
\begin{lemma}
\label{hausdorff_maximal_chain}
    Suppose $Q$ is a binary relation on $P$.
    Suppose $Q$ is transitive and asymmetric.
    Then there exists $C$ such that $C$ is a maximal chain in $P$ with respect to $Q$.
\end{lemma}
Proof

Suppose not.
Let $H=\{C\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{P}\mid \text{$C$ is a chain in $P$ with respect to $Q$}\}$.

Claim: For all $C\class{latex-symbol-tip latex-symbol-id-in}{\in} H$ there exists $p\class{latex-symbol-tip latex-symbol-id-in}{\in} P\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} C$ such that $\cons{p}{C}\class{latex-symbol-tip latex-symbol-id-in}{\in} H$.

Fix $C\class{latex-symbol-tip latex-symbol-id-in}{\in} H$.
Take $D$ such that $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} D$ and $D$ is a chain in $P$ with respect to $Q$ and $D\class{latex-symbol-tip latex-symbol-id-neq}{\neq} C$ by Definition 93, Definition 94.
Take $p\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ such that $p\class{latex-symbol-tip latex-symbol-id-notin}{\notin} C$ by Definition 2, Proposition 9.
Hence $\cons{p}{C}\class{latex-symbol-tip latex-symbol-id-in}{\in} H$ by Axiom 12, Definition 1, Definition 93, Proposition 123.
Follows by Definition 1, Definition 6, Definition 93.

Let $T=\{w\class{latex-symbol-tip latex-symbol-id-in}{\in} H\class{latex-symbol-tip latex-symbol-id-times}{\times} P\mid \text{$\snd{w}\notin\fst{w}$ and $\cons{\snd{w}}{\fst{w}}\in H$}\}$.
Take $f$ such that $f$ is a function on $H$ and for all $C\class{latex-symbol-tip latex-symbol-id-in}{\in} H$ we have $C\mathrel{T}f(C)$ by Axiom 10, Axiom 11, Axiom 54, Definition 1, Definition 6, Definition 12, Proposition 115, Proposition 121.

Let $G=\{p\class{latex-symbol-tip latex-symbol-id-in}{\in} H\class{latex-symbol-tip latex-symbol-id-times}{\times}\pow{P\class{latex-symbol-tip latex-symbol-id-times}{\times} P}\mid \text{$\snd{p}$ is a well ordering generated by $f$ on $\fst{p}$}\}$.
Thus $G$ is inhabited by Axiom 2, Axiom 10, Axiom 11, Definition 93, Lemma 69, Proposition 11, Proposition 115, Proposition 157.

Let $U=\{\fst{p}\mid p\class{latex-symbol-tip latex-symbol-id-in}{\in} G\}$.
Let $V=\{\snd{p}\mid p\class{latex-symbol-tip latex-symbol-id-in}{\in} G\}$.
Let $B=\unions{U}$.
Let $S=\unions{V}$.

Claim: $B$ is a chain in $P$ with respect to $Q$.
Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have for all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ $x=y$ or $x\mathrel{Q}y$ or $y\mathrel{Q}x$.

Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
Fix $y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
Take $p\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\fst{p}$ by Axiom 4.
Take $q\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\fst{q}$ by Axiom 4.

Case. $\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.
Case. $\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.
LaTeX source
\begin{byCase}
                \caseOf{$\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                    Follows by \cref{common_initial_segment,inter_elim_right,subseteq,fst_type,chain_in_relation}.
                \caseOf{$\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                    Follows by \cref{common_initial_segment,inter_elim_left,subseteq,fst_type,chain_in_relation}.
            
\end{byCase}

Follows by Axiom 4, Definition 1, Definition 93, Proposition 119.

Let $c=f(B)$.
$c\class{latex-symbol-tip latex-symbol-id-in}{\in} P\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} B$ and $\cons{c}{B}\class{latex-symbol-tip latex-symbol-id-in}{\in} H$ by Axiom 10, Axiom 11, Axiom 12, Definition 1, Definition 6, Definition 93, Proposition 114.
Let $C=\cons{c}{B}$.
Let $R=S\union(B\class{latex-symbol-tip latex-symbol-id-times}{\times}\{c\})$.
$R$ is a well ordering generated by $f$ on $C$ by Definition 6, Lemma 70, Lemma 73.
Contradiction by Axiom 4, Axiom 10, Axiom 11, Axiom 12, Definition 1, Definition 6, Definition 95, Definition 96, Proposition 6, Proposition 14, Proposition 115, Proposition 143, Proposition 144.

LaTeX source
\begin{proof}
    Suppose not.
    Let $H=\{C\in\pow{P}\mid \text{$C$ is a chain in $P$ with respect to $Q$}\}$.

    Show that for all $C\in H$ there exists $p\in P\setminus C$ such that $\cons{p}{C}\in H$.
    \begin{subproof}
        Fix $C\in H$.
        Take $D$ such that $C\subseteq D$ and $D$ is a chain in $P$ with respect to $Q$ and $D\neq C$
            by \cref{chain_in_relation,maximal_chain_in_relation}.
        Take $p\in D$ such that $p\notin C$ by \cref{subset,subset_witness}.
        Hence $\cons{p}{C}\in H$
            by \cref{cons_subseteq_intro,chain_in_relation,subseteq,pow_iff}.
        Follows by \cref{chain_in_relation,subseteq,setminus}.
    \end{subproof}

    Let $T=\{w\in H\times P\mid \text{$\snd{w}\notin\fst{w}$ and $\cons{\snd{w}}{\fst{w}}\in H$}\}$.
    Take $f$ such that $f$ is a function on $H$ and for all $C\in H$ we have $C\mathrel{T}f(C)$
        by \cref{relation,subseteq,times_elem_is_tuple,setminus,times_tuple_intro,fst_eq,snd_eq,axiom_of_choice}.

    Let $G=\{p\in H\times\pow{P\times P}\mid \text{$\snd{p}$ is a well ordering generated by $f$ on $\fst{p}$}\}$.
    Thus $G$ is inhabited
        by \cref{chain_in_relation,emptyset,emptyset_subseteq,times_tuple_intro,powerset_bottom,empty_generated_well_ordering,fst_eq,snd_eq}.

    Let $U=\{\fst{p}\mid p\in G\}$.
    Let $V=\{\snd{p}\mid p\in G\}$.
    Let $B=\unions{U}$.
    Let $S=\unions{V}$.

    Show $B$ is a chain in $P$ with respect to $Q$.
    \begin{subproof}
        Show that for all $x\in B$ we have for all $y\in B$
            $x=y$ or $x\mathrel{Q}y$ or $y\mathrel{Q}x$.
        \begin{subproof}
            Fix $x\in B$.
            Fix $y\in B$.
            Take $p\in G$ such that $x\in\fst{p}$ by \cref{unions_iff}.
            Take $q\in G$ such that $y\in\fst{q}$ by \cref{unions_iff}.
            \begin{byCase}
                \caseOf{$\fst{p}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                    Follows by \cref{common_initial_segment,inter_elim_right,subseteq,fst_type,chain_in_relation}.
                \caseOf{$\fst{q}$ is a common initial segment of $\snd{p}$ on $\fst{p}$ and $\snd{q}$ on $\fst{q}$.}
                    Follows by \cref{common_initial_segment,inter_elim_left,subseteq,fst_type,chain_in_relation}.
            \end{byCase}
        \end{subproof}
        Follows by \cref{subseteq,unions_iff,fst_type,chain_in_relation}.
    \end{subproof}

    Let $c=f(B)$.
    $c\in P\setminus B$ and $\cons{c}{B}\in H$
        by \cref{chain_in_relation,pow_iff,fst_eq,snd_eq,subseteq,times_tuple_elim,setminus}.
    Let $C=\cons{c}{B}$.
    Let $R=S\union(B\times\{c\})$.
    $R$ is a well ordering generated by $f$ on $C$
        by \cref{union_generated_well_orderings,generated_well_ordering_adjoin,setminus}.
    Contradiction
        by \cref{generated_well_ordering,foundational_ordering,pow_iff,times_subseteq_left,times_subseteq_right,subseteq_transitive,times_tuple_intro,fst_eq,snd_eq,unions_iff,cons_left,subseteq,setminus}.
\end{proof}
Lemma 75
finite_subset_of_chain_union

Suppose $M$ is inhabited.
Suppose for all $C\class{latex-symbol-tip latex-symbol-id-in}{\in} M$ we have for all $D\class{latex-symbol-tip latex-symbol-id-in}{\in} M$ we have $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} D$ or $D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$.
Suppose $F$ is finite and $F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\unions{M}$.
Then there exists $E\class{latex-symbol-tip latex-symbol-id-in}{\in} M$ such that $F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} E$.

LaTeX source
\begin{lemma}
\label{finite_subset_of_chain_union}
    Suppose $M$ is inhabited.
    Suppose for all $C\in M$ we have for all $D\in M$ we have $C\subseteq D$ or $D\subseteq C$.
    Suppose $F$ is finite and $F\subseteq\unions{M}$.
    Then there exists $E\in M$ such that $F\subseteq E$.
\end{lemma}
Proof

Let $K=\{Y\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{F}\mid \text{there exists $E\in M$ such that $Y\subseteq E$}\}$.
Thus $\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}\class{latex-symbol-tip latex-symbol-id-in}{\in} K$ by Proposition 11, Proposition 157.

Claim: For all $Y,y$ such that $Y\class{latex-symbol-tip latex-symbol-id-in}{\in} K$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $\cons{y}{Y}\class{latex-symbol-tip latex-symbol-id-in}{\in} K$.

Fix $Y$.
Fix $y$.
Assume $Y\class{latex-symbol-tip latex-symbol-id-in}{\in} K$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} F$.
Thus $\cons{y}{Y}\class{latex-symbol-tip latex-symbol-id-in}{\in} K$ by Axiom 4, Axiom 12, Definition 1, Proposition 6, Proposition 123.

Follows by Lemma 43.

LaTeX source
\begin{proof}
    Let $K=\{Y\in\pow{F}\mid \text{there exists $E\in M$ such that $Y\subseteq E$}\}$.
    Thus $\emptyset\in K$ by \cref{powerset_bottom,emptyset_subseteq}.

    Show that for all $Y,y$ such that $Y\in K$ and $y\in F$ we have $\cons{y}{Y}\in K$.
    \begin{subproof}
        Fix $Y$.
        Fix $y$.
        Assume $Y\in K$ and $y\in F$.
        Thus $\cons{y}{Y}\in K$
            by \cref{pow_iff,unions_iff,subseteq_transitive,subseteq,cons_subseteq_intro}.
    \end{subproof}

    Follows by \cref{finite_induction}.
\end{proof}
Theorem 4
zorn_subset_family

Assume $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\pow{X}$.
Suppose $A$ has the finite intersection property.
Then there exists $D$ such that $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} D$ and $D$ is maximal with respect to the finite intersection property on $X$.

LaTeX source
\begin{theorem}
\label{zorn_subset_family}
    Assume $A\subseteq\pow{X}$.
    Suppose $A$ has the finite intersection property.
    Then there exists $D$ such that
        $A\subseteq D$ and
        $D$ is maximal with respect to the finite intersection property on $X$.
\end{theorem}
Proof

Let $P=\{E\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{\pow{X}}\mid \text{$A\subseteq E$ and $E$ has the finite intersection property}\}$.

Let $Q=\{w\class{latex-symbol-tip latex-symbol-id-in}{\in} P\class{latex-symbol-tip latex-symbol-id-times}{\times} P\mid \text{$\fst{w}\subset\snd{w}$}\}$.
Thus $Q$ is a binary relation on $P$.

$Q$ is transitive by Axiom 10, Axiom 11, Definition 1, Definition 2, Definition 37 [Transitivity], Proposition 6, Proposition 9, Proposition 114, Proposition 115.

$Q$ is asymmetric by Axiom 10, Axiom 11, Definition 2, Definition 36, Proposition 3, Proposition 7.

Take $M$ such that $M$ is a maximal chain in $P$ with respect to $Q$ by Lemma 74.
$M$ is a chain in $P$ with respect to $Q$ by Definition 94.

Claim: $M$ is inhabited.

Let $D=\unions{M}$.
For all $E\class{latex-symbol-tip latex-symbol-id-in}{\in} M$ we have $E\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} D$ by Axiom 4, Definition 1.
For all $E\class{latex-symbol-tip latex-symbol-id-in}{\in} M$ we have for all $F\class{latex-symbol-tip latex-symbol-id-in}{\in} M$ $E\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} F$ or $F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} E$ by Axiom 10, Axiom 11, Definition 2, Definition 93, Proposition 2.

$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} D$ by Axiom 4, Definition 1, Definition 93.

Claim: For all $E$ such that $D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} E\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\pow{X}$ and $E$ has the finite intersection property we have $E=D$.

Fix $E$.
Assume $D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} E\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\pow{X}$ and $E$ has the finite intersection property.

Let $K=\cons{E}{M}$.
Thus $K=M$ by Axiom 3, Axiom 10, Axiom 11, Axiom 12, Definition 1, Definition 2, Definition 93, Definition 94, Proposition 6, Proposition 115, Proposition 123, Corollary 1.
Follows by Proposition 3, Proposition 14.

Follows by Axiom 12, Definition 1, Definition 91, Definition 92, Definition 93, Lemma 75, Proposition 29.

LaTeX source
\begin{proof}
    Let $P=\{E\in\pow{\pow{X}}\mid \text{$A\subseteq E$ and $E$ has the finite intersection property}\}$.

    Let $Q=\{w\in P\times P\mid \text{$\fst{w}\subset\snd{w}$}\}$.
    Thus $Q$ is a binary relation on $P$.

    $Q$ is transitive
        by \cref{transitive,times_tuple_elim,times_tuple_intro,fst_eq,snd_eq,subset,subseteq_transitive,subset_witness,subseteq}.

    $Q$ is asymmetric
        by \cref{asymmetric,fst_eq,snd_eq,subset,subseteq_antisymmetric,subset_irrefl}.

    Take $M$ such that $M$ is a maximal chain in $P$ with respect to $Q$
        by \cref{hausdorff_maximal_chain}.
    $M$ is a chain in $P$ with respect to $Q$ by \cref{maximal_chain_in_relation}.

    Show $M$ is inhabited.
    \begin{subproof}
        Suppose not.
        Contradiction
            by \cref{subseteq,emptyset,emptyset_subseteq,subseteq_antisymmetric,pow_iff,subseteq_refl,singleton_subset_intro,singleton_iff,chain_in_relation,subseteq_cons_self,maximal_chain_in_relation,cons_left}.
    \end{subproof}

    Let $D=\unions{M}$.
    For all $E\in M$ we have $E\subseteq D$ by \cref{subseteq,unions_iff}.
    For all $E\in M$ we have for all $F\in M$
        $E\subseteq F$ or $F\subseteq E$
        by \cref{chain_in_relation,subseteq_refl,subset,fst_eq,snd_eq}.

    $A\subseteq D$ by \cref{chain_in_relation,subseteq,unions_iff}.

    Show that for all $E$ such that $D\subseteq E\subseteq\pow{X}$ and
        $E$ has the finite intersection property we have $E=D$.
    \begin{subproof}
        Fix $E$.
        Assume $D\subseteq E\subseteq\pow{X}$ and $E$ has the finite intersection property.

        Let $K=\cons{E}{M}$.
        Thus $K=M$
            by \cref{subseteq_transitive,pow_iff,subset,subseteq,times_tuple_intro,fst_eq,snd_eq,cons_subseteq_intro,cons_iff,chain_in_relation,subseteq_cons_self,maximal_chain_in_relation}.
        Follows by \cref{cons_left,subseteq_antisymmetric}.
    \end{subproof}

    Follows by \cref{chain_in_relation,finite_intersection_property,subseteq,finite_subset_of_chain_union,pow_iff,unions_family,maximal_finite_intersection_property_on}.
\end{proof}
Definition 98
simple_order_relation

$R$ is a simple order relation on $X$ iff $R$ is a binary relation on $X$ and $R$ is transitive and $R$ is asymmetric and $R$ is connex on $X$.

LaTeX source
\begin{definition}
\label{simple_order_relation}
    $R$ is a simple order relation on $X$ iff
    $R$ is a binary relation on $X$ and
    $R$ is transitive and
    $R$ is asymmetric and
    $R$ is connex on $X$.
\end{definition}
Definition 99
smallest_element

$a$ is a smallest element of $X$ with respect to $R$ iff $a\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $a\mathrel{R}x$ or $a = x$.

LaTeX source
\begin{definition}
\label{smallest_element}
    $a$ is a smallest element of $X$ with respect to $R$ iff
    $a\in X$ and for all $x\in X$ we have $a\mathrel{R}x$ or $a = x$.
\end{definition}
Definition 100
well_order_relation

$R$ is a well order relation on $X$ iff $R$ is a simple order relation on $X$ and for all $A$ such that $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and $A\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ there exists $a$ such that $a$ is a smallest element of $A$ with respect to $R$.

LaTeX source
\begin{definition}
\label{well_order_relation}
    $R$ is a well order relation on $X$ iff
        $R$ is a simple order relation on $X$ and
        for all $A$ such that $A\subseteq X$ and $A\neq\emptyset$
            there exists $a$ such that $a$ is a smallest element of $A$ with respect to $R$.
\end{definition}
Theorem 5
well_ordering_theorem

There exists $R$ such that $R$ is a well order relation on $A$.

LaTeX source
\begin{theorem}
\label{well_ordering_theorem}
    There exists $R$ such that $R$ is a well order relation on $A$.
\end{theorem}
Proof

Let $H=\{B\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{A}\mid B\class{latex-symbol-tip latex-symbol-id-neq}{\neq} A\}$.

Let $T=\{w\class{latex-symbol-tip latex-symbol-id-in}{\in} H\class{latex-symbol-tip latex-symbol-id-times}{\times} A\mid \snd{w}\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\fst{w}\}$.
Take $f$ such that $f$ is a function on $H$ and for all $B\class{latex-symbol-tip latex-symbol-id-in}{\in} H$ we have $B\mathrel{T}f(B)$ by Axiom 10, Axiom 11, Axiom 12, Axiom 54, Definition 1, Definition 2, Definition 6, Definition 12, Proposition 9, Proposition 115, Proposition 121.

Let $G=\{p\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{A}\class{latex-symbol-tip latex-symbol-id-times}{\times}\pow{A\class{latex-symbol-tip latex-symbol-id-times}{\times} A}\mid \text{$\snd{p}$ is a well ordering generated by $f$ on $\fst{p}$}\}$.
Thus $G$ is inhabited by Axiom 10, Axiom 11, Lemma 69, Proposition 115, Proposition 157.

Let $U=\{\fst{p}\mid p\class{latex-symbol-tip latex-symbol-id-in}{\in} G\}$.
Let $V=\{\snd{p}\mid p\class{latex-symbol-tip latex-symbol-id-in}{\in} G\}$.
Let $B=\unions{U}$.
Let $S=\unions{V}$.
$S$ is a well ordering generated by $f$ on $B$ by Lemma 73.

$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Axiom 12, Proposition 29, Proposition 119.

Claim: $B=A$.

Suppose not.
Let $c=f(B)$.
Hence $c\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $c\class{latex-symbol-tip latex-symbol-id-notin}{\notin} B$ by Axiom 10, Axiom 11, Axiom 12, Definition 6, Proposition 114.
Let $C=\cons{c}{B}$.
Let $R=S\union(B\class{latex-symbol-tip latex-symbol-id-times}{\times}\{c\})$.
$R$ is a well ordering generated by $f$ on $C$ by Lemma 70.
Contradiction by Axiom 4, Axiom 10, Axiom 11, Axiom 12, Definition 1, Definition 95, Definition 96, Proposition 6, Proposition 14, Proposition 115, Proposition 123, Proposition 143, Proposition 144.

Follows by Definition 95, Definition 96, Definition 98, Definition 99, Definition 100.

LaTeX source
\begin{proof}
    Let $H=\{B\in\pow{A}\mid B\neq A\}$.

    Let $T=\{w\in H\times A\mid \snd{w}\notin\fst{w}\}$.
    Take $f$ such that $f$ is a function on $H$ and for all $B\in H$ we have $B\mathrel{T}f(B)$
        by \cref{relation,subseteq,times_elem_is_tuple,pow_iff,subset,subset_witness,setminus,times_tuple_intro,fst_eq,snd_eq,axiom_of_choice}.

    Let $G=\{p\in\pow{A}\times\pow{A\times A}\mid
        \text{$\snd{p}$ is a well ordering generated by $f$ on $\fst{p}$}\}$.
    Thus $G$ is inhabited
        by \cref{times_tuple_intro,powerset_bottom,empty_generated_well_ordering,fst_eq,snd_eq}.

    Let $U=\{\fst{p}\mid p\in G\}$.
    Let $V=\{\snd{p}\mid p\in G\}$.
    Let $B=\unions{U}$.
    Let $S=\unions{V}$.
    $S$ is a well ordering generated by $f$ on $B$ by \cref{union_generated_well_orderings}.

    $B\subseteq A$ by \cref{fst_type,pow_iff,unions_family}.

    Show $B=A$.
    \begin{subproof}
        Suppose not.
        Let $c=f(B)$.
        Hence $c\in A$ and $c\notin B$
            by \cref{pow_iff,times_tuple_elim,fst_eq,snd_eq,setminus}.
        Let $C=\cons{c}{B}$.
        Let $R=S\union(B\times\{c\})$.
        $R$ is a well ordering generated by $f$ on $C$
            by \cref{generated_well_ordering_adjoin}.
        Contradiction
            by \cref{cons_subseteq_intro,generated_well_ordering,foundational_ordering,times_subseteq_left,times_subseteq_right,subseteq_transitive,pow_iff,times_tuple_intro,fst_eq,snd_eq,unions_iff,cons_left,subseteq}.
    \end{subproof}

    Follows by \cref{generated_well_ordering,foundational_ordering,simple_order_relation,smallest_element,well_order_relation}.
\end{proof}