Topology (Munkres)

§27 Compact Subspaces of the Real Line

Definition 248
immediate_successor

$y$ is an immediate successor of $x$ in $X$ with respect to $R$ iff $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $x\mathrel{R}y$ and $\intervalclosedrel{R}{X}{x}{y} = \{x,y\}$.

LaTeX source
\begin{definition}
\label{immediate_successor}
    $y$ is an immediate successor of $x$ in $X$ with respect to $R$ iff
        $x\in X$ and $y\in X$ and $x\mathrel{R}y$ and
        $\intervalclosedrel{R}{X}{x}{y} = \{x,y\}$.
\end{definition}
Lemma 362
immediate_successor_interval

Assume $R$ is asymmetric.
Suppose $y$ is an immediate successor of $x$ in $X$ with respect to $R$.
Let $I = \intervalclosedrel{R}{X}{x}{y}$.
Then $I = \{x,y\}$.

LaTeX source
\begin{lemma}
\label{immediate_successor_interval}
    Assume $R$ is asymmetric.
    Suppose $y$ is an immediate successor of $x$ in $X$ with respect to $R$.
    Let $I = \intervalclosedrel{R}{X}{x}{y}$.
    Then $I = \{x,y\}$.
\end{lemma}
Proof

Follows by Definition 248.

LaTeX source
\begin{proof}
    Follows by \cref{immediate_successor}.
\end{proof}
Lemma 363
no_immediate_successor_between

Suppose $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Suppose $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Suppose $x\mathrel{R}y$.
Suppose it is wrong that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.
Then there exists $z\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $x\mathrel{R}z$ and $z\mathrel{R}y$.

LaTeX source
\begin{lemma}
\label{no_immediate_successor_between}
    Suppose $x\in X$.
    Suppose $y\in X$.
    Suppose $x\mathrel{R}y$.
    Suppose it is wrong that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.
    Then there exists $z\in X$ such that $x\mathrel{R}z$ and $z\mathrel{R}y$.
\end{lemma}
Proof

Let $I = \intervalclosedrel{R}{X}{x}{y}$.
Suppose not.

Claim: $\{x,y\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} I$.
Claim: For all $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ we have $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\{x,y\}$.

Fix $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
$(x\mathrel{R}z \class{latex-symbol-tip latex-symbol-id-lor}{\lor} z = x)$ and $(z\mathrel{R}y \class{latex-symbol-tip latex-symbol-id-lor}{\lor} z = y)$ by Definition 132.

Case. $z = x$.

$z\class{latex-symbol-tip latex-symbol-id-in}{\in}\{x,y\}$ by Proposition 16.

Case. $z = y$.

$z\class{latex-symbol-tip latex-symbol-id-in}{\in}\{x,y\}$ by Proposition 17.

Case. $x\mathrel{R}z$ and $z\mathrel{R}y$.

Contradiction.

LaTeX source
\begin{byCase}
        \caseOf{$z = x$.}
            $z\in\{x,y\}$ by \cref{upair_intro_left}.
        \caseOf{$z = y$.}
            $z\in\{x,y\}$ by \cref{upair_intro_right}.
        \caseOf{$x\mathrel{R}z$ and $z\mathrel{R}y$.}
            Contradiction.
        
\end{byCase}
Claim: $y$ is an immediate successor of $x$ in $X$ with respect to $R$.

Contradiction.

LaTeX source
\begin{proof}
    Let $I = \intervalclosedrel{R}{X}{x}{y}$.
    Suppose not.
    Show that $\{x,y\}\subseteq I$.
    \begin{subproof}
        Follows by \cref{upair_elim,intervalclosed_rel,subseteq}.
    \end{subproof}
    Show that for all $z$ such that $z\in I$ we have $z\in\{x,y\}$.
    \begin{subproof}
        Fix $z$ such that $z\in I$.
        $(x\mathrel{R}z \lor z = x)$ and $(z\mathrel{R}y \lor z = y)$
            by \cref{intervalclosed_rel}.
        \begin{byCase}
        \caseOf{$z = x$.}
            $z\in\{x,y\}$ by \cref{upair_intro_left}.
        \caseOf{$z = y$.}
            $z\in\{x,y\}$ by \cref{upair_intro_right}.
        \caseOf{$x\mathrel{R}z$ and $z\mathrel{R}y$.}
            Contradiction.
        \end{byCase}
    \end{subproof}
    Show that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.
    \begin{subproof}
        Follows by \cref{subseteq,subseteq_antisymmetric,immediate_successor}.
    \end{subproof}
    Contradiction.
\end{proof}
Theorem 65
ordered_closed_interval_compact

Assume $R$ is a simple order relation on $X$.
Assume $X$ has the least upper bound property with respect to $R$.
Assume $T$ is the order topology on $X$ with respect to $R$.
Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Suppose $b\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Suppose $a\mathrel{R}b$ or $a = b$.
Let $Y = \intervalclosedrel{R}{X}{a}{b}$.
Let $T_Y = \subspaceTopology{T}{Y}$.
Then $Y$ is compact with respect to $T_Y$.

LaTeX source
\begin{theorem}
\label{ordered_closed_interval_compact}
    Assume $R$ is a simple order relation on $X$.
    Assume $X$ has the least upper bound property with respect to $R$.
    Assume $T$ is the order topology on $X$ with respect to $R$.
    Suppose $a\in X$.
    Suppose $b\in X$.
    Suppose $a\mathrel{R}b$ or $a = b$.
    Let $Y = \intervalclosedrel{R}{X}{a}{b}$.
    Let $T_Y = \subspaceTopology{T}{Y}$.
    Then $Y$ is compact with respect to $T_Y$.
\end{theorem}
Proof
Claim: $R$ is transitive and $R$ is asymmetric and $R$ is connex on $X$.

Follows by Definition 98.

Claim: For all $A$ such that $A$ is an open covering of $Y$ with respect to $T_Y$ there exists $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B$ is finite and $B$ is a covering of $Y$.

Fix $A$ such that $A$ is an open covering of $Y$ with respect to $T_Y$.

Case. $a = b$.

Take $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $a\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ by Axiom 4, Definition 1, Definition 132, Definition 245, Definition 246.
Let $B = \{U\}$.
We have $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B$ is finite by Lemma 40, Lemma 44, Proposition 16, Proposition 25.
For all $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{B}$ by Axiom 4, Definition 36, Definition 132, Proposition 20.
$B$ is a covering of $Y$ by Definition 1, Definition 245.
$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B$ is finite and $B$ is a covering of $Y$.

Case. $a\mathrel{R}b$.
Claim: $a\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ and $b\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

Follows by Definition 132.

$a\class{latex-symbol-tip latex-symbol-id-neq}{\neq} b$ by Definition 36.

Claim: $X$ has more than one element and $Y$ has more than one element.

Follows by Definition 127.

$Y$ is convex in $X$ with respect to $R$ by Lemma 313.

Claim: For all $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ we have $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.

Follows by Definition 132.

$Y\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 1.
$a$ is a smallest element of $Y$ with respect to $R$ by Definition 99, Definition 132.
$b$ is a largest element of $Y$ with respect to $R$ by Definition 128, Definition 132.
$T = \basisTopology{\orderBasis{R}{X}}{X}$ by Definition 134.
$T$ is a topology on $X$ by Lemma 76, Lemma 113.
$T_Y$ is a topology on $Y$ by Definition 147, Lemma 131.

Claim: For all $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ and $x\class{latex-symbol-tip latex-symbol-id-neq}{\neq} b$ there exists $y\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ such that $x\mathrel{R}y$ and there exists $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B$ is finite and $B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ and $x\class{latex-symbol-tip latex-symbol-id-neq}{\neq} b$.
Take $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ by Axiom 4, Definition 1, Definition 245, Definition 246.
Take $V\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ such that $U = Y\inter V$ by Definition 103, Definition 146, Definition 246.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in} V$ by Proposition 63.
Take $B_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\orderBasis{R}{X}$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} B_1$ and $B_1\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} V$ by Definition 114.

Claim: There exists $c\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ such that $x\mathrel{R}c$ and $\intervalclosedopenrel{R}{X}{x}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} V$.

$B_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ and $((\class{latex-symbol-tip latex-symbol-id-exists}{\exists} u, v\class{latex-symbol-tip latex-symbol-id-in}{\in} X. u\mathrel{R}v \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalopenrel{R}{X}{u}{v}) \class{latex-symbol-tip latex-symbol-id-lor}{\lor} (\class{latex-symbol-tip latex-symbol-id-exists}{\exists} v\class{latex-symbol-tip latex-symbol-id-in}{\in} X. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X. (\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. a_0\mathrel{R}z \class{latex-symbol-tip latex-symbol-id-lor}{\lor} a_0 = z) \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}) \class{latex-symbol-tip latex-symbol-id-lor}{\lor} (\class{latex-symbol-tip latex-symbol-id-exists}{\exists} u\class{latex-symbol-tip latex-symbol-id-in}{\in} X. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} b_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X. (\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. z\mathrel{R}b_0 \class{latex-symbol-tip latex-symbol-id-lor}{\lor} z = b_0) \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}))$ by Definition 133.

Case. $\class{latex-symbol-tip latex-symbol-id-exists}{\exists} u, v\class{latex-symbol-tip latex-symbol-id-in}{\in} X. u\mathrel{R}v \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalopenrel{R}{X}{u}{v}$.

Take $u, v\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $u\mathrel{R}v$ and $B_1 = \intervalopenrel{R}{X}{u}{v}$.
$u\mathrel{R}x$ and $x\mathrel{R}v$ by Definition 129.

Case. $v\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

Let $c = v$.
$\intervalclosedopenrel{R}{X}{x}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 1, Definition 37 [Transitivity], Definition 129, Definition 131.

Case. it is wrong that $v\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

$a\mathrel{R}v$ by Definition 37 [Transitivity], Definition 132.
$b\mathrel{R}v$ by Definition 40, Definition 132.
$\intervalclosedopenrel{R}{X}{x}{b} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 1, Definition 37 [Transitivity], Definition 129, Definition 131.
There exists $c\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ such that $x\mathrel{R}c$ and $\intervalclosedopenrel{R}{X}{x}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 132.

LaTeX source
\begin{byCase}
                        \caseOf{$v\in Y$.}
                            Let $c = v$.
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,transitive,intervalopen_rel,subseteq}.
                        \caseOf{it is wrong that $v\in Y$.}
                            $a\mathrel{R}v$ by \cref{intervalclosed_rel,transitive}.
                            $b\mathrel{R}v$ by \cref{connex,intervalclosed_rel}.
                            $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,transitive,intervalopen_rel,subseteq}.
                            There exists $c\in Y$ such that $x\mathrel{R}c$ and
                                $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                        
\end{byCase}
Case. $\class{latex-symbol-tip latex-symbol-id-exists}{\exists} v\class{latex-symbol-tip latex-symbol-id-in}{\in} X. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X. (\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. a_0\mathrel{R}z \class{latex-symbol-tip latex-symbol-id-lor}{\lor} a_0 = z) \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.

Take $a_0, v\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $(\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. a_0\mathrel{R}z \class{latex-symbol-tip latex-symbol-id-lor}{\lor} a_0 = z)$ and $B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $(a_0\mathrel{R}x \class{latex-symbol-tip latex-symbol-id-lor}{\lor} x = a_0)$ and $x\mathrel{R}v$ by Definition 131.

Case. $v\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

Let $c = v$.
$\intervalclosedopenrel{R}{X}{x}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 1, Definition 99, Definition 131, Definition 132.

Case. it is wrong that $v\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

$a\mathrel{R}v$ by Definition 37 [Transitivity], Definition 132.
$b\mathrel{R}v$ by Definition 40, Definition 132.
$\intervalclosedopenrel{R}{X}{x}{b} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 1, Definition 37 [Transitivity], Definition 99, Definition 131.
There exists $c\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ such that $x\mathrel{R}c$ and $\intervalclosedopenrel{R}{X}{x}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 132.

LaTeX source
\begin{byCase}
                        \caseOf{$v\in Y$.}
                            Let $c = v$.
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,smallest_element,intervalclosed_rel,subseteq}.
                        \caseOf{it is wrong that $v\in Y$.}
                            $a\mathrel{R}v$ by \cref{intervalclosed_rel,transitive}.
                            $b\mathrel{R}v$ by \cref{connex,intervalclosed_rel}.
                            $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,smallest_element,transitive,subseteq}.
                            There exists $c\in Y$ such that $x\mathrel{R}c$ and
                                $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                        
\end{byCase}
Case. $\class{latex-symbol-tip latex-symbol-id-exists}{\exists} u\class{latex-symbol-tip latex-symbol-id-in}{\in} X. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} b_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X. (\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. z\mathrel{R}b_0 \class{latex-symbol-tip latex-symbol-id-lor}{\lor} z = b_0) \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.

Take $u, b_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $(\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. z\mathrel{R}b_0 \class{latex-symbol-tip latex-symbol-id-lor}{\lor} z = b_0)$ and $B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.
$u\mathrel{R}x$ and $(x\mathrel{R}b_0 \class{latex-symbol-tip latex-symbol-id-lor}{\lor} x = b_0)$ by Definition 130.
$\intervalclosedopenrel{R}{X}{x}{b} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 1, Definition 37 [Transitivity], Definition 130, Definition 131.
There exists $c\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ such that $x\mathrel{R}c$ and $\intervalclosedopenrel{R}{X}{x}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 132.

LaTeX source
\begin{byCase}
                    \caseOf{$\exists u, v\in X. u\mathrel{R}v \land B_1 = \intervalopenrel{R}{X}{u}{v}$.}
                        Take $u, v\in X$ such that $u\mathrel{R}v$ and $B_1 = \intervalopenrel{R}{X}{u}{v}$.
                        $u\mathrel{R}x$ and $x\mathrel{R}v$ by \cref{intervalopen_rel}.
                        \begin{byCase}
                        \caseOf{$v\in Y$.}
                            Let $c = v$.
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,transitive,intervalopen_rel,subseteq}.
                        \caseOf{it is wrong that $v\in Y$.}
                            $a\mathrel{R}v$ by \cref{intervalclosed_rel,transitive}.
                            $b\mathrel{R}v$ by \cref{connex,intervalclosed_rel}.
                            $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,transitive,intervalopen_rel,subseteq}.
                            There exists $c\in Y$ such that $x\mathrel{R}c$ and
                                $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                        \end{byCase}
                    \caseOf{$\exists v\in X. \exists a_0\in X. (\forall z\in X. a_0\mathrel{R}z \lor a_0 = z) \land
                        B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.}
                        Take $a_0, v\in X$ such that
                            $(\forall z\in X. a_0\mathrel{R}z \lor a_0 = z)$ and
                            $B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.
                        $x\in X$ and $(a_0\mathrel{R}x \lor x = a_0)$ and $x\mathrel{R}v$
                            by \cref{intervalclosedopen_rel}.
                        \begin{byCase}
                        \caseOf{$v\in Y$.}
                            Let $c = v$.
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,smallest_element,intervalclosed_rel,subseteq}.
                        \caseOf{it is wrong that $v\in Y$.}
                            $a\mathrel{R}v$ by \cref{intervalclosed_rel,transitive}.
                            $b\mathrel{R}v$ by \cref{connex,intervalclosed_rel}.
                            $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,smallest_element,transitive,subseteq}.
                            There exists $c\in Y$ such that $x\mathrel{R}c$ and
                                $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                        \end{byCase}
                    \caseOf{$\exists u\in X. \exists b_0\in X. (\forall z\in X. z\mathrel{R}b_0 \lor z = b_0) \land
                        B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.}
                        Take $u, b_0\in X$ such that
                            $(\forall z\in X. z\mathrel{R}b_0 \lor z = b_0)$ and
                            $B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.
                        $u\mathrel{R}x$ and $(x\mathrel{R}b_0 \lor x = b_0)$ by \cref{intervalopenclosed_rel}.
                        $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                            by \cref{intervalclosedopen_rel,transitive,intervalopenclosed_rel,subseteq}.
                        There exists $c\in Y$ such that $x\mathrel{R}c$ and
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                    
\end{byCase}

Take $c\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ such that $x\mathrel{R}c$ and $\intervalclosedopenrel{R}{X}{x}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} V$.

Case. there exists $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.

Take $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.

Claim: $y\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.
Claim: $y\mathrel{R}b$ or $y = b$.

$y\mathrel{R}b$ or $y = b$ or $b\mathrel{R}y$ by Definition 40.

Case. $b\mathrel{R}y$.

$b\class{latex-symbol-tip latex-symbol-id-in}{\in}\intervalclosedrel{R}{X}{x}{y}$ by Definition 132.
$b\class{latex-symbol-tip latex-symbol-id-in}{\in}\{x,y\}$ by Lemma 362.
$b = x$ or $b = y$ by Proposition 18.
$y = b$.

LaTeX source
\begin{byCase}
                            \caseOf{$b\mathrel{R}y$.}
                                $b\in\intervalclosedrel{R}{X}{x}{y}$ by \cref{intervalclosed_rel}.
                                $b\in\{x,y\}$ by \cref{immediate_successor_interval}.
                                $b = x$ or $b = y$ by \cref{upair_elim}.
                                $y = b$.
                            \caseOf{$y\mathrel{R}b$ or $y = b$.}
                            
\end{byCase}

$y\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ by Definition 37 [Transitivity], Definition 132, Definition 248.

Take $U_1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} U_1$ by Axiom 4, Definition 1, Definition 245, Definition 246.
Let $B = \{U,U_1\}$.
$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B$ is finite by Definition 1, Lemma 40, Proposition 18.
For all $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\intervalclosedrel{R}{X}{x}{y}$ we have $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{B}$ by Axiom 4, Lemma 362, Proposition 16, Proposition 17, Proposition 18.
$B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$ by Definition 1, Definition 245.

Case. it is wrong that there exists $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.

It is wrong that $c$ is an immediate successor of $x$ in $X$ with respect to $R$ by Definition 1.
Take $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $x\mathrel{R}y$ and $y\mathrel{R}c$ by Lemma 363.
$y\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ by Definition 148.
Let $B = \{U\}$.
$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B$ is finite by Lemma 40, Lemma 44, Proposition 16, Proposition 25.
For all $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\intervalclosedrel{R}{X}{x}{y}$ we have $z\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $(x\mathrel{R}z \class{latex-symbol-tip latex-symbol-id-lor}{\lor} z = x)$ and $(z\mathrel{R}y \class{latex-symbol-tip latex-symbol-id-lor}{\lor} z = y)$ by Definition 132.
For all $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\intervalclosedrel{R}{X}{x}{y}$ we have $z\mathrel{R}c$ by \hyperref[transitive]{transitivity}.
For all $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\intervalclosedrel{R}{X}{x}{y}$ we have $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{B}$ by Axiom 4, Definition 1, Definition 131, Definition 148, Proposition 20, Proposition 61.
$B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$ by Definition 1, Definition 245.

LaTeX source
\begin{byCase}
                \caseOf{there exists $y\in X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.}
                    Take $y\in X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.
                    Show that $y\in Y$.
                    \begin{subproof}
                        Show that $y\mathrel{R}b$ or $y = b$.
                        \begin{subproof}
                            $y\mathrel{R}b$ or $y = b$ or $b\mathrel{R}y$ by \cref{connex}.
                            \begin{byCase}
                            \caseOf{$b\mathrel{R}y$.}
                                $b\in\intervalclosedrel{R}{X}{x}{y}$ by \cref{intervalclosed_rel}.
                                $b\in\{x,y\}$ by \cref{immediate_successor_interval}.
                                $b = x$ or $b = y$ by \cref{upair_elim}.
                                $y = b$.
                            \caseOf{$y\mathrel{R}b$ or $y = b$.}
                            \end{byCase}
                        \end{subproof}
                        $y\in Y$ by \cref{immediate_successor,intervalclosed_rel,transitive}.
                    \end{subproof}
                    Take $U_1\in A$ such that $y\in U_1$
                        by \cref{open_covering,covering,subseteq,unions_iff}.
                    Let $B = \{U,U_1\}$.
                    $B\subseteq A$ and $B$ is finite by \cref{upair_elim,subseteq,pair_is_finite}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have $z\in\unions{B}$
                        by \cref{immediate_successor_interval,upair_elim,upair_intro_left,upair_intro_right,unions_iff}.
                    $B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$ by \cref{subseteq,covering}.
                \caseOf{it is wrong that there exists $y\in X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.}
                    It is wrong that $c$ is an immediate successor of $x$ in $X$ with respect to $R$
                        by \cref{subseteq}.
                    Take $y\in X$ such that $x\mathrel{R}y$ and $y\mathrel{R}c$ by \cref{no_immediate_successor_between}.
                    $y\in Y$ by \cref{convex_in}.
                    Let $B = \{U\}$.
                    $B\subseteq A$ and $B$ is finite
                        by \cref{singleton_subset_intro,pair_is_finite,upair_intro_left,subseteq_finite_is_finite}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have
                        $z\in X$ and $(x\mathrel{R}z \lor z = x)$ and $(z\mathrel{R}y \lor z = y)$
                        by \cref{intervalclosed_rel}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have $z\mathrel{R}c$
                        by \hyperref[transitive]{transitivity}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have $z\in\unions{B}$
                        by \cref{intervalclosedopen_rel,subseteq,convex_in,inter_intro,singleton_intro,unions_iff}.
                    $B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$ by \cref{subseteq,covering}.
                
\end{byCase}

Let $C = \{y\class{latex-symbol-tip latex-symbol-id-in}{\in} Y \mid \text{$a\mathrel{R}y$ and there exists $B\subseteq A$ such that $B$ is finite and $B$ is a covering of $\intervalclosedrel{R}{X}{a}{y}$}\}$.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.
Take $y\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ such that $a\mathrel{R}y$ and there exists $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B$ is finite and $B$ is a covering of $\intervalclosedrel{R}{X}{a}{y}$.
$y\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
$C$ is inhabited.
We have $C\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 1, Definition 132.

Claim: For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ we have $y\mathrel{R}b$ or $y = b$.

Follows by Definition 132.

$b$ is an upper bound of $C$ in $X$ with respect to $R$ by Definition 228.
Take $c$ such that $c$ is a least upper bound of $C$ in $X$ with respect to $R$ by Definition 230.

Claim: $a\mathrel{R}c$.

Take $y_0\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ such that $a\mathrel{R}y_0$ by Proposition 10.
Suppose not.

Case. $c = a$.

$y_0\mathrel{R}c$ or $y_0 = c$ by Definition 228, Definition 229.
$y_0\mathrel{R}c$ by Definition 36, Definition 228, Definition 229.
$y_0\mathrel{R}a$.
Contradiction by Definition 36.

Case. $c\class{latex-symbol-tip latex-symbol-id-neq}{\neq} a$.

$c\mathrel{R}a$ or $a\mathrel{R}c$ by Definition 40, Definition 228, Definition 229.
$c\mathrel{R}a$ by Definition 40, Definition 228, Definition 229.
$c\mathrel{R}y$ by \hyperref[transitive]{transitivity}.
$y\mathrel{R}c$ or $y = c$ by Definition 228, Definition 229.
Contradiction by Definition 36.

LaTeX source
\begin{byCase}
                \caseOf{$c = a$.}
                    $y_0\mathrel{R}c$ or $y_0 = c$ by \cref{least_upper_bound_rel,upper_bound_rel}.
                    $y_0\mathrel{R}c$ by \cref{least_upper_bound_rel,upper_bound_rel,asymmetric}.
                    $y_0\mathrel{R}a$.
                    Contradiction by \cref{asymmetric}.
                \caseOf{$c\neq a$.}
                    $c\mathrel{R}a$ or $a\mathrel{R}c$ by \cref{least_upper_bound_rel,upper_bound_rel,connex}.
                    $c\mathrel{R}a$ by \cref{least_upper_bound_rel,upper_bound_rel,connex}.
                    $c\mathrel{R}y$ by \hyperref[transitive]{transitivity}.
                    $y\mathrel{R}c$ or $y = c$ by \cref{least_upper_bound_rel,upper_bound_rel}.
                    Contradiction by \cref{asymmetric}.
                
\end{byCase}
Claim: $c\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $c\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.
Claim: $c\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.

Take $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $c\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ by Axiom 4, Definition 1, Definition 245, Definition 246.
Take $V\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ such that $U = Y\inter V$ by Definition 103, Definition 146, Definition 246.
$c\class{latex-symbol-tip latex-symbol-id-in}{\in} V$ by Proposition 63.
Take $B_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\orderBasis{R}{X}$ such that $c\class{latex-symbol-tip latex-symbol-id-in}{\in} B_1$ and $B_1\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} V$ by Definition 114.

Claim: There exists $d\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ such that $d\mathrel{R}c$ and $\intervalopenclosedrel{R}{X}{d}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} V$.

$B_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ and $((\class{latex-symbol-tip latex-symbol-id-exists}{\exists} u, v\class{latex-symbol-tip latex-symbol-id-in}{\in} X. u\mathrel{R}v \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalopenrel{R}{X}{u}{v}) \class{latex-symbol-tip latex-symbol-id-lor}{\lor} (\class{latex-symbol-tip latex-symbol-id-exists}{\exists} v\class{latex-symbol-tip latex-symbol-id-in}{\in} X. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X. (\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. a_0\mathrel{R}z \class{latex-symbol-tip latex-symbol-id-lor}{\lor} a_0 = z) \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}) \class{latex-symbol-tip latex-symbol-id-lor}{\lor} (\class{latex-symbol-tip latex-symbol-id-exists}{\exists} u\class{latex-symbol-tip latex-symbol-id-in}{\in} X. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} b_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X. (\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. z\mathrel{R}b_0 \class{latex-symbol-tip latex-symbol-id-lor}{\lor} z = b_0) \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}))$ by Definition 133.

Case. $\class{latex-symbol-tip latex-symbol-id-exists}{\exists} u, v\class{latex-symbol-tip latex-symbol-id-in}{\in} X. u\mathrel{R}v \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalopenrel{R}{X}{u}{v}$.

Take $u, v\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $u\mathrel{R}v$ and $B_1 = \intervalopenrel{R}{X}{u}{v}$.
$u\mathrel{R}c$ and $c\mathrel{R}v$ by Definition 129.

Case. $u\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

Let $d = u$.
$\intervalopenclosedrel{R}{X}{d}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 1, Definition 37 [Transitivity], Definition 129, Definition 130.

Case. it is wrong that $u\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

$u\mathrel{R}a$ by Definition 37 [Transitivity], Definition 40, Definition 132, Definition 229.
Let $d = a$.
$\intervalopenclosedrel{R}{X}{d}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 1, Definition 37 [Transitivity], Definition 129, Definition 130.

LaTeX source
\begin{byCase}
                        \caseOf{$u\in Y$.}
                            Let $d = u$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopen_rel,subseteq}.
                        \caseOf{it is wrong that $u\in Y$.}
                            $u\mathrel{R}a$ by \cref{connex,least_upper_bound_rel,transitive,intervalclosed_rel}.
                            Let $d = a$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopen_rel,subseteq}.
                        
\end{byCase}
Case. $\class{latex-symbol-tip latex-symbol-id-exists}{\exists} v\class{latex-symbol-tip latex-symbol-id-in}{\in} X. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X. (\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. a_0\mathrel{R}z \class{latex-symbol-tip latex-symbol-id-lor}{\lor} a_0 = z) \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.

Take $a_0, v\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $(\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. a_0\mathrel{R}z \class{latex-symbol-tip latex-symbol-id-lor}{\lor} a_0 = z)$ and $B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.
We have $c\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $(a_0\mathrel{R}c \class{latex-symbol-tip latex-symbol-id-lor}{\lor} c = a_0)$ and $c\mathrel{R}v$ by Definition 131.
Let $d = a$.
$\intervalopenclosedrel{R}{X}{d}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 1, Definition 37 [Transitivity], Definition 99, Definition 130, Definition 131.

Case. $\class{latex-symbol-tip latex-symbol-id-exists}{\exists} u\class{latex-symbol-tip latex-symbol-id-in}{\in} X. \class{latex-symbol-tip latex-symbol-id-exists}{\exists} b_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X. (\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. z\mathrel{R}b_0 \class{latex-symbol-tip latex-symbol-id-lor}{\lor} z = b_0) \class{latex-symbol-tip latex-symbol-id-land}{\land} B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.

Take $u, b_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $(\class{latex-symbol-tip latex-symbol-id-forall}{\forall} z\class{latex-symbol-tip latex-symbol-id-in}{\in} X. z\mathrel{R}b_0 \class{latex-symbol-tip latex-symbol-id-lor}{\lor} z = b_0)$ and $B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.
$u\mathrel{R}c$ and $(c\mathrel{R}b_0 \class{latex-symbol-tip latex-symbol-id-lor}{\lor} c = b_0)$ by Definition 130.

Case. $u\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

Let $d = u$.
$\intervalopenclosedrel{R}{X}{d}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 1, Definition 37 [Transitivity], Definition 130, Definition 130.

Case. it is wrong that $u\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.

$u\mathrel{R}a$ by Definition 37 [Transitivity], Definition 40, Definition 132, Definition 229.
Let $d = a$.
$\intervalopenclosedrel{R}{X}{d}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B_1$ by Definition 1, Definition 37 [Transitivity], Definition 130, Definition 130.

LaTeX source
\begin{byCase}
                        \caseOf{$u\in Y$.}
                            Let $d = u$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopenclosed_rel,subseteq}.
                        \caseOf{it is wrong that $u\in Y$.}
                            $u\mathrel{R}a$ by \cref{connex,least_upper_bound_rel,transitive,intervalclosed_rel}.
                            Let $d = a$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopenclosed_rel,subseteq}.
                        
\end{byCase}
LaTeX source
\begin{byCase}
                    \caseOf{$\exists u, v\in X. u\mathrel{R}v \land B_1 = \intervalopenrel{R}{X}{u}{v}$.}
                        Take $u, v\in X$ such that $u\mathrel{R}v$ and $B_1 = \intervalopenrel{R}{X}{u}{v}$.
                        $u\mathrel{R}c$ and $c\mathrel{R}v$ by \cref{intervalopen_rel}.
                        \begin{byCase}
                        \caseOf{$u\in Y$.}
                            Let $d = u$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopen_rel,subseteq}.
                        \caseOf{it is wrong that $u\in Y$.}
                            $u\mathrel{R}a$ by \cref{connex,least_upper_bound_rel,transitive,intervalclosed_rel}.
                            Let $d = a$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopen_rel,subseteq}.
                        \end{byCase}
                    \caseOf{$\exists v\in X. \exists a_0\in X. (\forall z\in X. a_0\mathrel{R}z \lor a_0 = z) \land
                        B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.}
                        Take $a_0, v\in X$ such that
                            $(\forall z\in X. a_0\mathrel{R}z \lor a_0 = z)$ and
                            $B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.
                        We have $c\in X$ and $(a_0\mathrel{R}c \lor c = a_0)$ and $c\mathrel{R}v$
                            by \cref{intervalclosedopen_rel}.
                        Let $d = a$.
                        $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                            by \cref{intervalopenclosed_rel,smallest_element,transitive,intervalclosedopen_rel,subseteq}.
                    \caseOf{$\exists u\in X. \exists b_0\in X. (\forall z\in X. z\mathrel{R}b_0 \lor z = b_0) \land
                        B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.}
                        Take $u, b_0\in X$ such that
                            $(\forall z\in X. z\mathrel{R}b_0 \lor z = b_0)$ and
                            $B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.
                        $u\mathrel{R}c$ and $(c\mathrel{R}b_0 \lor c = b_0)$ by \cref{intervalopenclosed_rel}.
                        \begin{byCase}
                        \caseOf{$u\in Y$.}
                            Let $d = u$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopenclosed_rel,subseteq}.
                        \caseOf{it is wrong that $u\in Y$.}
                            $u\mathrel{R}a$ by \cref{connex,least_upper_bound_rel,transitive,intervalclosed_rel}.
                            Let $d = a$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopenclosed_rel,subseteq}.
                        \end{byCase}
                    
\end{byCase}

Take $d\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ such that $d\mathrel{R}c$ and $\intervalopenclosedrel{R}{X}{d}{c} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} V$.
Suppose not.

Claim: There exists $z\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ such that $d\mathrel{R}z$.

Suppose not.

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

$c\mathrel{R}d$ or $c = d$ by Definition 1, Definition 228, Definition 229.
Contradiction by Definition 36.

Take $z\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ such that $d\mathrel{R}z$.
$z\mathrel{R}c$ by Definition 228, Definition 229.
Take $B_0$ such that $B_0\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B_0$ is finite and $B_0$ is a covering of $\intervalclosedrel{R}{X}{a}{z}$.
Let $B = B_0\union\{U\}$.
$B$ is finite by Lemma 40, Lemma 44, Lemma 45, Proposition 16, Proposition 25.

Claim: For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\intervalclosedrel{R}{X}{a}{c}$ we have $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{B}$.

Fix $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\intervalclosedrel{R}{X}{a}{c}$.
We have $w\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $(a\mathrel{R}w \class{latex-symbol-tip latex-symbol-id-lor}{\lor} w = a)$ and $(w\mathrel{R}c \class{latex-symbol-tip latex-symbol-id-lor}{\lor} w = c)$ by Definition 132.
$w\mathrel{R}z$ or $w = z$ or $z\mathrel{R}w$ by Definition 40.

Case. $w\mathrel{R}z$ or $w = z$.

$w\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{B}$ by Axiom 4, Definition 1, Definition 132, Definition 245, Proposition 38.

Case. $z\mathrel{R}w$.

$w\class{latex-symbol-tip latex-symbol-id-in}{\in} V$ by Definition 1, Definition 37 [Transitivity], Definition 130.
$w\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ by Definition 148.
$w\class{latex-symbol-tip latex-symbol-id-in}{\in} Y\inter V$ by Proposition 61.
$w\class{latex-symbol-tip latex-symbol-id-in}{\in} U$.
$w\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{B}$ by Axiom 4, Proposition 20, Proposition 39.

LaTeX source
\begin{byCase}
                    \caseOf{$w\mathrel{R}z$ or $w = z$.}
                        $w\in\unions{B}$ by \cref{subseteq,intervalclosed_rel,covering,unions_iff,union_intro_left}.
                    \caseOf{$z\mathrel{R}w$.}
                        $w\in V$ by \cref{transitive,intervalopenclosed_rel,subseteq}.
                        $w\in Y$ by \cref{convex_in}.
                        $w\in Y\inter V$ by \cref{inter_intro}.
                        $w\in U$.
                        $w\in\unions{B}$ by \cref{singleton_intro,union_intro_right,unions_iff}.
                    
\end{byCase}

$B$ is a covering of $\intervalclosedrel{R}{X}{a}{c}$ by Definition 1, Definition 245.
We have $\{U\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Proposition 25.
$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Proposition 44.
$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B$ is finite and $B$ is a covering of $\intervalclosedrel{R}{X}{a}{c}$.
$c\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Contradiction.

Claim: $c = b$.

Suppose not.
$c\mathrel{R}b$ by Definition 229.
Take $y_1,B_1$ such that $y_1\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ and $c\mathrel{R}y_1$ and $B_1\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B_1$ is finite and $B_1$ is a covering of $\intervalclosedrel{R}{X}{c}{y_1}$.
$a\mathrel{R}y_1$ by \hyperref[transitive]{transitivity}.
Take $B_0$ such that $B_0\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B_0$ is finite and $B_0$ is a covering of $\intervalclosedrel{R}{X}{a}{c}$.
Let $B = B_0\union B_1$.
$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Proposition 44.
$B$ is finite by Lemma 45.
For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\intervalclosedrel{R}{X}{a}{y_1}$ we have $w\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{B}$ by Axiom 4, Definition 1, Definition 40, Definition 132, Definition 245, Proposition 38, Proposition 39.
$B$ is a covering of $\intervalclosedrel{R}{X}{a}{y_1}$ by Definition 1, Definition 245.
$y_1\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
$y_1\mathrel{R}c$ or $y_1 = c$ by Definition 228, Definition 229.
Contradiction by Definition 36.

Take $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ and $B$ is finite and $B$ is a covering of $\intervalclosedrel{R}{X}{a}{b}$.

LaTeX source
\begin{byCase}
        \caseOf{$a = b$.}
            Take $U\in A$ such that $a\in U$
                by \cref{open_covering,covering,intervalclosed_rel,subseteq,unions_iff}.
            Let $B = \{U\}$.
            We have $B\subseteq A$ and $B$ is finite
                by \cref{singleton_subset_intro,pair_is_finite,upair_intro_left,subseteq_finite_is_finite}.
            For all $x$ such that $x\in Y$ we have $x\in\unions{B}$
                by \cref{intervalclosed_rel,asymmetric,singleton_intro,unions_iff}.
            $B$ is a covering of $Y$ by \cref{subseteq,covering}.
            $B\subseteq A$ and $B$ is finite and $B$ is a covering of $Y$.
        \caseOf{$a\mathrel{R}b$.}
            Show that $a\in Y$ and $b\in Y$.
            \begin{subproof}
                Follows by \cref{intervalclosed_rel}.
            \end{subproof}
            $a\neq b$ by \cref{asymmetric}.
            Show that $X$ has more than one element and $Y$ has more than one element.
            \begin{subproof}
                Follows by \cref{more_than_one_element}.
            \end{subproof}
            $Y$ is convex in $X$ with respect to $R$ by \cref{intervalclosedrel_convex}.
            Show that for all $y$ such that $y\in Y$ we have $y\in X$.
            \begin{subproof}
                Follows by \cref{intervalclosed_rel}.
            \end{subproof}
            $Y\subseteq X$ by \cref{subseteq}.
            $a$ is a smallest element of $Y$ with respect to $R$ by \cref{intervalclosed_rel,smallest_element}.
            $b$ is a largest element of $Y$ with respect to $R$ by \cref{intervalclosed_rel,largest_element}.
            $T = \basisTopology{\orderBasis{R}{X}}{X}$ by \cref{order_topology}.
            $T$ is a topology on $X$ by \cref{order_basis_is_basis,basis_topology_is_topology}.
            $T_Y$ is a topology on $Y$ by \cref{subspace_topology_is_topology,subspace_of}.

            Show that for all $x$ such that $x\in Y$ and $x\neq b$ there exists $y\in Y$ such that
                $x\mathrel{R}y$ and
                there exists $B$ such that $B\subseteq A$ and $B$ is finite and
                    $B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$.
            \begin{subproof}
                Fix $x$ such that $x\in Y$ and $x\neq b$.
                Take $U\in A$ such that $x\in U$ by \cref{open_covering,covering,subseteq,unions_iff}.
                Take $V\in T$ such that $U = Y\inter V$ by \cref{open_covering,open_in,subspace_topology}.
                $x\in V$ by \cref{inter_elim_right}.
                Take $B_1\in\orderBasis{R}{X}$ such that $x\in B_1$ and $B_1\subseteq V$
                    by \cref{topology_generated_by_basis}.
                Show that there exists $c\in Y$ such that $x\mathrel{R}c$ and
                    $\intervalclosedopenrel{R}{X}{x}{c} \subseteq V$.
                \begin{subproof}
                    $B_1\in\pow{X}$ and
                        $((\exists u, v\in X. u\mathrel{R}v \land B_1 = \intervalopenrel{R}{X}{u}{v}) \lor
                        (\exists v\in X. \exists a_0\in X. (\forall z\in X. a_0\mathrel{R}z \lor a_0 = z) \land
                            B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}) \lor
                        (\exists u\in X. \exists b_0\in X. (\forall z\in X. z\mathrel{R}b_0 \lor z = b_0) \land
                            B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}))$
                        by \cref{order_basis}.
                    \begin{byCase}
                    \caseOf{$\exists u, v\in X. u\mathrel{R}v \land B_1 = \intervalopenrel{R}{X}{u}{v}$.}
                        Take $u, v\in X$ such that $u\mathrel{R}v$ and $B_1 = \intervalopenrel{R}{X}{u}{v}$.
                        $u\mathrel{R}x$ and $x\mathrel{R}v$ by \cref{intervalopen_rel}.
                        \begin{byCase}
                        \caseOf{$v\in Y$.}
                            Let $c = v$.
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,transitive,intervalopen_rel,subseteq}.
                        \caseOf{it is wrong that $v\in Y$.}
                            $a\mathrel{R}v$ by \cref{intervalclosed_rel,transitive}.
                            $b\mathrel{R}v$ by \cref{connex,intervalclosed_rel}.
                            $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,transitive,intervalopen_rel,subseteq}.
                            There exists $c\in Y$ such that $x\mathrel{R}c$ and
                                $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                        \end{byCase}
                    \caseOf{$\exists v\in X. \exists a_0\in X. (\forall z\in X. a_0\mathrel{R}z \lor a_0 = z) \land
                        B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.}
                        Take $a_0, v\in X$ such that
                            $(\forall z\in X. a_0\mathrel{R}z \lor a_0 = z)$ and
                            $B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.
                        $x\in X$ and $(a_0\mathrel{R}x \lor x = a_0)$ and $x\mathrel{R}v$
                            by \cref{intervalclosedopen_rel}.
                        \begin{byCase}
                        \caseOf{$v\in Y$.}
                            Let $c = v$.
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,smallest_element,intervalclosed_rel,subseteq}.
                        \caseOf{it is wrong that $v\in Y$.}
                            $a\mathrel{R}v$ by \cref{intervalclosed_rel,transitive}.
                            $b\mathrel{R}v$ by \cref{connex,intervalclosed_rel}.
                            $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,smallest_element,transitive,subseteq}.
                            There exists $c\in Y$ such that $x\mathrel{R}c$ and
                                $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                        \end{byCase}
                    \caseOf{$\exists u\in X. \exists b_0\in X. (\forall z\in X. z\mathrel{R}b_0 \lor z = b_0) \land
                        B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.}
                        Take $u, b_0\in X$ such that
                            $(\forall z\in X. z\mathrel{R}b_0 \lor z = b_0)$ and
                            $B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.
                        $u\mathrel{R}x$ and $(x\mathrel{R}b_0 \lor x = b_0)$ by \cref{intervalopenclosed_rel}.
                        $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                            by \cref{intervalclosedopen_rel,transitive,intervalopenclosed_rel,subseteq}.
                        There exists $c\in Y$ such that $x\mathrel{R}c$ and
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                    \end{byCase}
                \end{subproof}
                Take $c\in Y$ such that $x\mathrel{R}c$ and $\intervalclosedopenrel{R}{X}{x}{c} \subseteq V$.
                \begin{byCase}
                \caseOf{there exists $y\in X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.}
                    Take $y\in X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.
                    Show that $y\in Y$.
                    \begin{subproof}
                        Show that $y\mathrel{R}b$ or $y = b$.
                        \begin{subproof}
                            $y\mathrel{R}b$ or $y = b$ or $b\mathrel{R}y$ by \cref{connex}.
                            \begin{byCase}
                            \caseOf{$b\mathrel{R}y$.}
                                $b\in\intervalclosedrel{R}{X}{x}{y}$ by \cref{intervalclosed_rel}.
                                $b\in\{x,y\}$ by \cref{immediate_successor_interval}.
                                $b = x$ or $b = y$ by \cref{upair_elim}.
                                $y = b$.
                            \caseOf{$y\mathrel{R}b$ or $y = b$.}
                            \end{byCase}
                        \end{subproof}
                        $y\in Y$ by \cref{immediate_successor,intervalclosed_rel,transitive}.
                    \end{subproof}
                    Take $U_1\in A$ such that $y\in U_1$
                        by \cref{open_covering,covering,subseteq,unions_iff}.
                    Let $B = \{U,U_1\}$.
                    $B\subseteq A$ and $B$ is finite by \cref{upair_elim,subseteq,pair_is_finite}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have $z\in\unions{B}$
                        by \cref{immediate_successor_interval,upair_elim,upair_intro_left,upair_intro_right,unions_iff}.
                    $B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$ by \cref{subseteq,covering}.
                \caseOf{it is wrong that there exists $y\in X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.}
                    It is wrong that $c$ is an immediate successor of $x$ in $X$ with respect to $R$
                        by \cref{subseteq}.
                    Take $y\in X$ such that $x\mathrel{R}y$ and $y\mathrel{R}c$ by \cref{no_immediate_successor_between}.
                    $y\in Y$ by \cref{convex_in}.
                    Let $B = \{U\}$.
                    $B\subseteq A$ and $B$ is finite
                        by \cref{singleton_subset_intro,pair_is_finite,upair_intro_left,subseteq_finite_is_finite}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have
                        $z\in X$ and $(x\mathrel{R}z \lor z = x)$ and $(z\mathrel{R}y \lor z = y)$
                        by \cref{intervalclosed_rel}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have $z\mathrel{R}c$
                        by \hyperref[transitive]{transitivity}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have $z\in\unions{B}$
                        by \cref{intervalclosedopen_rel,subseteq,convex_in,inter_intro,singleton_intro,unions_iff}.
                    $B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$ by \cref{subseteq,covering}.
                \end{byCase}
            \end{subproof}

            Let $C = \{y\in Y \mid \text{$a\mathrel{R}y$ and there exists $B\subseteq A$ such that
                $B$ is finite and $B$ is a covering of $\intervalclosedrel{R}{X}{a}{y}$}\}$.
            $a\in Y$.
            Take $y\in Y$ such that $a\mathrel{R}y$ and
                there exists $B$ such that $B\subseteq A$ and $B$ is finite and
                    $B$ is a covering of $\intervalclosedrel{R}{X}{a}{y}$.
            $y\in C$.
            $C$ is inhabited.
            We have $C\subseteq X$ by \cref{intervalclosed_rel,subseteq}.
            Show that for all $y\in C$ we have $y\mathrel{R}b$ or $y = b$.
            \begin{subproof}
                Follows by \cref{intervalclosed_rel}.
            \end{subproof}
            $b$ is an upper bound of $C$ in $X$ with respect to $R$ by \cref{upper_bound_rel}.
            Take $c$ such that $c$ is a least upper bound of $C$ in $X$ with respect to $R$
                by \cref{least_upper_bound_property}.
            Show that $a\mathrel{R}c$.
            \begin{subproof}
                Take $y_0\in C$ such that $a\mathrel{R}y_0$ by \cref{nonempty_inhabited}.
                Suppose not.
                \begin{byCase}
                \caseOf{$c = a$.}
                    $y_0\mathrel{R}c$ or $y_0 = c$ by \cref{least_upper_bound_rel,upper_bound_rel}.
                    $y_0\mathrel{R}c$ by \cref{least_upper_bound_rel,upper_bound_rel,asymmetric}.
                    $y_0\mathrel{R}a$.
                    Contradiction by \cref{asymmetric}.
                \caseOf{$c\neq a$.}
                    $c\mathrel{R}a$ or $a\mathrel{R}c$ by \cref{least_upper_bound_rel,upper_bound_rel,connex}.
                    $c\mathrel{R}a$ by \cref{least_upper_bound_rel,upper_bound_rel,connex}.
                    $c\mathrel{R}y$ by \hyperref[transitive]{transitivity}.
                    $y\mathrel{R}c$ or $y = c$ by \cref{least_upper_bound_rel,upper_bound_rel}.
                    Contradiction by \cref{asymmetric}.
                \end{byCase}
            \end{subproof}
            Show that $c\in X$ and $c\in Y$.
            \begin{subproof}
                Follows by \cref{least_upper_bound_rel,upper_bound_rel,intervalclosed_rel}.
            \end{subproof}

            Show that $c\in C$.
            \begin{subproof}
                Take $U\in A$ such that $c\in U$ by \cref{open_covering,covering,subseteq,unions_iff}.
                Take $V\in T$ such that $U = Y\inter V$ by \cref{open_covering,open_in,subspace_topology}.
                $c\in V$ by \cref{inter_elim_right}.
                Take $B_1\in\orderBasis{R}{X}$ such that $c\in B_1$ and $B_1\subseteq V$
                    by \cref{topology_generated_by_basis}.
                Show that there exists $d\in Y$ such that $d\mathrel{R}c$ and
                    $\intervalopenclosedrel{R}{X}{d}{c} \subseteq V$.
                \begin{subproof}
                    $B_1\in\pow{X}$ and
                        $((\exists u, v\in X. u\mathrel{R}v \land B_1 = \intervalopenrel{R}{X}{u}{v}) \lor
                        (\exists v\in X. \exists a_0\in X. (\forall z\in X. a_0\mathrel{R}z \lor a_0 = z) \land
                            B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}) \lor
                        (\exists u\in X. \exists b_0\in X. (\forall z\in X. z\mathrel{R}b_0 \lor z = b_0) \land
                            B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}))$
                        by \cref{order_basis}.
                    \begin{byCase}
                    \caseOf{$\exists u, v\in X. u\mathrel{R}v \land B_1 = \intervalopenrel{R}{X}{u}{v}$.}
                        Take $u, v\in X$ such that $u\mathrel{R}v$ and $B_1 = \intervalopenrel{R}{X}{u}{v}$.
                        $u\mathrel{R}c$ and $c\mathrel{R}v$ by \cref{intervalopen_rel}.
                        \begin{byCase}
                        \caseOf{$u\in Y$.}
                            Let $d = u$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopen_rel,subseteq}.
                        \caseOf{it is wrong that $u\in Y$.}
                            $u\mathrel{R}a$ by \cref{connex,least_upper_bound_rel,transitive,intervalclosed_rel}.
                            Let $d = a$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopen_rel,subseteq}.
                        \end{byCase}
                    \caseOf{$\exists v\in X. \exists a_0\in X. (\forall z\in X. a_0\mathrel{R}z \lor a_0 = z) \land
                        B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.}
                        Take $a_0, v\in X$ such that
                            $(\forall z\in X. a_0\mathrel{R}z \lor a_0 = z)$ and
                            $B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.
                        We have $c\in X$ and $(a_0\mathrel{R}c \lor c = a_0)$ and $c\mathrel{R}v$
                            by \cref{intervalclosedopen_rel}.
                        Let $d = a$.
                        $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                            by \cref{intervalopenclosed_rel,smallest_element,transitive,intervalclosedopen_rel,subseteq}.
                    \caseOf{$\exists u\in X. \exists b_0\in X. (\forall z\in X. z\mathrel{R}b_0 \lor z = b_0) \land
                        B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.}
                        Take $u, b_0\in X$ such that
                            $(\forall z\in X. z\mathrel{R}b_0 \lor z = b_0)$ and
                            $B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.
                        $u\mathrel{R}c$ and $(c\mathrel{R}b_0 \lor c = b_0)$ by \cref{intervalopenclosed_rel}.
                        \begin{byCase}
                        \caseOf{$u\in Y$.}
                            Let $d = u$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopenclosed_rel,subseteq}.
                        \caseOf{it is wrong that $u\in Y$.}
                            $u\mathrel{R}a$ by \cref{connex,least_upper_bound_rel,transitive,intervalclosed_rel}.
                            Let $d = a$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopenclosed_rel,subseteq}.
                        \end{byCase}
                    \end{byCase}
                \end{subproof}
                Take $d\in Y$ such that $d\mathrel{R}c$ and $\intervalopenclosedrel{R}{X}{d}{c} \subseteq V$.
                Suppose not.
                Show that there exists $z\in C$ such that $d\mathrel{R}z$.
                \begin{subproof}
                    Suppose not.
                    Show that for all $y\in C$ we have $y\mathrel{R}d$ or $y = d$.
                    \begin{subproof}
                        Follows by \cref{subseteq,connex}.
                    \end{subproof}
                    $c\mathrel{R}d$ or $c = d$ by \cref{subseteq,upper_bound_rel,least_upper_bound_rel}.
                    Contradiction by \cref{asymmetric}.
                \end{subproof}
                Take $z\in C$ such that $d\mathrel{R}z$.
                $z\mathrel{R}c$ by \cref{least_upper_bound_rel,upper_bound_rel}.
                Take $B_0$ such that $B_0\subseteq A$ and $B_0$ is finite and
                    $B_0$ is a covering of $\intervalclosedrel{R}{X}{a}{z}$.
                Let $B = B_0\union\{U\}$.
                $B$ is finite by \cref{pair_is_finite,upair_intro_left,singleton_subset_intro,subseteq_finite_is_finite,union_of_finite_is_finite}.
                Show that for all $w$ such that $w\in\intervalclosedrel{R}{X}{a}{c}$ we have $w\in\unions{B}$.
                \begin{subproof}
                    Fix $w$ such that $w\in\intervalclosedrel{R}{X}{a}{c}$.
                    We have $w\in X$ and $(a\mathrel{R}w \lor w = a)$ and $(w\mathrel{R}c \lor w = c)$
                        by \cref{intervalclosed_rel}.
                    $w\mathrel{R}z$ or $w = z$ or $z\mathrel{R}w$ by \cref{connex}.
                    \begin{byCase}
                    \caseOf{$w\mathrel{R}z$ or $w = z$.}
                        $w\in\unions{B}$ by \cref{subseteq,intervalclosed_rel,covering,unions_iff,union_intro_left}.
                    \caseOf{$z\mathrel{R}w$.}
                        $w\in V$ by \cref{transitive,intervalopenclosed_rel,subseteq}.
                        $w\in Y$ by \cref{convex_in}.
                        $w\in Y\inter V$ by \cref{inter_intro}.
                        $w\in U$.
                        $w\in\unions{B}$ by \cref{singleton_intro,union_intro_right,unions_iff}.
                    \end{byCase}
                \end{subproof}
                $B$ is a covering of $\intervalclosedrel{R}{X}{a}{c}$ by \cref{subseteq,covering}.
                We have $\{U\}\subseteq A$ by \cref{singleton_subset_intro}.
                $B\subseteq A$ by \cref{union_subsets_is_subset}.
                $B\subseteq A$ and $B$ is finite and
                    $B$ is a covering of $\intervalclosedrel{R}{X}{a}{c}$.
                $c\in C$.
                Contradiction.
            \end{subproof}

            Show that $c = b$.
            \begin{subproof}
                Suppose not.
                $c\mathrel{R}b$ by \cref{least_upper_bound_rel}.
                Take $y_1,B_1$ such that $y_1\in Y$ and $c\mathrel{R}y_1$ and $B_1\subseteq A$ and
                    $B_1$ is finite and $B_1$ is a covering of $\intervalclosedrel{R}{X}{c}{y_1}$.
                $a\mathrel{R}y_1$ by \hyperref[transitive]{transitivity}.
                Take $B_0$ such that $B_0\subseteq A$ and $B_0$ is finite and
                    $B_0$ is a covering of $\intervalclosedrel{R}{X}{a}{c}$.
                Let $B = B_0\union B_1$.
                $B\subseteq A$ by \cref{union_subsets_is_subset}.
                $B$ is finite by \cref{union_of_finite_is_finite}.
                For all $w$ such that $w\in\intervalclosedrel{R}{X}{a}{y_1}$ we have $w\in\unions{B}$
                    by \cref{intervalclosed_rel,covering,subseteq,unions_iff,union_intro_left,union_intro_right,connex}.
                $B$ is a covering of $\intervalclosedrel{R}{X}{a}{y_1}$ by \cref{subseteq,covering}.
                $y_1\in C$.
                $y_1\mathrel{R}c$ or $y_1 = c$ by \cref{least_upper_bound_rel,upper_bound_rel}.
                Contradiction by \cref{asymmetric}.
            \end{subproof}
            Take $B$ such that $B\subseteq A$ and $B$ is finite and
                $B$ is a covering of $\intervalclosedrel{R}{X}{a}{b}$.
        
\end{byCase}

$Y$ is compact with respect to $T_Y$ by Definition 247.

LaTeX source
\begin{proof}
    Show that $R$ is transitive and $R$ is asymmetric and $R$ is connex on $X$.
    \begin{subproof}
        Follows by \cref{simple_order_relation}.
    \end{subproof}
    Show that for all $A$ such that $A$ is an open covering of $Y$ with respect to $T_Y$
        there exists $B$ such that $B\subseteq A$ and $B$ is finite and $B$ is a covering of $Y$.
    \begin{subproof}
        Fix $A$ such that $A$ is an open covering of $Y$ with respect to $T_Y$.
        \begin{byCase}
        \caseOf{$a = b$.}
            Take $U\in A$ such that $a\in U$
                by \cref{open_covering,covering,intervalclosed_rel,subseteq,unions_iff}.
            Let $B = \{U\}$.
            We have $B\subseteq A$ and $B$ is finite
                by \cref{singleton_subset_intro,pair_is_finite,upair_intro_left,subseteq_finite_is_finite}.
            For all $x$ such that $x\in Y$ we have $x\in\unions{B}$
                by \cref{intervalclosed_rel,asymmetric,singleton_intro,unions_iff}.
            $B$ is a covering of $Y$ by \cref{subseteq,covering}.
            $B\subseteq A$ and $B$ is finite and $B$ is a covering of $Y$.
        \caseOf{$a\mathrel{R}b$.}
            Show that $a\in Y$ and $b\in Y$.
            \begin{subproof}
                Follows by \cref{intervalclosed_rel}.
            \end{subproof}
            $a\neq b$ by \cref{asymmetric}.
            Show that $X$ has more than one element and $Y$ has more than one element.
            \begin{subproof}
                Follows by \cref{more_than_one_element}.
            \end{subproof}
            $Y$ is convex in $X$ with respect to $R$ by \cref{intervalclosedrel_convex}.
            Show that for all $y$ such that $y\in Y$ we have $y\in X$.
            \begin{subproof}
                Follows by \cref{intervalclosed_rel}.
            \end{subproof}
            $Y\subseteq X$ by \cref{subseteq}.
            $a$ is a smallest element of $Y$ with respect to $R$ by \cref{intervalclosed_rel,smallest_element}.
            $b$ is a largest element of $Y$ with respect to $R$ by \cref{intervalclosed_rel,largest_element}.
            $T = \basisTopology{\orderBasis{R}{X}}{X}$ by \cref{order_topology}.
            $T$ is a topology on $X$ by \cref{order_basis_is_basis,basis_topology_is_topology}.
            $T_Y$ is a topology on $Y$ by \cref{subspace_topology_is_topology,subspace_of}.

            Show that for all $x$ such that $x\in Y$ and $x\neq b$ there exists $y\in Y$ such that
                $x\mathrel{R}y$ and
                there exists $B$ such that $B\subseteq A$ and $B$ is finite and
                    $B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$.
            \begin{subproof}
                Fix $x$ such that $x\in Y$ and $x\neq b$.
                Take $U\in A$ such that $x\in U$ by \cref{open_covering,covering,subseteq,unions_iff}.
                Take $V\in T$ such that $U = Y\inter V$ by \cref{open_covering,open_in,subspace_topology}.
                $x\in V$ by \cref{inter_elim_right}.
                Take $B_1\in\orderBasis{R}{X}$ such that $x\in B_1$ and $B_1\subseteq V$
                    by \cref{topology_generated_by_basis}.
                Show that there exists $c\in Y$ such that $x\mathrel{R}c$ and
                    $\intervalclosedopenrel{R}{X}{x}{c} \subseteq V$.
                \begin{subproof}
                    $B_1\in\pow{X}$ and
                        $((\exists u, v\in X. u\mathrel{R}v \land B_1 = \intervalopenrel{R}{X}{u}{v}) \lor
                        (\exists v\in X. \exists a_0\in X. (\forall z\in X. a_0\mathrel{R}z \lor a_0 = z) \land
                            B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}) \lor
                        (\exists u\in X. \exists b_0\in X. (\forall z\in X. z\mathrel{R}b_0 \lor z = b_0) \land
                            B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}))$
                        by \cref{order_basis}.
                    \begin{byCase}
                    \caseOf{$\exists u, v\in X. u\mathrel{R}v \land B_1 = \intervalopenrel{R}{X}{u}{v}$.}
                        Take $u, v\in X$ such that $u\mathrel{R}v$ and $B_1 = \intervalopenrel{R}{X}{u}{v}$.
                        $u\mathrel{R}x$ and $x\mathrel{R}v$ by \cref{intervalopen_rel}.
                        \begin{byCase}
                        \caseOf{$v\in Y$.}
                            Let $c = v$.
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,transitive,intervalopen_rel,subseteq}.
                        \caseOf{it is wrong that $v\in Y$.}
                            $a\mathrel{R}v$ by \cref{intervalclosed_rel,transitive}.
                            $b\mathrel{R}v$ by \cref{connex,intervalclosed_rel}.
                            $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,transitive,intervalopen_rel,subseteq}.
                            There exists $c\in Y$ such that $x\mathrel{R}c$ and
                                $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                        \end{byCase}
                    \caseOf{$\exists v\in X. \exists a_0\in X. (\forall z\in X. a_0\mathrel{R}z \lor a_0 = z) \land
                        B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.}
                        Take $a_0, v\in X$ such that
                            $(\forall z\in X. a_0\mathrel{R}z \lor a_0 = z)$ and
                            $B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.
                        $x\in X$ and $(a_0\mathrel{R}x \lor x = a_0)$ and $x\mathrel{R}v$
                            by \cref{intervalclosedopen_rel}.
                        \begin{byCase}
                        \caseOf{$v\in Y$.}
                            Let $c = v$.
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,smallest_element,intervalclosed_rel,subseteq}.
                        \caseOf{it is wrong that $v\in Y$.}
                            $a\mathrel{R}v$ by \cref{intervalclosed_rel,transitive}.
                            $b\mathrel{R}v$ by \cref{connex,intervalclosed_rel}.
                            $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                                by \cref{intervalclosedopen_rel,smallest_element,transitive,subseteq}.
                            There exists $c\in Y$ such that $x\mathrel{R}c$ and
                                $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                        \end{byCase}
                    \caseOf{$\exists u\in X. \exists b_0\in X. (\forall z\in X. z\mathrel{R}b_0 \lor z = b_0) \land
                        B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.}
                        Take $u, b_0\in X$ such that
                            $(\forall z\in X. z\mathrel{R}b_0 \lor z = b_0)$ and
                            $B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.
                        $u\mathrel{R}x$ and $(x\mathrel{R}b_0 \lor x = b_0)$ by \cref{intervalopenclosed_rel}.
                        $\intervalclosedopenrel{R}{X}{x}{b} \subseteq B_1$
                            by \cref{intervalclosedopen_rel,transitive,intervalopenclosed_rel,subseteq}.
                        There exists $c\in Y$ such that $x\mathrel{R}c$ and
                            $\intervalclosedopenrel{R}{X}{x}{c} \subseteq B_1$ by \cref{intervalclosed_rel}.
                    \end{byCase}
                \end{subproof}
                Take $c\in Y$ such that $x\mathrel{R}c$ and $\intervalclosedopenrel{R}{X}{x}{c} \subseteq V$.
                \begin{byCase}
                \caseOf{there exists $y\in X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.}
                    Take $y\in X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.
                    Show that $y\in Y$.
                    \begin{subproof}
                        Show that $y\mathrel{R}b$ or $y = b$.
                        \begin{subproof}
                            $y\mathrel{R}b$ or $y = b$ or $b\mathrel{R}y$ by \cref{connex}.
                            \begin{byCase}
                            \caseOf{$b\mathrel{R}y$.}
                                $b\in\intervalclosedrel{R}{X}{x}{y}$ by \cref{intervalclosed_rel}.
                                $b\in\{x,y\}$ by \cref{immediate_successor_interval}.
                                $b = x$ or $b = y$ by \cref{upair_elim}.
                                $y = b$.
                            \caseOf{$y\mathrel{R}b$ or $y = b$.}
                            \end{byCase}
                        \end{subproof}
                        $y\in Y$ by \cref{immediate_successor,intervalclosed_rel,transitive}.
                    \end{subproof}
                    Take $U_1\in A$ such that $y\in U_1$
                        by \cref{open_covering,covering,subseteq,unions_iff}.
                    Let $B = \{U,U_1\}$.
                    $B\subseteq A$ and $B$ is finite by \cref{upair_elim,subseteq,pair_is_finite}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have $z\in\unions{B}$
                        by \cref{immediate_successor_interval,upair_elim,upair_intro_left,upair_intro_right,unions_iff}.
                    $B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$ by \cref{subseteq,covering}.
                \caseOf{it is wrong that there exists $y\in X$ such that $y$ is an immediate successor of $x$ in $X$ with respect to $R$.}
                    It is wrong that $c$ is an immediate successor of $x$ in $X$ with respect to $R$
                        by \cref{subseteq}.
                    Take $y\in X$ such that $x\mathrel{R}y$ and $y\mathrel{R}c$ by \cref{no_immediate_successor_between}.
                    $y\in Y$ by \cref{convex_in}.
                    Let $B = \{U\}$.
                    $B\subseteq A$ and $B$ is finite
                        by \cref{singleton_subset_intro,pair_is_finite,upair_intro_left,subseteq_finite_is_finite}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have
                        $z\in X$ and $(x\mathrel{R}z \lor z = x)$ and $(z\mathrel{R}y \lor z = y)$
                        by \cref{intervalclosed_rel}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have $z\mathrel{R}c$
                        by \hyperref[transitive]{transitivity}.
                    For all $z$ such that $z\in\intervalclosedrel{R}{X}{x}{y}$ we have $z\in\unions{B}$
                        by \cref{intervalclosedopen_rel,subseteq,convex_in,inter_intro,singleton_intro,unions_iff}.
                    $B$ is a covering of $\intervalclosedrel{R}{X}{x}{y}$ by \cref{subseteq,covering}.
                \end{byCase}
            \end{subproof}

            Let $C = \{y\in Y \mid \text{$a\mathrel{R}y$ and there exists $B\subseteq A$ such that
                $B$ is finite and $B$ is a covering of $\intervalclosedrel{R}{X}{a}{y}$}\}$.
            $a\in Y$.
            Take $y\in Y$ such that $a\mathrel{R}y$ and
                there exists $B$ such that $B\subseteq A$ and $B$ is finite and
                    $B$ is a covering of $\intervalclosedrel{R}{X}{a}{y}$.
            $y\in C$.
            $C$ is inhabited.
            We have $C\subseteq X$ by \cref{intervalclosed_rel,subseteq}.
            Show that for all $y\in C$ we have $y\mathrel{R}b$ or $y = b$.
            \begin{subproof}
                Follows by \cref{intervalclosed_rel}.
            \end{subproof}
            $b$ is an upper bound of $C$ in $X$ with respect to $R$ by \cref{upper_bound_rel}.
            Take $c$ such that $c$ is a least upper bound of $C$ in $X$ with respect to $R$
                by \cref{least_upper_bound_property}.
            Show that $a\mathrel{R}c$.
            \begin{subproof}
                Take $y_0\in C$ such that $a\mathrel{R}y_0$ by \cref{nonempty_inhabited}.
                Suppose not.
                \begin{byCase}
                \caseOf{$c = a$.}
                    $y_0\mathrel{R}c$ or $y_0 = c$ by \cref{least_upper_bound_rel,upper_bound_rel}.
                    $y_0\mathrel{R}c$ by \cref{least_upper_bound_rel,upper_bound_rel,asymmetric}.
                    $y_0\mathrel{R}a$.
                    Contradiction by \cref{asymmetric}.
                \caseOf{$c\neq a$.}
                    $c\mathrel{R}a$ or $a\mathrel{R}c$ by \cref{least_upper_bound_rel,upper_bound_rel,connex}.
                    $c\mathrel{R}a$ by \cref{least_upper_bound_rel,upper_bound_rel,connex}.
                    $c\mathrel{R}y$ by \hyperref[transitive]{transitivity}.
                    $y\mathrel{R}c$ or $y = c$ by \cref{least_upper_bound_rel,upper_bound_rel}.
                    Contradiction by \cref{asymmetric}.
                \end{byCase}
            \end{subproof}
            Show that $c\in X$ and $c\in Y$.
            \begin{subproof}
                Follows by \cref{least_upper_bound_rel,upper_bound_rel,intervalclosed_rel}.
            \end{subproof}

            Show that $c\in C$.
            \begin{subproof}
                Take $U\in A$ such that $c\in U$ by \cref{open_covering,covering,subseteq,unions_iff}.
                Take $V\in T$ such that $U = Y\inter V$ by \cref{open_covering,open_in,subspace_topology}.
                $c\in V$ by \cref{inter_elim_right}.
                Take $B_1\in\orderBasis{R}{X}$ such that $c\in B_1$ and $B_1\subseteq V$
                    by \cref{topology_generated_by_basis}.
                Show that there exists $d\in Y$ such that $d\mathrel{R}c$ and
                    $\intervalopenclosedrel{R}{X}{d}{c} \subseteq V$.
                \begin{subproof}
                    $B_1\in\pow{X}$ and
                        $((\exists u, v\in X. u\mathrel{R}v \land B_1 = \intervalopenrel{R}{X}{u}{v}) \lor
                        (\exists v\in X. \exists a_0\in X. (\forall z\in X. a_0\mathrel{R}z \lor a_0 = z) \land
                            B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}) \lor
                        (\exists u\in X. \exists b_0\in X. (\forall z\in X. z\mathrel{R}b_0 \lor z = b_0) \land
                            B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}))$
                        by \cref{order_basis}.
                    \begin{byCase}
                    \caseOf{$\exists u, v\in X. u\mathrel{R}v \land B_1 = \intervalopenrel{R}{X}{u}{v}$.}
                        Take $u, v\in X$ such that $u\mathrel{R}v$ and $B_1 = \intervalopenrel{R}{X}{u}{v}$.
                        $u\mathrel{R}c$ and $c\mathrel{R}v$ by \cref{intervalopen_rel}.
                        \begin{byCase}
                        \caseOf{$u\in Y$.}
                            Let $d = u$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopen_rel,subseteq}.
                        \caseOf{it is wrong that $u\in Y$.}
                            $u\mathrel{R}a$ by \cref{connex,least_upper_bound_rel,transitive,intervalclosed_rel}.
                            Let $d = a$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopen_rel,subseteq}.
                        \end{byCase}
                    \caseOf{$\exists v\in X. \exists a_0\in X. (\forall z\in X. a_0\mathrel{R}z \lor a_0 = z) \land
                        B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.}
                        Take $a_0, v\in X$ such that
                            $(\forall z\in X. a_0\mathrel{R}z \lor a_0 = z)$ and
                            $B_1 = \intervalclosedopenrel{R}{X}{a_0}{v}$.
                        We have $c\in X$ and $(a_0\mathrel{R}c \lor c = a_0)$ and $c\mathrel{R}v$
                            by \cref{intervalclosedopen_rel}.
                        Let $d = a$.
                        $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                            by \cref{intervalopenclosed_rel,smallest_element,transitive,intervalclosedopen_rel,subseteq}.
                    \caseOf{$\exists u\in X. \exists b_0\in X. (\forall z\in X. z\mathrel{R}b_0 \lor z = b_0) \land
                        B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.}
                        Take $u, b_0\in X$ such that
                            $(\forall z\in X. z\mathrel{R}b_0 \lor z = b_0)$ and
                            $B_1 = \intervalopenclosedrel{R}{X}{u}{b_0}$.
                        $u\mathrel{R}c$ and $(c\mathrel{R}b_0 \lor c = b_0)$ by \cref{intervalopenclosed_rel}.
                        \begin{byCase}
                        \caseOf{$u\in Y$.}
                            Let $d = u$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopenclosed_rel,subseteq}.
                        \caseOf{it is wrong that $u\in Y$.}
                            $u\mathrel{R}a$ by \cref{connex,least_upper_bound_rel,transitive,intervalclosed_rel}.
                            Let $d = a$.
                            $\intervalopenclosedrel{R}{X}{d}{c} \subseteq B_1$
                                by \cref{intervalopenclosed_rel,transitive,intervalopenclosed_rel,subseteq}.
                        \end{byCase}
                    \end{byCase}
                \end{subproof}
                Take $d\in Y$ such that $d\mathrel{R}c$ and $\intervalopenclosedrel{R}{X}{d}{c} \subseteq V$.
                Suppose not.
                Show that there exists $z\in C$ such that $d\mathrel{R}z$.
                \begin{subproof}
                    Suppose not.
                    Show that for all $y\in C$ we have $y\mathrel{R}d$ or $y = d$.
                    \begin{subproof}
                        Follows by \cref{subseteq,connex}.
                    \end{subproof}
                    $c\mathrel{R}d$ or $c = d$ by \cref{subseteq,upper_bound_rel,least_upper_bound_rel}.
                    Contradiction by \cref{asymmetric}.
                \end{subproof}
                Take $z\in C$ such that $d\mathrel{R}z$.
                $z\mathrel{R}c$ by \cref{least_upper_bound_rel,upper_bound_rel}.
                Take $B_0$ such that $B_0\subseteq A$ and $B_0$ is finite and
                    $B_0$ is a covering of $\intervalclosedrel{R}{X}{a}{z}$.
                Let $B = B_0\union\{U\}$.
                $B$ is finite by \cref{pair_is_finite,upair_intro_left,singleton_subset_intro,subseteq_finite_is_finite,union_of_finite_is_finite}.
                Show that for all $w$ such that $w\in\intervalclosedrel{R}{X}{a}{c}$ we have $w\in\unions{B}$.
                \begin{subproof}
                    Fix $w$ such that $w\in\intervalclosedrel{R}{X}{a}{c}$.
                    We have $w\in X$ and $(a\mathrel{R}w \lor w = a)$ and $(w\mathrel{R}c \lor w = c)$
                        by \cref{intervalclosed_rel}.
                    $w\mathrel{R}z$ or $w = z$ or $z\mathrel{R}w$ by \cref{connex}.
                    \begin{byCase}
                    \caseOf{$w\mathrel{R}z$ or $w = z$.}
                        $w\in\unions{B}$ by \cref{subseteq,intervalclosed_rel,covering,unions_iff,union_intro_left}.
                    \caseOf{$z\mathrel{R}w$.}
                        $w\in V$ by \cref{transitive,intervalopenclosed_rel,subseteq}.
                        $w\in Y$ by \cref{convex_in}.
                        $w\in Y\inter V$ by \cref{inter_intro}.
                        $w\in U$.
                        $w\in\unions{B}$ by \cref{singleton_intro,union_intro_right,unions_iff}.
                    \end{byCase}
                \end{subproof}
                $B$ is a covering of $\intervalclosedrel{R}{X}{a}{c}$ by \cref{subseteq,covering}.
                We have $\{U\}\subseteq A$ by \cref{singleton_subset_intro}.
                $B\subseteq A$ by \cref{union_subsets_is_subset}.
                $B\subseteq A$ and $B$ is finite and
                    $B$ is a covering of $\intervalclosedrel{R}{X}{a}{c}$.
                $c\in C$.
                Contradiction.
            \end{subproof}

            Show that $c = b$.
            \begin{subproof}
                Suppose not.
                $c\mathrel{R}b$ by \cref{least_upper_bound_rel}.
                Take $y_1,B_1$ such that $y_1\in Y$ and $c\mathrel{R}y_1$ and $B_1\subseteq A$ and
                    $B_1$ is finite and $B_1$ is a covering of $\intervalclosedrel{R}{X}{c}{y_1}$.
                $a\mathrel{R}y_1$ by \hyperref[transitive]{transitivity}.
                Take $B_0$ such that $B_0\subseteq A$ and $B_0$ is finite and
                    $B_0$ is a covering of $\intervalclosedrel{R}{X}{a}{c}$.
                Let $B = B_0\union B_1$.
                $B\subseteq A$ by \cref{union_subsets_is_subset}.
                $B$ is finite by \cref{union_of_finite_is_finite}.
                For all $w$ such that $w\in\intervalclosedrel{R}{X}{a}{y_1}$ we have $w\in\unions{B}$
                    by \cref{intervalclosed_rel,covering,subseteq,unions_iff,union_intro_left,union_intro_right,connex}.
                $B$ is a covering of $\intervalclosedrel{R}{X}{a}{y_1}$ by \cref{subseteq,covering}.
                $y_1\in C$.
                $y_1\mathrel{R}c$ or $y_1 = c$ by \cref{least_upper_bound_rel,upper_bound_rel}.
                Contradiction by \cref{asymmetric}.
            \end{subproof}
            Take $B$ such that $B\subseteq A$ and $B$ is finite and
                $B$ is a covering of $\intervalclosedrel{R}{X}{a}{b}$.
        \end{byCase}
    \end{subproof}
    $Y$ is compact with respect to $T_Y$ by \cref{compact}.
\end{proof}
Corollary 11
real_closed_interval_compact

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
Suppose $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
Suppose $a < b$ or $a = b$.
Let $R = \realOrderRel$.
Let $T = \realOrderTopology$.
Let $Y = \intervalclosedrel{R}{\reals}{a}{b}$.
Let $T_Y = \subspaceTopology{T}{Y}$.
Then $Y$ is compact with respect to $T_Y$.

LaTeX source
\begin{corollary}
\label{real_closed_interval_compact}
    Suppose $a\in\reals$.
    Suppose $b\in\reals$.
    Suppose $a < b$ or $a = b$.
    Let $R = \realOrderRel$.
    Let $T = \realOrderTopology$.
    Let $Y = \intervalclosedrel{R}{\reals}{a}{b}$.
    Let $T_Y = \subspaceTopology{T}{Y}$.
    Then $Y$ is compact with respect to $T_Y$.
\end{corollary}
Proof

Let $X = \reals$.
$R$ is a simple order relation on $X$ and $X$ has the least upper bound property with respect to $R$ and $X$ has more than one element by Definition 231, Lemma 322, Lemma 326.
$Y$ is compact with respect to $T_Y$ by Definition 134, Definition 233, Lemma 320, Theorem 65.

LaTeX source
\begin{proof}
    Let $X = \reals$.
    $R$ is a simple order relation on $X$ and $X$ has the least upper bound property with respect to $R$ and
        $X$ has more than one element by \cref{real_order_relation_simple,reals_linear_continuum,linear_continuum}.
    $Y$ is compact with respect to $T_Y$
        by \cref{real_order_topology,order_topology,real_order_relation_intro,ordered_closed_interval_compact}.
\end{proof}
Lemma 364
real_four_sum_bound

Suppose $r_1,r_2,r_3,r_4,M_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
Suppose $r_1 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} 1$ and $r_4 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} 1$ and $r_2 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0$ and $r_3 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0$.
Then $(r_1 + r_2) + (r_3 + r_4) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (M_0 + 1) + (M_0 + 1)$.

LaTeX source
\begin{lemma}
\label{real_four_sum_bound}
    Suppose $r_1,r_2,r_3,r_4,M_0\in\reals$.
    Suppose $r_1 \leq 1$ and $r_4 \leq 1$ and $r_2 \leq M_0$ and $r_3 \leq M_0$.
    Then $(r_1 + r_2) + (r_3 + r_4) \leq (M_0 + 1) + (M_0 + 1)$.
\end{lemma}
Proof

$1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $r_2 + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $r_3 + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $M_0 + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13, Axiom 41, Axiom 42, Definition 1.
$r_1 + r_2\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $r_3 + r_4\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $r_4 + r_3\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $(r_1 + r_2) + (r_3 + r_4)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $(M_0 + 1) + (r_3 + r_4)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $(r_3 + r_4) + (M_0 + 1)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $(M_0 + 1) + (M_0 + 1)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$r_1 + r_2 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} 1 + r_2$ by Lemma 24.
$1 + r_2 = r_2 + 1$ by Axiom 16.
$r_2 + 1 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0 + 1$ by Lemma 24.
Hence $r_1 + r_2 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0 + 1$ by Lemma 23.
$r_4 + r_3 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} 1 + r_3$ by Lemma 24.
$r_4 + r_3 = r_3 + r_4$ and $1 + r_3 = r_3 + 1$ by Axiom 16.
$r_3 + 1 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0 + 1$ by Lemma 24.
Hence $r_3 + r_4 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0 + 1$ by Lemma 23.
Thus $(r_1 + r_2) + (r_3 + r_4) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (M_0 + 1) + (r_3 + r_4)$ by Lemma 24.
$(M_0 + 1) + (r_3 + r_4) = (r_3 + r_4) + (M_0 + 1)$ by Axiom 16.
$(r_3 + r_4) + (M_0 + 1) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (M_0 + 1) + (M_0 + 1)$ by Lemma 24.
Therefore $(r_1 + r_2) + (r_3 + r_4) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (M_0 + 1) + (M_0 + 1)$ by Lemma 23.

LaTeX source
\begin{proof}
    $1\in\reals$ and $r_2 + 1\in\reals$ and $r_3 + 1\in\reals$ and $M_0 + 1\in\reals$
        by \cref{real_naturals_subset_reals,real_one_in_naturals,subseteq,real_add_closed}.
    $r_1 + r_2\in\reals$ and $r_3 + r_4\in\reals$ and $r_4 + r_3\in\reals$ and
        $(r_1 + r_2) + (r_3 + r_4)\in\reals$ and $(M_0 + 1) + (r_3 + r_4)\in\reals$ and
        $(r_3 + r_4) + (M_0 + 1)\in\reals$ and $(M_0 + 1) + (M_0 + 1)\in\reals$
        by \cref{real_add_closed}.
    $r_1 + r_2 \leq 1 + r_2$ by \cref{real_leq_add}.
    $1 + r_2 = r_2 + 1$ by \cref{real_add_comm}.
    $r_2 + 1 \leq M_0 + 1$ by \cref{real_leq_add}.
    Hence $r_1 + r_2 \leq M_0 + 1$ by \cref{real_leq_trans}.
    $r_4 + r_3 \leq 1 + r_3$ by \cref{real_leq_add}.
    $r_4 + r_3 = r_3 + r_4$ and $1 + r_3 = r_3 + 1$ by \cref{real_add_comm}.
    $r_3 + 1 \leq M_0 + 1$ by \cref{real_leq_add}.
    Hence $r_3 + r_4 \leq M_0 + 1$ by \cref{real_leq_trans}.
    Thus $(r_1 + r_2) + (r_3 + r_4) \leq (M_0 + 1) + (r_3 + r_4)$
        by \cref{real_leq_add}.
    $(M_0 + 1) + (r_3 + r_4) = (r_3 + r_4) + (M_0 + 1)$ by \cref{real_add_comm}.
    $(r_3 + r_4) + (M_0 + 1) \leq (M_0 + 1) + (M_0 + 1)$ by \cref{real_leq_add}.
    Therefore $(r_1 + r_2) + (r_3 + r_4) \leq (M_0 + 1) + (M_0 + 1)$
        by \cref{real_leq_trans}.
\end{proof}
Lemma 365
real_intervalclosed_compact_standard

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
Suppose $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
Suppose $a \class{latex-symbol-tip latex-symbol-id-leq}{\leq} b$.
Let $I = \intervalclosed{a}{b}$.
Then $I$ is compact with respect to $\subspaceTopology{\standardTopologyR}{I}$.

LaTeX source
\begin{lemma}
\label{real_intervalclosed_compact_standard}
    Suppose $a\in\reals$.
    Suppose $b\in\reals$.
    Suppose $a \leq b$.
    Let $I = \intervalclosed{a}{b}$.
    Then $I$ is compact with respect to $\subspaceTopology{\standardTopologyR}{I}$.
\end{lemma}
Proof

Let $R = \realOrderRel$.
Let $J = \intervalclosedrel{R}{\reals}{a}{b}$.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in} J$.

Hence $I\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} J$ by Definition 1.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.

$J\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} I$ by Definition 1.
Thus $I = J$ by Proposition 3.
Let $T = \realOrderTopology$.
Let $T_I = \subspaceTopology{T}{I}$.
$I$ is compact with respect to $T_I$ by Corollary 11.
Therefore $I$ is compact with respect to $\subspaceTopology{\standardTopologyR}{I}$ by Lemma 336.

LaTeX source
\begin{proof}
    Let $R = \realOrderRel$.
    Let $J = \intervalclosedrel{R}{\reals}{a}{b}$.
    Show that for all $x\in I$ we have $x\in J$.
    \begin{subproof}
        Follows by \cref{intervalclosed,intervalclosed_rel,real_order_relation_intro}.
    \end{subproof}
    Hence $I\subseteq J$ by \cref{subseteq}.
    Show that for all $x\in J$ we have $x\in I$.
    \begin{subproof}
        Follows by \cref{intervalclosed,intervalclosed_rel,real_order_relation_elim}.
    \end{subproof}
    $J\subseteq I$ by \cref{subseteq}.
    Thus $I = J$ by \cref{subseteq_antisymmetric}.
    Let $T = \realOrderTopology$.
    Let $T_I = \subspaceTopology{T}{I}$.
    $I$ is compact with respect to $T_I$ by \cref{real_closed_interval_compact}.
    Therefore $I$ is compact with respect to $\subspaceTopology{\standardTopologyR}{I}$
        by \cref{real_order_topology_eq_standard}.
\end{proof}
Lemma 366
projection_map_indexed_continuous

Assume $X$ is a function.
Assume $T$ is a function.
Assume $\dom{T} = \dom{X}$.
Assume $\dom{X}$ is inhabited.
Assume that for all $\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{X}$ we have $\apply{T}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$ is a topology on $\apply{X}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$.
Let $T_0 = \productTopologyIndexed{T}{X}$.
Then for all $\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{X}$ we have $\piIndex{X}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$ is continuous from $\productFamily{X}$ to $\apply{X}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$ with respect to $T_0$ and $\apply{T}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$.

LaTeX source
\begin{lemma}
\label{projection_map_indexed_continuous}
    Assume $X$ is a function.
    Assume $T$ is a function.
    Assume $\dom{T} = \dom{X}$.
    Assume $\dom{X}$ is inhabited.
    Assume that for all $\alpha\in\dom{X}$ we have $\apply{T}{\alpha}$ is a topology on $\apply{X}{\alpha}$.
    Let $T_0 = \productTopologyIndexed{T}{X}$.
    Then for all $\alpha\in\dom{X}$ we have $\piIndex{X}{\alpha}$ is continuous from $\productFamily{X}$ to $\apply{X}{\alpha}$
        with respect to $T_0$ and $\apply{T}{\alpha}$.
\end{lemma}
Proof

$T_0$ is a topology on $\productFamily{X}$ by Definition 115, Lemma 76, Lemma 176, Lemma 177.
Let $j = \identity{\productFamily{X}}$.
$j\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\productFamily{X}}{\productFamily{X}}$ and $j$ is continuous from $\productFamily{X}$ to $\productFamily{X}$ with respect to $T_0$ and $T_0$ by Lemma 308, Proposition 406.
Therefore for all $\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{X}$ we have $\piIndex{X}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} j$ is continuous from $\productFamily{X}$ to $\apply{X}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$ with respect to $T_0$ and $\apply{T}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$ by Lemma 193.
Fix $\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}$ such that $\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{X}$.

Claim: For all $x,z$ we have $x\mathrel{\piIndex{X}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} j} z$ iff $x\mathrel{\piIndex{X}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}} z$.

Therefore $\piIndex{X}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$ is continuous from $\productFamily{X}$ to $\apply{X}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$ with respect to $T_0$ and $\apply{T}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$ by Lemma 191, Lemma 193, Proposition 177, Proposition 254, Proposition 355, Proposition 406.

LaTeX source
\begin{proof}
    $T_0$ is a topology on $\productFamily{X}$
        by \cref{product_subbasis_is_subbasis,product_subbasis_finite_intersections_basis,basis_topology_is_topology,basis_for_topology}.
    Let $j = \identity{\productFamily{X}}$.
    $j\in\funs{\productFamily{X}}{\productFamily{X}}$ and
        $j$ is continuous from $\productFamily{X}$ to $\productFamily{X}$ with respect to $T_0$ and $T_0$
        by \cref{id_elem_funs,identity_continuous}.
    Therefore for all $\alpha\in\dom{X}$ we have $\piIndex{X}{\alpha}\circ j$ is continuous from $\productFamily{X}$
        to $\apply{X}{\alpha}$ with respect to $T_0$ and $\apply{T}{\alpha}$
        by \cref{continuous_map_into_indexed_product}.
    Fix $\alpha$ such that $\alpha\in\dom{X}$.
    Show that for all $x,z$ we have $x\mathrel{\piIndex{X}{\alpha}\circ j} z$ iff $x\mathrel{\piIndex{X}{\alpha}} z$.
    \begin{subproof}
        Follows by \cref{circ_iff,id_iff,projection_map_indexed,pair_eq_iff}.
    \end{subproof}
    Therefore $\piIndex{X}{\alpha}$ is continuous from $\productFamily{X}$ to $\apply{X}{\alpha}$
        with respect to $T_0$ and $\apply{T}{\alpha}$
        by \cref{continuous_map_into_indexed_product,circ_is_relation,projection_map_indexed_function,id_elem_funs,funs_is_relation,relext}.
\end{proof}
Definition 249
indexed_product_compact_index

A natural number $m$ is indexed-product-compact iff for all $Y_1,T_1$ such that $Y_1$ is a function and $T_1$ is a function and $\dom{Y_1} = \initialSegment{m}$ and $\dom{T_1} = \initialSegment{m}$, if for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\initialSegment{m}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ then if for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\initialSegment{m}$ we have $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$ then $\productFamily{Y_1}$ is compact with respect to $\productTopologyIndexed{T_1}{Y_1}$.

LaTeX source
\begin{definition}
\label{indexed_product_compact_index}
    A natural number $m$ is indexed-product-compact iff
        for all $Y_1,T_1$ such that $Y_1$ is a function and $T_1$ is a function and
            $\dom{Y_1} = \initialSegment{m}$ and $\dom{T_1} = \initialSegment{m}$,
            if for all $i\in\initialSegment{m}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ then
            if for all $i\in\initialSegment{m}$ we have $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$ then
            $\productFamily{Y_1}$ is compact with respect to $\productTopologyIndexed{T_1}{Y_1}$.
\end{definition}
Definition 250
finite_indexed_product_compact_property

$\finiteIndexedProductCompactProp{m}$ iff for all $Y_1,T_1$ such that $Y_1$ is a function and $T_1$ is a function and $\dom{Y_1} = \initialSegment{m}$ and $\dom{T_1} = \initialSegment{m}$ and for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ and $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$, we have $\productFamily{Y_1}$ is compact with respect to $\productTopologyIndexed{T_1}{Y_1}$.

LaTeX source
\begin{definition}
\label{finite_indexed_product_compact_property}
    $\finiteIndexedProductCompactProp{m}$ iff
        for all $Y_1,T_1$ such that
            $Y_1$ is a function and $T_1$ is a function and
            $\dom{Y_1} = \initialSegment{m}$ and $\dom{T_1} = \initialSegment{m}$ and
            for all $i\in\dom{Y_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ and
                $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$,
        we have $\productFamily{Y_1}$ is compact with respect to $\productTopologyIndexed{T_1}{Y_1}$.
\end{definition}
Lemma 367
continuous_eq_subst

Let $f,g$ be functions.
Suppose $f = g$.
Suppose $g$ is continuous from $X$ to $Y$ with respect to $T$ and $T_1$.
Then $f$ is continuous from $X$ to $Y$ with respect to $T$ and $T_1$.

LaTeX source
\begin{lemma}
\label{continuous_eq_subst}
    Let $f,g$ be functions.
    Suppose $f = g$.
    Suppose $g$ is continuous from $X$ to $Y$ with respect to $T$ and $T_1$.
    Then $f$ is continuous from $X$ to $Y$ with respect to $T$ and $T_1$.
\end{lemma}
Proof

Trivial.

LaTeX source
\begin{proof}
    Trivial.
\end{proof}
Lemma 368
continuous_eq_codomain

Suppose $Y = Y_2$.
Suppose $T_1 = T_2$.
Suppose $f$ is continuous from $X$ to $Y$ with respect to $T$ and $T_1$.
Then $f$ is continuous from $X$ to $Y_2$ with respect to $T$ and $T_2$.

LaTeX source
\begin{lemma}
\label{continuous_eq_codomain}
    Suppose $Y = Y_2$.
    Suppose $T_1 = T_2$.
    Suppose $f$ is continuous from $X$ to $Y$ with respect to $T$ and $T_1$.
    Then $f$ is continuous from $X$ to $Y_2$ with respect to $T$ and $T_2$.
\end{lemma}
Proof

Trivial.

LaTeX source
\begin{proof}
    Trivial.
\end{proof}
Lemma 369
finite_indexed_product_compact_property_succ

Assume $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.
Assume $\finiteIndexedProductCompactProp{k}$.
Then $\finiteIndexedProductCompactProp{k + 1}$.

LaTeX source
\begin{lemma}
\label{finite_indexed_product_compact_property_succ}
    Assume $k\in\naturalsPlus$.
    Assume $\finiteIndexedProductCompactProp{k}$.
    Then $\finiteIndexedProductCompactProp{k + 1}$.
\end{lemma}
Proof
Claim: For all $Y_1,T_1$ such that $Y_1$ is a function and $T_1$ is a function and $\dom{Y_1} = \initialSegment{k + 1}$ and $\dom{T_1} = \initialSegment{k + 1}$ and for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ and $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$, we have $\productFamily{Y_1}$ is compact with respect to $\productTopologyIndexed{T_1}{Y_1}$.

Fix $Y_1$.
Fix $T_1$.
Assume $Y_1$ is a function.
Assume $T_1$ is a function.
Assume $\dom{Y_1} = \initialSegment{k + 1}$.
Assume $\dom{T_1} = \initialSegment{k + 1}$.
Assume that for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ and $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$.
Let $J_1 = \initialSegment{k}$.
Let $J = \initialSegment{k + 1}$.
For all $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ we have $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Axiom 16, Axiom 17, Axiom 37, Axiom 41, Axiom 42, Axiom 45, Definition 1, Definition 84, Lemma 23, Lemma 82, Lemma 231, Proposition 462.
Hence $J_1\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} J$ by Definition 1.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 41, Definition 1.
$k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ and $k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 41, Axiom 45, Definition 1.
Thus $k < k + 1$ by Axiom 16, Axiom 17, Axiom 37, Axiom 41, Axiom 42, Definition 1, Lemma 82, Proposition 462.

Claim: $k \class{latex-symbol-tip latex-symbol-id-neq}{\neq} k + 1$.

Suppose not.
Thus $k = k + 1$.
Hence $k < k$ by Lemma 82.
Contradiction by Axiom 39.

Let $Y_0 = \{(i,\apply{Y_1}{i}) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1\}$.
Let $T_0 = \{(i,\apply{T_1}{i}) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1\}$.
$\dom{Y_0} = J_1$ by Axiom 6, Definition 1, Proposition 3, Proposition 199, Proposition 200.
We have $\dom{T_0} = J_1$ by Axiom 6, Definition 1, Proposition 3, Proposition 199, Proposition 200.
$Y_0$ is a relation by Definition 12.

Claim: For all $a,b_1,b_2$ such that $(a,b_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} Y_0$ and $(a,b_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} Y_0$ we have $b_1 = b_2$.

Follows by Axiom 6.

Hence $Y_0$ is a function by Definition 51.
$T_0$ is a relation by Definition 12.

Claim: For all $a,b_1,b_2$ such that $(a,b_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} T_0$ and $(a,b_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} T_0$ we have $b_1 = b_2$.

Follows by Axiom 6.

Thus $T_0$ is a function by Definition 51.
For all $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ we have $\apply{T_0}{i}$ is a topology on $\apply{Y_0}{i}$ by Definition 1, Proposition 346.
For all $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ we have $\apply{Y_0}{i}$ is compact with respect to $\apply{T_0}{i}$ by Definition 1, Proposition 346.
Therefore $\productFamily{Y_0}$ is compact with respect to $\productTopologyIndexed{T_0}{Y_0}$ by Definition 250.
Let $X_0 = \productFamily{Y_0}$.
Let $T_X = \productTopologyIndexed{T_0}{Y_0}$.
Let $X_1 = \apply{Y_1}{k + 1}$.
Let $T_{1p} = \apply{T_1}{k + 1}$.
$k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Axiom 45, Definition 84.

Claim: $T_{1p}$ is a topology on $X_1$ and $X_1$ is compact with respect to $T_{1p}$.

Follows by Definition 1.

We have $J_1$ is inhabited by Axiom 42, Axiom 43, Definition 84.
Hence $T_X$ is a topology on $X_0$ by Definition 115, Lemma 76, Lemma 177.
Let $T_P = \productTopology{T_X}{T_{1p}}{X_0}{X_1}$.
Therefore $X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ is compact with respect to $T_P$ by Theorem 63.
Let $g = \{(p,\fst{p}\union\{(k + 1,\snd{p})\}) \mid p\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1\}$.
$g$ is a relation by Definition 12.
For all $p,u,v$ such that $(p,u)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ and $(p,v)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ we have $u = v$ by Axiom 6.
Hence $g$ is a function by Definition 51.
We have $\dom{g} = X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ by Axiom 6, Definition 1, Proposition 3, Proposition 199, Proposition 200.

Claim: For all $p\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ we have $g(p)\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$.

Fix $p$ such that $p\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$.
Take $v$ such that $(p,v)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ by Proposition 199.
Hence $p\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ by Definition 1.
Let $u = \fst{p}\union\{(k + 1,\snd{p})\}$.
$(p,u)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$.
Hence $v = u$ by Axiom 6.
Let $x = \fst{p}$.
Let $y = \snd{p}$.
We have $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X_1$ by Definition 1, Proposition 122.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y_0}}{\unions{\ran{Y_0}}}$ and $x$ is a function and $\dom{x} = \dom{Y_0}$ by Definition 1, Definition 167, Proposition 359.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\rels{\dom{Y_0}}{\unions{\ran{Y_0}}}$ and $x$ is a relation by Definition 1, Proposition 285, Proposition 357.

Claim: $v\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$.

For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} v$ there exist $q_1,q_2$ such that $w = (q_1,q_2)$ by Axiom 5, Definition 12, Proposition 22.
Hence $v$ is a relation by Definition 12.

Claim: For all $a,b_1,b_2$ such that $(a,b_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} v$ and $(a,b_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} v$ we have $b_1 = b_2$.

Fix $a$.
Fix $b_1$.
Fix $b_2$ such that $(a,b_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} v$ and $(a,b_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} v$.

Case. $a = k + 1$.

Hence $(a,b_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ or $(a,b_1) = (k + 1,y)$ by Axiom 5, Proposition 22.

Claim: $(a,b_1)\class{latex-symbol-tip latex-symbol-id-notin}{\notin} x$.

Suppose not.
$(a,b_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} x$.
Hence $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{x}$ by Proposition 200.
We have $\dom{x} = \dom{Y_0}$ by Proposition 359.
Hence $a\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ by Definition 1.
Therefore $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ and $a \class{latex-symbol-tip latex-symbol-id-leq}{\leq} k$ by Definition 84.
Hence $k + 1 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} k$.
Therefore $k + 1 < k$ or $k + 1 = k$ by Lemma 81.
Contradiction by Axiom 35, Axiom 39, Lemma 82.

Hence $(a,b_1) = (k + 1,y)$.
We have $(a,b_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ or $(a,b_2) = (k + 1,y)$ by Axiom 5, Proposition 22.

Claim: $(a,b_2)\class{latex-symbol-tip latex-symbol-id-notin}{\notin} x$.

Suppose not.
$(a,b_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} x$.
Hence $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{x}$ by Proposition 200.
We have $\dom{x} = \dom{Y_0}$ by Proposition 359.
Hence $a\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ by Definition 1.
Therefore $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ and $a \class{latex-symbol-tip latex-symbol-id-leq}{\leq} k$ by Definition 84.
Hence $k + 1 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} k$.
Therefore $k + 1 < k$ or $k + 1 = k$ by Lemma 81.
Contradiction by Axiom 35, Axiom 39, Lemma 82.

Hence $(a,b_2) = (k + 1,y)$.
Hence $b_1 = y$ and $b_2 = y$ by Axiom 6.
Therefore $b_1 = b_2$.

Case. $a \class{latex-symbol-tip latex-symbol-id-neq}{\neq} k + 1$.

Hence $(a,b_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ by Axiom 5, Axiom 6, Proposition 22.
$(a,b_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ by Axiom 5, Axiom 6, Proposition 22.
Thus $b_1 = b_2$ by Definition 12, Definition 51.

LaTeX source
\begin{byCase}
                                \caseOf{$a = k + 1$.}
                                    Hence $(a,b_1)\in x$ or $(a,b_1) = (k + 1,y)$ by \cref{union_iff,singleton_iff}.
                                    Show that $(a,b_1)\notin x$.
                                    \begin{subproof}
                                        Suppose not.
                                        $(a,b_1)\in x$.
                                        Hence $a\in\dom{x}$ by \cref{dom_intro}.
                                        We have $\dom{x} = \dom{Y_0}$ by \cref{funs_elim}.
                                        Hence $a\in J_1$ by \cref{subseteq}.
                                        Therefore $a\in\naturalsPlus$ and $a \leq k$ by \cref{initial_segment_naturalsplus}.
                                        Hence $k + 1 \leq k$.
                                        Therefore $k + 1 < k$ or $k + 1 = k$ by \cref{real_leq_split}.
                                        Contradiction by \cref{real_lt_asym,real_lt_subst_left,real_lt_irreflexive}.
                                    \end{subproof}
                                    Hence $(a,b_1) = (k + 1,y)$.
                                    We have $(a,b_2)\in x$ or $(a,b_2) = (k + 1,y)$ by \cref{union_iff,singleton_iff}.
                                    Show that $(a,b_2)\notin x$.
                                    \begin{subproof}
                                        Suppose not.
                                        $(a,b_2)\in x$.
                                        Hence $a\in\dom{x}$ by \cref{dom_intro}.
                                        We have $\dom{x} = \dom{Y_0}$ by \cref{funs_elim}.
                                        Hence $a\in J_1$ by \cref{subseteq}.
                                        Therefore $a\in\naturalsPlus$ and $a \leq k$ by \cref{initial_segment_naturalsplus}.
                                        Hence $k + 1 \leq k$.
                                        Therefore $k + 1 < k$ or $k + 1 = k$ by \cref{real_leq_split}.
                                        Contradiction by \cref{real_lt_asym,real_lt_subst_left,real_lt_irreflexive}.
                                    \end{subproof}
                                    Hence $(a,b_2) = (k + 1,y)$.
                                    Hence $b_1 = y$ and $b_2 = y$ by \cref{pair_eq_iff}.
                                    Therefore $b_1 = b_2$.
                                \caseOf{$a \neq k + 1$.}
                                    Hence $(a,b_1)\in x$ by \cref{union_iff,singleton_iff,pair_eq_iff}.
                                    $(a,b_2)\in x$ by \cref{union_iff,singleton_iff,pair_eq_iff}.
                                    Thus $b_1 = b_2$ by \cref{rightunique,relation}.
                                
\end{byCase}

Hence $v$ is a function by Definition 51.

Claim: For all $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{v}$.

Hence $\dom{Y_1}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{v}$ by Definition 1.

Claim: For all $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{v}$ we have $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$.

Fix $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{v}$.
Take $b$ such that $(i,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} v$ by Proposition 199.
We have $(i,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ or $(i,b) = (k + 1,y)$ by Axiom 5, Proposition 22.

Case. $(i,b) = (k + 1,y)$.

Hence $i = k + 1$ by Axiom 6.
We have $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$.
Therefore $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ by Definition 1.

Case. $(i,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} x$.

Hence $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{x}$ by Proposition 200.
We have $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ by Definition 167, Proposition 359.
Therefore $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 1, Definition 84.
Hence $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ by Definition 1.

LaTeX source
\begin{byCase}
                                \caseOf{$(i,b) = (k + 1,y)$.}
                                    Hence $i = k + 1$ by \cref{pair_eq_iff}.
                                    We have $i\in J$.
                                    Therefore $i\in\dom{Y_1}$ by \cref{subseteq}.
                                \caseOf{$(i,b)\in x$.}
                                    Hence $i\in\dom{x}$ by \cref{dom_intro}.
                                    We have $i\in J_1$ by \cref{indexed_product,funs_elim}.
                                    Therefore $i\in J$ by \cref{subseteq,initial_segment_naturalsplus}.
                                    Hence $i\in\dom{Y_1}$ by \cref{subseteq}.
                                
\end{byCase}

Therefore $\dom{v}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{Y_1}$ by Definition 1.
Hence $\dom{v} = \dom{Y_1}$ by Proposition 3.

Claim: For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $v(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{\ran{Y_1}}$.

Fix $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$.
Hence $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 1.

Case. $i = k + 1$.

We have $(k + 1,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} v$ by Axiom 5, Proposition 22.
Hence $v(k + 1) = y$ by Proposition 346.
$(k + 1,X_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} Y_1$ by Definition 1, Proposition 348.
Hence $X_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{Y_1}$ by Proposition 209.
Therefore $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{\ran{Y_1}}$ by Axiom 4.
Therefore $v(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{\ran{Y_1}}$.

Case. $i \class{latex-symbol-tip latex-symbol-id-neq}{\neq} k + 1$.

Hence $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ by Definition 84, Lemma 29.
We have $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{x}$ by Definition 1, Definition 167, Proposition 359.
Therefore $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\apply{Y_0}{i}$ by Definition 167.
$(i,\apply{Y_1}{i})\class{latex-symbol-tip latex-symbol-id-in}{\in} Y_0$.
Hence $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\apply{Y_1}{i}$ by Proposition 346.
Therefore $(i,\apply{Y_1}{i})\class{latex-symbol-tip latex-symbol-id-in}{\in} Y_1$ by Proposition 348.
Hence $\apply{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-in}{\in}\ran{Y_1}$ by Proposition 209.
Therefore $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{\ran{Y_1}}$ by Axiom 4.
We have $(i,x(i))\class{latex-symbol-tip latex-symbol-id-in}{\in} v$ by Axiom 5, Proposition 348.
Hence $v(i) = x(i)$ by Proposition 346.
Hence $v(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{\ran{Y_1}}$.

LaTeX source
\begin{byCase}
                            \caseOf{$i = k + 1$.}
                                We have $(k + 1,y)\in v$ by \cref{union_iff,singleton_iff}.
                                Hence $v(k + 1) = y$ by \cref{function_apply_intro}.
                                $(k + 1,X_1)\in Y_1$ by \cref{function_apply_elim,subseteq}.
                                Hence $X_1\in\ran{Y_1}$ by \cref{ran_intro}.
                                Therefore $y\in\unions{\ran{Y_1}}$ by \cref{unions_iff}.
                                Therefore $v(i)\in\unions{\ran{Y_1}}$.
                            \caseOf{$i \neq k + 1$.}
                                Hence $i\in J_1$ by \cref{real_naturals_leq_succ_elim,initial_segment_naturalsplus}.
                                We have $i\in\dom{x}$ by \cref{subseteq,indexed_product,funs_elim}.
                                Therefore $x(i)\in\apply{Y_0}{i}$ by \cref{indexed_product}.
                                $(i,\apply{Y_1}{i})\in Y_0$.
                                Hence $x(i)\in\apply{Y_1}{i}$ by \cref{function_apply_intro}.
                                Therefore $(i,\apply{Y_1}{i})\in Y_1$ by \cref{function_apply_elim}.
                                Hence $\apply{Y_1}{i}\in\ran{Y_1}$ by \cref{ran_intro}.
                                Therefore $x(i)\in\unions{\ran{Y_1}}$ by \cref{unions_iff}.
                                We have $(i,x(i))\in v$ by \cref{function_apply_elim,union_iff}.
                                Hence $v(i) = x(i)$ by \cref{function_apply_intro}.
                                Hence $v(i)\in\unions{\ran{Y_1}}$.
                            
\end{byCase}

Therefore $v\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$ by Proposition 358.

Hence $v$ is right-unique and $v$ is a relation by Definition 55, Proposition 285.

Claim: For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $v(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\apply{Y_1}{i}$.

Fix $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$.
Hence $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 1.

Case. $i = k + 1$.

We have $(k + 1,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} v$ by Axiom 5, Proposition 22.
Hence $v(k + 1) = y$ by Proposition 346.
Therefore $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X_1$ by Definition 1.
Hence $v(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\apply{Y_1}{i}$.

Case. $i \class{latex-symbol-tip latex-symbol-id-neq}{\neq} k + 1$.

Hence $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ by Definition 84, Lemma 29.
We have $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\apply{Y_0}{i}$ by Definition 167.
Hence $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\apply{Y_1}{i}$ by Proposition 346.
Therefore $(i,x(i))\class{latex-symbol-tip latex-symbol-id-in}{\in} v$ by Axiom 5, Proposition 348.
Hence $v(i) = x(i)$ by Proposition 346.
Hence $v(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\apply{Y_1}{i}$.

LaTeX source
\begin{byCase}
                        \caseOf{$i = k + 1$.}
                            We have $(k + 1,y)\in v$ by \cref{union_iff,singleton_iff}.
                            Hence $v(k + 1) = y$ by \cref{function_apply_intro}.
                            Therefore $y\in X_1$ by \cref{subseteq}.
                            Hence $v(i)\in\apply{Y_1}{i}$.
                        \caseOf{$i \neq k + 1$.}
                            Hence $i\in J_1$ by \cref{real_naturals_leq_succ_elim,initial_segment_naturalsplus}.
                            We have $x(i)\in\apply{Y_0}{i}$ by \cref{indexed_product}.
                            Hence $x(i)\in\apply{Y_1}{i}$ by \cref{function_apply_intro}.
                            Therefore $(i,x(i))\in v$ by \cref{function_apply_elim,union_iff}.
                            Hence $v(i) = x(i)$ by \cref{function_apply_intro}.
                            Hence $v(i)\in\apply{Y_1}{i}$.
                        
\end{byCase}

Therefore $v\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ by Definition 167.
Hence $g(p)\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ by Proposition 346.

Therefore $g\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1}{\productFamily{Y_1}}$ by Proposition 358.
Hence $g$ is right-unique and $g$ is a relation by Definition 55, Proposition 285.

Claim: For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ we have $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is continuous from $X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$.

Fix $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$.

Case. $i = k + 1$.

Let $h = \piTwo{X_0}{X_1}$.
$h$ is continuous from $X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ to $X_1$ with respect to $T_P$ and $T_{1p}$ by Lemma 172.

Claim: For all $p\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ we have $\apply{\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g}{p} = \apply{h}{p}$.

Fix $p$ such that $p\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$.
We have $g$ is a function to $\productFamily{Y_1}$ and $g$ is a function by Proposition 356, Proposition 359.
Hence $g(p)\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ by Definition 1, Definition 55, Proposition 209, Proposition 348, Proposition 354.
$(p,\fst{p}\union\{(k + 1,\snd{p})\})\class{latex-symbol-tip latex-symbol-id-in}{\in} g$.
Thus $g(p) = \fst{p}\union\{(k + 1,\snd{p})\}$ by Proposition 346.
Hence $(i,\snd{p})\class{latex-symbol-tip latex-symbol-id-in}{\in} g(p)$ by Axiom 5, Proposition 22.
We have $g(p)\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$ and $g(p)$ is a function by Definition 167, Proposition 356.
Therefore $\apply{g(p)}{i} = \snd{p}$ by Proposition 346.
Hence $(g(p),\snd{p})\class{latex-symbol-tip latex-symbol-id-in}{\in}\piIndex{Y_1}{i}$ by Axiom 6, Definition 170.
Therefore $(p,\snd{p})\class{latex-symbol-tip latex-symbol-id-in}{\in}\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ by Proposition 257.
We have $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ and $\piIndex{Y_1}{i}$ is a function by Lemma 191, Proposition 356.
Hence $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is a function by Proposition 372.
Therefore $\apply{\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g}{p} = \snd{p}$ by Proposition 346.
We have $h\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1}{X_1}$ and $h$ is a function by Definition 160, Proposition 356.
Take $x,y$ such that $p = (x,y)$ by Proposition 121.
$(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X_1$ by Proposition 114.
Therefore $\snd{p} = y$ by Axiom 11.
Hence $(p,\snd{p})\class{latex-symbol-tip latex-symbol-id-in}{\in} h$ by Axiom 6, Definition 143.
Therefore $\apply{\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g}{p} = \apply{h}{p}$ by Proposition 346.

$\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ by Lemma 191.
Thus $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1}{\apply{Y_1}{i}}$ by Proposition 359, Proposition 382.
Thus $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is a function and $\dom{\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g} = X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ by Proposition 356, Proposition 359.
$h$ is a function and $\dom{h} = X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ by Definition 160, Proposition 356, Proposition 359.
Hence $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g = h$ by Definition 1, Proposition 3, Proposition 350, Proposition 359.
Thus $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is continuous from $X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$ by Lemma 367.

Case. $i \class{latex-symbol-tip latex-symbol-id-neq}{\neq} k + 1$.

Hence $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ by Definition 84, Lemma 29.
Let $h_0 = \piOne{X_0}{X_1}$.
$h_0$ is continuous from $X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ to $X_0$ with respect to $T_P$ and $T_X$ by Lemma 171.
$\piIndex{Y_0}{i}$ is continuous from $X_0$ to $\apply{Y_0}{i}$ with respect to $T_X$ and $\apply{T_0}{i}$ by Definition 1, Lemma 366, Proposition 3.
Let $h = \piIndex{Y_0}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} h_0$.
$h$ is continuous from $X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ to $\apply{Y_0}{i}$ with respect to $T_P$ and $\apply{T_0}{i}$ by Lemma 165.

Claim: For all $p\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ we have $\apply{\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g}{p} = \apply{h}{p}$.

Fix $p$ such that $p\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$.
$(p,\fst{p}\union\{(k + 1,\snd{p})\})\class{latex-symbol-tip latex-symbol-id-in}{\in} g$.
Thus $g(p) = \fst{p}\union\{(k + 1,\snd{p})\}$ by Proposition 346.
Let $x = \fst{p}$.
Take $a,b$ such that $p = (a,b)$ and $a\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0$ and $b\class{latex-symbol-tip latex-symbol-id-in}{\in} X_1$ by Proposition 121.
Hence $\fst{p} = a$ by Axiom 10.
We have $x = a$.
Therefore $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0$.
Hence $(p,x)\class{latex-symbol-tip latex-symbol-id-in}{\in} h_0$ by Axiom 6, Definition 142.
Therefore $(x,\apply{x}{i})\class{latex-symbol-tip latex-symbol-id-in}{\in}\piIndex{Y_0}{i}$ by Definition 170.
Hence $(p,\apply{x}{i})\class{latex-symbol-tip latex-symbol-id-in}{\in}\piIndex{Y_0}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} h_0$ by Proposition 257.
We have $h\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1}{\apply{Y_0}{i}}$ and $h$ is a function by Definition 160, Proposition 356.
Therefore $\apply{h}{p} = \apply{x}{i}$ by Proposition 346.
We have $g$ is a function to $\productFamily{Y_1}$ and $g$ is a function by Proposition 356, Proposition 359.
Hence $g(p)\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ by Definition 1, Definition 55, Proposition 209, Proposition 348, Proposition 354.
We have $g(p)\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$ and $g(p)$ is a function by Definition 167, Proposition 356.
We have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y_0}}{\unions{\ran{Y_0}}}$ and $x$ is a function by Definition 167, Proposition 356.
Hence $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{x}$ by Definition 1, Proposition 359.
Therefore $(i,\apply{x}{i})\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ by Proposition 348.
Hence $(i,\apply{x}{i})\class{latex-symbol-tip latex-symbol-id-in}{\in} g(p)$ by Axiom 5.
Therefore $\apply{g(p)}{i} = \apply{x}{i}$ by Proposition 346.
Hence $(g(p),\apply{x}{i})\class{latex-symbol-tip latex-symbol-id-in}{\in}\piIndex{Y_1}{i}$ by Definition 170.
Therefore $(p,\apply{x}{i})\class{latex-symbol-tip latex-symbol-id-in}{\in}\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ by Proposition 257.
We have $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ and $\piIndex{Y_1}{i}$ is a function by Lemma 191, Proposition 356.
Hence $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is a function by Proposition 372.
Therefore $\apply{\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g}{p} = \apply{h}{p}$ by Proposition 346.

$\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ by Lemma 191.
Thus $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1}{\apply{Y_1}{i}}$ by Proposition 359, Proposition 382.
Thus $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is a function and $\dom{\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g} = X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ by Proposition 356, Proposition 359.
$h$ is a function and $\dom{h} = X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ by Definition 160, Proposition 356, Proposition 359.
Hence $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g = h$ by Definition 1, Proposition 3, Proposition 350, Proposition 359.
Hence $h$ is continuous from $X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$ by Lemma 368, Proposition 346.
Hence $h\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1}{\apply{Y_1}{i}}$ and $h$ is a function by Definition 160, Proposition 356.
Thus $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ and $\piIndex{Y_1}{i}$ is a function by Lemma 191, Proposition 356.
Hence $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is a function by Proposition 372.
Therefore $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is continuous from $X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$ by Lemma 367.

LaTeX source
\begin{byCase}
            \caseOf{$i = k + 1$.}
                    Let $h = \piTwo{X_0}{X_1}$.
                    $h$ is continuous from $X_0\times X_1$ to $X_1$ with respect to $T_P$ and $T_{1p}$
                        by \cref{projection_two_continuous}.
                    Show that for all $p\in X_0\times X_1$ we have $\apply{\piIndex{Y_1}{i}\circ g}{p} = \apply{h}{p}$.
                    \begin{subproof}
                        Fix $p$ such that $p\in X_0\times X_1$.
                        We have $g$ is a function to $\productFamily{Y_1}$ and $g$ is a function
                            by \cref{funs_elim,funs_is_function}.
                        Hence $g(p)\in\productFamily{Y_1}$
                            by \cref{funs,function_apply_elim,ran_intro,function_to_ran,subseteq}.
                        $(p,\fst{p}\union\{(k + 1,\snd{p})\})\in g$.
                        Thus $g(p) = \fst{p}\union\{(k + 1,\snd{p})\}$ by \cref{function_apply_intro}.
                        Hence $(i,\snd{p})\in g(p)$ by \cref{union_iff,singleton_iff}.
                        We have $g(p)\in\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$
                            and $g(p)$ is a function by \cref{indexed_product,funs_is_function}.
                        Therefore $\apply{g(p)}{i} = \snd{p}$ by \cref{function_apply_intro}.
                        Hence $(g(p),\snd{p})\in\piIndex{Y_1}{i}$ by \cref{pair_eq_iff,projection_map_indexed}.
                        Therefore $(p,\snd{p})\in\piIndex{Y_1}{i}\circ g$ by \cref{circ_iff}.
                        We have $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$
                            and $\piIndex{Y_1}{i}$ is a function by \cref{projection_map_indexed_function,funs_is_function}.
                        Hence $\piIndex{Y_1}{i}\circ g$ is a function by \cref{function_circ}.
                        Therefore $\apply{\piIndex{Y_1}{i}\circ g}{p} = \snd{p}$ by \cref{function_apply_intro}.
                        We have $h\in\funs{X_0\times X_1}{X_1}$ and $h$ is a function by \cref{continuous,funs_is_function}.
                        Take $x,y$ such that $p = (x,y)$ by \cref{times_elem_is_tuple}.
                        $(x,y)\in X_0\times X_1$.
                        Hence $x\in X_0$ and $y\in X_1$ by \cref{times_tuple_elim}.
                        Therefore $\snd{p} = y$ by \cref{snd_eq}.
                        Hence $(p,\snd{p})\in h$ by \cref{pair_eq_iff,projection_second}.
                        Therefore $\apply{\piIndex{Y_1}{i}\circ g}{p} = \apply{h}{p}$
                            by \cref{function_apply_intro}.
                    \end{subproof}
                    $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$
                        by \cref{projection_map_indexed_function}.
                    Thus $\piIndex{Y_1}{i}\circ g\in\funs{X_0\times X_1}{\apply{Y_1}{i}}$
                        by \cref{funs_circ,funs_elim}.
                    Thus $\piIndex{Y_1}{i}\circ g$ is a function and $\dom{\piIndex{Y_1}{i}\circ g} = X_0\times X_1$
                        by \cref{funs_elim,funs_is_function}.
                    $h$ is a function and $\dom{h} = X_0\times X_1$ by \cref{continuous,funs_is_function,funs_elim}.
                    Hence $\piIndex{Y_1}{i}\circ g = h$ by \cref{funs_elim,subseteq,fun_subseteq,subseteq_antisymmetric}.
                    Thus $\piIndex{Y_1}{i}\circ g$ is continuous from $X_0\times X_1$ to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$
                        by \cref{continuous_eq_subst}.
                \caseOf{$i \neq k + 1$.}
                    Hence $i\in J_1$ by \cref{real_naturals_leq_succ_elim,initial_segment_naturalsplus}.
                    Let $h_0 = \piOne{X_0}{X_1}$.
                    $h_0$ is continuous from $X_0\times X_1$ to $X_0$ with respect to $T_P$ and $T_X$
                        by \cref{projection_one_continuous}.
                    $\piIndex{Y_0}{i}$ is continuous from $X_0$ to $\apply{Y_0}{i}$ with respect to $T_X$ and $\apply{T_0}{i}$
                        by \cref{projection_map_indexed_continuous,subseteq,subseteq_antisymmetric}.
                    Let $h = \piIndex{Y_0}{i}\circ h_0$.
                    $h$ is continuous from $X_0\times X_1$ to $\apply{Y_0}{i}$ with respect to $T_P$ and $\apply{T_0}{i}$
                        by \cref{continuous_composite}.
                    Show that for all $p\in X_0\times X_1$ we have $\apply{\piIndex{Y_1}{i}\circ g}{p} = \apply{h}{p}$.
                    \begin{subproof}
                            Fix $p$ such that $p\in X_0\times X_1$.
                            $(p,\fst{p}\union\{(k + 1,\snd{p})\})\in g$.
                            Thus $g(p) = \fst{p}\union\{(k + 1,\snd{p})\}$ by \cref{function_apply_intro}.
                            Let $x = \fst{p}$.
                            Take $a,b$ such that $p = (a,b)$ and $a\in X_0$ and $b\in X_1$ by \cref{times_elem_is_tuple}.
                            Hence $\fst{p} = a$ by \cref{fst_eq}.
                            We have $x = a$.
                            Therefore $x\in X_0$.
                            Hence $(p,x)\in h_0$ by \cref{pair_eq_iff,projection_first}.
                            Therefore $(x,\apply{x}{i})\in\piIndex{Y_0}{i}$ by \cref{projection_map_indexed}.
                            Hence $(p,\apply{x}{i})\in\piIndex{Y_0}{i}\circ h_0$ by \cref{circ_iff}.
                            We have $h\in\funs{X_0\times X_1}{\apply{Y_0}{i}}$ and $h$ is a function
                                by \cref{continuous,funs_is_function}.
                            Therefore $\apply{h}{p} = \apply{x}{i}$ by \cref{function_apply_intro}.
                            We have $g$ is a function to $\productFamily{Y_1}$ and $g$ is a function
                                by \cref{funs_elim,funs_is_function}.
                            Hence $g(p)\in\productFamily{Y_1}$
                                by \cref{funs,function_apply_elim,ran_intro,function_to_ran,subseteq}.
                            We have $g(p)\in\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$
                                and $g(p)$ is a function by \cref{indexed_product,funs_is_function}.
                            We have $x\in\funs{\dom{Y_0}}{\unions{\ran{Y_0}}}$ and $x$ is a function
                                by \cref{indexed_product,funs_is_function}.
                            Hence $i\in\dom{x}$ by \cref{funs_elim,subseteq}.
                            Therefore $(i,\apply{x}{i})\in x$ by \cref{function_apply_elim}.
                            Hence $(i,\apply{x}{i})\in g(p)$ by \cref{union_iff}.
                            Therefore $\apply{g(p)}{i} = \apply{x}{i}$ by \cref{function_apply_intro}.
                            Hence $(g(p),\apply{x}{i})\in\piIndex{Y_1}{i}$ by \cref{projection_map_indexed}.
                            Therefore $(p,\apply{x}{i})\in\piIndex{Y_1}{i}\circ g$ by \cref{circ_iff}.
                            We have $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ and
                                $\piIndex{Y_1}{i}$ is a function by \cref{projection_map_indexed_function,funs_is_function}.
                            Hence $\piIndex{Y_1}{i}\circ g$ is a function by \cref{function_circ}.
                            Therefore $\apply{\piIndex{Y_1}{i}\circ g}{p} = \apply{h}{p}$
                                by \cref{function_apply_intro}.
                    \end{subproof}
                    $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$
                        by \cref{projection_map_indexed_function}.
                    Thus $\piIndex{Y_1}{i}\circ g\in\funs{X_0\times X_1}{\apply{Y_1}{i}}$
                        by \cref{funs_circ,funs_elim}.
                    Thus $\piIndex{Y_1}{i}\circ g$ is a function and $\dom{\piIndex{Y_1}{i}\circ g} = X_0\times X_1$
                        by \cref{funs_elim,funs_is_function}.
                    $h$ is a function and $\dom{h} = X_0\times X_1$ by \cref{continuous,funs_is_function,funs_elim}.
                    Hence $\piIndex{Y_1}{i}\circ g = h$ by \cref{funs_elim,subseteq,fun_subseteq,subseteq_antisymmetric}.
                    Hence $h$ is continuous from $X_0\times X_1$ to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$
                        by \cref{function_apply_intro,continuous_eq_codomain}.
                    Hence $h\in\funs{X_0\times X_1}{\apply{Y_1}{i}}$ and $h$ is a function
                        by \cref{continuous,funs_is_function}.
                    Thus $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ and
                        $\piIndex{Y_1}{i}$ is a function by \cref{projection_map_indexed_function,funs_is_function}.
                    Hence $\piIndex{Y_1}{i}\circ g$ is a function by \cref{function_circ}.
                    Therefore $\piIndex{Y_1}{i}\circ g$ is continuous from $X_0\times X_1$ to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$
                        by \cref{continuous_eq_subst}.
            
\end{byCase}

$J$ is inhabited.
$T_P$ is a topology on $X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$.
Hence $g$ is continuous from $X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ to $\productFamily{Y_1}$ with respect to $T_P$ and $\productTopologyIndexed{T_1}{Y_1}$ by Lemma 193.

Claim: For all $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ there exists $p\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ such that $g(p) = z$.

Fix $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$.
We have $z$ is a function and $\dom{z} = \dom{Y_1}$ by Definition 167, Proposition 359.
Let $x = \{(i,z(i)) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1\}$.
$x$ is a relation by Definition 12.
For all $a,b_1,b_2$ such that $(a,b_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ and $(a,b_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} x$ we have $b_1 = b_2$ by Axiom 6.
Hence $x$ is a function by Definition 51.
We have $\dom{x} = \dom{Y_0}$ by Axiom 6, Definition 1, Proposition 3, Proposition 199, Proposition 200.
For all $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_0}$ we have $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{\ran{Y_0}}$ by Axiom 4, Definition 1, Definition 167, Proposition 209, Proposition 346.
Therefore $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y_0}}{\unions{\ran{Y_0}}}$ and $x$ is a function by Proposition 356, Proposition 358.
For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_0}$ we have $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\apply{Y_0}{i}$ by Definition 1, Definition 167, Proposition 346.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_0}$ by Definition 167.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0$ by Definition 1.
Let $y = z(k + 1)$.
Hence $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X_1$ by Definition 1, Definition 167.
Let $p = (x,y)$.
Hence $p\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ by Proposition 115.

Claim: For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{z}$ we have $\apply{g(p)}{i} = z(i)$.

Fix $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{z}$.
Hence $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 1.
We have $p\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ by Definition 55.
Hence $g(p)\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ by Definition 1, Definition 55, Proposition 209, Proposition 348, Proposition 354, Proposition 359.
We have $g(p)\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$ and $g(p)$ is a function by Definition 167, Proposition 356.
$(p,\fst{p}\union\{(k + 1,\snd{p})\})\class{latex-symbol-tip latex-symbol-id-in}{\in} g$.
Thus $g(p) = \fst{p}\union\{(k + 1,\snd{p})\}$ by Proposition 346.
Hence $g(p) = x\union\{(k + 1,y)\}$ by Axiom 10, Axiom 11.

Case. $i = k + 1$.

We have $(k + 1,y)\class{latex-symbol-tip latex-symbol-id-in}{\in}\{(k + 1,y)\}$ by Proposition 20.
Hence $(k + 1,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} g(p)$ by Axiom 5.
Therefore $\apply{g(p)}{k + 1} = y$ by Proposition 346.
Hence $\apply{g(p)}{i} = z(i)$.

Case. $i \class{latex-symbol-tip latex-symbol-id-neq}{\neq} k + 1$.

Hence $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ by Definition 84, Lemma 29.
We have $(i,z(i))\class{latex-symbol-tip latex-symbol-id-in}{\in} x$.
Hence $(i,z(i))\class{latex-symbol-tip latex-symbol-id-in}{\in} g(p)$ by Axiom 5.
Therefore $\apply{g(p)}{i} = z(i)$ by Proposition 346.

LaTeX source
\begin{byCase}
                        \caseOf{$i = k + 1$.}
                            We have $(k + 1,y)\in\{(k + 1,y)\}$ by \cref{singleton_intro}.
                            Hence $(k + 1,y)\in g(p)$ by \cref{union_iff}.
                            Therefore $\apply{g(p)}{k + 1} = y$ by \cref{function_apply_intro}.
                            Hence $\apply{g(p)}{i} = z(i)$.
                        \caseOf{$i \neq k + 1$.}
                            Hence $i\in J_1$ by \cref{real_naturals_leq_succ_elim,initial_segment_naturalsplus}.
                            We have $(i,z(i))\in x$.
                            Hence $(i,z(i))\in g(p)$ by \cref{union_iff}.
                            Therefore $\apply{g(p)}{i} = z(i)$ by \cref{function_apply_intro}.
                        
\end{byCase}

We have $g$ is a function to $\productFamily{Y_1}$ by Proposition 359.
Hence $p\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ by Definition 55.
Hence $g(p)\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ by Definition 1, Definition 55, Proposition 209, Proposition 348, Proposition 354, Proposition 359.
Therefore $g(p)$ is a function and $\dom{g(p)} = \dom{Y_1}$ by Definition 167, Proposition 359.
Therefore there exists $q\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1$ such that $g(q) = z$ by Definition 1, Proposition 3, Proposition 350.

Therefore $g\class{latex-symbol-tip latex-symbol-id-in}{\in}\surj{X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1}{\productFamily{Y_1}}$ by Definition 57.
Hence $\img{g}{X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1} = \productFamily{Y_1}$ by Definition 57, Proposition 238, Proposition 359, Corollary 8.
Let $A = \img{g}{X_0\class{latex-symbol-tip latex-symbol-id-times}{\times} X_1}$.
Let $T_Q = \productTopologyIndexed{T_1}{Y_1}$.
Let $T_A = \subspaceTopology{T_Q}{A}$.
Hence $T_A = \subspaceTopology{T_Q}{\productFamily{Y_1}}$.
$T_Q$ is a topology on $\productFamily{Y_1}$ by Definition 115, Lemma 76, Lemma 177.
Therefore $T_A = T_Q$ by Definition 1, Definition 101, Definition 146, Proposition 3, Proposition 70, Proposition 156.
Hence $\productFamily{Y_1}$ is compact with respect to $T_Q$ by Theorem 61.

Hence $\finiteIndexedProductCompactProp{k + 1}$ by Definition 250.

LaTeX source
\begin{proof}
    Show that for all $Y_1,T_1$ such that $Y_1$ is a function and $T_1$ is a function and
        $\dom{Y_1} = \initialSegment{k + 1}$ and $\dom{T_1} = \initialSegment{k + 1}$ and
        for all $i\in\dom{Y_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ and
            $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$,
        we have $\productFamily{Y_1}$ is compact with respect to $\productTopologyIndexed{T_1}{Y_1}$.
    \begin{subproof}
        Fix $Y_1$.
        Fix $T_1$.
        Assume $Y_1$ is a function.
        Assume $T_1$ is a function.
        Assume $\dom{Y_1} = \initialSegment{k + 1}$.
        Assume $\dom{T_1} = \initialSegment{k + 1}$.
        Assume that for all $i\in\dom{Y_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ and
            $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$.
        Let $J_1 = \initialSegment{k}$.
        Let $J = \initialSegment{k + 1}$.
        For all $i$ such that $i\in J_1$ we have $i\in J$
            by \cref{initial_segment_naturalsplus,real_naturals_subset_reals,subseteq,real_naturals_closed_succ,real_add_ident,real_one_in_naturals,real_zero_lt_one,real_lt_add,real_add_comm,real_lt_subst_left,real_lt_imp_leq,real_leq_trans}.
        Hence $J_1\subseteq J$ by \cref{subseteq}.
        $k\in\reals$ by \cref{real_naturals_subset_reals,subseteq}.
        $k + 1\in\naturalsPlus$ and $k + 1\in\reals$
            by \cref{real_naturals_closed_succ,real_naturals_subset_reals,subseteq}.
        Thus $k < k + 1$
            by \cref{real_zero_lt_one,real_add_ident,real_naturals_subset_reals,real_one_in_naturals,subseteq,real_lt_add,real_add_comm,real_lt_subst_left}.
        Show that $k \neq k + 1$.
        \begin{subproof}
            Suppose not.
            Thus $k = k + 1$.
            Hence $k < k$ by \cref{real_lt_subst_left}.
            Contradiction by \cref{real_lt_irreflexive}.
        \end{subproof}
        Let $Y_0 = \{(i,\apply{Y_1}{i}) \mid i\in J_1\}$.
        Let $T_0 = \{(i,\apply{T_1}{i}) \mid i\in J_1\}$.
        $\dom{Y_0} = J_1$ by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
        We have $\dom{T_0} = J_1$ by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
        $Y_0$ is a relation by \cref{relation}.
        Show that for all $a,b_1,b_2$ such that $(a,b_1)\in Y_0$ and $(a,b_2)\in Y_0$ we have $b_1 = b_2$.
        \begin{subproof}
            Follows by \cref{pair_eq_iff}.
        \end{subproof}
        Hence $Y_0$ is a function by \cref{rightunique}.
        $T_0$ is a relation by \cref{relation}.
        Show that for all $a,b_1,b_2$ such that $(a,b_1)\in T_0$ and $(a,b_2)\in T_0$ we have $b_1 = b_2$.
        \begin{subproof}
            Follows by \cref{pair_eq_iff}.
        \end{subproof}
        Thus $T_0$ is a function by \cref{rightunique}.
        For all $i$ such that $i\in J_1$ we have $\apply{T_0}{i}$ is a topology on $\apply{Y_0}{i}$
            by \cref{subseteq,function_apply_intro}.
        For all $i$ such that $i\in J_1$ we have $\apply{Y_0}{i}$ is compact with respect to $\apply{T_0}{i}$
            by \cref{subseteq,function_apply_intro}.
        Therefore $\productFamily{Y_0}$ is compact with respect to $\productTopologyIndexed{T_0}{Y_0}$
            by \cref{finite_indexed_product_compact_property}.
        Let $X_0 = \productFamily{Y_0}$.
        Let $T_X = \productTopologyIndexed{T_0}{Y_0}$.
        Let $X_1 = \apply{Y_1}{k + 1}$.
        Let $T_{1p} = \apply{T_1}{k + 1}$.
        $k + 1\in J$ by \cref{real_naturals_closed_succ,initial_segment_naturalsplus}.
        Show that $T_{1p}$ is a topology on $X_1$ and $X_1$ is compact with respect to $T_{1p}$.
        \begin{subproof}
            Follows by \cref{subseteq}.
        \end{subproof}
        We have $J_1$ is inhabited by \cref{real_one_leq_naturalsplus,real_one_in_naturals,initial_segment_naturalsplus}.
        Hence $T_X$ is a topology on $X_0$
            by \cref{product_subbasis_finite_intersections_basis,basis_for_topology,basis_topology_is_topology}.
        Let $T_P = \productTopology{T_X}{T_{1p}}{X_0}{X_1}$.
        Therefore $X_0\times X_1$ is compact with respect to $T_P$ by \cref{product_compact}.
        Let $g = \{(p,\fst{p}\union\{(k + 1,\snd{p})\}) \mid p\in X_0\times X_1\}$.
        $g$ is a relation by \cref{relation}.
        For all $p,u,v$ such that $(p,u)\in g$ and $(p,v)\in g$ we have $u = v$ by \cref{pair_eq_iff}.
        Hence $g$ is a function by \cref{rightunique}.
        We have $\dom{g} = X_0\times X_1$ by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
            Show that for all $p\in\dom{g}$ we have $g(p)\in\productFamily{Y_1}$.
            \begin{subproof}
                Fix $p$ such that $p\in\dom{g}$.
                Take $v$ such that $(p,v)\in g$ by \cref{dom_iff}.
                Hence $p\in X_0\times X_1$ by \cref{subseteq}.
                Let $u = \fst{p}\union\{(k + 1,\snd{p})\}$.
                $(p,u)\in g$.
                Hence $v = u$ by \cref{pair_eq_iff}.
                Let $x = \fst{p}$.
                    Let $y = \snd{p}$.
                    We have $x\in X_0$ and $y\in X_1$ by \cref{subseteq,times_proj_elim}.
                    Hence $x\in\funs{\dom{Y_0}}{\unions{\ran{Y_0}}}$ and $x$ is a function and $\dom{x} = \dom{Y_0}$
                        by \cref{subseteq,indexed_product,funs_elim}.
                    Thus $x\in\rels{\dom{Y_0}}{\unions{\ran{Y_0}}}$ and $x$ is a relation
                        by \cref{funs_subseteq_rels,subseteq,rels_is_relation}.
                    Show that $v\in\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$.
                    \begin{subproof}
                            For all $w$ such that $w\in v$ there exist $q_1,q_2$ such that $w = (q_1,q_2)$
                                by \cref{union_iff,singleton_iff,relation}.
                            Hence $v$ is a relation by \cref{relation}.
                            Show that for all $a,b_1,b_2$ such that $(a,b_1)\in v$ and $(a,b_2)\in v$ we have $b_1 = b_2$.
                            \begin{subproof}
                                Fix $a$.
                                Fix $b_1$.
                                Fix $b_2$ such that $(a,b_1)\in v$ and $(a,b_2)\in v$.
                                \begin{byCase}
                                \caseOf{$a = k + 1$.}
                                    Hence $(a,b_1)\in x$ or $(a,b_1) = (k + 1,y)$ by \cref{union_iff,singleton_iff}.
                                    Show that $(a,b_1)\notin x$.
                                    \begin{subproof}
                                        Suppose not.
                                        $(a,b_1)\in x$.
                                        Hence $a\in\dom{x}$ by \cref{dom_intro}.
                                        We have $\dom{x} = \dom{Y_0}$ by \cref{funs_elim}.
                                        Hence $a\in J_1$ by \cref{subseteq}.
                                        Therefore $a\in\naturalsPlus$ and $a \leq k$ by \cref{initial_segment_naturalsplus}.
                                        Hence $k + 1 \leq k$.
                                        Therefore $k + 1 < k$ or $k + 1 = k$ by \cref{real_leq_split}.
                                        Contradiction by \cref{real_lt_asym,real_lt_subst_left,real_lt_irreflexive}.
                                    \end{subproof}
                                    Hence $(a,b_1) = (k + 1,y)$.
                                    We have $(a,b_2)\in x$ or $(a,b_2) = (k + 1,y)$ by \cref{union_iff,singleton_iff}.
                                    Show that $(a,b_2)\notin x$.
                                    \begin{subproof}
                                        Suppose not.
                                        $(a,b_2)\in x$.
                                        Hence $a\in\dom{x}$ by \cref{dom_intro}.
                                        We have $\dom{x} = \dom{Y_0}$ by \cref{funs_elim}.
                                        Hence $a\in J_1$ by \cref{subseteq}.
                                        Therefore $a\in\naturalsPlus$ and $a \leq k$ by \cref{initial_segment_naturalsplus}.
                                        Hence $k + 1 \leq k$.
                                        Therefore $k + 1 < k$ or $k + 1 = k$ by \cref{real_leq_split}.
                                        Contradiction by \cref{real_lt_asym,real_lt_subst_left,real_lt_irreflexive}.
                                    \end{subproof}
                                    Hence $(a,b_2) = (k + 1,y)$.
                                    Hence $b_1 = y$ and $b_2 = y$ by \cref{pair_eq_iff}.
                                    Therefore $b_1 = b_2$.
                                \caseOf{$a \neq k + 1$.}
                                    Hence $(a,b_1)\in x$ by \cref{union_iff,singleton_iff,pair_eq_iff}.
                                    $(a,b_2)\in x$ by \cref{union_iff,singleton_iff,pair_eq_iff}.
                                    Thus $b_1 = b_2$ by \cref{rightunique,relation}.
                                \end{byCase}
                            \end{subproof}
                            Hence $v$ is a function by \cref{rightunique}.
                            Show that for all $i$ such that $i\in\dom{Y_1}$ we have $i\in\dom{v}$.
                            \begin{subproof}
                                Follows by \cref{subseteq,union_iff,singleton_iff,dom_intro,real_naturals_leq_succ_elim,initial_segment_naturalsplus,indexed_product,funs_elim,dom_iff}.
                            \end{subproof}
                            Hence $\dom{Y_1}\subseteq\dom{v}$ by \cref{subseteq}.
                            Show that for all $i$ such that $i\in\dom{v}$ we have $i\in\dom{Y_1}$.
                            \begin{subproof}
                                Fix $i$ such that $i\in\dom{v}$.
                                Take $b$ such that $(i,b)\in v$ by \cref{dom_iff}.
                                We have $(i,b)\in x$ or $(i,b) = (k + 1,y)$ by \cref{union_iff,singleton_iff}.
                                \begin{byCase}
                                \caseOf{$(i,b) = (k + 1,y)$.}
                                    Hence $i = k + 1$ by \cref{pair_eq_iff}.
                                    We have $i\in J$.
                                    Therefore $i\in\dom{Y_1}$ by \cref{subseteq}.
                                \caseOf{$(i,b)\in x$.}
                                    Hence $i\in\dom{x}$ by \cref{dom_intro}.
                                    We have $i\in J_1$ by \cref{indexed_product,funs_elim}.
                                    Therefore $i\in J$ by \cref{subseteq,initial_segment_naturalsplus}.
                                    Hence $i\in\dom{Y_1}$ by \cref{subseteq}.
                                \end{byCase}
                            \end{subproof}
                            Therefore $\dom{v}\subseteq\dom{Y_1}$ by \cref{subseteq}.
                            Hence $\dom{v} = \dom{Y_1}$ by \cref{subseteq_antisymmetric}.
                        Show that for all $i\in\dom{Y_1}$ we have $v(i)\in\unions{\ran{Y_1}}$.
                        \begin{subproof}
                            Fix $i$ such that $i\in\dom{Y_1}$.
                            Hence $i\in J$ by \cref{subseteq}.
                            \begin{byCase}
                            \caseOf{$i = k + 1$.}
                                We have $(k + 1,y)\in v$ by \cref{union_iff,singleton_iff}.
                                Hence $v(k + 1) = y$ by \cref{function_apply_intro}.
                                $(k + 1,X_1)\in Y_1$ by \cref{function_apply_elim,subseteq}.
                                Hence $X_1\in\ran{Y_1}$ by \cref{ran_intro}.
                                Therefore $y\in\unions{\ran{Y_1}}$ by \cref{unions_iff}.
                                Therefore $v(i)\in\unions{\ran{Y_1}}$.
                            \caseOf{$i \neq k + 1$.}
                                Hence $i\in J_1$ by \cref{real_naturals_leq_succ_elim,initial_segment_naturalsplus}.
                                We have $i\in\dom{x}$ by \cref{subseteq,indexed_product,funs_elim}.
                                Therefore $x(i)\in\apply{Y_0}{i}$ by \cref{indexed_product}.
                                $(i,\apply{Y_1}{i})\in Y_0$.
                                Hence $x(i)\in\apply{Y_1}{i}$ by \cref{function_apply_intro}.
                                Therefore $(i,\apply{Y_1}{i})\in Y_1$ by \cref{function_apply_elim}.
                                Hence $\apply{Y_1}{i}\in\ran{Y_1}$ by \cref{ran_intro}.
                                Therefore $x(i)\in\unions{\ran{Y_1}}$ by \cref{unions_iff}.
                                We have $(i,x(i))\in v$ by \cref{function_apply_elim,union_iff}.
                                Hence $v(i) = x(i)$ by \cref{function_apply_intro}.
                                Hence $v(i)\in\unions{\ran{Y_1}}$.
                            \end{byCase}
                        \end{subproof}
                        Therefore $v\in\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$ by \cref{funs_intro}.
                    \end{subproof}
                    Hence $v$ is right-unique and $v$ is a relation by \cref{funs,rels_is_relation}.
                    Show that for all $i\in\dom{Y_1}$ we have $v(i)\in\apply{Y_1}{i}$.
                    \begin{subproof}
                        Fix $i$ such that $i\in\dom{Y_1}$.
                        Hence $i\in J$ by \cref{subseteq}.
                        \begin{byCase}
                        \caseOf{$i = k + 1$.}
                            We have $(k + 1,y)\in v$ by \cref{union_iff,singleton_iff}.
                            Hence $v(k + 1) = y$ by \cref{function_apply_intro}.
                            Therefore $y\in X_1$ by \cref{subseteq}.
                            Hence $v(i)\in\apply{Y_1}{i}$.
                        \caseOf{$i \neq k + 1$.}
                            Hence $i\in J_1$ by \cref{real_naturals_leq_succ_elim,initial_segment_naturalsplus}.
                            We have $x(i)\in\apply{Y_0}{i}$ by \cref{indexed_product}.
                            Hence $x(i)\in\apply{Y_1}{i}$ by \cref{function_apply_intro}.
                            Therefore $(i,x(i))\in v$ by \cref{function_apply_elim,union_iff}.
                            Hence $v(i) = x(i)$ by \cref{function_apply_intro}.
                            Hence $v(i)\in\apply{Y_1}{i}$.
                        \end{byCase}
                    \end{subproof}
                    Therefore $v\in\productFamily{Y_1}$ by \cref{indexed_product}.
                Hence $g(p)\in\productFamily{Y_1}$ by \cref{function_apply_intro}.
            \end{subproof}
            Therefore $g\in\funs{X_0\times X_1}{\productFamily{Y_1}}$ by \cref{funs_intro}.
        Hence $g$ is right-unique and $g$ is a relation by \cref{funs,rels_is_relation}.
        Show that for all $i\in J$ we have $\piIndex{Y_1}{i}\circ g$ is continuous from $X_0\times X_1$
            to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$.
        \begin{subproof}
            Fix $i$ such that $i\in J$.
            \begin{byCase}
            \caseOf{$i = k + 1$.}
                    Let $h = \piTwo{X_0}{X_1}$.
                    $h$ is continuous from $X_0\times X_1$ to $X_1$ with respect to $T_P$ and $T_{1p}$
                        by \cref{projection_two_continuous}.
                    Show that for all $p\in X_0\times X_1$ we have $\apply{\piIndex{Y_1}{i}\circ g}{p} = \apply{h}{p}$.
                    \begin{subproof}
                        Fix $p$ such that $p\in X_0\times X_1$.
                        We have $g$ is a function to $\productFamily{Y_1}$ and $g$ is a function
                            by \cref{funs_elim,funs_is_function}.
                        Hence $g(p)\in\productFamily{Y_1}$
                            by \cref{funs,function_apply_elim,ran_intro,function_to_ran,subseteq}.
                        $(p,\fst{p}\union\{(k + 1,\snd{p})\})\in g$.
                        Thus $g(p) = \fst{p}\union\{(k + 1,\snd{p})\}$ by \cref{function_apply_intro}.
                        Hence $(i,\snd{p})\in g(p)$ by \cref{union_iff,singleton_iff}.
                        We have $g(p)\in\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$
                            and $g(p)$ is a function by \cref{indexed_product,funs_is_function}.
                        Therefore $\apply{g(p)}{i} = \snd{p}$ by \cref{function_apply_intro}.
                        Hence $(g(p),\snd{p})\in\piIndex{Y_1}{i}$ by \cref{pair_eq_iff,projection_map_indexed}.
                        Therefore $(p,\snd{p})\in\piIndex{Y_1}{i}\circ g$ by \cref{circ_iff}.
                        We have $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$
                            and $\piIndex{Y_1}{i}$ is a function by \cref{projection_map_indexed_function,funs_is_function}.
                        Hence $\piIndex{Y_1}{i}\circ g$ is a function by \cref{function_circ}.
                        Therefore $\apply{\piIndex{Y_1}{i}\circ g}{p} = \snd{p}$ by \cref{function_apply_intro}.
                        We have $h\in\funs{X_0\times X_1}{X_1}$ and $h$ is a function by \cref{continuous,funs_is_function}.
                        Take $x,y$ such that $p = (x,y)$ by \cref{times_elem_is_tuple}.
                        $(x,y)\in X_0\times X_1$.
                        Hence $x\in X_0$ and $y\in X_1$ by \cref{times_tuple_elim}.
                        Therefore $\snd{p} = y$ by \cref{snd_eq}.
                        Hence $(p,\snd{p})\in h$ by \cref{pair_eq_iff,projection_second}.
                        Therefore $\apply{\piIndex{Y_1}{i}\circ g}{p} = \apply{h}{p}$
                            by \cref{function_apply_intro}.
                    \end{subproof}
                    $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$
                        by \cref{projection_map_indexed_function}.
                    Thus $\piIndex{Y_1}{i}\circ g\in\funs{X_0\times X_1}{\apply{Y_1}{i}}$
                        by \cref{funs_circ,funs_elim}.
                    Thus $\piIndex{Y_1}{i}\circ g$ is a function and $\dom{\piIndex{Y_1}{i}\circ g} = X_0\times X_1$
                        by \cref{funs_elim,funs_is_function}.
                    $h$ is a function and $\dom{h} = X_0\times X_1$ by \cref{continuous,funs_is_function,funs_elim}.
                    Hence $\piIndex{Y_1}{i}\circ g = h$ by \cref{funs_elim,subseteq,fun_subseteq,subseteq_antisymmetric}.
                    Thus $\piIndex{Y_1}{i}\circ g$ is continuous from $X_0\times X_1$ to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$
                        by \cref{continuous_eq_subst}.
                \caseOf{$i \neq k + 1$.}
                    Hence $i\in J_1$ by \cref{real_naturals_leq_succ_elim,initial_segment_naturalsplus}.
                    Let $h_0 = \piOne{X_0}{X_1}$.
                    $h_0$ is continuous from $X_0\times X_1$ to $X_0$ with respect to $T_P$ and $T_X$
                        by \cref{projection_one_continuous}.
                    $\piIndex{Y_0}{i}$ is continuous from $X_0$ to $\apply{Y_0}{i}$ with respect to $T_X$ and $\apply{T_0}{i}$
                        by \cref{projection_map_indexed_continuous,subseteq,subseteq_antisymmetric}.
                    Let $h = \piIndex{Y_0}{i}\circ h_0$.
                    $h$ is continuous from $X_0\times X_1$ to $\apply{Y_0}{i}$ with respect to $T_P$ and $\apply{T_0}{i}$
                        by \cref{continuous_composite}.
                    Show that for all $p\in X_0\times X_1$ we have $\apply{\piIndex{Y_1}{i}\circ g}{p} = \apply{h}{p}$.
                    \begin{subproof}
                            Fix $p$ such that $p\in X_0\times X_1$.
                            $(p,\fst{p}\union\{(k + 1,\snd{p})\})\in g$.
                            Thus $g(p) = \fst{p}\union\{(k + 1,\snd{p})\}$ by \cref{function_apply_intro}.
                            Let $x = \fst{p}$.
                            Take $a,b$ such that $p = (a,b)$ and $a\in X_0$ and $b\in X_1$ by \cref{times_elem_is_tuple}.
                            Hence $\fst{p} = a$ by \cref{fst_eq}.
                            We have $x = a$.
                            Therefore $x\in X_0$.
                            Hence $(p,x)\in h_0$ by \cref{pair_eq_iff,projection_first}.
                            Therefore $(x,\apply{x}{i})\in\piIndex{Y_0}{i}$ by \cref{projection_map_indexed}.
                            Hence $(p,\apply{x}{i})\in\piIndex{Y_0}{i}\circ h_0$ by \cref{circ_iff}.
                            We have $h\in\funs{X_0\times X_1}{\apply{Y_0}{i}}$ and $h$ is a function
                                by \cref{continuous,funs_is_function}.
                            Therefore $\apply{h}{p} = \apply{x}{i}$ by \cref{function_apply_intro}.
                            We have $g$ is a function to $\productFamily{Y_1}$ and $g$ is a function
                                by \cref{funs_elim,funs_is_function}.
                            Hence $g(p)\in\productFamily{Y_1}$
                                by \cref{funs,function_apply_elim,ran_intro,function_to_ran,subseteq}.
                            We have $g(p)\in\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$
                                and $g(p)$ is a function by \cref{indexed_product,funs_is_function}.
                            We have $x\in\funs{\dom{Y_0}}{\unions{\ran{Y_0}}}$ and $x$ is a function
                                by \cref{indexed_product,funs_is_function}.
                            Hence $i\in\dom{x}$ by \cref{funs_elim,subseteq}.
                            Therefore $(i,\apply{x}{i})\in x$ by \cref{function_apply_elim}.
                            Hence $(i,\apply{x}{i})\in g(p)$ by \cref{union_iff}.
                            Therefore $\apply{g(p)}{i} = \apply{x}{i}$ by \cref{function_apply_intro}.
                            Hence $(g(p),\apply{x}{i})\in\piIndex{Y_1}{i}$ by \cref{projection_map_indexed}.
                            Therefore $(p,\apply{x}{i})\in\piIndex{Y_1}{i}\circ g$ by \cref{circ_iff}.
                            We have $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ and
                                $\piIndex{Y_1}{i}$ is a function by \cref{projection_map_indexed_function,funs_is_function}.
                            Hence $\piIndex{Y_1}{i}\circ g$ is a function by \cref{function_circ}.
                            Therefore $\apply{\piIndex{Y_1}{i}\circ g}{p} = \apply{h}{p}$
                                by \cref{function_apply_intro}.
                    \end{subproof}
                    $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$
                        by \cref{projection_map_indexed_function}.
                    Thus $\piIndex{Y_1}{i}\circ g\in\funs{X_0\times X_1}{\apply{Y_1}{i}}$
                        by \cref{funs_circ,funs_elim}.
                    Thus $\piIndex{Y_1}{i}\circ g$ is a function and $\dom{\piIndex{Y_1}{i}\circ g} = X_0\times X_1$
                        by \cref{funs_elim,funs_is_function}.
                    $h$ is a function and $\dom{h} = X_0\times X_1$ by \cref{continuous,funs_is_function,funs_elim}.
                    Hence $\piIndex{Y_1}{i}\circ g = h$ by \cref{funs_elim,subseteq,fun_subseteq,subseteq_antisymmetric}.
                    Hence $h$ is continuous from $X_0\times X_1$ to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$
                        by \cref{function_apply_intro,continuous_eq_codomain}.
                    Hence $h\in\funs{X_0\times X_1}{\apply{Y_1}{i}}$ and $h$ is a function
                        by \cref{continuous,funs_is_function}.
                    Thus $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ and
                        $\piIndex{Y_1}{i}$ is a function by \cref{projection_map_indexed_function,funs_is_function}.
                    Hence $\piIndex{Y_1}{i}\circ g$ is a function by \cref{function_circ}.
                    Therefore $\piIndex{Y_1}{i}\circ g$ is continuous from $X_0\times X_1$ to $\apply{Y_1}{i}$ with respect to $T_P$ and $\apply{T_1}{i}$
                        by \cref{continuous_eq_subst}.
            \end{byCase}
        \end{subproof}
        $J$ is inhabited.
        $T_P$ is a topology on $X_0\times X_1$.
        Hence $g$ is continuous from $X_0\times X_1$ to $\productFamily{Y_1}$ with respect to $T_P$ and $\productTopologyIndexed{T_1}{Y_1}$
            by \cref{continuous_map_into_indexed_product}.
        Show that for all $z\in\productFamily{Y_1}$ there exists $p\in X_0\times X_1$ such that $g(p) = z$.
        \begin{subproof}
                Fix $z$ such that $z\in\productFamily{Y_1}$.
                We have $z$ is a function and $\dom{z} = \dom{Y_1}$ by \cref{indexed_product,funs_elim}.
                Let $x = \{(i,z(i)) \mid i\in J_1\}$.
                $x$ is a relation by \cref{relation}.
                        For all $a,b_1,b_2$ such that $(a,b_1)\in x$ and $(a,b_2)\in x$ we have $b_1 = b_2$
                            by \cref{pair_eq_iff}.
                        Hence $x$ is a function by \cref{rightunique}.
                        We have $\dom{x} = \dom{Y_0}$ by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
                        For all $i$ such that $i\in\dom{Y_0}$ we have $x(i)\in\unions{\ran{Y_0}}$
                            by \cref{subseteq,function_apply_intro,indexed_product,ran_intro,unions_iff}.
                        Therefore $x\in\funs{\dom{Y_0}}{\unions{\ran{Y_0}}}$ and $x$ is a function
                            by \cref{funs_intro,funs_is_function}.
                        For all $i\in\dom{Y_0}$ we have $x(i)\in\apply{Y_0}{i}$
                            by \cref{subseteq,function_apply_intro,indexed_product}.
                Thus $x\in\productFamily{Y_0}$ by \cref{indexed_product}.
                Hence $x\in X_0$ by \cref{subseteq}.
                Let $y = z(k + 1)$.
                Hence $y\in X_1$ by \cref{indexed_product,subseteq}.
                Let $p = (x,y)$.
                Hence $p\in X_0\times X_1$ by \cref{times_tuple_intro}.
                Show that for all $i\in\dom{z}$ we have $\apply{g(p)}{i} = z(i)$.
                    \begin{subproof}
                        Fix $i$ such that $i\in\dom{z}$.
                        Hence $i\in J$ by \cref{subseteq}.
                        We have $p\in\dom{g}$ by \cref{funs}.
                        Hence $g(p)\in\productFamily{Y_1}$
                            by \cref{funs_elim,funs,function_apply_elim,ran_intro,function_to_ran,subseteq}.
                        We have $g(p)\in\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$
                            and $g(p)$ is a function by \cref{indexed_product,funs_is_function}.
                        $(p,\fst{p}\union\{(k + 1,\snd{p})\})\in g$.
                        Thus $g(p) = \fst{p}\union\{(k + 1,\snd{p})\}$ by \cref{function_apply_intro}.
                        Hence $g(p) = x\union\{(k + 1,y)\}$ by \cref{fst_eq,snd_eq}.
                        \begin{byCase}
                        \caseOf{$i = k + 1$.}
                            We have $(k + 1,y)\in\{(k + 1,y)\}$ by \cref{singleton_intro}.
                            Hence $(k + 1,y)\in g(p)$ by \cref{union_iff}.
                            Therefore $\apply{g(p)}{k + 1} = y$ by \cref{function_apply_intro}.
                            Hence $\apply{g(p)}{i} = z(i)$.
                        \caseOf{$i \neq k + 1$.}
                            Hence $i\in J_1$ by \cref{real_naturals_leq_succ_elim,initial_segment_naturalsplus}.
                            We have $(i,z(i))\in x$.
                            Hence $(i,z(i))\in g(p)$ by \cref{union_iff}.
                            Therefore $\apply{g(p)}{i} = z(i)$ by \cref{function_apply_intro}.
                        \end{byCase}
                    \end{subproof}
                We have $g$ is a function to $\productFamily{Y_1}$ by \cref{funs_elim}.
                Hence $p\in\dom{g}$ by \cref{funs}.
                Hence $g(p)\in\productFamily{Y_1}$
                    by \cref{funs_elim,funs,function_apply_elim,ran_intro,function_to_ran,subseteq}.
                Therefore $g(p)$ is a function and $\dom{g(p)} = \dom{Y_1}$ by \cref{indexed_product,funs_elim}.
                Therefore there exists $q\in X_0\times X_1$ such that $g(q) = z$
                    by \cref{subseteq,fun_subseteq,subseteq_antisymmetric}.
            \end{subproof}
        Therefore $g\in\surj{X_0\times X_1}{\productFamily{Y_1}}$ by \cref{surj}.
        Hence $\img{g}{X_0\times X_1} = \productFamily{Y_1}$ by \cref{surj,funs_elim,img_dom,funs_surj_iff}.
        Let $A = \img{g}{X_0\times X_1}$.
        Let $T_Q = \productTopologyIndexed{T_1}{Y_1}$.
        Let $T_A = \subspaceTopology{T_Q}{A}$.
        Hence $T_A = \subspaceTopology{T_Q}{\productFamily{Y_1}}$.
        $T_Q$ is a topology on $\productFamily{Y_1}$
            by \cref{product_subbasis_finite_intersections_basis,basis_for_topology,basis_topology_is_topology}.
        Therefore $T_A = T_Q$
            by \cref{subspace_topology,topology_on,subseteq,powerset_elim,inter_absorb_supseteq_left,subseteq_antisymmetric}.
        Hence $\productFamily{Y_1}$ is compact with respect to $T_Q$ by \cref{continuous_image_compact}.
    \end{subproof}
    Hence $\finiteIndexedProductCompactProp{k + 1}$ by \cref{finite_indexed_product_compact_property}.
\end{proof}
Lemma 370
compact_indexed_product_initial_segment

Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.
Let $J = \initialSegment{n}$.
Assume $Y$ is a function.
Assume $T_Y$ is a function.
Assume $\dom{Y} = J$.
Assume $\dom{T_Y} = J$.
Assume that for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ we have $\apply{T_Y}{i}$ is a topology on $\apply{Y}{i}$.
Assume that for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ we have $\apply{Y}{i}$ is compact with respect to $\apply{T_Y}{i}$.
Then $\productFamily{Y}$ is compact with respect to $\productTopologyIndexed{T_Y}{Y}$.

LaTeX source
\begin{lemma}
\label{compact_indexed_product_initial_segment}
    Suppose $n\in\naturalsPlus$.
    Let $J = \initialSegment{n}$.
    Assume $Y$ is a function.
    Assume $T_Y$ is a function.
    Assume $\dom{Y} = J$.
    Assume $\dom{T_Y} = J$.
    Assume that for all $i\in J$ we have $\apply{T_Y}{i}$ is a topology on $\apply{Y}{i}$.
    Assume that for all $i\in J$ we have $\apply{Y}{i}$ is compact with respect to $\apply{T_Y}{i}$.
    Then $\productFamily{Y}$ is compact with respect to $\productTopologyIndexed{T_Y}{Y}$.
\end{lemma}
Proof

Let $A = \{m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus \mid \finiteIndexedProductCompactProp{m}\}$.
$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturalsPlus$ by Definition 1.

Claim: $1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

It suffices to show that $1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ and $\finiteIndexedProductCompactProp{1}$.

Claim: For all $Y_1,T_1$ such that $Y_1$ is a function and $T_1$ is a function and $\dom{Y_1} = \initialSegment{1}$ and $\dom{T_1} = \initialSegment{1}$ and for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ and $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$, we have $\productFamily{Y_1}$ is compact with respect to $\productTopologyIndexed{T_1}{Y_1}$.

Fix $Y_1$.
Fix $T_1$.
Assume $Y_1$ is a function.
Assume $T_1$ is a function.
Assume $\dom{Y_1} = \initialSegment{1}$.
Assume $\dom{T_1} = \initialSegment{1}$.
Assume that for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ and $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$.
Let $J_1 = \initialSegment{1}$.
We have $1\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ by Axiom 42, Definition 84.
For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ we have $i < 1$ or $i = 1$ by Definition 84.
For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ we have $1\class{latex-symbol-tip latex-symbol-id-leq}{\leq} i$ by Axiom 43, Definition 84.
Thus for all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ we have $i = 1$.
Therefore $J_1 = \{1,1\}$ by Definition 1, Proposition 3, Proposition 19.
Let $X = \apply{Y_1}{1}$.
Let $T_X = \apply{T_1}{1}$.

Claim: $T_X$ is a topology on $X$ and $X$ is compact with respect to $T_X$.

Follows by Definition 1.

Let $g = \{(x,\{(1,x)\}) \mid x\class{latex-symbol-tip latex-symbol-id-in}{\in} X\}$.
$g$ is a relation by Definition 12.
For all $x,u,v$ such that $(x,u)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ and $(x,v)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ we have $u = v$ by Axiom 6.
Hence $g$ is a function by Definition 51.
We have $\dom{g} = X$ by Axiom 6, Definition 1, Proposition 3, Proposition 199, Proposition 200.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ we have $g(x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$.
Take $y$ such that $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ by Proposition 199.
Take $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $(x,y) = (x_0,\{(1,x_0)\})$.
We have $y = \{(1,x_0)\}$ by Axiom 6.
Hence $y$ is a relation by Definition 12, Proposition 22.
For all $a,b_1,b_2$ such that $(a,b_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} y$ and $(a,b_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} y$ we have $b_1 = b_2$ by Axiom 6, Proposition 22.
Hence $y$ is a function by Definition 51.

Claim: For all $a$ such that $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{y}$ we have $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$.

Fix $a$ such that $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{y}$.
Take $b$ such that $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} y$ by Proposition 199.
We have $(a,b) = (1,x_0)$ by Proposition 22.
Hence $a = 1$ by Axiom 6.
Therefore $a\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$.
Therefore $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$.

Hence $\dom{y}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{Y_1}$ by Definition 1.

Claim: For all $a$ such that $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{y}$.

Fix $a$ such that $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$.
We have $a\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$.
Hence $a = 1$.
Therefore $(a,x_0)\class{latex-symbol-tip latex-symbol-id-in}{\in} y$ by Proposition 22.
Therefore $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{y}$ by Proposition 200.

Hence $\dom{Y_1}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{y}$ by Definition 1.
Therefore $\dom{y} = \dom{Y_1}$ by Proposition 3.
For all $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $y(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{\ran{Y_1}}$ by Axiom 4, Definition 1, Proposition 22, Proposition 209, Proposition 346, Proposition 348.
Hence $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$ by Proposition 358.
For all $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y_1}$ we have $y(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\apply{Y_1}{i}$ by Definition 1, Proposition 22, Proposition 346, Proposition 359.
Therefore $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ by Definition 167.
Hence $g(x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ by Proposition 346.

Therefore $g\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X}{\productFamily{Y_1}}$ by Proposition 358.
Let $T_P = \productTopologyIndexed{T_1}{Y_1}$.
$J_1$ is inhabited.

Claim: For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$ we have $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is continuous from $X$ to $\apply{Y_1}{i}$ with respect to $T_X$ and $\apply{T_1}{i}$.

Fix $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J_1$.
Hence $i = 1$.
Let $j = \identity{X}$.
$j$ is continuous from $X$ to $X$ with respect to $T_X$ and $T_X$ by Lemma 308.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $\apply{\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g}{x} = \apply{j}{x}$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
We have $g$ is a function to $\productFamily{Y_1}$ and $g$ is a function and $\dom{g} = X$ by Proposition 356, Proposition 359.
Hence $g(x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ by Definition 1, Definition 55, Proposition 209, Proposition 348, Proposition 354.
$(x,\{(1,x)\})\class{latex-symbol-tip latex-symbol-id-in}{\in} g$.
Thus $g(x) = \{(1,x)\}$ by Proposition 346.
We have $g(x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$ and $g(x)$ is a function by Definition 167, Proposition 359.
Hence $(1,x)\class{latex-symbol-tip latex-symbol-id-in}{\in} g(x)$ by Proposition 22.
Hence $\apply{g(x)}{i} = x$ by Proposition 346.
Therefore $(g(x),x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\piIndex{Y_1}{i}$ by Axiom 6, Definition 170.
Hence $(x,x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ by Proposition 257.
We have $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ and $\piIndex{Y_1}{i}$ is a function by Lemma 191, Proposition 356.
Hence $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is a function by Proposition 372.
Therefore $\apply{\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g}{x} = \apply{j}{x}$ by Proposition 346, Proposition 405.

$\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$ by Lemma 191.
Thus $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X}{\apply{Y_1}{i}}$ by Proposition 359, Proposition 382.
Thus $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is a function and $\dom{\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g} = X$ by Proposition 356, Proposition 359.
$j$ is a function and $\dom{j} = X$ by Proposition 297, Proposition 401.
Therefore $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g = j$ by Definition 1, Proposition 3, Proposition 350.
Hence $\piIndex{Y_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is continuous from $X$ to $\apply{Y_1}{i}$ with respect to $T_X$ and $\apply{T_1}{i}$.

Therefore $g$ is continuous from $X$ to $\productFamily{Y_1}$ with respect to $T_X$ and $T_P$ by Lemma 193.

Claim: For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$ there exists $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $g(x) = y$.

Fix $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y_1}$.
We have $y$ is a function and $\dom{y} = \dom{Y_1}$ by Definition 167, Proposition 359.
Hence $1\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{y}$ by Axiom 42, Definition 1, Definition 84.
Thus $y(1)\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Definition 167.
Take $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $x = y(1)$.
Thus $(x,\{(1,x)\})\class{latex-symbol-tip latex-symbol-id-in}{\in} g$.
For all $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{y}$ we have $\apply{g(x)}{i} = y(i)$ by Definition 1, Definition 167, Proposition 22, Proposition 209, Proposition 346, Proposition 348, Proposition 354, Proposition 359.
Thus $g(x)$ is a function and $\dom{g(x)} = \dom{Y_1}$ by Definition 1, Definition 55, Definition 167, Proposition 209, Proposition 348, Proposition 354, Proposition 356, Proposition 359.
Therefore there exists $z\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $g(z) = y$ by Definition 1, Proposition 3, Proposition 350.

Therefore $g\class{latex-symbol-tip latex-symbol-id-in}{\in}\surj{X}{\productFamily{Y_1}}$ by Definition 57.
Hence $\img{g}{X} = \productFamily{Y_1}$ by Definition 57, Proposition 238, Proposition 359, Corollary 8.
Let $A_0 = \img{g}{X}$.
Let $T_A = \subspaceTopology{T_P}{A_0}$.
We have $T_A = \subspaceTopology{T_P}{\productFamily{Y_1}}$.
$T_P$ is a topology on $\productFamily{Y_1}$ by Definition 115, Lemma 76, Lemma 177.
Therefore $T_A = T_P$ by Definition 1, Definition 101, Definition 146, Proposition 3, Proposition 70, Proposition 156.
Hence $\productFamily{Y_1}$ is compact with respect to $T_P$ by Theorem 61.

Hence $\finiteIndexedProductCompactProp{1}$ by Definition 250.
Therefore $1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Axiom 42.

For all $k$ such that $k\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ and $\finiteIndexedProductCompactProp{k}$.
Thus for all $k\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Axiom 45, Lemma 369.
Hence $n\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Proposition 445.
Therefore $\productFamily{Y}$ is compact with respect to $\productTopologyIndexed{T_Y}{Y}$ by Definition 1, Definition 250.

LaTeX source
\begin{proof}
    Let $A = \{m\in\naturalsPlus \mid \finiteIndexedProductCompactProp{m}\}$.
    $A\subseteq\naturalsPlus$ by \cref{subseteq}.
    Show that $1\in A$.
    \begin{subproof}
        It suffices to show that $1\in\naturalsPlus$ and $\finiteIndexedProductCompactProp{1}$.
        Show that for all $Y_1,T_1$ such that $Y_1$ is a function and $T_1$ is a function and
            $\dom{Y_1} = \initialSegment{1}$ and $\dom{T_1} = \initialSegment{1}$ and
            for all $i\in\dom{Y_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ and
                $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$,
            we have $\productFamily{Y_1}$ is compact with respect to $\productTopologyIndexed{T_1}{Y_1}$.
        \begin{subproof}
            Fix $Y_1$.
            Fix $T_1$.
            Assume $Y_1$ is a function.
            Assume $T_1$ is a function.
            Assume $\dom{Y_1} = \initialSegment{1}$.
            Assume $\dom{T_1} = \initialSegment{1}$.
            Assume that for all $i\in\dom{Y_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{Y_1}{i}$ and
                $\apply{Y_1}{i}$ is compact with respect to $\apply{T_1}{i}$.
            Let $J_1 = \initialSegment{1}$.
            We have $1\in J_1$ by \cref{real_one_in_naturals,initial_segment_naturalsplus}.
            For all $i\in J_1$ we have $i < 1$ or $i = 1$ by \cref{initial_segment_naturalsplus}.
            For all $i\in J_1$ we have $1\leq i$ by \cref{initial_segment_naturalsplus,real_one_leq_naturalsplus}.
            Thus for all $i\in J_1$ we have $i = 1$.
            Therefore $J_1 = \{1,1\}$ by \cref{subseteq_antisymmetric,subseteq,upair_iff}.
            Let $X = \apply{Y_1}{1}$.
            Let $T_X = \apply{T_1}{1}$.
            Show that $T_X$ is a topology on $X$ and $X$ is compact with respect to $T_X$.
            \begin{subproof}
                Follows by \cref{subseteq}.
            \end{subproof}
            Let $g = \{(x,\{(1,x)\}) \mid x\in X\}$.
            $g$ is a relation by \cref{relation}.
            For all $x,u,v$ such that $(x,u)\in g$ and $(x,v)\in g$ we have $u = v$ by \cref{pair_eq_iff}.
            Hence $g$ is a function by \cref{rightunique}.
            We have $\dom{g} = X$ by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
            Show that for all $x\in\dom{g}$ we have $g(x)\in\productFamily{Y_1}$.
            \begin{subproof}
                Fix $x$ such that $x\in\dom{g}$.
                Take $y$ such that $(x,y)\in g$ by \cref{dom_iff}.
                Take $x_0\in X$ such that $(x,y) = (x_0,\{(1,x_0)\})$.
                We have $y = \{(1,x_0)\}$ by \cref{pair_eq_iff}.
                Hence $y$ is a relation by \cref{singleton_iff,relation}.
                For all $a,b_1,b_2$ such that $(a,b_1)\in y$ and $(a,b_2)\in y$ we have $b_1 = b_2$
                    by \cref{singleton_iff,pair_eq_iff}.
                Hence $y$ is a function by \cref{rightunique}.
                Show that for all $a$ such that $a\in\dom{y}$ we have $a\in\dom{Y_1}$.
                \begin{subproof}
                    Fix $a$ such that $a\in\dom{y}$.
                    Take $b$ such that $(a,b)\in y$ by \cref{dom_iff}.
                    We have $(a,b) = (1,x_0)$ by \cref{singleton_iff}.
                    Hence $a = 1$ by \cref{pair_eq_iff}.
                    Therefore $a\in J_1$.
                    Therefore $a\in\dom{Y_1}$.
                \end{subproof}
                Hence $\dom{y}\subseteq\dom{Y_1}$ by \cref{subseteq}.
                Show that for all $a$ such that $a\in\dom{Y_1}$ we have $a\in\dom{y}$.
                \begin{subproof}
                    Fix $a$ such that $a\in\dom{Y_1}$.
                    We have $a\in J_1$.
                    Hence $a = 1$.
                    Therefore $(a,x_0)\in y$ by \cref{singleton_iff}.
                    Therefore $a\in\dom{y}$ by \cref{dom_intro}.
                \end{subproof}
                Hence $\dom{Y_1}\subseteq\dom{y}$ by \cref{subseteq}.
                Therefore $\dom{y} = \dom{Y_1}$ by \cref{subseteq_antisymmetric}.
                For all $i$ such that $i\in\dom{Y_1}$ we have $y(i)\in\unions{\ran{Y_1}}$
                    by \cref{subseteq,singleton_iff,function_apply_intro,function_apply_elim,ran_intro,unions_iff}.
                Hence $y\in\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$ by \cref{funs_intro}.
                For all $i$ such that $i\in\dom{Y_1}$ we have $y(i)\in\apply{Y_1}{i}$
                    by \cref{subseteq,singleton_iff,funs_elim,function_apply_intro}.
                Therefore $y\in\productFamily{Y_1}$ by \cref{indexed_product}.
                Hence $g(x)\in\productFamily{Y_1}$ by \cref{function_apply_intro}.
            \end{subproof}
            Therefore $g\in\funs{X}{\productFamily{Y_1}}$ by \cref{funs_intro}.
            Let $T_P = \productTopologyIndexed{T_1}{Y_1}$.
        $J_1$ is inhabited.
        Show that for all $i\in J_1$ we have $\piIndex{Y_1}{i}\circ g$ is continuous from $X$ to $\apply{Y_1}{i}$ with respect to $T_X$ and $\apply{T_1}{i}$.
        \begin{subproof}
            Fix $i$ such that $i\in J_1$.
            Hence $i = 1$.
            Let $j = \identity{X}$.
            $j$ is continuous from $X$ to $X$ with respect to $T_X$ and $T_X$ by \cref{identity_continuous}.
                    Show that for all $x\in X$ we have $\apply{\piIndex{Y_1}{i}\circ g}{x} = \apply{j}{x}$.
                    \begin{subproof}
                        Fix $x$ such that $x\in X$.
                        We have $g$ is a function to $\productFamily{Y_1}$ and $g$ is a function and $\dom{g} = X$
                            by \cref{funs_elim,funs_is_function}.
                        Hence $g(x)\in\productFamily{Y_1}$ by \cref{subseteq,funs,function_apply_elim,ran_intro,function_to_ran}.
                        $(x,\{(1,x)\})\in g$.
                        Thus $g(x) = \{(1,x)\}$ by \cref{function_apply_intro}.
                        We have $g(x)\in\funs{\dom{Y_1}}{\unions{\ran{Y_1}}}$ and $g(x)$ is a function
                            by \cref{indexed_product,funs_elim}.
                        Hence $(1,x)\in g(x)$ by \cref{singleton_iff}.
                        Hence $\apply{g(x)}{i} = x$ by \cref{function_apply_intro}.
                        Therefore $(g(x),x)\in\piIndex{Y_1}{i}$ by \cref{pair_eq_iff,projection_map_indexed}.
                        Hence $(x,x)\in\piIndex{Y_1}{i}\circ g$ by \cref{circ_iff}.
                        We have $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$
                            and $\piIndex{Y_1}{i}$ is a function by \cref{projection_map_indexed_function,funs_is_function}.
                        Hence $\piIndex{Y_1}{i}\circ g$ is a function by \cref{function_circ}.
                        Therefore $\apply{\piIndex{Y_1}{i}\circ g}{x} = \apply{j}{x}$
                            by \cref{function_apply_intro,id_apply}.
                    \end{subproof}
            $\piIndex{Y_1}{i}\in\funs{\productFamily{Y_1}}{\apply{Y_1}{i}}$
                by \cref{projection_map_indexed_function}.
            Thus $\piIndex{Y_1}{i}\circ g\in\funs{X}{\apply{Y_1}{i}}$ by \cref{funs_circ,funs_elim}.
            Thus $\piIndex{Y_1}{i}\circ g$ is a function and $\dom{\piIndex{Y_1}{i}\circ g} = X$
                by \cref{funs_elim,funs_is_function}.
            $j$ is a function and $\dom{j} = X$ by \cref{id_is_function,id_dom}.
            Therefore $\piIndex{Y_1}{i}\circ g = j$ by \cref{subseteq,fun_subseteq,subseteq_antisymmetric}.
            Hence $\piIndex{Y_1}{i}\circ g$ is continuous from $X$ to $\apply{Y_1}{i}$ with respect to $T_X$ and $\apply{T_1}{i}$.
        \end{subproof}
        Therefore $g$ is continuous from $X$ to $\productFamily{Y_1}$ with respect to $T_X$ and $T_P$
            by \cref{continuous_map_into_indexed_product}.
        Show that for all $y\in\productFamily{Y_1}$ there exists $x\in X$ such that $g(x) = y$.
        \begin{subproof}
            Fix $y$ such that $y\in\productFamily{Y_1}$.
            We have $y$ is a function and $\dom{y} = \dom{Y_1}$ by \cref{indexed_product,funs_elim}.
            Hence $1\in\dom{y}$ by \cref{subseteq,real_one_in_naturals,initial_segment_naturalsplus}.
            Thus $y(1)\in X$ by \cref{indexed_product}.
            Take $x\in X$ such that $x = y(1)$.
            Thus $(x,\{(1,x)\})\in g$.
            For all $i$ such that $i\in\dom{y}$ we have $\apply{g(x)}{i} = y(i)$
                by \cref{subseteq,funs_elim,function_apply_intro,singleton_iff,function_apply_elim,ran_intro,function_to_ran,indexed_product}.
            Thus $g(x)$ is a function and $\dom{g(x)} = \dom{Y_1}$
                by \cref{subseteq,funs,funs_is_function,function_apply_elim,ran_intro,function_to_ran,indexed_product,funs_elim}.
            Therefore there exists $z\in X$ such that $g(z) = y$
                by \cref{subseteq,fun_subseteq,subseteq_antisymmetric}.
        \end{subproof}
        Therefore $g\in\surj{X}{\productFamily{Y_1}}$ by \cref{surj}.
        Hence $\img{g}{X} = \productFamily{Y_1}$ by \cref{surj,funs_elim,img_dom,funs_surj_iff}.
        Let $A_0 = \img{g}{X}$.
        Let $T_A = \subspaceTopology{T_P}{A_0}$.
        We have $T_A = \subspaceTopology{T_P}{\productFamily{Y_1}}$.
        $T_P$ is a topology on $\productFamily{Y_1}$
            by \cref{product_subbasis_finite_intersections_basis,basis_for_topology,basis_topology_is_topology}.
        Therefore $T_A = T_P$
            by \cref{subspace_topology,topology_on,subseteq,powerset_elim,inter_absorb_supseteq_left,subseteq_antisymmetric}.
        Hence $\productFamily{Y_1}$ is compact with respect to $T_P$ by \cref{continuous_image_compact}.
    \end{subproof}
        Hence $\finiteIndexedProductCompactProp{1}$ by \cref{finite_indexed_product_compact_property}.
        Therefore $1\in A$ by \cref{real_one_in_naturals}.
    \end{subproof}
    For all $k$ such that $k\in A$ we have $k\in\naturalsPlus$ and $\finiteIndexedProductCompactProp{k}$.
    Thus for all $k\in A$ we have $k + 1\in A$
        by \cref{real_naturals_closed_succ,finite_indexed_product_compact_property_succ}.
    Hence $n\in A$ by \cref{real_naturals_induction}.
    Therefore $\productFamily{Y}$ is compact with respect to $\productTopologyIndexed{T_Y}{Y}$
        by \cref{subseteq,finite_indexed_product_compact_property}.
\end{proof}
Lemma 371
square_metric_topology_equals_euclidean

Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.
Let $J = \initialSegment{n}$.
Let $X = \realsPower{J}$.
Let $T_E = \metricTopology{\euclideanMetric{n}}{X}$.
Let $T_S = \metricTopology{\squareMetric{n}}{X}$.
Then $T_E = T_S$.

LaTeX source
\begin{lemma}
\label{square_metric_topology_equals_euclidean}
    Suppose $n\in\naturalsPlus$.
    Let $J = \initialSegment{n}$.
    Let $X = \realsPower{J}$.
    Let $T_E = \metricTopology{\euclideanMetric{n}}{X}$.
    Let $T_S = \metricTopology{\squareMetric{n}}{X}$.
    Then $T_E = T_S$.
\end{lemma}
Proof

Let $X_0 = X$.
Let $d = \euclideanMetric{n}$.
Let $d_1 = \squareMetric{n}$.
$d$ is a metric on $X_0$ and $d_1$ is a metric on $X_0$ by Lemma 250, Theorem 23.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0$ we have for all $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ there exists $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and $\metricBall{d}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \metricBall{d_1}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}}$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0$.
Fix $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ such that $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.
Let $\class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

Claim: $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and $\metricBall{d}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \metricBall{d_1}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}}$.
Claim: $T_E$ is finer than $T_S$ on $X_0$.

Follows by Lemma 207.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0$ we have for all $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ there exists $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and $\metricBall{d_1}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \metricBall{d}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}}$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0$.
Fix $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ such that $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.
$0 < 1$ and $0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 17, Axiom 41, Axiom 42, Definition 1, Proposition 462.
Hence $0 < n$ by Axiom 36, Axiom 43, Lemma 83.
We have $\sqrt{n}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $\sqrt{n} \class{latex-symbol-tip latex-symbol-id-geq}{\geq} 0$ and $\sqrt{n} \rmul \sqrt{n} = n$ by Axiom 53.
Hence $\sqrt{n}$ is positive.
Let $\class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{\sqrt{n}}$.
$\sqrt{n} \class{latex-symbol-tip latex-symbol-id-neq}{\neq} 0$ and $\inv{\sqrt{n}}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $\inv{\sqrt{n}} > 0$ by Axiom 22, Lemma 20, Proposition 463.
Therefore $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $\class{latex-symbol-tip latex-symbol-id-delta}{\delta} > 0$ by Axiom 14, Proposition 454.

Claim: For all $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\metricBall{d_1}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}}$ we have $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\metricBall{d}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}}$.

Fix $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\metricBall{d_1}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}}$.
Thus $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X_0$ and $d_1((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ by Definition 180.
Take $m\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $((x,y),m)\class{latex-symbol-tip latex-symbol-id-in}{\in} d_1$ by Lemma 216.
Take $r\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $((x,y),r)\class{latex-symbol-tip latex-symbol-id-in}{\in} d$ by Lemma 247.
Hence $m < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ by Lemma 82, Lemma 211, Proposition 346.
Hence $r \class{latex-symbol-tip latex-symbol-id-leq}{\leq} \sqrt{n} \rmul m$ by Lemma 220.
$m \rmul \sqrt{n} < \class{latex-symbol-tip latex-symbol-id-delta}{\delta} \rmul \sqrt{n}$ by Axiom 38.
Hence $\sqrt{n} \rmul m < \sqrt{n} \rmul \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ by Axiom 20.
Thus $\sqrt{n} \rmul \class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ by Axiom 19, Axiom 20, Axiom 21, Axiom 22.
Hence $\sqrt{n} \rmul m < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ by Lemma 83.
Therefore $d((x,y)) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ by Axiom 14, Axiom 36, Lemma 81, Lemma 82, Lemma 248, Proposition 346.
Hence $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\metricBall{d}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}}$ by Definition 180.

Therefore $\metricBall{d_1}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}} \class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \metricBall{d}{X_0}{x}{\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}}$ by Definition 1.

Claim: $T_S$ is finer than $T_E$ on $X_0$.

Follows by Lemma 207.

Therefore $T_E = T_S$ by Definition 108, Proposition 3.

LaTeX source
\begin{proof}
    Let $X_0 = X$.
    Let $d = \euclideanMetric{n}$.
    Let $d_1 = \squareMetric{n}$.
    $d$ is a metric on $X_0$ and $d_1$ is a metric on $X_0$ by \cref{euclidean_metric_is_metric,square_metric_is_metric}.
    Show that for all $x\in X_0$ we have
        for all $\epsilon\in\reals$ such that $0 < \epsilon$ there exists $\delta\in\reals$
            such that $0 < \delta$ and
            $\metricBall{d}{X_0}{x}{\delta} \subseteq \metricBall{d_1}{X_0}{x}{\epsilon}$.
    \begin{subproof}
        Fix $x$ such that $x\in X_0$.
        Fix $\epsilon$ such that $\epsilon\in\reals$ and $0 < \epsilon$.
        Let $\delta = \epsilon$.
        Show that $0 < \delta$ and
            $\metricBall{d}{X_0}{x}{\delta} \subseteq \metricBall{d_1}{X_0}{x}{\epsilon}$.
        \begin{subproof}
            Follows by \cref{subseteq,metric_ball,euclidean_metric_value_exists,square_metric_value_exists,euclidean_square_metric_bounds,euclidean_metric_function,square_metric_function,real_leq_split,real_lt_subst_left,real_lt_trans,function_apply_intro}.
        \end{subproof}
    \end{subproof}
    Show that $T_E$ is finer than $T_S$ on $X_0$.
    \begin{subproof}
        Follows by \cref{metric_topology_finer_iff}.
    \end{subproof}
    Show that for all $x\in X_0$ we have
        for all $\epsilon\in\reals$ such that $0 < \epsilon$ there exists $\delta\in\reals$
            such that $0 < \delta$ and
            $\metricBall{d_1}{X_0}{x}{\delta} \subseteq \metricBall{d}{X_0}{x}{\epsilon}$.
    \begin{subproof}
        Fix $x$ such that $x\in X_0$.
        Fix $\epsilon$ such that $\epsilon\in\reals$ and $0 < \epsilon$.
        $0 < 1$ and $0\in\reals$ and $1\in\reals$ and $n\in\reals$
            by \cref{real_zero_lt_one,real_add_ident,real_naturals_subset_reals,real_one_in_naturals,subseteq}.
        Hence $0 < n$ by \cref{real_one_leq_naturalsplus,real_lt_subst_right,real_lt_trans}.
        We have $\sqrt{n}\in\reals$ and $\sqrt{n} \geq 0$ and $\sqrt{n} \rmul \sqrt{n} = n$ by \cref{positive_square_root}.
        Hence $\sqrt{n}$ is positive.
        Let $\delta = \epsilon \rmul \inv{\sqrt{n}}$.
        $\sqrt{n} \neq 0$ and $\inv{\sqrt{n}}\in\reals$ and $\inv{\sqrt{n}} > 0$
            by \cref{real_pos_nonzero,real_mul_inverse,real_inv_pos}.
        Therefore $\delta\in\reals$ and $\delta > 0$ by \cref{real_mul_closed,real_mul_pos_pos_gt}.
        Show that for all $y$ such that $y\in\metricBall{d_1}{X_0}{x}{\delta}$ we have
            $y\in\metricBall{d}{X_0}{x}{\epsilon}$.
        \begin{subproof}
            Fix $y$ such that $y\in\metricBall{d_1}{X_0}{x}{\delta}$.
            Thus $y\in X_0$ and $d_1((x,y)) < \delta$ by \cref{metric_ball}.
            Take $m\in\reals$ such that $((x,y),m)\in d_1$ by \cref{square_metric_value_exists}.
            Take $r\in\reals$ such that $((x,y),r)\in d$ by \cref{euclidean_metric_value_exists}.
            Hence $m < \delta$ by \cref{square_metric_function,function_apply_intro,real_lt_subst_left}.
            Hence $r \leq \sqrt{n} \rmul m$ by \cref{euclidean_square_metric_bounds}.
            $m \rmul \sqrt{n} < \delta \rmul \sqrt{n}$ by \cref{real_lt_mul_pos}.
            Hence $\sqrt{n} \rmul m < \sqrt{n} \rmul \delta$ by \cref{real_mul_comm}.
            Thus $\sqrt{n} \rmul \delta = \epsilon$ by
                \cref{real_mul_assoc,real_mul_comm,real_mul_inverse,real_mul_ident}.
            Hence $\sqrt{n} \rmul m < \epsilon$ by \cref{real_lt_subst_right}.
            Therefore $d((x,y)) < \epsilon$ by
                \cref{euclidean_metric_function,real_mul_closed,real_leq_split,real_lt_subst_left,real_lt_trans,function_apply_intro}.
            Hence $y\in\metricBall{d}{X_0}{x}{\epsilon}$ by \cref{metric_ball}.
        \end{subproof}
        Therefore $\metricBall{d_1}{X_0}{x}{\delta} \subseteq \metricBall{d}{X_0}{x}{\epsilon}$ by \cref{subseteq}.
    \end{subproof}
    Show that $T_S$ is finer than $T_E$ on $X_0$.
    \begin{subproof}
        Follows by \cref{metric_topology_finer_iff}.
    \end{subproof}
    Therefore $T_E = T_S$ by \cref{finer_topology,subseteq_antisymmetric}.
\end{proof}
Lemma 372
reals_standard_indexed_families_data

Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.
Let $J = \initialSegment{n}$.
Let $X_1 = \{(i,\reals) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J\}$.
Let $T_1 = \{(i,\standardTopologyR) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J\}$.
Then $X_1$ is a function and $T_1$ is a function and $\dom{X_1} = J$ and $\dom{T_1} = J$.

LaTeX source
\begin{lemma}
\label{reals_standard_indexed_families_data}
    Suppose $n\in\naturalsPlus$.
    Let $J = \initialSegment{n}$.
    Let $X_1 = \{(i,\reals) \mid i\in J\}$.
    Let $T_1 = \{(i,\standardTopologyR) \mid i\in J\}$.
    Then $X_1$ is a function and $T_1$ is a function and $\dom{X_1} = J$ and $\dom{T_1} = J$.
\end{lemma}
Proof
Claim: For all $i,y_1,y_2$ such that $(i,y_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} X_1$ and $(i,y_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} X_1$ we have $y_1 = y_2$.

Trivial.

Claim: $X_1$ is a function.
Claim: For all $i,y_1,y_2$ such that $(i,y_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} T_1$ and $(i,y_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} T_1$ we have $y_1 = y_2$.

Trivial.

Claim: $T_1$ is a function.
Claim: $\dom{X_1} = J$.
Claim: $\dom{T_1} = J$.
LaTeX source
\begin{proof}
    Show that for all $i,y_1,y_2$ such that $(i,y_1)\in X_1$ and $(i,y_2)\in X_1$ we have $y_1 = y_2$.
    \begin{subproof}
        Trivial.
    \end{subproof}
    Show that $X_1$ is a function.
    \begin{subproof}
        Follows by \cref{relation,rightunique}.
    \end{subproof}
    Show that for all $i,y_1,y_2$ such that $(i,y_1)\in T_1$ and $(i,y_2)\in T_1$ we have $y_1 = y_2$.
    \begin{subproof}
        Trivial.
    \end{subproof}
    Show that $T_1$ is a function.
    \begin{subproof}
        Follows by \cref{relation,rightunique}.
    \end{subproof}
    Show that $\dom{X_1} = J$.
    \begin{subproof}
        Follows by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
    \end{subproof}
    Show that $\dom{T_1} = J$.
    \begin{subproof}
        Follows by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
    \end{subproof}
\end{proof}
Theorem 66
compact_reals_power_iff_closed_bounded

Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.
Let $J = \initialSegment{n}$.
Let $X = \realsPower{J}$.
Let $d = \euclideanMetric{n}$.
Let $\class{latex-symbol-tip latex-symbol-id-rho}{\rho} = \squareMetric{n}$.
Let $T = \metricTopology{\class{latex-symbol-tip latex-symbol-id-rho}{\rho}}{X}$.
Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.
Let $T_A = \subspaceTopology{T}{A}$.
Then $A$ is compact with respect to $T_A$ iff $A$ is closed in $X$ with respect to $T$ and $A$ is bounded in $X$ with respect to $d$ or $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$.

LaTeX source
\begin{theorem}
\label{compact_reals_power_iff_closed_bounded}
    Suppose $n\in\naturalsPlus$.
    Let $J = \initialSegment{n}$.
    Let $X = \realsPower{J}$.
    Let $d = \euclideanMetric{n}$.
    Let $\rho = \squareMetric{n}$.
    Let $T = \metricTopology{\rho}{X}$.
    Suppose $A\subseteq X$.
    Let $T_A = \subspaceTopology{T}{A}$.
    Then $A$ is compact with respect to $T_A$ iff
        $A$ is closed in $X$ with respect to $T$ and
        $A$ is bounded in $X$ with respect to $d$ or $A$ is bounded in $X$ with respect to $\rho$.
\end{theorem}
Proof

Let $X_0 = X$.
Let $d_1 = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}$.

Claim: If $A$ is compact with respect to $T_A$ then $A$ is closed in $X$ with respect to $T$ and $A$ is bounded in $X$ with respect to $d$ or $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$.

Assume $A$ is compact with respect to $T_A$.
$d_1$ is a metric on $X$ by Lemma 250.
$T$ is a topology on $X$ by Definition 115, Definition 182, Lemma 76, Lemma 194.
Let $T_S = \metricTopology{d_1}{X_0}$.
Let $X_1 = \{(i,\reals) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J\}$.
Let $T_1 = \{(i,\standardTopologyR) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J\}$.
Let $T_0 = \productTopologyIndexed{T_1}{X_1}$.
$d$ is a metric on $X_0$ and $d_1$ is a metric on $X_0$ by Lemma 250, Theorem 23.
Hence $J$ is inhabited by Axiom 42, Axiom 43, Definition 84.
$X_1$ is a function and $T_1$ is a function and $\dom{X_1} = J$ and $\dom{T_1} = J$ by Lemma 372.
For all $\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{X_1}$ we have $\apply{X_1}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}} = \reals$ and $\apply{T_1}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}} = \standardTopologyR$ by Definition 1, Proposition 346.
$\realOrderTopology = \standardTopologyR$ and $\realOrderTopology = \basisTopology{\orderBasis{\realOrderRel}{\reals}}{\reals}$ by Definition 233, Lemma 336.
$\realOrderRel$ is a simple order relation on $\reals$ by Lemma 322.
$\reals$ has more than one element by Definition 231, Lemma 326.
Hence $\realOrderTopology$ is the order topology on $\reals$ with respect to $\realOrderRel$ by Definition 134.
Therefore for all $\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{X_1}$ we have $\apply{X_1}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$ is Hausdorff with respect to $\apply{T_1}{\class{latex-symbol-tip latex-symbol-id-alpha}{\alpha}}$ by Lemma 336, Theorem 17.
Hence $X_0$ is Hausdorff with respect to $T_0$ by Lemma 188, Lemma 209.
Therefore $T_S = T_0$ by Lemma 371, Theorem 24.
Hence $X$ is Hausdorff with respect to $T$.

Claim: $A$ is closed in $X$ with respect to $T$.

Follows by Theorem 60.

Claim: $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$.
Case. $A = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

Let $M = 0$.
For all $a_1,a_2\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_1,a_2)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$ by Axiom 2, Proposition 4, Proposition 12.
Thus $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$ by Axiom 17, Definition 187.

Case. $A \class{latex-symbol-tip latex-symbol-id-neq}{\neq} \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

$A$ is inhabited by Proposition 10.
Let $C = \{\metricBall{\class{latex-symbol-tip latex-symbol-id-rho}{\rho}}{X}{a}{1} \mid a\class{latex-symbol-tip latex-symbol-id-in}{\in} A\}$.
For all $U$ such that $U\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ we have $U$ is open in $X$ with respect to $T$ by Axiom 41, Axiom 42, Definition 1, Definition 103, Definition 115, Definition 180, Definition 181, Definition 182, Lemma 77, Lemma 194, Proposition 155, Proposition 462.
Hence $C$ is a covering of $A$ by Axiom 4, Definition 1, Definition 176, Definition 179, Definition 180, Definition 245, Lemma 82, Lemma 250, Proposition 462.
$A$ is a subspace of $X$ with respect to $T$ by Definition 147.
Thus there exists $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $B$ is finite and $B$ is a covering of $A$ by Lemma 356.
Let $R = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-times}{\times} A \mid \fst{w} = \metricBall{\class{latex-symbol-tip latex-symbol-id-rho}{\rho}}{X}{\snd{w}}{1}\}$.
Hence $R$ is a relation by Definition 12, Proposition 121.

Claim: For all $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ there exists $a$ such that $U\mathrel{R} a$.

Fix $U$ such that $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
We have $U\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Definition 1.
Take $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $U = \metricBall{\class{latex-symbol-tip latex-symbol-id-rho}{\rho}}{X}{a}{1}$.
Therefore $(U,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-times}{\times} A$ by Proposition 115.
Hence $\fst{(U,a)} = U$ and $\snd{(U,a)} = a$ by Axiom 10, Axiom 11.
Therefore $(U,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Hence $U\mathrel{R} a$.

Take $g$ such that $g$ is a function on $B$ and for all $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $U\mathrel{R}\apply{g}{U}$ by Axiom 54.
Let $F = \img{g}{B}$.
$F$ is finite by Lemma 192.
Hence $F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Definition 1, Definition 1, Proposition 114, Proposition 235, Proposition 346.
Take $a_0$ such that $a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Thus $a_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{B}$ by Definition 1, Definition 245.
Take $U_0\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ such that $a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} U_0$ by Axiom 4.
Take $f_0$ such that $f_0\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ by Definition 1, Proposition 235, Proposition 348.
Let $h = \{(f,\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f))) \mid f\class{latex-symbol-tip latex-symbol-id-in}{\in} F\}$.
$h$ is a relation by Definition 12.
For all $x,y_1,y_2$ such that $(x,y_1)\class{latex-symbol-tip latex-symbol-id-in}{\in} h$ and $(x,y_2)\class{latex-symbol-tip latex-symbol-id-in}{\in} h$ we have $y_1 = y_2$ by Axiom 6.
Hence $h$ is right-unique by Definition 51.
For all $f$ such that $f\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{h}$.
For all $f$ such that $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{h}$ we have $f\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ by Axiom 6, Proposition 199.
Therefore $\dom{h} = F$ by Definition 1, Proposition 3.
Hence $h$ is a function on $F$.
Let $D = \img{h}{F}$.
$D$ is finite by Lemma 192.
For all $r$ such that $r\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ we have $r\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 6, Definition 1, Definition 179, Lemma 250, Proposition 115, Proposition 235, Proposition 361.
Hence $D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$ by Definition 1.
Take $f_1$ such that $f_1\class{latex-symbol-tip latex-symbol-id-in}{\in} F$.
Thus $(f_1,\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f_1)))\class{latex-symbol-tip latex-symbol-id-in}{\in} h$.
Therefore $D\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Lemma 323, Proposition 10, Proposition 235.
Take $M_0\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ such that $M_0$ is a maximum of $D$ by Lemma 47.
Let $M = (M_0 + 1) + (M_0 + 1)$.

Claim: For all $x,y\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$.

Fix $x$.
Fix $y$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Take $U_x\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} U_x$ by Axiom 4, Definition 1, Definition 245.
Take $U_y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} U_y$ by Axiom 4, Definition 1, Definition 245.
Let $f_x = g(U_x)$.
Let $f_y = g(U_y)$.
$U_x\mathrel{R} f_x$ by Proposition 348.
$U_y\mathrel{R} f_y$ by Proposition 348.
We have $(U_x,f_x)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Therefore $(U_x,f_x)\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-times}{\times} A$.
$\fst{(U_x,f_x)} = \metricBall{\class{latex-symbol-tip latex-symbol-id-rho}{\rho}}{X}{\snd{(U_x,f_x)}}{1}$.
Hence $U_x = \metricBall{\class{latex-symbol-tip latex-symbol-id-rho}{\rho}}{X}{f_x}{1}$ by Axiom 10, Axiom 11.
We have $(U_y,f_y)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
Therefore $(U_y,f_y)\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-times}{\times} A$.
$\fst{(U_y,f_y)} = \metricBall{\class{latex-symbol-tip latex-symbol-id-rho}{\rho}}{X}{\snd{(U_y,f_y)}}{1}$.
Hence $U_y = \metricBall{\class{latex-symbol-tip latex-symbol-id-rho}{\rho}}{X}{f_y}{1}$ by Axiom 10, Axiom 11.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in} \metricBall{\class{latex-symbol-tip latex-symbol-id-rho}{\rho}}{X}{f_x}{1}$.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,x)) < 1$ by Definition 180.
Thus $f_x\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $f_x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Definition 1, Proposition 114.
Therefore $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,f_x)) < 1$ by Definition 177, Definition 179, Lemma 82, Lemma 250.
Hence $y\class{latex-symbol-tip latex-symbol-id-in}{\in} \metricBall{\class{latex-symbol-tip latex-symbol-id-rho}{\rho}}{X}{f_y}{1}$.
Thus $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_y,y)) < 1$ by Definition 180.
Thus $f_y\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $f_y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Definition 1, Proposition 114.
Therefore $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((y,f_y)) < 1$ by Definition 177, Definition 179, Lemma 82, Lemma 250.
Hence $f_x\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ and $f_y\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ by Definition 1, Proposition 235, Proposition 348.
We have $h(f_x)\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ and $h(f_y)\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ by Definition 1, Proposition 235, Proposition 348.
Therefore $h(f_x) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0$ and $h(f_y) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0$ by Definition 73.
Thus $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f_x)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0$ and $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f_y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0$ by Proposition 346.

Claim: $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,f_x)) + \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,a_0)) + \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f_y)) + \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_y,y))$.

$x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $f_x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $f_y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Definition 1.
Therefore $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,f_x)) + \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,y))$ by Definition 178, Definition 179, Lemma 250.
Hence $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,a_0)) + \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,y))$ by Definition 178, Definition 179, Lemma 250.
Therefore $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f_y)) + \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_y,y))$ by Definition 178, Definition 179, Lemma 250.
We have $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $f_x\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $f_x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $f_y\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Proposition 4.
Therefore $f_y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Proposition 4.
$(x,f_x)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$(f_x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$(f_x,a_0)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$(a_0,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$(a_0,f_y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$(f_y,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
We have $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 179, Proposition 361.
$\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,f_x))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 179, Proposition 361.
$\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 179, Proposition 361.
$\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,a_0))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 179, Proposition 361.
$\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 179, Proposition 361.
$\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f_y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 179, Proposition 361.
$\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_y,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 179, Proposition 361.
Let $r_1 = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,f_x))$.
Let $r_2 = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,y))$.
Let $r_3 = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,a_0))$.
Let $r_4 = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,y))$.
We have $r_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $r_2\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $r_3\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $r_4\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
$r_3 + r_4\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$r_1 + r_2\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$r_1 + (r_3 + r_4)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$r_2 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} r_3 + r_4$.
Hence $r_2 + r_1 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (r_3 + r_4) + r_1$ by Lemma 24.
We have $r_1 + r_2 = r_2 + r_1$ by Axiom 16.
$(r_3 + r_4) + r_1 = r_1 + (r_3 + r_4)$ by Axiom 16.
Therefore $r_1 + r_2 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (r_3 + r_4) + r_1$ by Lemma 23.
Hence $r_1 + r_2 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} r_1 + (r_3 + r_4)$ by Lemma 23.
Thus $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} r_1 + (r_3 + r_4)$ by Lemma 23.
Let $u = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f_y)) + \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_y,y))$.
We have $u\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$r_1 + r_3\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$(r_1 + r_3) + u\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$r_4 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} u$.
Therefore $r_4 + (r_1 + r_3) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} u + (r_1 + r_3)$ by Lemma 24.
Thus $(r_1 + r_3) + r_4 = r_4 + (r_1 + r_3)$ by Axiom 16.
Thus $u + (r_1 + r_3) = (r_1 + r_3) + u$ by Axiom 16.
Hence $(r_1 + r_3) + r_4 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} u + (r_1 + r_3)$ by Lemma 23.
Thus $(r_1 + r_3) + r_4 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (r_1 + r_3) + u$ by Lemma 23.
$r_1 + (r_3 + r_4) = (r_1 + r_3) + r_4$ by Axiom 15.
Therefore $r_1 + (r_3 + r_4) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (r_1 + r_3) + u$ by Lemma 23.
Hence $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (r_1 + r_3) + u$ by Lemma 23.
Therefore $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,f_x)) + \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,a_0)) + \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f_y)) + \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_y,y))$ by Axiom 15, Axiom 16.

Claim: $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$.

Let $s_1 = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,f_x))$.
Let $s_2 = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_x,a_0))$.
Let $s_3 = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f_y))$.
Let $s_4 = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((f_y,y))$.
We have $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $f_x\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $f_x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $f_y\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $f_y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $a_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Proposition 4.
$(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$(x,f_x)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$(f_x,a_0)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$(a_0,f_y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$(f_y,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
We have $s_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $s_2\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $s_3\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $s_4\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 179, Proposition 361.
$s_1 + s_2\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $s_3 + s_4\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 41, Axiom 42, Definition 1.
Hence $s_2 = \class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_0,f_x))$ by Definition 177, Definition 179, Lemma 250.
Therefore $s_1 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} 1$ by Lemma 231.
Hence $s_4 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} 1$ by Definition 177, Definition 179, Lemma 82, Lemma 231, Lemma 250.
We have $s_2 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0$ and $s_3 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M_0$.
Therefore $M_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 1, Definition 73.
$M_0 + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$(s_1 + s_2) + (s_3 + s_4)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$(M_0 + 1) + (M_0 + 1)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
We have $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 179, Proposition 361.
$\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} s_1 + s_2 + s_3 + s_4$.
Hence $s_1 + s_2 + s_3 + s_4 = (s_1 + s_2) + (s_3 + s_4)$ by Axiom 15.
Therefore $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (s_1 + s_2) + (s_3 + s_4)$ by Lemma 23.
Hence $(s_1 + s_2) + (s_3 + s_4) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (M_0 + 1) + (M_0 + 1)$ by Lemma 364.
Thus $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (M_0 + 1) + (M_0 + 1)$ by Lemma 23.
Therefore $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$.

Hence $M\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13, Axiom 41, Axiom 42, Definition 1, Definition 73.
Therefore $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$ by Definition 187.

LaTeX source
\begin{byCase}
            \caseOf{$A = \emptyset$.}
                Let $M = 0$.
                For all $a_1,a_2\in A$ we have $\rho((a_1,a_2)) \leq M$
                    by \cref{subseteq_emptyset_iff,elem_subseteq,emptyset}.
                Thus $A$ is bounded in $X$ with respect to $\rho$ by \cref{real_add_ident,metric_bounded}.
            \caseOf{$A \neq \emptyset$.}
                $A$ is inhabited by \cref{nonempty_inhabited}.
                Let $C = \{\metricBall{\rho}{X}{a}{1} \mid a\in A\}$.
                For all $U$ such that $U\in C$ we have $U$ is open in $X$ with respect to $T$
                    by \cref{real_naturals_subset_reals,real_one_in_naturals,subseteq,real_zero_lt_one,metric_ball,powerset_intro,metric_basis,metric_basis_is_basis,basis_elem_open_in_generated,metric_topology,basis_for_topology,open_in}.
                Hence $C$ is a covering of $A$
                    by \cref{subseteq,covering,square_metric_is_metric,metric_zero_characterization,metric_on,real_zero_lt_one,real_lt_subst_left,metric_ball,unions_iff}.
                $A$ is a subspace of $X$ with respect to $T$ by \cref{subspace_of}.
                Thus there exists $B$ such that
                    $B\subseteq C$ and
                    $B$ is finite and
                    $B$ is a covering of $A$
                    by \cref{compact_subspace_open_covering}.
                Let $R = \{w\in B\times A \mid \fst{w} = \metricBall{\rho}{X}{\snd{w}}{1}\}$.
                Hence $R$ is a relation by \cref{times_elem_is_tuple,relation}.
                Show that for all $U\in B$ there exists $a$ such that $U\mathrel{R} a$.
                \begin{subproof}
                    Fix $U$ such that $U\in B$.
                    We have $U\in C$ by \cref{subseteq}.
                    Take $a\in A$ such that $U = \metricBall{\rho}{X}{a}{1}$.
                    Therefore $(U,a)\in B\times A$ by \cref{times_tuple_intro}.
                    Hence $\fst{(U,a)} = U$ and $\snd{(U,a)} = a$ by \cref{fst_eq,snd_eq}.
                    Therefore $(U,a)\in R$.
                    Hence $U\mathrel{R} a$.
                \end{subproof}
                Take $g$ such that $g$ is a function on $B$ and for all $U\in B$ we have $U\mathrel{R}\apply{g}{U}$
                    by \cref{axiom_of_choice}.
                Let $F = \img{g}{B}$.
                $F$ is finite by \cref{finite_image_function}.
                Hence $F\subseteq A$ by \cref{subseteq,img_iff,function_apply_intro,subseteq,times_tuple_elim}.
                Take $a_0$ such that $a_0\in A$.
                Thus $a_0\in\unions{B}$ by \cref{covering,subseteq}.
                Take $U_0\in B$ such that $a_0\in U_0$ by \cref{unions_iff}.
                Take $f_0$ such that $f_0\in F$ by \cref{subseteq,function_apply_elim,img_iff}.
                Let $h = \{(f,\rho((a_0,f))) \mid f\in F\}$.
                $h$ is a relation by \cref{relation}.
                For all $x,y_1,y_2$ such that $(x,y_1)\in h$ and $(x,y_2)\in h$ we have $y_1 = y_2$
                    by \cref{pair_eq_iff}.
                Hence $h$ is right-unique by \cref{rightunique}.
                For all $f$ such that $f\in F$ we have $f\in\dom{h}$.
                For all $f$ such that $f\in\dom{h}$ we have $f\in F$ by \cref{dom_iff,pair_eq_iff}.
                Therefore $\dom{h} = F$ by \cref{subseteq,subseteq_antisymmetric}.
                Hence $h$ is a function on $F$.
                Let $D = \img{h}{F}$.
                $D$ is finite by \cref{finite_image_function}.
                For all $r$ such that $r\in D$ we have $r\in\reals$
                    by \cref{img_iff,subseteq,times_tuple_intro,metric_on,funs_type_apply,square_metric_is_metric,pair_eq_iff}.
                Hence $D\subseteq\reals$ by \cref{subseteq}.
                Take $f_1$ such that $f_1\in F$.
                Thus $(f_1,\rho((a_0,f_1)))\in h$.
                Therefore $D\neq\emptyset$ by \cref{img_iff,nonempty_inhabited,inhabited_nonempty}.
                Take $M_0\in D$ such that $M_0$ is a maximum of $D$ by \cref{finite_real_maximum}.
                Let $M = (M_0 + 1) + (M_0 + 1)$.
                Show that for all $x,y\in A$ we have $\rho((x,y)) \leq M$.
                \begin{subproof}
                    Fix $x$.
                    Fix $y$ such that $x\in A$ and $y\in A$.
                    Take $U_x\in B$ such that $x\in U_x$ by \cref{covering,subseteq,unions_iff}.
                    Take $U_y\in B$ such that $y\in U_y$ by \cref{covering,subseteq,unions_iff}.
                    Let $f_x = g(U_x)$.
                    Let $f_y = g(U_y)$.
                    $U_x\mathrel{R} f_x$ by \cref{function_apply_elim}.
                    $U_y\mathrel{R} f_y$ by \cref{function_apply_elim}.
                    We have $(U_x,f_x)\in R$.
                    Therefore $(U_x,f_x)\in B\times A$.
                    $\fst{(U_x,f_x)} = \metricBall{\rho}{X}{\snd{(U_x,f_x)}}{1}$.
                    Hence $U_x = \metricBall{\rho}{X}{f_x}{1}$ by \cref{fst_eq,snd_eq}.
                    We have $(U_y,f_y)\in R$.
                    Therefore $(U_y,f_y)\in B\times A$.
                    $\fst{(U_y,f_y)} = \metricBall{\rho}{X}{\snd{(U_y,f_y)}}{1}$.
                    Hence $U_y = \metricBall{\rho}{X}{f_y}{1}$ by \cref{fst_eq,snd_eq}.
                    Hence $x\in \metricBall{\rho}{X}{f_x}{1}$.
                    Thus $x\in X$ and $\rho((f_x,x)) < 1$ by \cref{metric_ball}.
                    Thus $f_x\in A$ and $f_x\in X$ by \cref{subseteq,times_tuple_elim}.
                    Therefore $\rho((x,f_x)) < 1$
                        by \cref{metric_symmetric,metric_on,square_metric_is_metric,real_lt_subst_left}.
                    Hence $y\in \metricBall{\rho}{X}{f_y}{1}$.
                    Thus $y\in X$ and $\rho((f_y,y)) < 1$ by \cref{metric_ball}.
                    Thus $f_y\in A$ and $f_y\in X$ by \cref{subseteq,times_tuple_elim}.
                    Therefore $\rho((y,f_y)) < 1$
                        by \cref{metric_symmetric,metric_on,square_metric_is_metric,real_lt_subst_left}.
                    Hence $f_x\in F$ and $f_y\in F$ by \cref{subseteq,function_apply_elim,img_iff}.
                    We have $h(f_x)\in D$ and $h(f_y)\in D$ by \cref{subseteq,function_apply_elim,img_iff}.
                    Therefore $h(f_x) \leq M_0$ and $h(f_y) \leq M_0$ by \cref{real_maximum}.
                    Thus $\rho((a_0,f_x)) \leq M_0$ and $\rho((a_0,f_y)) \leq M_0$ by \cref{function_apply_intro}.
                    Show that $\rho((x,y)) \leq \rho((x,f_x)) + \rho((f_x,a_0)) + \rho((a_0,f_y)) + \rho((f_y,y))$.
                    \begin{subproof}
                        $x\in X$ and $y\in X$ and $f_x\in X$ and $f_y\in X$ and $a_0\in X$ by \cref{subseteq}.
                        Therefore $\rho((x,y)) \leq \rho((x,f_x)) + \rho((f_x,y))$
                            by \cref{square_metric_is_metric,metric_on,metric_triangle_inequality}.
                        Hence $\rho((f_x,y)) \leq \rho((f_x,a_0)) + \rho((a_0,y))$
                            by \cref{square_metric_is_metric,metric_on,metric_triangle_inequality}.
                        Therefore $\rho((a_0,y)) \leq \rho((a_0,f_y)) + \rho((f_y,y))$
                            by \cref{square_metric_is_metric,metric_on,metric_triangle_inequality}.
                        We have $x\in X$ and $f_x\in A$ and $f_x\in X$ and $f_y\in A$ by \cref{elem_subseteq}.
                        Therefore $f_y\in X$ and $y\in X$ and $a_0\in A$ and $a_0\in X$ by \cref{elem_subseteq}.
                        $(x,f_x)\in X\times X$ by \cref{times_tuple_intro}.
                        $(f_x,y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(f_x,a_0)\in X\times X$ by \cref{times_tuple_intro}.
                        $(a_0,y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(a_0,f_y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(f_y,y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(x,y)\in X\times X$ by \cref{times_tuple_intro}.
                        We have $\rho((x,y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((x,f_x))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((f_x,y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((f_x,a_0))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((a_0,y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((a_0,f_y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((f_y,y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        Let $r_1 = \rho((x,f_x))$.
                        Let $r_2 = \rho((f_x,y))$.
                        Let $r_3 = \rho((f_x,a_0))$.
                        Let $r_4 = \rho((a_0,y))$.
                        We have $r_1\in\reals$ and $r_2\in\reals$ and $r_3\in\reals$ and $r_4\in\reals$.
                        $r_3 + r_4\in\reals$ by \cref{real_add_closed}.
                        $r_1 + r_2\in\reals$ by \cref{real_add_closed}.
                        $r_1 + (r_3 + r_4)\in\reals$ by \cref{real_add_closed}.
                        $r_2 \leq r_3 + r_4$.
                        Hence $r_2 + r_1 \leq (r_3 + r_4) + r_1$ by \cref{real_leq_add}.
                        We have $r_1 + r_2 = r_2 + r_1$ by \cref{real_add_comm}.
                        $(r_3 + r_4) + r_1 = r_1 + (r_3 + r_4)$ by \cref{real_add_comm}.
                        Therefore $r_1 + r_2 \leq (r_3 + r_4) + r_1$ by \cref{real_leq_trans}.
                        Hence $r_1 + r_2 \leq r_1 + (r_3 + r_4)$ by \cref{real_leq_trans}.
                        Thus $\rho((x,y)) \leq r_1 + (r_3 + r_4)$ by \cref{real_leq_trans}.
                        Let $u = \rho((a_0,f_y)) + \rho((f_y,y))$.
                        We have $u\in\reals$ by \cref{real_add_closed}.
                        $r_1 + r_3\in\reals$ by \cref{real_add_closed}.
                        $(r_1 + r_3) + u\in\reals$ by \cref{real_add_closed}.
                        $r_4 \leq u$.
                        Therefore $r_4 + (r_1 + r_3) \leq u + (r_1 + r_3)$ by \cref{real_leq_add}.
                        Thus $(r_1 + r_3) + r_4 = r_4 + (r_1 + r_3)$ by \cref{real_add_comm}.
                        Thus $u + (r_1 + r_3) = (r_1 + r_3) + u$ by \cref{real_add_comm}.
                        Hence $(r_1 + r_3) + r_4 \leq u + (r_1 + r_3)$ by \cref{real_leq_trans}.
                        Thus $(r_1 + r_3) + r_4 \leq (r_1 + r_3) + u$ by \cref{real_leq_trans}.
                        $r_1 + (r_3 + r_4) = (r_1 + r_3) + r_4$ by \cref{real_add_assoc}.
                        Therefore $r_1 + (r_3 + r_4) \leq (r_1 + r_3) + u$ by \cref{real_leq_trans}.
                        Hence $\rho((x,y)) \leq (r_1 + r_3) + u$ by \cref{real_leq_trans}.
                        Therefore $\rho((x,y)) \leq \rho((x,f_x)) + \rho((f_x,a_0)) + \rho((a_0,f_y)) + \rho((f_y,y))$
                            by \cref{real_add_assoc,real_add_comm}.
                    \end{subproof}
                    Show that $\rho((x,y)) \leq M$.
                    \begin{subproof}
                        Let $s_1 = \rho((x,f_x))$.
                        Let $s_2 = \rho((f_x,a_0))$.
                        Let $s_3 = \rho((a_0,f_y))$.
                        Let $s_4 = \rho((f_y,y))$.
                        We have $x\in X$ and $y\in X$ and $f_x\in A$ and $f_x\in X$ and $f_y\in A$ and $f_y\in X$ and $a_0\in A$ and $a_0\in X$
                            by \cref{elem_subseteq}.
                        $(x,y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(x,f_x)\in X\times X$ by \cref{times_tuple_intro}.
                        $(f_x,a_0)\in X\times X$ by \cref{times_tuple_intro}.
                        $(a_0,f_y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(f_y,y)\in X\times X$ by \cref{times_tuple_intro}.
                        We have $s_1\in\reals$ and $s_2\in\reals$ and $s_3\in\reals$ and $s_4\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $s_1 + s_2\in\reals$ and $s_3 + s_4\in\reals$ by \cref{real_add_closed}.
                        $1\in\reals$ by \cref{real_naturals_subset_reals,real_one_in_naturals,subseteq}.
                        Hence $s_2 = \rho((a_0,f_x))$ by \cref{metric_symmetric,metric_on,square_metric_is_metric}.
                        Therefore $s_1 \leq 1$ by \cref{real_lt_imp_leq}.
                        Hence $s_4 \leq 1$ by \cref{metric_symmetric,metric_on,square_metric_is_metric,real_lt_subst_left,real_lt_imp_leq}.
                        We have $s_2 \leq M_0$ and $s_3 \leq M_0$.
                        Therefore $M_0\in\reals$ by \cref{real_maximum,subseteq}.
                        $M_0 + 1\in\reals$ by \cref{real_add_closed}.
                        $(s_1 + s_2) + (s_3 + s_4)\in\reals$ by \cref{real_add_closed}.
                        $(M_0 + 1) + (M_0 + 1)\in\reals$ by \cref{real_add_closed}.
                        We have $\rho((x,y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((x,y)) \leq s_1 + s_2 + s_3 + s_4$.
                        Hence $s_1 + s_2 + s_3 + s_4 = (s_1 + s_2) + (s_3 + s_4)$ by \cref{real_add_assoc}.
                        Therefore $\rho((x,y)) \leq (s_1 + s_2) + (s_3 + s_4)$ by \cref{real_leq_trans}.
                        Hence $(s_1 + s_2) + (s_3 + s_4) \leq (M_0 + 1) + (M_0 + 1)$ by \cref{real_four_sum_bound}.
                        Thus $\rho((x,y)) \leq (M_0 + 1) + (M_0 + 1)$ by \cref{real_leq_trans}.
                        Therefore $\rho((x,y)) \leq M$.
                    \end{subproof}
                \end{subproof}
                Hence $M\in\reals$ by \cref{real_maximum,subseteq,real_naturals_subset_reals,real_one_in_naturals,real_add_closed}.
                Therefore $A$ is bounded in $X$ with respect to $\rho$ by \cref{metric_bounded}.
            
\end{byCase}
Claim: $A$ is bounded in $X$ with respect to $d$ or $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$.

Trivial.

Claim: If $A$ is closed in $X$ with respect to $T$ and $A$ is bounded in $X$ with respect to $d$ or $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$ then $A$ is compact with respect to $T_A$.

Assume $A$ is closed in $X$ with respect to $T$ and $A$ is bounded in $X$ with respect to $d$ or $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$.

Case. $A = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Claim: For all $C$ such that $C$ is an open covering of $A$ with respect to $T_A$ there exists $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $B$ is finite and $B$ is a covering of $A$.

Therefore $A$ is compact with respect to $T_A$ by Definition 247.

Case. $A \class{latex-symbol-tip latex-symbol-id-neq}{\neq} \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

$A$ is inhabited by Proposition 10.

Claim: $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$.
Case. $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$.
Claim: $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$.

Trivial.

Case. $A$ is bounded in $X$ with respect to $d$.

Take $M\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that for all $a_1,a_2\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $d((a_1,a_2)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$ by Definition 187.
For all $a_1,a_2\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_1,a_2)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$ by Lemma 23, Lemma 211, Lemma 216, Lemma 220, Lemma 247, Lemma 248, Proposition 4, Proposition 115, Proposition 346.
Hence $A$ is bounded in $X$ with respect to $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$ by Definition 187, Lemma 250.

LaTeX source
\begin{byCase}
                \caseOf{$A$ is bounded in $X$ with respect to $\rho$.}
                    Show that $A$ is bounded in $X$ with respect to $\rho$.
                    \begin{subproof}
                        Trivial.
                    \end{subproof}
                \caseOf{$A$ is bounded in $X$ with respect to $d$.}
                    Take $M\in\reals$ such that for all $a_1,a_2\in A$ we have $d((a_1,a_2)) \leq M$
                        by \cref{metric_bounded}.
                    For all $a_1,a_2\in A$ we have $\rho((a_1,a_2)) \leq M$
                        by \cref{elem_subseteq,euclidean_metric_value_exists,square_metric_value_exists,times_tuple_intro,euclidean_square_metric_bounds,euclidean_metric_function,square_metric_function,function_apply_intro,real_leq_trans}.
                    Hence $A$ is bounded in $X$ with respect to $\rho$ by \cref{square_metric_is_metric,metric_bounded}.
                
\end{byCase}

Take $M\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that for all $a_1,a_2\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((a_1,a_2)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$ by Definition 187.
Take $x_0$ such that $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Let $Y = \{(i,\intervalclosed{x_0(i) - M}{x_0(i) + M}) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J\}$.

Claim: For all $i,u,v$ such that $(i,u)\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ and $(i,v)\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ we have $u = v$.

Trivial.

Hence $Y$ is a function by Definition 12, Definition 51.
We have $\dom{Y} = J$ by Axiom 6, Definition 1, Proposition 3, Proposition 199, Proposition 200.

Claim: For all $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in} \productFamily{Y}$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

Claim: For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ we have $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in} \intervalclosed{x_0(i) - M}{x_0(i) + M}$.

Fix $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$.
We have $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\realsPower{J}$ and $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\realsPower{J}$ by Proposition 4.
$x_0(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 166, Definition 191, Proposition 361.
$\neg{x(i)}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 18.
$x_0(i) - x(i) = x_0(i) + \neg{x(i)}$ by Definition 64.
Therefore $x_0(i) - x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
Hence $\abs{x_0(i) - x(i)}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Lemma 34.
Take $m\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $((x_0,x),m)\class{latex-symbol-tip latex-symbol-id-in}{\in} \class{latex-symbol-tip latex-symbol-id-rho}{\rho}$ by Lemma 216.
We have $m\class{latex-symbol-tip latex-symbol-id-in}{\in}\coordDiffSet{n}{x_0}{x}$ and for all $t\class{latex-symbol-tip latex-symbol-id-in}{\in}\coordDiffSet{n}{x_0}{x}$ we have $t \class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$ by Axiom 6, Definition 197.
Therefore $\abs{x_0(i) - x(i)} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$ by Definition 196.
Hence $m \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$ by Lemma 23, Lemma 211, Proposition 346.
Therefore $\abs{x_0(i) - x(i)} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$ by Lemma 23.
Hence $\abs{x(i) - x_0(i)} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$ by Lemma 23, Proposition 482.
Therefore $M$ is nonnegative by Axiom 17, Lemma 23, Proposition 480.
Hence $x_0(i) - M \class{latex-symbol-tip latex-symbol-id-leq}{\leq} x(i)$ by Proposition 491.
Therefore $x(i) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} x_0(i) + M$ by Proposition 492.
Hence $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\intervalclosed{x_0(i) - M}{x_0(i) + M}$ by Definition 75.

Thus $x$ is a function to $\reals$ and $\dom{x} = \dom{Y}$ by Definition 1, Definition 166, Definition 191, Proposition 359.
For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y}$ we have $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{\ran{Y}}$ by Axiom 4, Definition 1, Proposition 209.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\dom{Y}}{\unions{\ran{Y}}}$ by Proposition 358.
For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y}$ we have $x(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\apply{Y}{i}$ by Axiom 6, Proposition 199, Proposition 346.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y}$ by Definition 167.

Hence $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \productFamily{Y}$ by Definition 1.
Let $T_Y = \{(i,\subspaceTopology{\standardTopologyR}{\intervalclosed{x_0(i) - M}{x_0(i) + M}}) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J\}$.

Claim: For all $i,u,v$ such that $(i,u)\class{latex-symbol-tip latex-symbol-id-in}{\in} T_Y$ and $(i,v)\class{latex-symbol-tip latex-symbol-id-in}{\in} T_Y$ we have $u = v$.

Trivial.

Therefore $T_Y$ is a function by Definition 12, Definition 51.
Hence $\dom{T_Y} = J$ by Axiom 6, Definition 1, Proposition 3, Proposition 199, Proposition 200.

Claim: For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ we have $\intervalclosed{x_0(i) - M}{x_0(i) + M}$ is compact with respect to $\subspaceTopology{\standardTopologyR}{\intervalclosed{x_0(i) - M}{x_0(i) + M}}$.

Fix $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$.
We have $x_0(i)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 166, Definition 191, Proposition 4, Proposition 361.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 17.
$\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$ is a metric on $X$ by Lemma 250.
Hence $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}$ is nonnegative on $X$ by Definition 179.
Therefore $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Proposition 4.
$(x_0,x_0)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x_0,x_0))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 179, Proposition 361.
We have $\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x_0,x_0)) \class{latex-symbol-tip latex-symbol-id-geq}{\geq} 0$ by Definition 175.
$\class{latex-symbol-tip latex-symbol-id-rho}{\rho}((x_0,x_0)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$.
Therefore $0 \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$ by Lemma 23.
$\neg{M}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $\neg{0}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 18.
$0 + \neg{0} = 0$ and $0 + \neg{0} = \neg{0}$ by Axiom 17, Axiom 18.
We have $\neg{0} = 0$.
Therefore $\neg{M} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0$ by Lemma 22, Lemma 23.
Hence $\neg{M} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M$ by Lemma 23.
Therefore $\neg{M} + x_0(i) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} M + x_0(i)$ by Lemma 24.
$x_0(i) + \neg{M} = \neg{M} + x_0(i)$ and $x_0(i) + M = M + x_0(i)$ by Axiom 16.
Hence $x_0(i) + \neg{M} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} x_0(i) + M$ by Lemma 23.
$x_0(i) + M\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$x_0(i) - M = x_0(i) + \neg{M}$ by Definition 64.
$x_0(i) - M\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
Therefore $x_0(i) - M \class{latex-symbol-tip latex-symbol-id-leq}{\leq} x_0(i) + M$ by Definition 64.
Hence $\intervalclosed{x_0(i) - M}{x_0(i) + M}$ is compact with respect to $\subspaceTopology{\standardTopologyR}{\intervalclosed{x_0(i) - M}{x_0(i) + M}}$ by Lemma 365.

For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ we have $\apply{T_Y}{i}$ is a topology on $\apply{Y}{i}$ by Definition 1, Definition 75, Definition 118, Lemma 76, Lemma 93, Lemma 131, Proposition 346.
For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ we have $\apply{Y}{i}$ is compact with respect to $\apply{T_Y}{i}$ by Definition 1, Proposition 346.
Therefore $\productFamily{Y}$ is compact with respect to $\productTopologyIndexed{T_Y}{Y}$ by Lemma 370.
Let $T_{P0} = \productTopologyIndexed{T_Y}{Y}$.
Let $T_{Y0} = \subspaceTopology{T}{\productFamily{Y}}$.
Let $X_1 = \{(i,\reals) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J\}$.
Let $T_1 = \{(i,\standardTopologyR) \mid i\class{latex-symbol-tip latex-symbol-id-in}{\in} J\}$.
Let $T_0 = \productTopologyIndexed{T_1}{X_1}$.
Hence $T = T_0$ by Lemma 371, Theorem 24.
$X_1$ is a function and $T_1$ is a function and $\dom{X_1} = J$ and $\dom{T_1} = J$ by Lemma 372.
Therefore $\dom{X_1}$ is inhabited by Axiom 42, Axiom 43, Definition 1, Definition 84.
For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{X_1}$ we have $\apply{Y}{i}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\apply{X_1}{i}$ by Definition 1, Definition 75, Proposition 6, Proposition 346.
For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{X_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{X_1}{i}$ by Definition 1, Definition 118, Lemma 76, Lemma 93, Proposition 346.
Hence $\productFamily{Y}$ is a subspace of $\productFamily{X_1}$ with respect to $T$ by Lemma 186.
Let $j = \identity{\productFamily{Y}}$.
Therefore $\dom{Y}$ is inhabited by Axiom 42, Axiom 43, Definition 1, Definition 84.
For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{Y}$ we have $\apply{T_Y}{i}$ is a topology on $\apply{Y}{i}$ by Definition 1, Definition 75, Definition 118, Lemma 76, Lemma 93, Lemma 131, Proposition 346.
Therefore $T_{P0}$ is a topology on $\productFamily{Y}$ by Definition 115, Lemma 76, Lemma 177.
Hence $\productFamily{X_1} = X$ by Lemma 209.
We have $\productFamily{Y}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 147, Proposition 6.
$j\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\productFamily{Y}}{X}$ by Proposition 360, Proposition 406.

Claim: For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{X_1}$ we have $\piIndex{X_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} j$ is continuous from $\productFamily{Y}$ to $\apply{X_1}{i}$ with respect to $T_{P0}$ and $\apply{T_1}{i}$.

Fix $i$ such that $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{X_1}$.
Let $g = \piIndex{Y}{i}$.
Let $k = \identity{\apply{Y}{i}}$.
$k$ is continuous from $\apply{Y}{i}$ to $\apply{X_1}{i}$ with respect to $\apply{T_Y}{i}$ and $\apply{T_1}{i}$ by Definition 1, Definition 147, Lemma 164, Proposition 346.
$g$ is continuous from $\productFamily{Y}$ to $\apply{Y}{i}$ with respect to $T_{P0}$ and $\apply{T_Y}{i}$ by Lemma 366.
Therefore $k\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g$ is continuous from $\productFamily{Y}$ to $\apply{X_1}{i}$ with respect to $T_{P0}$ and $\apply{T_1}{i}$ by Lemma 165.

Claim: $k\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g = \piIndex{X_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} j$.
Claim: For all $y,z$ if $y\mathrel{k\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g} z$ then $y\mathrel{\piIndex{X_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} j} z$.
Claim: For all $y,z$ if $y\mathrel{\piIndex{X_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} j} z$ then $y\mathrel{k\class{latex-symbol-tip latex-symbol-id-circ}{\circ} g} z$.

Follows by set extensionality.

Hence $\piIndex{X_1}{i}\class{latex-symbol-tip latex-symbol-id-circ}{\circ} j$ is continuous from $\productFamily{Y}$ to $\apply{X_1}{i}$ with respect to $T_{P0}$ and $\apply{T_1}{i}$ by Lemma 367.

Therefore $j$ is continuous from $\productFamily{Y}$ to $\productFamily{X_1}$ with respect to $T_{P0}$ and $T_0$ by Lemma 193.
Hence $j$ is continuous from $\productFamily{Y}$ to $X$ with respect to $T_{P0}$ and $T$ by Lemma 368.

Claim: For all $U$ such that $U\class{latex-symbol-tip latex-symbol-id-in}{\in} T_{Y0}$ we have $U\class{latex-symbol-tip latex-symbol-id-in}{\in} T_{P0}$.

Fix $U$ such that $U\class{latex-symbol-tip latex-symbol-id-in}{\in} T_{Y0}$.
Take $V\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ such that $U = \productFamily{Y}\inter V$ by Definition 146.
Let $j_0 = \identity{\productFamily{Y}}$.
Thus $V$ is open in $X$ with respect to $T$ by Definition 103, Definition 160.
Hence $\preimg{j_0}{V}$ is open in $\productFamily{Y}$ with respect to $T_{P0}$ by Definition 160.

Claim: $\preimg{j_0}{V} = \productFamily{Y}\inter V$.
Claim: For all $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\preimg{j_0}{V}$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y}\inter V$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\preimg{j_0}{V}$.
Take $v$ such that $v\class{latex-symbol-tip latex-symbol-id-in}{\in} V$ and $(x,v)\class{latex-symbol-tip latex-symbol-id-in}{\in} j_0$ by Proposition 246.
Thus $x = v$ and $v\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y}$ by Proposition 293.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y}$ and $x\class{latex-symbol-tip latex-symbol-id-in}{\in} V$.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y}\inter V$ by Proposition 61.

Hence $\preimg{j_0}{V}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \productFamily{Y}\inter V$ by Definition 1.

Claim: For all $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y}\inter V$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\preimg{j_0}{V}$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y}\inter V$.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\productFamily{Y}$ and $x\class{latex-symbol-tip latex-symbol-id-in}{\in} V$ by Definition 5.
Hence $(x,x)\class{latex-symbol-tip latex-symbol-id-in}{\in} j_0$ by Proposition 293.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\preimg{j_0}{V}$ by Proposition 246.

Hence $\productFamily{Y}\inter V\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \preimg{j_0}{V}$ by Definition 1.
Follows by Proposition 3.

Hence $U\class{latex-symbol-tip latex-symbol-id-in}{\in} T_{P0}$ by Definition 103.

Hence $T_{Y0}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} T_{P0}$ by Definition 1.
For all $C$ such that $C$ is an open covering of $\productFamily{Y}$ with respect to $T_{Y0}$ there exists $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $B$ is finite and $B$ is a covering of $\productFamily{Y}$ by Definition 1, Definition 103, Definition 246, Definition 247.
Therefore $\productFamily{Y}$ is compact with respect to $T_{Y0}$ by Definition 247.
We have $T$ is a topology on $X$ by Definition 115, Definition 182, Lemma 76, Lemma 194, Lemma 250.
$\productFamily{Y}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 1, Definition 75, Definition 166, Definition 167, Definition 191, Proposition 346, Proposition 358, Proposition 359.
Thus $\productFamily{Y}$ is a subspace of $X$ with respect to $T$ by Definition 147.
We have $A = A\inter\productFamily{Y}$ by Definition 1, Proposition 69.
Thus $A$ is closed in $\productFamily{Y}$ with respect to $T_{Y0}$ by Definition 147, Theorem 8.
Therefore $T$ is a topology on $X$ and $\productFamily{Y}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 147.
Thus $T_{Y0}$ is a topology on $\productFamily{Y}$ by Lemma 131.
Hence $A$ is compact with respect to $T_A$ by Lemma 307, Theorem 59.

LaTeX source
\begin{byCase}
            \caseOf{$A = \emptyset$.}
                Show that for all $C$ such that $C$ is an open covering of $A$ with respect to $T_A$ there exists $B$ such that
                    $B\subseteq C$ and $B$ is finite and $B$ is a covering of $A$.
                \begin{subproof}
                    Follows by \cref{emptyset_is_finite,emptyset_subseteq,covering}.
                \end{subproof}
            Therefore $A$ is compact with respect to $T_A$ by \cref{compact}.
        \caseOf{$A \neq \emptyset$.}
            $A$ is inhabited by \cref{nonempty_inhabited}.
            Show that $A$ is bounded in $X$ with respect to $\rho$.
            \begin{subproof}
                \begin{byCase}
                \caseOf{$A$ is bounded in $X$ with respect to $\rho$.}
                    Show that $A$ is bounded in $X$ with respect to $\rho$.
                    \begin{subproof}
                        Trivial.
                    \end{subproof}
                \caseOf{$A$ is bounded in $X$ with respect to $d$.}
                    Take $M\in\reals$ such that for all $a_1,a_2\in A$ we have $d((a_1,a_2)) \leq M$
                        by \cref{metric_bounded}.
                    For all $a_1,a_2\in A$ we have $\rho((a_1,a_2)) \leq M$
                        by \cref{elem_subseteq,euclidean_metric_value_exists,square_metric_value_exists,times_tuple_intro,euclidean_square_metric_bounds,euclidean_metric_function,square_metric_function,function_apply_intro,real_leq_trans}.
                    Hence $A$ is bounded in $X$ with respect to $\rho$ by \cref{square_metric_is_metric,metric_bounded}.
                \end{byCase}
            \end{subproof}
            Take $M\in\reals$ such that for all $a_1,a_2\in A$ we have $\rho((a_1,a_2)) \leq M$
                by \cref{metric_bounded}.
            Take $x_0$ such that $x_0\in A$.
            Let $Y = \{(i,\intervalclosed{x_0(i) - M}{x_0(i) + M}) \mid i\in J\}$.
            Show that for all $i,u,v$ such that $(i,u)\in Y$ and $(i,v)\in Y$ we have $u = v$.
            \begin{subproof}
                Trivial.
            \end{subproof}
            Hence $Y$ is a function by \cref{relation,rightunique}.
            We have $\dom{Y} = J$ by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
            Show that for all $x$ such that $x\in A$ we have $x\in \productFamily{Y}$.
            \begin{subproof}
                Fix $x$ such that $x\in A$.
                Show that for all $i\in J$ we have $x(i)\in \intervalclosed{x_0(i) - M}{x_0(i) + M}$.
                \begin{subproof}
                    Fix $i$ such that $i\in J$.
                    We have $x_0\in\realsPower{J}$ and $x\in\realsPower{J}$ by \cref{elem_subseteq}.
                    $x_0(i)\in\reals$ and $x(i)\in\reals$ by \cref{reals_power,tuple_power,funs_type_apply}.
                    $\neg{x(i)}\in\reals$ by \cref{real_add_inverse}.
                    $x_0(i) - x(i) = x_0(i) + \neg{x(i)}$ by \cref{real_sub}.
                    Therefore $x_0(i) - x(i)\in\reals$ by \cref{real_add_closed}.
                    Hence $\abs{x_0(i) - x(i)}\in\reals$ by \cref{real_abs_in_reals}.
                    Take $m\in\reals$ such that $((x_0,x),m)\in \rho$ by \cref{square_metric_value_exists}.
                    We have $m\in\coordDiffSet{n}{x_0}{x}$ and for all $t\in\coordDiffSet{n}{x_0}{x}$ we have $t \leq m$
                        by \cref{square_metric,pair_eq_iff}.
                    Therefore $\abs{x_0(i) - x(i)} \leq m$ by \cref{coord_diff_set}.
                    Hence $m \leq M$ by \cref{square_metric_function,function_apply_intro,real_leq_trans}.
                    Therefore $\abs{x_0(i) - x(i)} \leq M$ by \cref{real_leq_trans}.
                    Hence $\abs{x(i) - x_0(i)} \leq M$ by \cref{real_abs_sub_swap,real_leq_trans}.
                    Therefore $M$ is nonnegative by \cref{real_abs_nonnegative,real_add_ident,real_leq_trans}.
                    Hence $x_0(i) - M \leq x(i)$ by \cref{real_abs_sub_leq_imp_left_bound}.
                    Therefore $x(i) \leq x_0(i) + M$ by \cref{real_abs_sub_leq_imp_right_bound}.
                    Hence $x(i)\in\intervalclosed{x_0(i) - M}{x_0(i) + M}$ by \cref{intervalclosed}.
                \end{subproof}
                Thus $x$ is a function to $\reals$ and $\dom{x} = \dom{Y}$ by \cref{subseteq,reals_power,tuple_power,funs_elim}.
                For all $i\in\dom{Y}$ we have $x(i)\in\unions{\ran{Y}}$ by \cref{subseteq,ran_intro,unions_iff}.
                Hence $x\in\funs{\dom{Y}}{\unions{\ran{Y}}}$ by \cref{funs_intro}.
                For all $i\in\dom{Y}$ we have $x(i)\in\apply{Y}{i}$ by \cref{dom_iff,pair_eq_iff,function_apply_intro}.
                Hence $x\in\productFamily{Y}$ by \cref{indexed_product}.
            \end{subproof}
            Hence $A\subseteq \productFamily{Y}$ by \cref{subseteq}.
            Let $T_Y = \{(i,\subspaceTopology{\standardTopologyR}{\intervalclosed{x_0(i) - M}{x_0(i) + M}}) \mid i\in J\}$.
            Show that for all $i,u,v$ such that $(i,u)\in T_Y$ and $(i,v)\in T_Y$ we have $u = v$.
            \begin{subproof}
                Trivial.
            \end{subproof}
            Therefore $T_Y$ is a function by \cref{relation,rightunique}.
            Hence $\dom{T_Y} = J$ by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
            
            Show that for all $i\in J$ we have $\intervalclosed{x_0(i) - M}{x_0(i) + M}$ is compact
                with respect to $\subspaceTopology{\standardTopologyR}{\intervalclosed{x_0(i) - M}{x_0(i) + M}}$.
            \begin{subproof}
                Fix $i$ such that $i\in J$.
                We have $x_0(i)\in\reals$ by \cref{elem_subseteq,reals_power,tuple_power,funs_type_apply}.
                $0\in\reals$ by \cref{real_add_ident}.
                $\rho$ is a metric on $X$ by \cref{square_metric_is_metric}.
                Hence $\rho$ is nonnegative on $X$ by \cref{metric_on}.
                Therefore $x_0\in X$ by \cref{elem_subseteq}.
                $(x_0,x_0)\in X\times X$ by \cref{times_tuple_intro}.
                $\rho((x_0,x_0))\in\reals$ by \cref{metric_on,funs_type_apply}.
                We have $\rho((x_0,x_0)) \geq 0$ by \cref{metric_nonnegative}.
                $\rho((x_0,x_0)) \leq M$.
                Therefore $0 \leq M$ by \cref{real_leq_trans}.
                $\neg{M}\in\reals$ and $\neg{0}\in\reals$ by \cref{real_add_inverse}.
                $0 + \neg{0} = 0$ and $0 + \neg{0} = \neg{0}$ by \cref{real_add_inverse,real_add_ident}.
                We have $\neg{0} = 0$.
                Therefore $\neg{M} \leq 0$ by \cref{real_leq_neg,real_leq_trans}.
                Hence $\neg{M} \leq M$ by \cref{real_leq_trans}.
                Therefore $\neg{M} + x_0(i) \leq M + x_0(i)$ by \cref{real_leq_add}.
                $x_0(i) + \neg{M} = \neg{M} + x_0(i)$ and $x_0(i) + M = M + x_0(i)$ by \cref{real_add_comm}.
                Hence $x_0(i) + \neg{M} \leq x_0(i) + M$ by \cref{real_leq_trans}.
                $x_0(i) + M\in\reals$ by \cref{real_add_closed}.
                $x_0(i) - M = x_0(i) + \neg{M}$ by \cref{real_sub}.
                $x_0(i) - M\in\reals$ by \cref{real_add_closed}.
                Therefore $x_0(i) - M \leq x_0(i) + M$ by \cref{real_sub}.
                Hence $\intervalclosed{x_0(i) - M}{x_0(i) + M}$ is compact
                    with respect to $\subspaceTopology{\standardTopologyR}{\intervalclosed{x_0(i) - M}{x_0(i) + M}}$
                    by \cref{real_intervalclosed_compact_standard}.
            \end{subproof}
            For all $i\in J$ we have $\apply{T_Y}{i}$ is a topology on $\apply{Y}{i}$
                by \cref{subseteq,function_apply_intro,standard_basis_is_basis,basis_topology_is_topology,standard_topology_reals,intervalclosed,subspace_topology_is_topology}.
            For all $i\in J$ we have $\apply{Y}{i}$ is compact with respect to $\apply{T_Y}{i}$
                by \cref{subseteq,function_apply_intro}.
            Therefore $\productFamily{Y}$ is compact with respect to $\productTopologyIndexed{T_Y}{Y}$ by \cref{compact_indexed_product_initial_segment}.
            Let $T_{P0} = \productTopologyIndexed{T_Y}{Y}$.
            Let $T_{Y0} = \subspaceTopology{T}{\productFamily{Y}}$.
            Let $X_1 = \{(i,\reals) \mid i\in J\}$.
            Let $T_1 = \{(i,\standardTopologyR) \mid i\in J\}$.
            Let $T_0 = \productTopologyIndexed{T_1}{X_1}$.
            Hence $T = T_0$ by \cref{euclidean_metric_product_topology,square_metric_topology_equals_euclidean}.
            $X_1$ is a function and $T_1$ is a function and $\dom{X_1} = J$ and $\dom{T_1} = J$
                by \cref{reals_standard_indexed_families_data}.
            Therefore $\dom{X_1}$ is inhabited by \cref{real_one_in_naturals,real_one_leq_naturalsplus,initial_segment_naturalsplus,subseteq}.
            For all $i\in\dom{X_1}$ we have $\apply{Y}{i}\subseteq\apply{X_1}{i}$
                by \cref{subseteq,function_apply_intro,intervalclosed,subseteq_transitive}.
            For all $i\in\dom{X_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{X_1}{i}$
                by \cref{subseteq,function_apply_intro,standard_basis_is_basis,basis_topology_is_topology,standard_topology_reals}.
            Hence $\productFamily{Y}$ is a subspace of $\productFamily{X_1}$ with respect to $T$ by \cref{product_subspace_product}.
            Let $j = \identity{\productFamily{Y}}$.
            Therefore $\dom{Y}$ is inhabited by \cref{real_one_in_naturals,real_one_leq_naturalsplus,initial_segment_naturalsplus,subseteq}.
            For all $i\in\dom{Y}$ we have $\apply{T_Y}{i}$ is a topology on $\apply{Y}{i}$
                by \cref{subseteq,function_apply_intro,standard_basis_is_basis,basis_topology_is_topology,standard_topology_reals,intervalclosed,subspace_topology_is_topology}.
            Therefore $T_{P0}$ is a topology on $\productFamily{Y}$
                by \cref{product_subbasis_finite_intersections_basis,basis_for_topology,basis_topology_is_topology}.
            Hence $\productFamily{X_1} = X$ by \cref{product_family_reals_power}.
            We have $\productFamily{Y}\subseteq X$ by \cref{subspace_of,subseteq_transitive}.
            $j\in\funs{\productFamily{Y}}{X}$ by \cref{id_elem_funs,funs_weaken_codom}.
            Show that for all $i\in\dom{X_1}$ we have $\piIndex{X_1}{i}\circ j$ is continuous from $\productFamily{Y}$
                to $\apply{X_1}{i}$ with respect to $T_{P0}$ and $\apply{T_1}{i}$.
            \begin{subproof}
                Fix $i$ such that $i\in\dom{X_1}$.
                Let $g = \piIndex{Y}{i}$.
                Let $k = \identity{\apply{Y}{i}}$.
                $k$ is continuous from $\apply{Y}{i}$ to $\apply{X_1}{i}$ with respect to $\apply{T_Y}{i}$ and $\apply{T_1}{i}$
                    by \cref{subseteq,subspace_of,function_apply_intro,inclusion_continuous}.
                $g$ is continuous from $\productFamily{Y}$ to $\apply{Y}{i}$ with respect to $T_{P0}$ and $\apply{T_Y}{i}$
                    by \cref{projection_map_indexed_continuous}.
                Therefore $k\circ g$ is continuous from $\productFamily{Y}$ to $\apply{X_1}{i}$ with respect to $T_{P0}$ and $\apply{T_1}{i}$
                    by \cref{continuous_composite}.
                Show that $k\circ g = \piIndex{X_1}{i}\circ j$.
                \begin{subproof}
                    Show that for all $y,z$ if $y\mathrel{k\circ g} z$ then $y\mathrel{\piIndex{X_1}{i}\circ j} z$.
                    \begin{subproof}
                        Follows by \cref{circ_iff,id_iff,projection_map_indexed,pair_eq_iff,subspace_of,subseteq}.
                    \end{subproof}
                    Show that for all $y,z$ if $y\mathrel{\piIndex{X_1}{i}\circ j} z$ then $y\mathrel{k\circ g} z$.
                    \begin{subproof}
                        Follows by \cref{circ_iff,id_iff,projection_map_indexed,pair_eq_iff,subseteq,indexed_product}.
                    \end{subproof}
                    Follows by set extensionality.
                \end{subproof}
                Hence $\piIndex{X_1}{i}\circ j$ is continuous from $\productFamily{Y}$ to $\apply{X_1}{i}$ with respect to $T_{P0}$ and $\apply{T_1}{i}$
                    by \cref{continuous_eq_subst}.
            \end{subproof}
            Therefore $j$ is continuous from $\productFamily{Y}$ to $\productFamily{X_1}$ with respect to $T_{P0}$ and $T_0$
                by \cref{continuous_map_into_indexed_product}.
            Hence $j$ is continuous from $\productFamily{Y}$ to $X$ with respect to $T_{P0}$ and $T$ by \cref{continuous_eq_codomain}.
            Show that for all $U$ such that $U\in T_{Y0}$ we have $U\in T_{P0}$.
            \begin{subproof}
                Fix $U$ such that $U\in T_{Y0}$.
                Take $V\in T$ such that $U = \productFamily{Y}\inter V$ by \cref{subspace_topology}.
                Let $j_0 = \identity{\productFamily{Y}}$.
                Thus $V$ is open in $X$ with respect to $T$ by \cref{continuous,open_in}.
                Hence $\preimg{j_0}{V}$ is open in $\productFamily{Y}$ with respect to $T_{P0}$ by \cref{continuous}.
                Show that $\preimg{j_0}{V} = \productFamily{Y}\inter V$.
                \begin{subproof}
                    Show that for all $x$ such that $x\in\preimg{j_0}{V}$ we have $x\in\productFamily{Y}\inter V$.
                    \begin{subproof}
                        Fix $x$ such that $x\in\preimg{j_0}{V}$.
                        Take $v$ such that $v\in V$ and $(x,v)\in j_0$ by \cref{preimg_iff}.
                        Thus $x = v$ and $v\in\productFamily{Y}$ by \cref{id_iff}.
                        Hence $x\in\productFamily{Y}$ and $x\in V$.
                        Thus $x\in\productFamily{Y}\inter V$ by \cref{inter_intro}.
                    \end{subproof}
                    Hence $\preimg{j_0}{V}\subseteq \productFamily{Y}\inter V$ by \cref{subseteq}.
                    Show that for all $x$ such that $x\in\productFamily{Y}\inter V$ we have $x\in\preimg{j_0}{V}$.
                    \begin{subproof}
                        Fix $x$ such that $x\in\productFamily{Y}\inter V$.
                        Thus $x\in\productFamily{Y}$ and $x\in V$ by \cref{inter}.
                        Hence $(x,x)\in j_0$ by \cref{id_iff}.
                        Thus $x\in\preimg{j_0}{V}$ by \cref{preimg_iff}.
                    \end{subproof}
                    Hence $\productFamily{Y}\inter V\subseteq \preimg{j_0}{V}$ by \cref{subseteq}.
                    Follows by \cref{subseteq_antisymmetric}.
                \end{subproof}
                Hence $U\in T_{P0}$ by \cref{open_in}.
            \end{subproof}
            Hence $T_{Y0}\subseteq T_{P0}$ by \cref{subseteq}.
            For all $C$ such that $C$ is an open covering of $\productFamily{Y}$ with respect to $T_{Y0}$ there exists $B$ such that
                $B\subseteq C$ and $B$ is finite and $B$ is a covering of $\productFamily{Y}$
                by \cref{open_covering,open_in,subseteq,compact}.
            Therefore $\productFamily{Y}$ is compact with respect to $T_{Y0}$ by \cref{compact}.
            We have $T$ is a topology on $X$ by \cref{square_metric_is_metric,metric_basis_is_basis,basis_topology_is_topology,metric_topology,basis_for_topology}.
            $\productFamily{Y}\subseteq X$
                by \cref{indexed_product,funs_elim,subseteq,function_apply_intro,intervalclosed,funs_intro,tuple_power,reals_power}.
            Thus $\productFamily{Y}$ is a subspace of $X$ with respect to $T$ by \cref{subspace_of}.
            We have $A = A\inter\productFamily{Y}$ by \cref{subseteq,inter_absorb_supseteq_right}.
            Thus $A$ is closed in $\productFamily{Y}$ with respect to $T_{Y0}$ by \cref{closed_in_subspace_iff,subspace_of}.
            Therefore $T$ is a topology on $X$ and $\productFamily{Y}\subseteq X$ by \cref{subspace_of}.
            Thus $T_{Y0}$ is a topology on $\productFamily{Y}$ by \cref{subspace_topology_is_topology}.
            Hence $A$ is compact with respect to $T_A$ by \cref{closed_subspace_compact,subspace_subspace_topology}.
        
\end{byCase}
LaTeX source
\begin{proof}
    Let $X_0 = X$.
    Let $d_1 = \rho$.
    Show that if $A$ is compact with respect to $T_A$ then
        $A$ is closed in $X$ with respect to $T$ and
        $A$ is bounded in $X$ with respect to $d$ or $A$ is bounded in $X$ with respect to $\rho$.
    \begin{subproof}
        Assume $A$ is compact with respect to $T_A$.
        $d_1$ is a metric on $X$ by \cref{square_metric_is_metric}.
        $T$ is a topology on $X$ by \cref{basis_topology_is_topology,metric_topology,metric_basis_is_basis,basis_for_topology}.
        Let $T_S = \metricTopology{d_1}{X_0}$.
        Let $X_1 = \{(i,\reals) \mid i\in J\}$.
        Let $T_1 = \{(i,\standardTopologyR) \mid i\in J\}$.
        Let $T_0 = \productTopologyIndexed{T_1}{X_1}$.
        $d$ is a metric on $X_0$ and $d_1$ is a metric on $X_0$ by \cref{euclidean_metric_is_metric,square_metric_is_metric}.
        Hence $J$ is inhabited by \cref{real_one_in_naturals,real_one_leq_naturalsplus,initial_segment_naturalsplus}.
        $X_1$ is a function and $T_1$ is a function and $\dom{X_1} = J$ and $\dom{T_1} = J$
            by \cref{reals_standard_indexed_families_data}.
        For all $\alpha\in\dom{X_1}$ we have $\apply{X_1}{\alpha} = \reals$ and $\apply{T_1}{\alpha} = \standardTopologyR$
            by \cref{subseteq,function_apply_intro}.
        $\realOrderTopology = \standardTopologyR$ and $\realOrderTopology = \basisTopology{\orderBasis{\realOrderRel}{\reals}}{\reals}$
            by \cref{real_order_topology_eq_standard,real_order_topology}.
        $\realOrderRel$ is a simple order relation on $\reals$ by \cref{real_order_relation_simple}.
        $\reals$ has more than one element by \cref{linear_continuum,reals_linear_continuum}.
        Hence $\realOrderTopology$ is the order topology on $\reals$ with respect to $\realOrderRel$ by \cref{order_topology}.
        Therefore for all $\alpha\in\dom{X_1}$ we have $\apply{X_1}{\alpha}$ is Hausdorff with respect to $\apply{T_1}{\alpha}$
            by \cref{order_topology_hausdorff,real_order_topology_eq_standard}.
        Hence $X_0$ is Hausdorff with respect to $T_0$ by \cref{product_hausdorff_product,product_family_reals_power}.
        Therefore $T_S = T_0$ by \cref{square_metric_topology_equals_euclidean,euclidean_metric_product_topology}.
        Hence $X$ is Hausdorff with respect to $T$.
        Show that $A$ is closed in $X$ with respect to $T$.
        \begin{subproof}
            Follows by \cref{compact_subspace_closed}.
        \end{subproof}
        Show that $A$ is bounded in $X$ with respect to $\rho$.
        \begin{subproof}
            \begin{byCase}
            \caseOf{$A = \emptyset$.}
                Let $M = 0$.
                For all $a_1,a_2\in A$ we have $\rho((a_1,a_2)) \leq M$
                    by \cref{subseteq_emptyset_iff,elem_subseteq,emptyset}.
                Thus $A$ is bounded in $X$ with respect to $\rho$ by \cref{real_add_ident,metric_bounded}.
            \caseOf{$A \neq \emptyset$.}
                $A$ is inhabited by \cref{nonempty_inhabited}.
                Let $C = \{\metricBall{\rho}{X}{a}{1} \mid a\in A\}$.
                For all $U$ such that $U\in C$ we have $U$ is open in $X$ with respect to $T$
                    by \cref{real_naturals_subset_reals,real_one_in_naturals,subseteq,real_zero_lt_one,metric_ball,powerset_intro,metric_basis,metric_basis_is_basis,basis_elem_open_in_generated,metric_topology,basis_for_topology,open_in}.
                Hence $C$ is a covering of $A$
                    by \cref{subseteq,covering,square_metric_is_metric,metric_zero_characterization,metric_on,real_zero_lt_one,real_lt_subst_left,metric_ball,unions_iff}.
                $A$ is a subspace of $X$ with respect to $T$ by \cref{subspace_of}.
                Thus there exists $B$ such that
                    $B\subseteq C$ and
                    $B$ is finite and
                    $B$ is a covering of $A$
                    by \cref{compact_subspace_open_covering}.
                Let $R = \{w\in B\times A \mid \fst{w} = \metricBall{\rho}{X}{\snd{w}}{1}\}$.
                Hence $R$ is a relation by \cref{times_elem_is_tuple,relation}.
                Show that for all $U\in B$ there exists $a$ such that $U\mathrel{R} a$.
                \begin{subproof}
                    Fix $U$ such that $U\in B$.
                    We have $U\in C$ by \cref{subseteq}.
                    Take $a\in A$ such that $U = \metricBall{\rho}{X}{a}{1}$.
                    Therefore $(U,a)\in B\times A$ by \cref{times_tuple_intro}.
                    Hence $\fst{(U,a)} = U$ and $\snd{(U,a)} = a$ by \cref{fst_eq,snd_eq}.
                    Therefore $(U,a)\in R$.
                    Hence $U\mathrel{R} a$.
                \end{subproof}
                Take $g$ such that $g$ is a function on $B$ and for all $U\in B$ we have $U\mathrel{R}\apply{g}{U}$
                    by \cref{axiom_of_choice}.
                Let $F = \img{g}{B}$.
                $F$ is finite by \cref{finite_image_function}.
                Hence $F\subseteq A$ by \cref{subseteq,img_iff,function_apply_intro,subseteq,times_tuple_elim}.
                Take $a_0$ such that $a_0\in A$.
                Thus $a_0\in\unions{B}$ by \cref{covering,subseteq}.
                Take $U_0\in B$ such that $a_0\in U_0$ by \cref{unions_iff}.
                Take $f_0$ such that $f_0\in F$ by \cref{subseteq,function_apply_elim,img_iff}.
                Let $h = \{(f,\rho((a_0,f))) \mid f\in F\}$.
                $h$ is a relation by \cref{relation}.
                For all $x,y_1,y_2$ such that $(x,y_1)\in h$ and $(x,y_2)\in h$ we have $y_1 = y_2$
                    by \cref{pair_eq_iff}.
                Hence $h$ is right-unique by \cref{rightunique}.
                For all $f$ such that $f\in F$ we have $f\in\dom{h}$.
                For all $f$ such that $f\in\dom{h}$ we have $f\in F$ by \cref{dom_iff,pair_eq_iff}.
                Therefore $\dom{h} = F$ by \cref{subseteq,subseteq_antisymmetric}.
                Hence $h$ is a function on $F$.
                Let $D = \img{h}{F}$.
                $D$ is finite by \cref{finite_image_function}.
                For all $r$ such that $r\in D$ we have $r\in\reals$
                    by \cref{img_iff,subseteq,times_tuple_intro,metric_on,funs_type_apply,square_metric_is_metric,pair_eq_iff}.
                Hence $D\subseteq\reals$ by \cref{subseteq}.
                Take $f_1$ such that $f_1\in F$.
                Thus $(f_1,\rho((a_0,f_1)))\in h$.
                Therefore $D\neq\emptyset$ by \cref{img_iff,nonempty_inhabited,inhabited_nonempty}.
                Take $M_0\in D$ such that $M_0$ is a maximum of $D$ by \cref{finite_real_maximum}.
                Let $M = (M_0 + 1) + (M_0 + 1)$.
                Show that for all $x,y\in A$ we have $\rho((x,y)) \leq M$.
                \begin{subproof}
                    Fix $x$.
                    Fix $y$ such that $x\in A$ and $y\in A$.
                    Take $U_x\in B$ such that $x\in U_x$ by \cref{covering,subseteq,unions_iff}.
                    Take $U_y\in B$ such that $y\in U_y$ by \cref{covering,subseteq,unions_iff}.
                    Let $f_x = g(U_x)$.
                    Let $f_y = g(U_y)$.
                    $U_x\mathrel{R} f_x$ by \cref{function_apply_elim}.
                    $U_y\mathrel{R} f_y$ by \cref{function_apply_elim}.
                    We have $(U_x,f_x)\in R$.
                    Therefore $(U_x,f_x)\in B\times A$.
                    $\fst{(U_x,f_x)} = \metricBall{\rho}{X}{\snd{(U_x,f_x)}}{1}$.
                    Hence $U_x = \metricBall{\rho}{X}{f_x}{1}$ by \cref{fst_eq,snd_eq}.
                    We have $(U_y,f_y)\in R$.
                    Therefore $(U_y,f_y)\in B\times A$.
                    $\fst{(U_y,f_y)} = \metricBall{\rho}{X}{\snd{(U_y,f_y)}}{1}$.
                    Hence $U_y = \metricBall{\rho}{X}{f_y}{1}$ by \cref{fst_eq,snd_eq}.
                    Hence $x\in \metricBall{\rho}{X}{f_x}{1}$.
                    Thus $x\in X$ and $\rho((f_x,x)) < 1$ by \cref{metric_ball}.
                    Thus $f_x\in A$ and $f_x\in X$ by \cref{subseteq,times_tuple_elim}.
                    Therefore $\rho((x,f_x)) < 1$
                        by \cref{metric_symmetric,metric_on,square_metric_is_metric,real_lt_subst_left}.
                    Hence $y\in \metricBall{\rho}{X}{f_y}{1}$.
                    Thus $y\in X$ and $\rho((f_y,y)) < 1$ by \cref{metric_ball}.
                    Thus $f_y\in A$ and $f_y\in X$ by \cref{subseteq,times_tuple_elim}.
                    Therefore $\rho((y,f_y)) < 1$
                        by \cref{metric_symmetric,metric_on,square_metric_is_metric,real_lt_subst_left}.
                    Hence $f_x\in F$ and $f_y\in F$ by \cref{subseteq,function_apply_elim,img_iff}.
                    We have $h(f_x)\in D$ and $h(f_y)\in D$ by \cref{subseteq,function_apply_elim,img_iff}.
                    Therefore $h(f_x) \leq M_0$ and $h(f_y) \leq M_0$ by \cref{real_maximum}.
                    Thus $\rho((a_0,f_x)) \leq M_0$ and $\rho((a_0,f_y)) \leq M_0$ by \cref{function_apply_intro}.
                    Show that $\rho((x,y)) \leq \rho((x,f_x)) + \rho((f_x,a_0)) + \rho((a_0,f_y)) + \rho((f_y,y))$.
                    \begin{subproof}
                        $x\in X$ and $y\in X$ and $f_x\in X$ and $f_y\in X$ and $a_0\in X$ by \cref{subseteq}.
                        Therefore $\rho((x,y)) \leq \rho((x,f_x)) + \rho((f_x,y))$
                            by \cref{square_metric_is_metric,metric_on,metric_triangle_inequality}.
                        Hence $\rho((f_x,y)) \leq \rho((f_x,a_0)) + \rho((a_0,y))$
                            by \cref{square_metric_is_metric,metric_on,metric_triangle_inequality}.
                        Therefore $\rho((a_0,y)) \leq \rho((a_0,f_y)) + \rho((f_y,y))$
                            by \cref{square_metric_is_metric,metric_on,metric_triangle_inequality}.
                        We have $x\in X$ and $f_x\in A$ and $f_x\in X$ and $f_y\in A$ by \cref{elem_subseteq}.
                        Therefore $f_y\in X$ and $y\in X$ and $a_0\in A$ and $a_0\in X$ by \cref{elem_subseteq}.
                        $(x,f_x)\in X\times X$ by \cref{times_tuple_intro}.
                        $(f_x,y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(f_x,a_0)\in X\times X$ by \cref{times_tuple_intro}.
                        $(a_0,y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(a_0,f_y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(f_y,y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(x,y)\in X\times X$ by \cref{times_tuple_intro}.
                        We have $\rho((x,y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((x,f_x))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((f_x,y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((f_x,a_0))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((a_0,y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((a_0,f_y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((f_y,y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        Let $r_1 = \rho((x,f_x))$.
                        Let $r_2 = \rho((f_x,y))$.
                        Let $r_3 = \rho((f_x,a_0))$.
                        Let $r_4 = \rho((a_0,y))$.
                        We have $r_1\in\reals$ and $r_2\in\reals$ and $r_3\in\reals$ and $r_4\in\reals$.
                        $r_3 + r_4\in\reals$ by \cref{real_add_closed}.
                        $r_1 + r_2\in\reals$ by \cref{real_add_closed}.
                        $r_1 + (r_3 + r_4)\in\reals$ by \cref{real_add_closed}.
                        $r_2 \leq r_3 + r_4$.
                        Hence $r_2 + r_1 \leq (r_3 + r_4) + r_1$ by \cref{real_leq_add}.
                        We have $r_1 + r_2 = r_2 + r_1$ by \cref{real_add_comm}.
                        $(r_3 + r_4) + r_1 = r_1 + (r_3 + r_4)$ by \cref{real_add_comm}.
                        Therefore $r_1 + r_2 \leq (r_3 + r_4) + r_1$ by \cref{real_leq_trans}.
                        Hence $r_1 + r_2 \leq r_1 + (r_3 + r_4)$ by \cref{real_leq_trans}.
                        Thus $\rho((x,y)) \leq r_1 + (r_3 + r_4)$ by \cref{real_leq_trans}.
                        Let $u = \rho((a_0,f_y)) + \rho((f_y,y))$.
                        We have $u\in\reals$ by \cref{real_add_closed}.
                        $r_1 + r_3\in\reals$ by \cref{real_add_closed}.
                        $(r_1 + r_3) + u\in\reals$ by \cref{real_add_closed}.
                        $r_4 \leq u$.
                        Therefore $r_4 + (r_1 + r_3) \leq u + (r_1 + r_3)$ by \cref{real_leq_add}.
                        Thus $(r_1 + r_3) + r_4 = r_4 + (r_1 + r_3)$ by \cref{real_add_comm}.
                        Thus $u + (r_1 + r_3) = (r_1 + r_3) + u$ by \cref{real_add_comm}.
                        Hence $(r_1 + r_3) + r_4 \leq u + (r_1 + r_3)$ by \cref{real_leq_trans}.
                        Thus $(r_1 + r_3) + r_4 \leq (r_1 + r_3) + u$ by \cref{real_leq_trans}.
                        $r_1 + (r_3 + r_4) = (r_1 + r_3) + r_4$ by \cref{real_add_assoc}.
                        Therefore $r_1 + (r_3 + r_4) \leq (r_1 + r_3) + u$ by \cref{real_leq_trans}.
                        Hence $\rho((x,y)) \leq (r_1 + r_3) + u$ by \cref{real_leq_trans}.
                        Therefore $\rho((x,y)) \leq \rho((x,f_x)) + \rho((f_x,a_0)) + \rho((a_0,f_y)) + \rho((f_y,y))$
                            by \cref{real_add_assoc,real_add_comm}.
                    \end{subproof}
                    Show that $\rho((x,y)) \leq M$.
                    \begin{subproof}
                        Let $s_1 = \rho((x,f_x))$.
                        Let $s_2 = \rho((f_x,a_0))$.
                        Let $s_3 = \rho((a_0,f_y))$.
                        Let $s_4 = \rho((f_y,y))$.
                        We have $x\in X$ and $y\in X$ and $f_x\in A$ and $f_x\in X$ and $f_y\in A$ and $f_y\in X$ and $a_0\in A$ and $a_0\in X$
                            by \cref{elem_subseteq}.
                        $(x,y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(x,f_x)\in X\times X$ by \cref{times_tuple_intro}.
                        $(f_x,a_0)\in X\times X$ by \cref{times_tuple_intro}.
                        $(a_0,f_y)\in X\times X$ by \cref{times_tuple_intro}.
                        $(f_y,y)\in X\times X$ by \cref{times_tuple_intro}.
                        We have $s_1\in\reals$ and $s_2\in\reals$ and $s_3\in\reals$ and $s_4\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $s_1 + s_2\in\reals$ and $s_3 + s_4\in\reals$ by \cref{real_add_closed}.
                        $1\in\reals$ by \cref{real_naturals_subset_reals,real_one_in_naturals,subseteq}.
                        Hence $s_2 = \rho((a_0,f_x))$ by \cref{metric_symmetric,metric_on,square_metric_is_metric}.
                        Therefore $s_1 \leq 1$ by \cref{real_lt_imp_leq}.
                        Hence $s_4 \leq 1$ by \cref{metric_symmetric,metric_on,square_metric_is_metric,real_lt_subst_left,real_lt_imp_leq}.
                        We have $s_2 \leq M_0$ and $s_3 \leq M_0$.
                        Therefore $M_0\in\reals$ by \cref{real_maximum,subseteq}.
                        $M_0 + 1\in\reals$ by \cref{real_add_closed}.
                        $(s_1 + s_2) + (s_3 + s_4)\in\reals$ by \cref{real_add_closed}.
                        $(M_0 + 1) + (M_0 + 1)\in\reals$ by \cref{real_add_closed}.
                        We have $\rho((x,y))\in\reals$ by \cref{metric_on,funs_type_apply}.
                        $\rho((x,y)) \leq s_1 + s_2 + s_3 + s_4$.
                        Hence $s_1 + s_2 + s_3 + s_4 = (s_1 + s_2) + (s_3 + s_4)$ by \cref{real_add_assoc}.
                        Therefore $\rho((x,y)) \leq (s_1 + s_2) + (s_3 + s_4)$ by \cref{real_leq_trans}.
                        Hence $(s_1 + s_2) + (s_3 + s_4) \leq (M_0 + 1) + (M_0 + 1)$ by \cref{real_four_sum_bound}.
                        Thus $\rho((x,y)) \leq (M_0 + 1) + (M_0 + 1)$ by \cref{real_leq_trans}.
                        Therefore $\rho((x,y)) \leq M$.
                    \end{subproof}
                \end{subproof}
                Hence $M\in\reals$ by \cref{real_maximum,subseteq,real_naturals_subset_reals,real_one_in_naturals,real_add_closed}.
                Therefore $A$ is bounded in $X$ with respect to $\rho$ by \cref{metric_bounded}.
            \end{byCase}
        \end{subproof}
        Show that $A$ is bounded in $X$ with respect to $d$ or $A$ is bounded in $X$ with respect to $\rho$.
        \begin{subproof}
            Trivial.
        \end{subproof}
    \end{subproof}
    Show that if
        $A$ is closed in $X$ with respect to $T$ and
        $A$ is bounded in $X$ with respect to $d$ or $A$ is bounded in $X$ with respect to $\rho$
        then $A$ is compact with respect to $T_A$.
    \begin{subproof}
        Assume $A$ is closed in $X$ with respect to $T$ and
            $A$ is bounded in $X$ with respect to $d$ or $A$ is bounded in $X$ with respect to $\rho$.
        \begin{byCase}
            \caseOf{$A = \emptyset$.}
                Show that for all $C$ such that $C$ is an open covering of $A$ with respect to $T_A$ there exists $B$ such that
                    $B\subseteq C$ and $B$ is finite and $B$ is a covering of $A$.
                \begin{subproof}
                    Follows by \cref{emptyset_is_finite,emptyset_subseteq,covering}.
                \end{subproof}
            Therefore $A$ is compact with respect to $T_A$ by \cref{compact}.
        \caseOf{$A \neq \emptyset$.}
            $A$ is inhabited by \cref{nonempty_inhabited}.
            Show that $A$ is bounded in $X$ with respect to $\rho$.
            \begin{subproof}
                \begin{byCase}
                \caseOf{$A$ is bounded in $X$ with respect to $\rho$.}
                    Show that $A$ is bounded in $X$ with respect to $\rho$.
                    \begin{subproof}
                        Trivial.
                    \end{subproof}
                \caseOf{$A$ is bounded in $X$ with respect to $d$.}
                    Take $M\in\reals$ such that for all $a_1,a_2\in A$ we have $d((a_1,a_2)) \leq M$
                        by \cref{metric_bounded}.
                    For all $a_1,a_2\in A$ we have $\rho((a_1,a_2)) \leq M$
                        by \cref{elem_subseteq,euclidean_metric_value_exists,square_metric_value_exists,times_tuple_intro,euclidean_square_metric_bounds,euclidean_metric_function,square_metric_function,function_apply_intro,real_leq_trans}.
                    Hence $A$ is bounded in $X$ with respect to $\rho$ by \cref{square_metric_is_metric,metric_bounded}.
                \end{byCase}
            \end{subproof}
            Take $M\in\reals$ such that for all $a_1,a_2\in A$ we have $\rho((a_1,a_2)) \leq M$
                by \cref{metric_bounded}.
            Take $x_0$ such that $x_0\in A$.
            Let $Y = \{(i,\intervalclosed{x_0(i) - M}{x_0(i) + M}) \mid i\in J\}$.
            Show that for all $i,u,v$ such that $(i,u)\in Y$ and $(i,v)\in Y$ we have $u = v$.
            \begin{subproof}
                Trivial.
            \end{subproof}
            Hence $Y$ is a function by \cref{relation,rightunique}.
            We have $\dom{Y} = J$ by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
            Show that for all $x$ such that $x\in A$ we have $x\in \productFamily{Y}$.
            \begin{subproof}
                Fix $x$ such that $x\in A$.
                Show that for all $i\in J$ we have $x(i)\in \intervalclosed{x_0(i) - M}{x_0(i) + M}$.
                \begin{subproof}
                    Fix $i$ such that $i\in J$.
                    We have $x_0\in\realsPower{J}$ and $x\in\realsPower{J}$ by \cref{elem_subseteq}.
                    $x_0(i)\in\reals$ and $x(i)\in\reals$ by \cref{reals_power,tuple_power,funs_type_apply}.
                    $\neg{x(i)}\in\reals$ by \cref{real_add_inverse}.
                    $x_0(i) - x(i) = x_0(i) + \neg{x(i)}$ by \cref{real_sub}.
                    Therefore $x_0(i) - x(i)\in\reals$ by \cref{real_add_closed}.
                    Hence $\abs{x_0(i) - x(i)}\in\reals$ by \cref{real_abs_in_reals}.
                    Take $m\in\reals$ such that $((x_0,x),m)\in \rho$ by \cref{square_metric_value_exists}.
                    We have $m\in\coordDiffSet{n}{x_0}{x}$ and for all $t\in\coordDiffSet{n}{x_0}{x}$ we have $t \leq m$
                        by \cref{square_metric,pair_eq_iff}.
                    Therefore $\abs{x_0(i) - x(i)} \leq m$ by \cref{coord_diff_set}.
                    Hence $m \leq M$ by \cref{square_metric_function,function_apply_intro,real_leq_trans}.
                    Therefore $\abs{x_0(i) - x(i)} \leq M$ by \cref{real_leq_trans}.
                    Hence $\abs{x(i) - x_0(i)} \leq M$ by \cref{real_abs_sub_swap,real_leq_trans}.
                    Therefore $M$ is nonnegative by \cref{real_abs_nonnegative,real_add_ident,real_leq_trans}.
                    Hence $x_0(i) - M \leq x(i)$ by \cref{real_abs_sub_leq_imp_left_bound}.
                    Therefore $x(i) \leq x_0(i) + M$ by \cref{real_abs_sub_leq_imp_right_bound}.
                    Hence $x(i)\in\intervalclosed{x_0(i) - M}{x_0(i) + M}$ by \cref{intervalclosed}.
                \end{subproof}
                Thus $x$ is a function to $\reals$ and $\dom{x} = \dom{Y}$ by \cref{subseteq,reals_power,tuple_power,funs_elim}.
                For all $i\in\dom{Y}$ we have $x(i)\in\unions{\ran{Y}}$ by \cref{subseteq,ran_intro,unions_iff}.
                Hence $x\in\funs{\dom{Y}}{\unions{\ran{Y}}}$ by \cref{funs_intro}.
                For all $i\in\dom{Y}$ we have $x(i)\in\apply{Y}{i}$ by \cref{dom_iff,pair_eq_iff,function_apply_intro}.
                Hence $x\in\productFamily{Y}$ by \cref{indexed_product}.
            \end{subproof}
            Hence $A\subseteq \productFamily{Y}$ by \cref{subseteq}.
            Let $T_Y = \{(i,\subspaceTopology{\standardTopologyR}{\intervalclosed{x_0(i) - M}{x_0(i) + M}}) \mid i\in J\}$.
            Show that for all $i,u,v$ such that $(i,u)\in T_Y$ and $(i,v)\in T_Y$ we have $u = v$.
            \begin{subproof}
                Trivial.
            \end{subproof}
            Therefore $T_Y$ is a function by \cref{relation,rightunique}.
            Hence $\dom{T_Y} = J$ by \cref{dom_intro,dom_iff,pair_eq_iff,subseteq,subseteq_antisymmetric}.
            
            Show that for all $i\in J$ we have $\intervalclosed{x_0(i) - M}{x_0(i) + M}$ is compact
                with respect to $\subspaceTopology{\standardTopologyR}{\intervalclosed{x_0(i) - M}{x_0(i) + M}}$.
            \begin{subproof}
                Fix $i$ such that $i\in J$.
                We have $x_0(i)\in\reals$ by \cref{elem_subseteq,reals_power,tuple_power,funs_type_apply}.
                $0\in\reals$ by \cref{real_add_ident}.
                $\rho$ is a metric on $X$ by \cref{square_metric_is_metric}.
                Hence $\rho$ is nonnegative on $X$ by \cref{metric_on}.
                Therefore $x_0\in X$ by \cref{elem_subseteq}.
                $(x_0,x_0)\in X\times X$ by \cref{times_tuple_intro}.
                $\rho((x_0,x_0))\in\reals$ by \cref{metric_on,funs_type_apply}.
                We have $\rho((x_0,x_0)) \geq 0$ by \cref{metric_nonnegative}.
                $\rho((x_0,x_0)) \leq M$.
                Therefore $0 \leq M$ by \cref{real_leq_trans}.
                $\neg{M}\in\reals$ and $\neg{0}\in\reals$ by \cref{real_add_inverse}.
                $0 + \neg{0} = 0$ and $0 + \neg{0} = \neg{0}$ by \cref{real_add_inverse,real_add_ident}.
                We have $\neg{0} = 0$.
                Therefore $\neg{M} \leq 0$ by \cref{real_leq_neg,real_leq_trans}.
                Hence $\neg{M} \leq M$ by \cref{real_leq_trans}.
                Therefore $\neg{M} + x_0(i) \leq M + x_0(i)$ by \cref{real_leq_add}.
                $x_0(i) + \neg{M} = \neg{M} + x_0(i)$ and $x_0(i) + M = M + x_0(i)$ by \cref{real_add_comm}.
                Hence $x_0(i) + \neg{M} \leq x_0(i) + M$ by \cref{real_leq_trans}.
                $x_0(i) + M\in\reals$ by \cref{real_add_closed}.
                $x_0(i) - M = x_0(i) + \neg{M}$ by \cref{real_sub}.
                $x_0(i) - M\in\reals$ by \cref{real_add_closed}.
                Therefore $x_0(i) - M \leq x_0(i) + M$ by \cref{real_sub}.
                Hence $\intervalclosed{x_0(i) - M}{x_0(i) + M}$ is compact
                    with respect to $\subspaceTopology{\standardTopologyR}{\intervalclosed{x_0(i) - M}{x_0(i) + M}}$
                    by \cref{real_intervalclosed_compact_standard}.
            \end{subproof}
            For all $i\in J$ we have $\apply{T_Y}{i}$ is a topology on $\apply{Y}{i}$
                by \cref{subseteq,function_apply_intro,standard_basis_is_basis,basis_topology_is_topology,standard_topology_reals,intervalclosed,subspace_topology_is_topology}.
            For all $i\in J$ we have $\apply{Y}{i}$ is compact with respect to $\apply{T_Y}{i}$
                by \cref{subseteq,function_apply_intro}.
            Therefore $\productFamily{Y}$ is compact with respect to $\productTopologyIndexed{T_Y}{Y}$ by \cref{compact_indexed_product_initial_segment}.
            Let $T_{P0} = \productTopologyIndexed{T_Y}{Y}$.
            Let $T_{Y0} = \subspaceTopology{T}{\productFamily{Y}}$.
            Let $X_1 = \{(i,\reals) \mid i\in J\}$.
            Let $T_1 = \{(i,\standardTopologyR) \mid i\in J\}$.
            Let $T_0 = \productTopologyIndexed{T_1}{X_1}$.
            Hence $T = T_0$ by \cref{euclidean_metric_product_topology,square_metric_topology_equals_euclidean}.
            $X_1$ is a function and $T_1$ is a function and $\dom{X_1} = J$ and $\dom{T_1} = J$
                by \cref{reals_standard_indexed_families_data}.
            Therefore $\dom{X_1}$ is inhabited by \cref{real_one_in_naturals,real_one_leq_naturalsplus,initial_segment_naturalsplus,subseteq}.
            For all $i\in\dom{X_1}$ we have $\apply{Y}{i}\subseteq\apply{X_1}{i}$
                by \cref{subseteq,function_apply_intro,intervalclosed,subseteq_transitive}.
            For all $i\in\dom{X_1}$ we have $\apply{T_1}{i}$ is a topology on $\apply{X_1}{i}$
                by \cref{subseteq,function_apply_intro,standard_basis_is_basis,basis_topology_is_topology,standard_topology_reals}.
            Hence $\productFamily{Y}$ is a subspace of $\productFamily{X_1}$ with respect to $T$ by \cref{product_subspace_product}.
            Let $j = \identity{\productFamily{Y}}$.
            Therefore $\dom{Y}$ is inhabited by \cref{real_one_in_naturals,real_one_leq_naturalsplus,initial_segment_naturalsplus,subseteq}.
            For all $i\in\dom{Y}$ we have $\apply{T_Y}{i}$ is a topology on $\apply{Y}{i}$
                by \cref{subseteq,function_apply_intro,standard_basis_is_basis,basis_topology_is_topology,standard_topology_reals,intervalclosed,subspace_topology_is_topology}.
            Therefore $T_{P0}$ is a topology on $\productFamily{Y}$
                by \cref{product_subbasis_finite_intersections_basis,basis_for_topology,basis_topology_is_topology}.
            Hence $\productFamily{X_1} = X$ by \cref{product_family_reals_power}.
            We have $\productFamily{Y}\subseteq X$ by \cref{subspace_of,subseteq_transitive}.
            $j\in\funs{\productFamily{Y}}{X}$ by \cref{id_elem_funs,funs_weaken_codom}.
            Show that for all $i\in\dom{X_1}$ we have $\piIndex{X_1}{i}\circ j$ is continuous from $\productFamily{Y}$
                to $\apply{X_1}{i}$ with respect to $T_{P0}$ and $\apply{T_1}{i}$.
            \begin{subproof}
                Fix $i$ such that $i\in\dom{X_1}$.
                Let $g = \piIndex{Y}{i}$.
                Let $k = \identity{\apply{Y}{i}}$.
                $k$ is continuous from $\apply{Y}{i}$ to $\apply{X_1}{i}$ with respect to $\apply{T_Y}{i}$ and $\apply{T_1}{i}$
                    by \cref{subseteq,subspace_of,function_apply_intro,inclusion_continuous}.
                $g$ is continuous from $\productFamily{Y}$ to $\apply{Y}{i}$ with respect to $T_{P0}$ and $\apply{T_Y}{i}$
                    by \cref{projection_map_indexed_continuous}.
                Therefore $k\circ g$ is continuous from $\productFamily{Y}$ to $\apply{X_1}{i}$ with respect to $T_{P0}$ and $\apply{T_1}{i}$
                    by \cref{continuous_composite}.
                Show that $k\circ g = \piIndex{X_1}{i}\circ j$.
                \begin{subproof}
                    Show that for all $y,z$ if $y\mathrel{k\circ g} z$ then $y\mathrel{\piIndex{X_1}{i}\circ j} z$.
                    \begin{subproof}
                        Follows by \cref{circ_iff,id_iff,projection_map_indexed,pair_eq_iff,subspace_of,subseteq}.
                    \end{subproof}
                    Show that for all $y,z$ if $y\mathrel{\piIndex{X_1}{i}\circ j} z$ then $y\mathrel{k\circ g} z$.
                    \begin{subproof}
                        Follows by \cref{circ_iff,id_iff,projection_map_indexed,pair_eq_iff,subseteq,indexed_product}.
                    \end{subproof}
                    Follows by set extensionality.
                \end{subproof}
                Hence $\piIndex{X_1}{i}\circ j$ is continuous from $\productFamily{Y}$ to $\apply{X_1}{i}$ with respect to $T_{P0}$ and $\apply{T_1}{i}$
                    by \cref{continuous_eq_subst}.
            \end{subproof}
            Therefore $j$ is continuous from $\productFamily{Y}$ to $\productFamily{X_1}$ with respect to $T_{P0}$ and $T_0$
                by \cref{continuous_map_into_indexed_product}.
            Hence $j$ is continuous from $\productFamily{Y}$ to $X$ with respect to $T_{P0}$ and $T$ by \cref{continuous_eq_codomain}.
            Show that for all $U$ such that $U\in T_{Y0}$ we have $U\in T_{P0}$.
            \begin{subproof}
                Fix $U$ such that $U\in T_{Y0}$.
                Take $V\in T$ such that $U = \productFamily{Y}\inter V$ by \cref{subspace_topology}.
                Let $j_0 = \identity{\productFamily{Y}}$.
                Thus $V$ is open in $X$ with respect to $T$ by \cref{continuous,open_in}.
                Hence $\preimg{j_0}{V}$ is open in $\productFamily{Y}$ with respect to $T_{P0}$ by \cref{continuous}.
                Show that $\preimg{j_0}{V} = \productFamily{Y}\inter V$.
                \begin{subproof}
                    Show that for all $x$ such that $x\in\preimg{j_0}{V}$ we have $x\in\productFamily{Y}\inter V$.
                    \begin{subproof}
                        Fix $x$ such that $x\in\preimg{j_0}{V}$.
                        Take $v$ such that $v\in V$ and $(x,v)\in j_0$ by \cref{preimg_iff}.
                        Thus $x = v$ and $v\in\productFamily{Y}$ by \cref{id_iff}.
                        Hence $x\in\productFamily{Y}$ and $x\in V$.
                        Thus $x\in\productFamily{Y}\inter V$ by \cref{inter_intro}.
                    \end{subproof}
                    Hence $\preimg{j_0}{V}\subseteq \productFamily{Y}\inter V$ by \cref{subseteq}.
                    Show that for all $x$ such that $x\in\productFamily{Y}\inter V$ we have $x\in\preimg{j_0}{V}$.
                    \begin{subproof}
                        Fix $x$ such that $x\in\productFamily{Y}\inter V$.
                        Thus $x\in\productFamily{Y}$ and $x\in V$ by \cref{inter}.
                        Hence $(x,x)\in j_0$ by \cref{id_iff}.
                        Thus $x\in\preimg{j_0}{V}$ by \cref{preimg_iff}.
                    \end{subproof}
                    Hence $\productFamily{Y}\inter V\subseteq \preimg{j_0}{V}$ by \cref{subseteq}.
                    Follows by \cref{subseteq_antisymmetric}.
                \end{subproof}
                Hence $U\in T_{P0}$ by \cref{open_in}.
            \end{subproof}
            Hence $T_{Y0}\subseteq T_{P0}$ by \cref{subseteq}.
            For all $C$ such that $C$ is an open covering of $\productFamily{Y}$ with respect to $T_{Y0}$ there exists $B$ such that
                $B\subseteq C$ and $B$ is finite and $B$ is a covering of $\productFamily{Y}$
                by \cref{open_covering,open_in,subseteq,compact}.
            Therefore $\productFamily{Y}$ is compact with respect to $T_{Y0}$ by \cref{compact}.
            We have $T$ is a topology on $X$ by \cref{square_metric_is_metric,metric_basis_is_basis,basis_topology_is_topology,metric_topology,basis_for_topology}.
            $\productFamily{Y}\subseteq X$
                by \cref{indexed_product,funs_elim,subseteq,function_apply_intro,intervalclosed,funs_intro,tuple_power,reals_power}.
            Thus $\productFamily{Y}$ is a subspace of $X$ with respect to $T$ by \cref{subspace_of}.
            We have $A = A\inter\productFamily{Y}$ by \cref{subseteq,inter_absorb_supseteq_right}.
            Thus $A$ is closed in $\productFamily{Y}$ with respect to $T_{Y0}$ by \cref{closed_in_subspace_iff,subspace_of}.
            Therefore $T$ is a topology on $X$ and $\productFamily{Y}\subseteq X$ by \cref{subspace_of}.
            Thus $T_{Y0}$ is a topology on $\productFamily{Y}$ by \cref{subspace_topology_is_topology}.
            Hence $A$ is compact with respect to $T_A$ by \cref{closed_subspace_compact,subspace_subspace_topology}.
        \end{byCase}
    \end{subproof}
\end{proof}
Lemma 373
finite_inhabited_largest_element

Assume $R$ is a simple order relation on $X$.
Suppose $F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.
Suppose $F$ is finite.
Suppose $F$ is inhabited.
Then there exists $b$ such that $b$ is a largest element of $F$ with respect to $R$.

LaTeX source
\begin{lemma}
\label{finite_inhabited_largest_element}
    Assume $R$ is a simple order relation on $X$.
    Suppose $F\subseteq X$.
    Suppose $F$ is finite.
    Suppose $F$ is inhabited.
    Then there exists $b$ such that $b$ is a largest element of $F$ with respect to $R$.
\end{lemma}
Proof

Take $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ such that there exists a bijection from $\initialSegment{k}$ to $F$ by Definition 89.
Take $f$ such that $f$ is a bijection from $\initialSegment{k}$ to $F$.
Let $A = \{ n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus \mid \text{for all $G,g$ such that $g$ is a bijection from $\initialSegment{n}$ to $G$ and $G\subseteq X$ and $G$ is inhabited there exists $b$ such that $b$ is a largest element of $G$ with respect to $R$}\}$.

Claim: For all $G,g$ such that $g$ is a bijection from $\initialSegment{1}$ to $G$ and $G\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and $G$ is inhabited we have there exists $b$ such that $b$ is a largest element of $G$ with respect to $R$.

Fix $G$.
Fix $g$ such that $g$ is a bijection from $\initialSegment{1}$ to $G$ and $G\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and $G$ is inhabited.
$g$ is a function by Proposition 390.
$\dom{g} = \initialSegment{1}$ by Proposition 391.
$1\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ by Lemma 119, Proposition 20.
Let $a = g(1)$.
$(1,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ by Proposition 348.
$g\class{latex-symbol-tip latex-symbol-id-in}{\in}\surj{\initialSegment{1}}{G}$ by Definition 58.
$\ran{g} = G$ by Corollary 7.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ by Proposition 208.

Claim: For all $z\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ we have $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\{a\}$.

Fix $z\class{latex-symbol-tip latex-symbol-id-in}{\in} G$.
Take $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\initialSegment{1}$ such that $g(x)=z$ by Definition 57, Definition 58.
$x = 1$ by Lemma 119, Proposition 22.
$a = z$.
Thus $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\{a\}$ by Proposition 22.

$G\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\{a\}$ by Definition 1.
$\{a\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} G$ by Proposition 25.
$G = \{a\}$ by Proposition 3.
$a$ is a largest element of $G$ with respect to $R$ by Definition 128, Proposition 22.

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

Claim: For all $n\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

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

Claim: For all $G,g$ such that $g$ is a bijection from $\initialSegment{n + 1}$ to $G$ and $G\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and $G$ is inhabited there exists $b$ such that $b$ is a largest element of $G$ with respect to $R$.

Fix $G$.
Fix $g$ such that $g$ is a bijection from $\initialSegment{n + 1}$ to $G$ and $G\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and $G$ is inhabited.
$g$ is a function by Proposition 390.
$\dom{g} = \initialSegment{n + 1}$ by Proposition 391.
$n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ by Axiom 45, Definition 84.
Let $a = g(n + 1)$.
Let $G_1 = \img{g}{\initialSegment{n}}$.
$\initialSegment{n}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} \initialSegment{n + 1}$ by Lemma 121.
$G_1\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} G$ and $G_1\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 1, Definition 58, Proposition 6, Proposition 236, Proposition 238, Corollary 7.
$g\class{latex-symbol-tip latex-symbol-id-in}{\in}\surj{\initialSegment{n + 1}}{G}$ by Definition 58.
$\ran{g} = G$ by Corollary 7.
$(n + 1,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ by Proposition 348.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ by Definition 58, Proposition 208, Proposition 348, Corollary 7.

Claim: For all $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ we have $z\class{latex-symbol-tip latex-symbol-id-in}{\in} G_1\union\{a\}$.

Fix $z\class{latex-symbol-tip latex-symbol-id-in}{\in} G$.
There exists $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\initialSegment{n + 1}$ such that $g(x)=z$ by Definition 57, Definition 58.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\initialSegment{n}$ or $x = n + 1$ by Lemma 122.

Case. $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\initialSegment{n}$.

$(x,z)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ by Proposition 348.
$z\class{latex-symbol-tip latex-symbol-id-in}{\in} G_1$ by Proposition 235.
$z\class{latex-symbol-tip latex-symbol-id-in}{\in} G_1\union\{a\}$ by Proposition 38.

Case. $x = n + 1$.

$z = a$.
$z\class{latex-symbol-tip latex-symbol-id-in}{\in} G_1\union\{a\}$ by Proposition 20, Proposition 39.

LaTeX source
\begin{byCase}
                \caseOf{$x\in\initialSegment{n}$.}
                    $(x,z)\in g$ by \cref{function_apply_elim}.
                    $z\in G_1$ by \cref{img_iff}.
                    $z\in G_1\union\{a\}$ by \cref{union_intro_left}.
                \caseOf{$x = n + 1$.}
                    $z = a$.
                    $z\in G_1\union\{a\}$ by \cref{union_intro_right,singleton_intro}.
                
\end{byCase}

$G\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} G_1\union\{a\}$ by Definition 1.
$G_1\union\{a\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} G$ by Proposition 25, Proposition 44.
$G = G_1\union\{a\}$ by Proposition 3.
Let $h = \restrl{g}{\initialSegment{n}}$.
$h$ is a function by Proposition 383.
For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\initialSegment{n}$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ by Definition 1, Lemma 121, Proposition 391.
$\dom{h} = \initialSegment{n}$ by Definition 1, Proposition 70, Corollary 3.
For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{h}$ we have $h(x)\class{latex-symbol-tip latex-symbol-id-in}{\in} G_1$ by Proposition 4, Proposition 235, Proposition 263, Proposition 348.
$h\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{\initialSegment{n}}{G_1}$ by Proposition 358.
For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} G_1$ there exists $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\initialSegment{n}$ such that $h(x) = y$ by Proposition 235, Proposition 349, Proposition 384.
$h\class{latex-symbol-tip latex-symbol-id-in}{\in}\surj{\initialSegment{n}}{G_1}$ by Definition 57.
$h$ is injective by Definition 58, Proposition 384, Proposition 386.
$h$ is a bijection from $\initialSegment{n}$ to $G_1$ by Definition 58.
Take $x_0$ such that $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\initialSegment{n}$ by Lemma 123.
$x_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ by Definition 1, Lemma 121, Proposition 391.
$g(x_0)\class{latex-symbol-tip latex-symbol-id-in}{\in} G_1$ by Proposition 235, Proposition 348.
$G_1$ is inhabited.
Take $b$ such that $b$ is a largest element of $G_1$ with respect to $R$.
$b\mathrel{R}a$ or $a\mathrel{R}b$ or $b = a$ by Definition 40, Definition 98, Definition 128, Proposition 4.

Case. $b\mathrel{R}a$ or $b = a$.

For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ we have $y\class{latex-symbol-tip latex-symbol-id-in}{\in} G_1$ or $y = a$ by Axiom 5, Proposition 22.
For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} G_1$ we have $y\mathrel{R}b$ or $y = b$ by Definition 128.
For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ we have $y\mathrel{R}a$ or $y = a$ by Definition 37 [Transitivity], Definition 98.
$a$ is a largest element of $G$ with respect to $R$ by Definition 128, Proposition 20, Proposition 39.

Case. $a\mathrel{R}b$.

For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ we have $y\class{latex-symbol-tip latex-symbol-id-in}{\in} G_1$ or $y = a$ by Axiom 5, Proposition 22.
For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} G$ we have $y\mathrel{R}b$ or $y = b$ by Definition 128.
$b$ is a largest element of $G$ with respect to $R$ by Definition 128, Proposition 4.

LaTeX source
\begin{byCase}
                \caseOf{$b\mathrel{R}a$ or $b = a$.}
                    For all $y\in G$ we have $y\in G_1$ or $y = a$ by \cref{union_iff,singleton_iff}.
                    For all $y\in G_1$ we have $y\mathrel{R}b$ or $y = b$ by \cref{largest_element}.
                    For all $y\in G$ we have $y\mathrel{R}a$ or $y = a$
                        by \cref{simple_order_relation,transitive}.
                    $a$ is a largest element of $G$ with respect to $R$
                        by \cref{union_intro_right,singleton_intro,largest_element}.
                \caseOf{$a\mathrel{R}b$.}
                    For all $y\in G$ we have $y\in G_1$ or $y = a$ by \cref{union_iff,singleton_iff}.
                    For all $y\in G$ we have $y\mathrel{R}b$ or $y = b$ by \cref{largest_element}.
                    $b$ is a largest element of $G$ with respect to $R$ by \cref{elem_subseteq,largest_element}.
                
\end{byCase}

$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturalsPlus$ by Definition 1.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Proposition 445.
For all $G,g$ such that $g$ is a bijection from $\initialSegment{k}$ to $G$ and $G\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and $G$ is inhabited there exists $b$ such that $b$ is a largest element of $G$ with respect to $R$.
Therefore there exists $b$ such that $b$ is a largest element of $F$ with respect to $R$.

LaTeX source
\begin{proof}
    Take $k\in\naturalsPlus$ such that there exists a bijection from $\initialSegment{k}$ to $F$ by \cref{finite}.
    Take $f$ such that $f$ is a bijection from $\initialSegment{k}$ to $F$.
    Let $A = \{ n\in\naturalsPlus \mid \text{for all $G,g$ such that $g$ is a bijection from $\initialSegment{n}$ to $G$ and $G\subseteq X$ and $G$ is inhabited
        there exists $b$ such that $b$ is a largest element of $G$ with respect to $R$}\}$.
    Show that for all $G,g$ such that $g$ is a bijection from $\initialSegment{1}$ to $G$ and $G\subseteq X$ and $G$ is inhabited
        we have there exists $b$ such that $b$ is a largest element of $G$ with respect to $R$.
    \begin{subproof}
        Fix $G$.
        Fix $g$ such that $g$ is a bijection from $\initialSegment{1}$ to $G$ and $G\subseteq X$ and $G$ is inhabited.
        $g$ is a function by \cref{bijection_is_function}.
        $\dom{g} = \initialSegment{1}$ by \cref{bijections_dom}.
        $1\in\dom{g}$ by \cref{initial_segment_one,singleton_intro}.
        Let $a = g(1)$.
        $(1,a)\in g$ by \cref{function_apply_elim}.
        $g\in\surj{\initialSegment{1}}{G}$ by \cref{bijections}.
        $\ran{g} = G$ by \cref{ran_of_surj}.
        $a\in G$ by \cref{ran_iff}.
        Show that for all $z\in G$ we have $z\in\{a\}$.
        \begin{subproof}
            Fix $z\in G$.
            Take $x\in\initialSegment{1}$ such that $g(x)=z$ by \cref{bijections,surj}.
            $x = 1$ by \cref{initial_segment_one,singleton_iff}.
            $a = z$.
            Thus $z\in\{a\}$ by \cref{singleton_iff}.
        \end{subproof}
        $G\subseteq\{a\}$ by \cref{subseteq}.
        $\{a\}\subseteq G$ by \cref{singleton_subset_intro}.
        $G = \{a\}$ by \cref{subseteq_antisymmetric}.
        $a$ is a largest element of $G$ with respect to $R$ by \cref{singleton_iff,largest_element}.
    \end{subproof}
    $1\in A$.
    Show that for all $n\in A$ we have $n + 1\in A$.
    \begin{subproof}
        Fix $n\in A$.
        Show that for all $G,g$ such that $g$ is a bijection from $\initialSegment{n + 1}$ to $G$ and $G\subseteq X$ and $G$ is inhabited
            there exists $b$ such that $b$ is a largest element of $G$ with respect to $R$.
        \begin{subproof}
            Fix $G$.
            Fix $g$ such that $g$ is a bijection from $\initialSegment{n + 1}$ to $G$ and $G\subseteq X$ and $G$ is inhabited.
            $g$ is a function by \cref{bijection_is_function}.
            $\dom{g} = \initialSegment{n + 1}$ by \cref{bijections_dom}.
            $n + 1\in\dom{g}$ by \cref{initial_segment_naturalsplus,real_naturals_closed_succ}.
            Let $a = g(n + 1)$.
            Let $G_1 = \img{g}{\initialSegment{n}}$.
            $\initialSegment{n}\subseteq \initialSegment{n + 1}$ by \cref{initial_segment_subset_succ}.
            $G_1\subseteq G$ and $G_1\subseteq X$
                by \cref{subseteq,img_subseteq,img_dom,bijections,ran_of_surj,subseteq_transitive}.
            $g\in\surj{\initialSegment{n + 1}}{G}$ by \cref{bijections}.
            $\ran{g} = G$ by \cref{ran_of_surj}.
            $(n + 1,a)\in g$ by \cref{function_apply_elim}.
            $a\in G$ by \cref{function_apply_elim,ran_iff,bijections,ran_of_surj}.
            Show that for all $z$ such that $z\in G$ we have $z\in G_1\union\{a\}$.
            \begin{subproof}
                Fix $z\in G$.
                There exists $x\in\initialSegment{n + 1}$ such that $g(x)=z$ by \cref{bijections,surj}.
                $x\in\initialSegment{n}$ or $x = n + 1$ by \cref{initial_segment_succ_split}.
                \begin{byCase}
                \caseOf{$x\in\initialSegment{n}$.}
                    $(x,z)\in g$ by \cref{function_apply_elim}.
                    $z\in G_1$ by \cref{img_iff}.
                    $z\in G_1\union\{a\}$ by \cref{union_intro_left}.
                \caseOf{$x = n + 1$.}
                    $z = a$.
                    $z\in G_1\union\{a\}$ by \cref{union_intro_right,singleton_intro}.
                \end{byCase}
            \end{subproof}
            $G\subseteq G_1\union\{a\}$ by \cref{subseteq}.
            $G_1\union\{a\}\subseteq G$ by \cref{singleton_subset_intro,union_subsets_is_subset}.
            $G = G_1\union\{a\}$ by \cref{subseteq_antisymmetric}.
            Let $h = \restrl{g}{\initialSegment{n}}$.
            $h$ is a function by \cref{restrl_of_function_is_function}.
            For all $x\in\initialSegment{n}$ we have $x\in\dom{g}$ by \cref{initial_segment_subset_succ,bijections_dom,subseteq}.
            $\dom{h} = \initialSegment{n}$ by \cref{subseteq,dom_of_restrl_eq_inter,inter_absorb_supseteq_left}.
            For all $x\in\dom{h}$ we have $h(x)\in G_1$
                by \cref{function_apply_elim,restrl_subseteq,elem_subseteq,img_iff}.
            $h\in\funs{\initialSegment{n}}{G_1}$ by \cref{funs_intro}.
            For all $y\in G_1$ there exists $x\in\initialSegment{n}$ such that $h(x) = y$
                by \cref{img_iff,function_apply_iff,restrl_of_function_apply}.
            $h\in\surj{\initialSegment{n}}{G_1}$ by \cref{surj}.
            $h$ is injective by \cref{restrl_of_function_apply,bijections,injective_function}.
            $h$ is a bijection from $\initialSegment{n}$ to $G_1$ by \cref{bijections}.
            Take $x_0$ such that $x_0\in\initialSegment{n}$ by \cref{initial_segment_inhabited}.
            $x_0\in\dom{g}$ by \cref{initial_segment_subset_succ,bijections_dom,subseteq}.
            $g(x_0)\in G_1$ by \cref{function_apply_elim,img_iff}.
            $G_1$ is inhabited.
                Take $b$ such that $b$ is a largest element of $G_1$ with respect to $R$.
                $b\mathrel{R}a$ or $a\mathrel{R}b$ or $b = a$
                    by \cref{largest_element,elem_subseteq,simple_order_relation,connex}.
                \begin{byCase}
                \caseOf{$b\mathrel{R}a$ or $b = a$.}
                    For all $y\in G$ we have $y\in G_1$ or $y = a$ by \cref{union_iff,singleton_iff}.
                    For all $y\in G_1$ we have $y\mathrel{R}b$ or $y = b$ by \cref{largest_element}.
                    For all $y\in G$ we have $y\mathrel{R}a$ or $y = a$
                        by \cref{simple_order_relation,transitive}.
                    $a$ is a largest element of $G$ with respect to $R$
                        by \cref{union_intro_right,singleton_intro,largest_element}.
                \caseOf{$a\mathrel{R}b$.}
                    For all $y\in G$ we have $y\in G_1$ or $y = a$ by \cref{union_iff,singleton_iff}.
                    For all $y\in G$ we have $y\mathrel{R}b$ or $y = b$ by \cref{largest_element}.
                    $b$ is a largest element of $G$ with respect to $R$ by \cref{elem_subseteq,largest_element}.
                \end{byCase}
        \end{subproof}
    \end{subproof}
    $A\subseteq\naturalsPlus$ by \cref{subseteq}.
    $k\in A$ by \cref{real_naturals_induction}.
    For all $G,g$ such that $g$ is a bijection from $\initialSegment{k}$ to $G$ and $G\subseteq X$ and $G$ is inhabited
        there exists $b$ such that $b$ is a largest element of $G$ with respect to $R$.
    Therefore there exists $b$ such that $b$ is a largest element of $F$ with respect to $R$.
\end{proof}
Lemma 374
finite_inhabited_smallest_element

Assume $R$ is a simple order relation on $X$.
Suppose $F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.
Suppose $F$ is finite.
Suppose $F$ is inhabited.
Then there exists $a$ such that $a$ is a smallest element of $F$ with respect to $R$.

LaTeX source
\begin{lemma}
\label{finite_inhabited_smallest_element}
    Assume $R$ is a simple order relation on $X$.
    Suppose $F\subseteq X$.
    Suppose $F$ is finite.
    Suppose $F$ is inhabited.
    Then there exists $a$ such that $a$ is a smallest element of $F$ with respect to $R$.
\end{lemma}
Proof

Let $S = \converse{R}$.
$S$ is a simple order relation on $X$ by Definition 36, Definition 37 [Transitivity], Definition 40, Definition 98, Proposition 186, Proposition 190.
Take $a$ such that $a$ is a largest element of $F$ with respect to $S$ by Lemma 373.
For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $x\mathrel{S}a$ or $x = a$ by Definition 128.
For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $a\mathrel{R}x$ or $a = x$ by Proposition 186.
$a$ is a smallest element of $F$ with respect to $R$ by Definition 99, Definition 128.

LaTeX source
\begin{proof}
    Let $S = \converse{R}$.
    $S$ is a simple order relation on $X$
        by \cref{simple_order_relation,converse_type,converse_iff,transitive,asymmetric,connex}.
    Take $a$ such that $a$ is a largest element of $F$ with respect to $S$
        by \cref{finite_inhabited_largest_element}.
    For all $x\in F$ we have $x\mathrel{S}a$ or $x = a$ by \cref{largest_element}.
    For all $x\in F$ we have $a\mathrel{R}x$ or $a = x$ by \cref{converse_iff}.
    $a$ is a smallest element of $F$ with respect to $R$ by \cref{largest_element,smallest_element}.
\end{proof}
Theorem 67
extreme_value_theorem

Assume $T_X$ is a topology on $X$.
Assume $T_Y$ is the order topology on $Y$ with respect to $R$.
Suppose $f$ is continuous from $X$ to $Y$ with respect to $T_X$ and $T_Y$.
Suppose $X$ is compact with respect to $T_X$.
Suppose $X\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then there exist $c,d\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $\apply{f}{c}$ is a smallest element of $\img{f}{X}$ with respect to $R$ and $\apply{f}{d}$ is a largest element of $\img{f}{X}$ with respect to $R$.

LaTeX source
\begin{theorem}
\label{extreme_value_theorem}
    Assume $T_X$ is a topology on $X$.
    Assume $T_Y$ is the order topology on $Y$ with respect to $R$.
    Suppose $f$ is continuous from $X$ to $Y$ with respect to $T_X$ and $T_Y$.
    Suppose $X$ is compact with respect to $T_X$.
    Suppose $X\neq\emptyset$.
    Then there exist $c,d\in X$ such that
        $\apply{f}{c}$ is a smallest element of $\img{f}{X}$ with respect to $R$ and
        $\apply{f}{d}$ is a largest element of $\img{f}{X}$ with respect to $R$.
\end{theorem}
Proof

Let $A = \img{f}{X}$.
Let $T_A = \subspaceTopology{T_Y}{A}$.
$A$ is compact with respect to $T_A$ by Theorem 61.
$T_Y = \basisTopology{\orderBasis{R}{Y}}{Y}$ and $R$ is a simple order relation on $Y$ and $Y$ has more than one element by Definition 134.
$T_Y$ is a topology on $Y$ by Definition 134, Lemma 76, Lemma 113.
$f$ is a function to $Y$ and $\dom{f} = X$ by Definition 160, Proposition 359.
$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} Y$ by Proposition 238, Proposition 354.
$A$ is a subspace of $Y$ with respect to $T_Y$ by Definition 147.
$A$ is inhabited by Definition 160, Proposition 10, Proposition 235, Proposition 348, Proposition 359.

Claim: There exists $M$ such that $M$ is a largest element of $A$ with respect to $R$.

Suppose not.
Let $C = \{U \mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} a\class{latex-symbol-tip latex-symbol-id-in}{\in} A. U = \openrayleft{R}{Y}{a}\}$.

Claim: For all $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{C}$.

$C$ is a covering of $A$ by Definition 1, Definition 245.
Take $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $B$ is finite and $B$ is a covering of $A$ by Definition 1, Definition 247, Lemma 154, Lemma 356.
$B$ is inhabited by Axiom 4, Definition 1, Definition 245, Proposition 10.
Let $R_B = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-times}{\times} A \mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} U\class{latex-symbol-tip latex-symbol-id-in}{\in} B.\class{latex-symbol-tip latex-symbol-id-exists}{\exists} a\class{latex-symbol-tip latex-symbol-id-in}{\in} A. w = (U,a) \class{latex-symbol-tip latex-symbol-id-land}{\land} U = \openrayleft{R}{Y}{a}\}$.
For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R_B$ there exist $U,a$ such that $w = (U,a)$.
$R_B$ is a relation by Definition 12.

Claim: For all $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ there exists $a$ such that $U\mathrel{R_B}a$.

Fix $U$ such that $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
$U\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Definition 1.
Take $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $U = \openrayleft{R}{Y}{a}$.
$(U,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-times}{\times} A$ by Proposition 115.
$(U,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} R_B$ by definition.
$U\mathrel{R_B}a$.

Take $g$ such that $g$ is a function on $B$ and for all $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $U\mathrel{R_B} \apply{g}{U}$ by Axiom 54.
Let $E = \img{g}{B}$.
For every $U$ such that $U \class{latex-symbol-tip latex-symbol-id-in}{\in} B$, $g(U) \class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Axiom 6, Definition 12.
$E\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Definition 1, Proposition 235, Proposition 346.
$E$ is finite and $E$ is inhabited by Lemma 192, Proposition 10, Proposition 235, Proposition 348.
$E\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} Y$ by Proposition 6.
Take $a_0$ such that $a_0$ is a largest element of $E$ with respect to $R$ by Lemma 373.

Claim: For all $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $a_0\class{latex-symbol-tip latex-symbol-id-notin}{\notin} U$.

$a_0\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\unions{B}$ by Axiom 4.
$a_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{B}$ by Definition 1, Definition 128, Definition 245, Proposition 4.
Contradiction.

Claim: There exists $m$ such that $m$ is a smallest element of $A$ with respect to $R$.

Suppose not.
Let $C = \{U \mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} a\class{latex-symbol-tip latex-symbol-id-in}{\in} A. U = \openrayright{R}{Y}{a}\}$.

Claim: For all $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{C}$.

$C$ is a covering of $A$ by Definition 1, Definition 245.
Take $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $B$ is finite and $B$ is a covering of $A$ by Definition 1, Definition 247, Lemma 153, Lemma 356.
$B$ is inhabited by Axiom 4, Definition 1, Definition 245, Proposition 10.
Let $R_B = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-times}{\times} A \mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} U\class{latex-symbol-tip latex-symbol-id-in}{\in} B.\class{latex-symbol-tip latex-symbol-id-exists}{\exists} a\class{latex-symbol-tip latex-symbol-id-in}{\in} A. w = (U,a) \class{latex-symbol-tip latex-symbol-id-land}{\land} U = \openrayright{R}{Y}{a}\}$.
For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R_B$ there exist $U,a$ such that $w = (U,a)$.
$R_B$ is a relation by Definition 12.

Claim: For all $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ there exists $a$ such that $U\mathrel{R_B}a$.

Fix $U$ such that $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
$U\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Definition 1.
Take $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $U = \openrayright{R}{Y}{a}$.
$(U,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} B\class{latex-symbol-tip latex-symbol-id-times}{\times} A$ by Proposition 115.
$(U,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} R_B$ by definition.
$U\mathrel{R_B}a$.

Take $g$ such that $g$ is a function on $B$ and for all $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $U\mathrel{R_B} \apply{g}{U}$ by Axiom 54.
Let $E = \img{g}{B}$.
For every $U$ such that $U \class{latex-symbol-tip latex-symbol-id-in}{\in} B$, $g(U) \class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Axiom 6, Definition 12.
$E\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Definition 1, Proposition 235, Proposition 346.
$E$ is finite and $E$ is inhabited by Lemma 192, Proposition 10, Proposition 235, Proposition 348.
$E\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} Y$ by Proposition 6.
Take $a_0$ such that $a_0$ is a smallest element of $E$ with respect to $R$ by Lemma 374.

Claim: For all $U\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $a_0\class{latex-symbol-tip latex-symbol-id-notin}{\notin} U$.

$a_0\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\unions{B}$ by Axiom 4.
$a_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{B}$ by Definition 1, Definition 99, Definition 245, Proposition 4.
Contradiction.

Take $m$ such that $m$ is a smallest element of $A$ with respect to $R$.
Take $c\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $f(c) = m$ by Definition 99, Proposition 235, Proposition 346.
Take $M$ such that $M$ is a largest element of $A$ with respect to $R$.
Take $d\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $f(d) = M$ by Definition 128, Proposition 235, Proposition 346.

Claim: $\apply{f}{c}$ is a smallest element of $A$ with respect to $R$ and $\apply{f}{d}$ is a largest element of $A$ with respect to $R$.
LaTeX source
\begin{proof}
    Let $A = \img{f}{X}$.
    Let $T_A = \subspaceTopology{T_Y}{A}$.
    $A$ is compact with respect to $T_A$ by \cref{continuous_image_compact}.
    $T_Y = \basisTopology{\orderBasis{R}{Y}}{Y}$ and $R$ is a simple order relation on $Y$
        and $Y$ has more than one element by \cref{order_topology}.
    $T_Y$ is a topology on $Y$ by \cref{order_topology,order_basis_is_basis,basis_topology_is_topology}.
    $f$ is a function to $Y$ and $\dom{f} = X$ by \cref{continuous,funs_elim}.
    $A\subseteq Y$ by \cref{img_dom,function_to_ran}.
    $A$ is a subspace of $Y$ with respect to $T_Y$ by \cref{subspace_of}.
    $A$ is inhabited by \cref{nonempty_inhabited,continuous,funs_elim,function_apply_elim,img_iff}.
    Show that there exists $M$ such that $M$ is a largest element of $A$ with respect to $R$.
    \begin{subproof}
        Suppose not.
        Let $C = \{U \mid \exists a\in A. U = \openrayleft{R}{Y}{a}\}$.
        Show that for all $y$ such that $y\in A$ we have $y\in\unions{C}$.
        \begin{subproof}
            Follows by \cref{largest_element,subseteq,order_topology,simple_order_relation,connex,openray_left,unions_iff}.
        \end{subproof}
        $C$ is a covering of $A$ by \cref{subseteq,covering}.
        Take $B$ such that $B\subseteq C$ and $B$ is finite and $B$ is a covering of $A$
            by \cref{subseteq,openrayleft_open_in_order_topology,compact_subspace_open_covering,compact}.
        $B$ is inhabited by \cref{nonempty_inhabited,covering,subseteq,unions_iff}.
        Let $R_B = \{w\in B\times A \mid \exists U\in B.\exists a\in A. w = (U,a) \land U = \openrayleft{R}{Y}{a}\}$.
        For all $w$ such that $w\in R_B$ there exist $U,a$ such that $w = (U,a)$.
        $R_B$ is a relation by \cref{relation}.
        Show that for all $U\in B$ there exists $a$ such that $U\mathrel{R_B}a$.
        \begin{subproof}
            Fix $U$ such that $U\in B$.
            $U\in C$ by \cref{subseteq}.
            Take $a\in A$ such that $U = \openrayleft{R}{Y}{a}$.
            $(U,a)\in B\times A$ by \cref{times_tuple_intro}.
            $(U,a)\in R_B$ by definition.
            $U\mathrel{R_B}a$.
        \end{subproof}
        Take $g$ such that $g$ is a function on $B$ and for all $U\in B$ we have $U\mathrel{R_B} \apply{g}{U}$
            by \cref{axiom_of_choice}.
        Let $E = \img{g}{B}$.
        For every $U$ such that $U \in B$, $g(U) \in A$ by \cref{relation,pair_eq_iff}.
        $E\subseteq A$ by \cref{img_iff,function_apply_intro,subseteq}.
        $E$ is finite and $E$ is inhabited by \cref{finite_image_function,nonempty_inhabited,function_apply_elim,img_iff}.
        $E\subseteq Y$ by \cref{subseteq_transitive}.
        Take $a_0$ such that $a_0$ is a largest element of $E$ with respect to $R$
            by \cref{finite_inhabited_largest_element}.
        Show that for all $U\in B$ we have $a_0\notin U$.
        \begin{subproof}
            Follows by \cref{axiom_of_choice,relation,pair_eq_iff,function_apply_elim,img_iff,largest_element,openray_left,simple_order_relation,order_topology,asymmetric}.
        \end{subproof}
        $a_0\notin\unions{B}$ by \cref{unions_iff}.
        $a_0\in\unions{B}$ by \cref{largest_element,elem_subseteq,covering,subseteq}.
        Contradiction.
    \end{subproof}
    Show that there exists $m$ such that $m$ is a smallest element of $A$ with respect to $R$.
    \begin{subproof}
        Suppose not.
        Let $C = \{U \mid \exists a\in A. U = \openrayright{R}{Y}{a}\}$.
        Show that for all $y$ such that $y\in A$ we have $y\in\unions{C}$.
        \begin{subproof}
            Follows by \cref{smallest_element,subseteq,order_topology,simple_order_relation,connex,openray_right,unions_iff}.
        \end{subproof}
        $C$ is a covering of $A$ by \cref{subseteq,covering}.
        Take $B$ such that $B\subseteq C$ and $B$ is finite and $B$ is a covering of $A$
            by \cref{subseteq,openrayright_open_in_order_topology,compact_subspace_open_covering,compact}.
        $B$ is inhabited by \cref{nonempty_inhabited,covering,subseteq,unions_iff}.
        Let $R_B = \{w\in B\times A \mid \exists U\in B.\exists a\in A. w = (U,a) \land U = \openrayright{R}{Y}{a}\}$.
        For all $w$ such that $w\in R_B$ there exist $U,a$ such that $w = (U,a)$.
        $R_B$ is a relation by \cref{relation}.
        Show that for all $U\in B$ there exists $a$ such that $U\mathrel{R_B}a$.
        \begin{subproof}
            Fix $U$ such that $U\in B$.
            $U\in C$ by \cref{subseteq}.
            Take $a\in A$ such that $U = \openrayright{R}{Y}{a}$.
            $(U,a)\in B\times A$ by \cref{times_tuple_intro}.
            $(U,a)\in R_B$ by definition.
            $U\mathrel{R_B}a$.
        \end{subproof}
        Take $g$ such that $g$ is a function on $B$ and for all $U\in B$ we have $U\mathrel{R_B} \apply{g}{U}$
            by \cref{axiom_of_choice}.
        Let $E = \img{g}{B}$.
        For every $U$ such that $U \in B$, $g(U) \in A$ by \cref{relation,pair_eq_iff}.
        $E\subseteq A$ by \cref{img_iff,function_apply_intro,subseteq}.
        $E$ is finite and $E$ is inhabited by \cref{finite_image_function,nonempty_inhabited,function_apply_elim,img_iff}.
        $E\subseteq Y$ by \cref{subseteq_transitive}.
        Take $a_0$ such that $a_0$ is a smallest element of $E$ with respect to $R$
            by \cref{finite_inhabited_smallest_element}.
        Show that for all $U\in B$ we have $a_0\notin U$.
        \begin{subproof}
            Follows by \cref{axiom_of_choice,relation,pair_eq_iff,function_apply_elim,img_iff,smallest_element,openray_right,simple_order_relation,order_topology,asymmetric}.
        \end{subproof}
        $a_0\notin\unions{B}$ by \cref{unions_iff}.
        $a_0\in\unions{B}$ by \cref{smallest_element,elem_subseteq,covering,subseteq}.
        Contradiction.
    \end{subproof}
    Take $m$ such that $m$ is a smallest element of $A$ with respect to $R$.
    Take $c\in X$ such that $f(c) = m$ by \cref{smallest_element,img_iff,function_apply_intro}.
    Take $M$ such that $M$ is a largest element of $A$ with respect to $R$.
    Take $d\in X$ such that $f(d) = M$ by \cref{largest_element,img_iff,function_apply_intro}.
    Show that $\apply{f}{c}$ is a smallest element of $A$ with respect to $R$ and
        $\apply{f}{d}$ is a largest element of $A$ with respect to $R$.
    \begin{subproof}
        Follows by \cref{smallest_element,largest_element}.
    \end{subproof}
\end{proof}
Definition 251
point_distance_set

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

LaTeX source
\begin{definition}
\label{point_distance_set}
    $\pointDistanceSet{d}{A}{x} = \{d((x,a)) \mid a\in A\}$.
\end{definition}
Definition 252
point_set_distance

$r$ is the distance from $x$ to $A$ in $X$ with respect to $d$ iff $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and $r\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $r$ is an infimum of $\pointDistanceSet{d}{A}{x}$.

LaTeX source
\begin{definition}
\label{point_set_distance}
    $r$ is the distance from $x$ to $A$ in $X$ with respect to $d$ iff
        $x\in X$ and $A\subseteq X$ and $r\in\reals$ and
        $r$ is an infimum of $\pointDistanceSet{d}{A}{x}$.
\end{definition}
Lemma 375
point_set_distance_continuous

Suppose $d$ is a metric on $X$.
Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$.
Suppose $A\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Let $T = \metricTopology{d}{X}$.
Then there exists $f$ such that $f$ is a function from $X$ to $\reals$ and for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $f(x)$ is the distance from $x$ to $A$ in $X$ with respect to $d$ and $f$ is continuous from $X$ to $\reals$ with respect to $T$ and $\standardTopologyR$.

LaTeX source
\begin{lemma}
\label{point_set_distance_continuous}
    Suppose $d$ is a metric on $X$.
    Suppose $A\subseteq X$.
    Suppose $A\neq\emptyset$.
    Let $T = \metricTopology{d}{X}$.
    Then there exists $f$ such that
        $f$ is a function from $X$ to $\reals$ and
        for all $x\in X$ we have $f(x)$ is the distance from $x$ to $A$ in $X$ with respect to $d$ and
        $f$ is continuous from $X$ to $\reals$ with respect to $T$ and $\standardTopologyR$.
\end{lemma}
Proof

Let $R = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times}\reals \mid \text{there exists $x\in X$ such that there exists $r\in\reals$ such that $w = (x,r)$ and $r$ is the distance from $x$ to $A$ in $X$ with respect to $d$}\}$.
For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ there exist $x,r$ such that $w = (x,r)$.
$R$ is a relation by Definition 12.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ there exists $r$ such that $x\mathrel{R} r$.

Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Let $S = \pointDistanceSet{d}{A}{x}$.
$S\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$ by Definition 1, Definition 179, Definition 251, Proposition 115, Proposition 361.
$S\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Axiom 2, Definition 251, Proposition 10.
$0$ is a lower bound of $S$ and $S$ is bounded below by Axiom 17, Definition 1, Definition 68, Definition 69, Definition 175, Definition 179, Definition 251.
Take $r$ such that $r$ is an infimum of $S$ by Proposition 473.
$r$ is the distance from $x$ to $A$ in $X$ with respect to $d$ by Definition 68, Definition 72, Definition 252.
$(x,r)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
$x\mathrel{R} r$ by Definition 12.

Take $f$ such that $f$ is a function on $X$ and for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $x\mathrel{R} f(x)$ by Axiom 54.
For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $f(x)$ is the distance from $x$ to $A$ in $X$ with respect to $d$ and $f(x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 6, Definition 12, Definition 252.
$f$ is a function from $X$ to $\reals$ by Definition 55, Proposition 358.
Let $T_Y = \metricTopology{\standardMetricR}{\reals}$.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have for all $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ there exists $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and for all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ if $d((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ then $\apply{\standardMetricR}{(f(x),f(y))} < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Fix $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ such that $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.
Let $\class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.
$0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$.

Claim: For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ if $d((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ then $\apply{\standardMetricR}{(f(x),f(y))} < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

Fix $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Assume $d((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$.
$d((x,y)) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ by Lemma 83.
Let $S_x = \pointDistanceSet{d}{A}{x}$.
Let $S_y = \pointDistanceSet{d}{A}{y}$.
$f(x)$ is an infimum of $S_x$ and $f(y)$ is an infimum of $S_y$ by Definition 252.
$f(x)$ is a lower bound of $S_x$ and $f(y)$ is a lower bound of $S_y$ by Definition 72.

Claim: $f(x) \class{latex-symbol-tip latex-symbol-id-geq}{\geq} f(y) - d((x,y))$.

Let $b = f(y) - d((x,y))$.
$f(y)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 252.
$(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$d\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X\class{latex-symbol-tip latex-symbol-id-times}{\times} X}{\reals}$ by Definition 179.
$d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Proposition 361.
$b = f(y) + \neg{(d((x,y)))}$ by Definition 64.
$\neg{(d((x,y)))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 18.
$b\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.

Claim: For all $s\class{latex-symbol-tip latex-symbol-id-in}{\in} S_x$ we have $b \class{latex-symbol-tip latex-symbol-id-leq}{\leq} s$.

Fix $s\class{latex-symbol-tip latex-symbol-id-in}{\in} S_x$.
Take $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $s = d((x,a))$ by Definition 251.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Definition 1.
$d((y,x)) = d((x,y))$ by Definition 177, Definition 179.
$d((y,x)) + d((x,a)) \class{latex-symbol-tip latex-symbol-id-geq}{\geq} d((y,a))$ by Definition 178, Definition 179.
$d((y,a)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((y,x)) + d((x,a))$.
$d((y,a)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y)) + d((x,a))$.
$(y,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $(x,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$d((y,a))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $d((x,a))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Proposition 361.
$d((x,y)) + d((x,a))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$f(y) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((y,a))$ by Definition 68, Definition 251, Definition 252.
$f(y) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y)) + d((x,a))$ by Lemma 23.
Let $u = d((x,y))$.
Let $v = d((x,a))$.
$f(y) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} u + v$ by Lemma 23.
$f(y) + \neg{u} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (u + v) + \neg{u}$ by Lemma 24.
$u\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $v\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
$u + \neg{u} = 0$ by Axiom 18.
$(u + v) + \neg{u} = v + (u + \neg{u})$ by Axiom 15, Axiom 16.
$(u + v) + \neg{u} = v + 0$ by Axiom 18.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 17.
$v + 0 = 0 + v$ by Axiom 16.
$0 + v = v$ by Axiom 17.
$(u + v) + \neg{u} = v$ by Axiom 16, Axiom 17.
$f(y) + \neg{u} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} v$ by Lemma 23.
$f(y) - u \class{latex-symbol-tip latex-symbol-id-leq}{\leq} v$ by Definition 64.
$f(y) - d((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,a))$.
$b \class{latex-symbol-tip latex-symbol-id-leq}{\leq} s$.

$b$ is a lower bound of $S_x$ by Definition 1, Definition 68.
$f(x) \class{latex-symbol-tip latex-symbol-id-geq}{\geq} b$ by Definition 72.

Claim: $f(y) \class{latex-symbol-tip latex-symbol-id-geq}{\geq} f(x) - d((x,y))$.

Let $b = f(x) - d((x,y))$.
$f(x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $d\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X\class{latex-symbol-tip latex-symbol-id-times}{\times} X}{\reals}$ by Definition 179, Definition 252, Proposition 115.
$d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Proposition 361.
$b = f(x) + \neg{(d((x,y)))}$ by Definition 64.
$\neg{(d((x,y)))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 18.
$b\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.

Claim: For all $s\class{latex-symbol-tip latex-symbol-id-in}{\in} S_y$ we have $b \class{latex-symbol-tip latex-symbol-id-leq}{\leq} s$.

Fix $s\class{latex-symbol-tip latex-symbol-id-in}{\in} S_y$.
Take $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $s = d((y,a))$ by Definition 251.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Definition 1.
$d((x,y)) = d((y,x))$ by Definition 177, Definition 179.
$d((x,y)) + d((y,a)) \class{latex-symbol-tip latex-symbol-id-geq}{\geq} d((x,a))$ by Definition 178, Definition 179.
$d((x,a)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y)) + d((y,a))$.
$(x,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $(y,a)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$d((x,a))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $d((y,a))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Proposition 361.
$d((x,y)) + d((y,a))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$f(x) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,a))$ by Definition 68, Definition 251, Definition 252.
$f(x) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y)) + d((y,a))$ by Lemma 23.
Let $u = d((x,y))$.
Let $v = d((y,a))$.
$f(x) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} u + v$ by Lemma 23.
$f(x) + \neg{u} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (u + v) + \neg{u}$ by Lemma 24.
$u\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $v\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
$u + \neg{u} = 0$ by Axiom 18.
$(u + v) + \neg{u} = v + (u + \neg{u})$ by Axiom 15, Axiom 16.
$(u + v) + \neg{u} = v + 0$ by Axiom 18.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 17.
$v + 0 = 0 + v$ by Axiom 16.
$0 + v = v$ by Axiom 17.
$(u + v) + \neg{u} = v$ by Axiom 16, Axiom 17.
$f(x) + \neg{u} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} v$ by Lemma 23.
$f(x) - u \class{latex-symbol-tip latex-symbol-id-leq}{\leq} v$ by Definition 64.
$f(x) - d((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((y,a))$.
$b \class{latex-symbol-tip latex-symbol-id-leq}{\leq} s$.

$b$ is a lower bound of $S_y$ by Definition 1, Definition 68.
$f(y) \class{latex-symbol-tip latex-symbol-id-geq}{\geq} b$ by Definition 72.

$f(x) - d((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} f(y)$.
$f(x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $f(y)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 252.
$(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $d\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X\class{latex-symbol-tip latex-symbol-id-times}{\times} X}{\reals}$ by Definition 179, Proposition 115.
$d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Proposition 361.
$\neg{(d((x,y)))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 18.
$f(x) + \neg{(d((x,y)))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$f(x) - d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 64.
$(f(x) - d((x,y))) + d((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} f(y) + d((x,y))$ by Lemma 24.
Let $s_0 = (f(x) - d((x,y))) + d((x,y))$.
$f(x) - d((x,y)) = f(x) + \neg{(d((x,y)))}$ by Definition 64.
$s_0 = f(x) + (\neg{(d((x,y)))} + d((x,y)))$ by Axiom 15.
$\neg{(d((x,y)))} + d((x,y)) = 0$ by Axiom 16, Axiom 18.
$s_0 = f(x) + 0$ by Axiom 15.
$f(x) + 0 = 0 + f(x)$ by Axiom 16, Axiom 17, Definition 252.
$0 + f(x) = f(x)$ by Axiom 17, Definition 252.
$s_0 = f(x)$ by Axiom 16, Axiom 17.
$f(x) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} s_0$.
$f(x) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} f(y) + d((x,y))$ by Lemma 23.
$f(y) - d((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} f(x)$.
$f(y)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $f(x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 252.
$(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $d\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X\class{latex-symbol-tip latex-symbol-id-times}{\times} X}{\reals}$ by Definition 179, Proposition 115.
$d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Proposition 361.
$\neg{(d((x,y)))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 18.
$f(y) + \neg{(d((x,y)))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$f(y) - d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 64.
We have $(f(y) - d((x,y))) + d((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} f(x) + d((x,y))$ by Lemma 24.
Let $s_1 = (f(y) - d((x,y))) + d((x,y))$.
$f(y) - d((x,y)) = f(y) + \neg{(d((x,y)))}$ by Definition 64.
$s_1 = f(y) + (\neg{(d((x,y)))} + d((x,y)))$ by Axiom 15.
$\neg{(d((x,y)))} + d((x,y)) = 0$ by Axiom 16, Axiom 18.
$s_1 = f(y) + 0$ by Axiom 15.
$f(y) + 0 = 0 + f(y)$ by Axiom 16, Axiom 17, Definition 252.
$0 + f(y) = f(y)$ by Axiom 17, Definition 252.
$s_1 = f(y)$ by Axiom 16, Axiom 17.
$f(y) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} s_1$.
$f(y) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} f(x) + d((x,y))$ by Lemma 23.
$f(x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $f(y)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 252.
$(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $d\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X\class{latex-symbol-tip latex-symbol-id-times}{\times} X}{\reals}$ by Definition 179, Proposition 115.
$d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Proposition 361.
$\neg{(f(y))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 18.
$f(x) + \neg{(f(y))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$f(x) - f(y)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 64.
$\neg{(f(x) - f(y))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 18.
$f(y) + d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
We have $f(x) + \neg{(f(y))} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (f(y) + d((x,y))) + \neg{(f(y))}$ by Lemma 24.
$(f(y) + d((x,y))) + \neg{(f(y))} = f(y) + (d((x,y)) + \neg{(f(y))})$ by Axiom 15.
$d((x,y)) + \neg{(f(y))} = \neg{(f(y))} + d((x,y))$ by Axiom 16.
$f(y) + (\neg{(f(y))} + d((x,y))) = (f(y) + \neg{(f(y))}) + d((x,y))$ by Axiom 15.
$f(y) + \neg{(f(y))} = 0$ by Axiom 18.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 17.
$(f(y) + d((x,y))) + \neg{(f(y))} = d((x,y))$ by Axiom 15, Axiom 16, Axiom 17.
$f(x) + \neg{(f(y))} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y))$ by Lemma 23.
$f(x) - f(y) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y))$ by Definition 64.
$f(x) + d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $\neg{(f(x))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13, Axiom 18.
$f(y) + \neg{(f(x))} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} (f(x) + d((x,y))) + \neg{(f(x))}$ by Lemma 24.
$(f(x) + d((x,y))) + \neg{(f(x))} = f(x) + (d((x,y)) + \neg{(f(x))})$ by Axiom 15.
$d((x,y)) + \neg{(f(x))} = \neg{(f(x))} + d((x,y))$ by Axiom 16.
$f(x) + (\neg{(f(x))} + d((x,y))) = (f(x) + \neg{(f(x))}) + d((x,y))$ by Axiom 15.
$f(x) + \neg{(f(x))} = 0$ by Axiom 18.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 17.
$(f(x) + d((x,y))) + \neg{(f(x))} = d((x,y))$ by Axiom 15, Axiom 16, Axiom 17.
$f(y) + \neg{(f(x))} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y))$ by Lemma 23.
$f(y) - f(x) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y))$ by Definition 64.
$f(y) - f(x) = \neg{(f(x) - f(y))}$ by Lemma 14.
$\neg{(f(x) - f(y))} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y))$.
$\abs{(f(x) - f(y))} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y))$ by Proposition 484.
$f(x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $f(y)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 252.
$\neg{(f(y))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 18.
$f(x) + \neg{(f(y))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 13.
$f(x) - f(y)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 64.
$(f(x),f(y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals\class{latex-symbol-tip latex-symbol-id-times}{\times}\reals$ by Proposition 115.
$\abs{(f(x) - f(y))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Lemma 34.
Let $p = (f(x),f(y))$.
$\fst{p} = f(x)$ and $\snd{p} = f(y)$ by Axiom 10, Axiom 11.
$\abs{(\fst{p} - \snd{p})} = \abs{(f(x) - f(y))}$.
$(p,\abs{(f(x) - f(y))})\class{latex-symbol-tip latex-symbol-id-in}{\in}\standardMetricR$ by Definition 184.
$\apply{\standardMetricR}{(f(x),f(y))} = \abs{(f(x) - f(y))}$ by Definition 179, Lemma 198, Proposition 346, Proposition 359.
$\apply{\standardMetricR}{(f(x),f(y))} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,y))$.
$(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
$d\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X\class{latex-symbol-tip latex-symbol-id-times}{\times} X}{\reals}$ by Definition 179.
$d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $\apply{\standardMetricR}{(f(x),f(y))}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Proposition 361.
$\apply{\standardMetricR}{(f(x),f(y))} < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ by Axiom 36, Lemma 81, Lemma 82.

$f$ is continuous from $X$ to $\reals$ with respect to $T$ and $T_Y$ by Lemma 198, Theorem 29.
$f$ is continuous from $X$ to $\reals$ with respect to $T$ and $\standardTopologyR$ by Lemma 200, Lemma 368.

LaTeX source
\begin{proof}
    Let $R = \{w\in X\times\reals \mid \text{there exists $x\in X$ such that there exists $r\in\reals$ such that
        $w = (x,r)$ and $r$ is the distance from $x$ to $A$ in $X$ with respect to $d$}\}$.
    For all $w$ such that $w\in R$ there exist $x,r$ such that $w = (x,r)$.
    $R$ is a relation by \cref{relation}.
    Show that for all $x\in X$ there exists $r$ such that $x\mathrel{R} r$.
    \begin{subproof}
        Fix $x\in X$.
        Let $S = \pointDistanceSet{d}{A}{x}$.
        $S\subseteq\reals$ by \cref{point_distance_set,subseteq,times_tuple_intro,metric_on,funs_type_apply}.
        $S\neq\emptyset$ by \cref{nonempty_inhabited,point_distance_set,emptyset}.
        $0$ is a lower bound of $S$ and $S$ is bounded below
            by \cref{point_distance_set,subseteq,metric_on,metric_nonnegative,real_add_ident,real_lower_bound,real_bounded_below}.
        Take $r$ such that $r$ is an infimum of $S$ by \cref{real_infimum_exists}.
        $r$ is the distance from $x$ to $A$ in $X$ with respect to $d$
            by \cref{real_infimum,real_lower_bound,point_set_distance}.
        $(x,r)\in R$.
        $x\mathrel{R} r$ by \cref{relation}.
    \end{subproof}
    Take $f$ such that $f$ is a function on $X$ and for all $x\in X$ we have $x\mathrel{R} f(x)$
        by \cref{axiom_of_choice}.
    For all $x\in X$ we have $f(x)$ is the distance from $x$ to $A$ in $X$ with respect to $d$ and $f(x)\in\reals$
        by \cref{relation,pair_eq_iff,point_set_distance}.
    $f$ is a function from $X$ to $\reals$ by \cref{funs_intro,funs}.
    Let $T_Y = \metricTopology{\standardMetricR}{\reals}$.
    Show that for all $x\in X$ we have
        for all $\epsilon\in\reals$ such that $0 < \epsilon$
        there exists $\delta\in\reals$ such that $0 < \delta$ and
        for all $y\in X$ if $d((x,y)) < \delta$ then
            $\apply{\standardMetricR}{(f(x),f(y))} < \epsilon$.
    \begin{subproof}
        Fix $x\in X$.
        Fix $\epsilon$ such that $\epsilon\in\reals$ and $0 < \epsilon$.
        Let $\delta = \epsilon$.
        $0 < \delta$.
        Show that for all $y\in X$ if $d((x,y)) < \delta$ then
            $\apply{\standardMetricR}{(f(x),f(y))} < \epsilon$.
        \begin{subproof}
            Fix $y\in X$.
            Assume $d((x,y)) < \delta$.
            $d((x,y)) < \epsilon$ by \cref{real_lt_subst_right}.
            Let $S_x = \pointDistanceSet{d}{A}{x}$.
            Let $S_y = \pointDistanceSet{d}{A}{y}$.
                $f(x)$ is an infimum of $S_x$ and $f(y)$ is an infimum of $S_y$ by \cref{point_set_distance}.
                $f(x)$ is a lower bound of $S_x$ and $f(y)$ is a lower bound of $S_y$ by \cref{real_infimum}.
                Show that $f(x) \geq f(y) - d((x,y))$.
                \begin{subproof}
                    Let $b = f(y) - d((x,y))$.
                    $f(y)\in\reals$ by \cref{point_set_distance}.
                    $(x,y)\in X\times X$ by \cref{times_tuple_intro}.
                    $d\in\funs{X\times X}{\reals}$ by \cref{metric_on}.
                    $d((x,y))\in\reals$ by \cref{funs_type_apply}.
                    $b = f(y) + \neg{(d((x,y)))}$ by \cref{real_sub}.
                    $\neg{(d((x,y)))}\in\reals$ by \cref{real_add_inverse}.
                    $b\in\reals$ by \cref{real_add_closed}.
                    Show that for all $s\in S_x$ we have $b \leq s$.
                    \begin{subproof}
                        Fix $s\in S_x$.
                        Take $a\in A$ such that $s = d((x,a))$ by \cref{point_distance_set}.
                        $a\in X$ by \cref{subseteq}.
                        $d((y,x)) = d((x,y))$ by \cref{metric_on,metric_symmetric}.
                        $d((y,x)) + d((x,a)) \geq d((y,a))$ by \cref{metric_on,metric_triangle_inequality}.
                        $d((y,a)) \leq d((y,x)) + d((x,a))$.
                        $d((y,a)) \leq d((x,y)) + d((x,a))$.
                        $(y,a)\in X\times X$ and $(x,y)\in X\times X$ and $(x,a)\in X\times X$
                            by \cref{times_tuple_intro}.
                        $d((y,a))\in\reals$ and $d((x,y))\in\reals$ and $d((x,a))\in\reals$
                            by \cref{funs_type_apply}.
                        $d((x,y)) + d((x,a))\in\reals$ by \cref{real_add_closed}.
                        $f(y) \leq d((y,a))$ by \cref{point_set_distance,real_lower_bound,point_distance_set}.
                        $f(y) \leq d((x,y)) + d((x,a))$ by \cref{real_leq_trans}.
                        Let $u = d((x,y))$.
                        Let $v = d((x,a))$.
                        $f(y) \leq u + v$ by \cref{real_leq_trans}.
                        $f(y) + \neg{u} \leq (u + v) + \neg{u}$ by \cref{real_leq_add}.
                        $u\in\reals$ and $v\in\reals$.
                        $u + \neg{u} = 0$ by \cref{real_add_inverse}.
                        $(u + v) + \neg{u} = v + (u + \neg{u})$ by \cref{real_add_assoc,real_add_comm}.
                        $(u + v) + \neg{u} = v + 0$ by \cref{real_add_inverse}.
                        $0\in\reals$ by \cref{real_add_ident}.
                        $v + 0 = 0 + v$ by \cref{real_add_comm}.
                        $0 + v = v$ by \cref{real_add_ident}.
                        $(u + v) + \neg{u} = v$ by \cref{real_add_comm,real_add_ident}.
                        $f(y) + \neg{u} \leq v$ by \cref{real_leq_trans}.
                        $f(y) - u \leq v$ by \cref{real_sub}.
                        $f(y) - d((x,y)) \leq d((x,a))$.
                        $b \leq s$.
                    \end{subproof}
                    $b$ is a lower bound of $S_x$ by \cref{real_lower_bound,subseteq}.
                    $f(x) \geq b$ by \cref{real_infimum}.
                \end{subproof}
                Show that $f(y) \geq f(x) - d((x,y))$.
                \begin{subproof}
                    Let $b = f(x) - d((x,y))$.
                    $f(x)\in\reals$ and $(x,y)\in X\times X$ and $d\in\funs{X\times X}{\reals}$
                        by \cref{point_set_distance,times_tuple_intro,metric_on}.
                    $d((x,y))\in\reals$ by \cref{funs_type_apply}.
                    $b = f(x) + \neg{(d((x,y)))}$ by \cref{real_sub}.
                    $\neg{(d((x,y)))}\in\reals$ by \cref{real_add_inverse}.
                    $b\in\reals$ by \cref{real_add_closed}.
                    Show that for all $s\in S_y$ we have $b \leq s$.
                    \begin{subproof}
                        Fix $s\in S_y$.
                        Take $a\in A$ such that $s = d((y,a))$ by \cref{point_distance_set}.
                        $a\in X$ by \cref{subseteq}.
                        $d((x,y)) = d((y,x))$ by \cref{metric_on,metric_symmetric}.
                        $d((x,y)) + d((y,a)) \geq d((x,a))$ by \cref{metric_on,metric_triangle_inequality}.
                        $d((x,a)) \leq d((x,y)) + d((y,a))$.
                        $(x,a)\in X\times X$ and $(x,y)\in X\times X$ and $(y,a)\in X\times X$
                            by \cref{times_tuple_intro}.
                        $d((x,a))\in\reals$ and $d((x,y))\in\reals$ and $d((y,a))\in\reals$
                            by \cref{funs_type_apply}.
                        $d((x,y)) + d((y,a))\in\reals$ by \cref{real_add_closed}.
                        $f(x) \leq d((x,a))$ by \cref{point_set_distance,real_lower_bound,point_distance_set}.
                        $f(x) \leq d((x,y)) + d((y,a))$ by \cref{real_leq_trans}.
                        Let $u = d((x,y))$.
                        Let $v = d((y,a))$.
                        $f(x) \leq u + v$ by \cref{real_leq_trans}.
                        $f(x) + \neg{u} \leq (u + v) + \neg{u}$ by \cref{real_leq_add}.
                        $u\in\reals$ and $v\in\reals$.
                        $u + \neg{u} = 0$ by \cref{real_add_inverse}.
                        $(u + v) + \neg{u} = v + (u + \neg{u})$ by \cref{real_add_assoc,real_add_comm}.
                        $(u + v) + \neg{u} = v + 0$ by \cref{real_add_inverse}.
                        $0\in\reals$ by \cref{real_add_ident}.
                        $v + 0 = 0 + v$ by \cref{real_add_comm}.
                        $0 + v = v$ by \cref{real_add_ident}.
                        $(u + v) + \neg{u} = v$ by \cref{real_add_comm,real_add_ident}.
                        $f(x) + \neg{u} \leq v$ by \cref{real_leq_trans}.
                        $f(x) - u \leq v$ by \cref{real_sub}.
                        $f(x) - d((x,y)) \leq d((y,a))$.
                        $b \leq s$.
                    \end{subproof}
                    $b$ is a lower bound of $S_y$ by \cref{real_lower_bound,subseteq}.
                    $f(y) \geq b$ by \cref{real_infimum}.
                \end{subproof}
                $f(x) - d((x,y)) \leq f(y)$.
                $f(x)\in\reals$ and $f(y)\in\reals$ by \cref{point_set_distance}.
                $(x,y)\in X\times X$ and $d\in\funs{X\times X}{\reals}$
                    by \cref{times_tuple_intro,metric_on}.
                $d((x,y))\in\reals$ by \cref{funs_type_apply}.
                $\neg{(d((x,y)))}\in\reals$ by \cref{real_add_inverse}.
                $f(x) + \neg{(d((x,y)))}\in\reals$ by \cref{real_add_closed}.
                $f(x) - d((x,y))\in\reals$ by \cref{real_sub}.
                $(f(x) - d((x,y))) + d((x,y)) \leq f(y) + d((x,y))$ by \cref{real_leq_add}.
                Let $s_0 = (f(x) - d((x,y))) + d((x,y))$.
                $f(x) - d((x,y)) = f(x) + \neg{(d((x,y)))}$ by \cref{real_sub}.
                $s_0 = f(x) + (\neg{(d((x,y)))} + d((x,y)))$ by \cref{real_add_assoc}.
                $\neg{(d((x,y)))} + d((x,y)) = 0$ by \cref{real_add_inverse,real_add_comm}.
                $s_0 = f(x) + 0$ by \cref{real_add_assoc}.
                $f(x) + 0 = 0 + f(x)$ by \cref{point_set_distance,real_add_ident,real_add_comm}.
                $0 + f(x) = f(x)$ by \cref{point_set_distance,real_add_ident}.
                $s_0 = f(x)$ by \cref{real_add_comm,real_add_ident}.
                $f(x) \leq s_0$.
                $f(x) \leq f(y) + d((x,y))$ by \cref{real_leq_trans}.
                $f(y) - d((x,y)) \leq f(x)$.
                $f(y)\in\reals$ and $f(x)\in\reals$ by \cref{point_set_distance}.
                $(x,y)\in X\times X$ and $d\in\funs{X\times X}{\reals}$
                    by \cref{times_tuple_intro,metric_on}.
                $d((x,y))\in\reals$ by \cref{funs_type_apply}.
                $\neg{(d((x,y)))}\in\reals$ by \cref{real_add_inverse}.
                $f(y) + \neg{(d((x,y)))}\in\reals$ by \cref{real_add_closed}.
                $f(y) - d((x,y))\in\reals$ by \cref{real_sub}.
                We have $(f(y) - d((x,y))) + d((x,y)) \leq f(x) + d((x,y))$ by \cref{real_leq_add}.
                Let $s_1 = (f(y) - d((x,y))) + d((x,y))$.
                $f(y) - d((x,y)) = f(y) + \neg{(d((x,y)))}$ by \cref{real_sub}.
                $s_1 = f(y) + (\neg{(d((x,y)))} + d((x,y)))$ by \cref{real_add_assoc}.
                $\neg{(d((x,y)))} + d((x,y)) = 0$ by \cref{real_add_inverse,real_add_comm}.
                $s_1 = f(y) + 0$ by \cref{real_add_assoc}.
                $f(y) + 0 = 0 + f(y)$ by \cref{point_set_distance,real_add_ident,real_add_comm}.
                $0 + f(y) = f(y)$ by \cref{point_set_distance,real_add_ident}.
                $s_1 = f(y)$ by \cref{real_add_comm,real_add_ident}.
                $f(y) \leq s_1$.
                $f(y) \leq f(x) + d((x,y))$ by \cref{real_leq_trans}.
                $f(x)\in\reals$ and $f(y)\in\reals$ by \cref{point_set_distance}.
                $(x,y)\in X\times X$ and $d\in\funs{X\times X}{\reals}$
                    by \cref{times_tuple_intro,metric_on}.
                $d((x,y))\in\reals$ by \cref{funs_type_apply}.
                $\neg{(f(y))}\in\reals$ by \cref{real_add_inverse}.
                $f(x) + \neg{(f(y))}\in\reals$ by \cref{real_add_closed}.
                $f(x) - f(y)\in\reals$ by \cref{real_sub}.
                $\neg{(f(x) - f(y))}\in\reals$ by \cref{real_add_inverse}.
                $f(y) + d((x,y))\in\reals$ by \cref{real_add_closed}.
                We have $f(x) + \neg{(f(y))} \leq (f(y) + d((x,y))) + \neg{(f(y))}$ by \cref{real_leq_add}.
                $(f(y) + d((x,y))) + \neg{(f(y))} = f(y) + (d((x,y)) + \neg{(f(y))})$ by \cref{real_add_assoc}.
                $d((x,y)) + \neg{(f(y))} = \neg{(f(y))} + d((x,y))$ by \cref{real_add_comm}.
                $f(y) + (\neg{(f(y))} + d((x,y))) = (f(y) + \neg{(f(y))}) + d((x,y))$ by \cref{real_add_assoc}.
                $f(y) + \neg{(f(y))} = 0$ by \cref{real_add_inverse}.
                $0\in\reals$ by \cref{real_add_ident}.
                $(f(y) + d((x,y))) + \neg{(f(y))} = d((x,y))$ by \cref{real_add_ident,real_add_assoc,real_add_comm}.
                $f(x) + \neg{(f(y))} \leq d((x,y))$ by \cref{real_leq_trans}.
                $f(x) - f(y) \leq d((x,y))$ by \cref{real_sub}.
                $f(x) + d((x,y))\in\reals$ and $\neg{(f(x))}\in\reals$
                    by \cref{real_add_closed,real_add_inverse}.
                $f(y) + \neg{(f(x))} \leq (f(x) + d((x,y))) + \neg{(f(x))}$ by \cref{real_leq_add}.
                $(f(x) + d((x,y))) + \neg{(f(x))} = f(x) + (d((x,y)) + \neg{(f(x))})$ by \cref{real_add_assoc}.
                $d((x,y)) + \neg{(f(x))} = \neg{(f(x))} + d((x,y))$ by \cref{real_add_comm}.
                $f(x) + (\neg{(f(x))} + d((x,y))) = (f(x) + \neg{(f(x))}) + d((x,y))$ by \cref{real_add_assoc}.
                $f(x) + \neg{(f(x))} = 0$ by \cref{real_add_inverse}.
                $0\in\reals$ by \cref{real_add_ident}.
                $(f(x) + d((x,y))) + \neg{(f(x))} = d((x,y))$ by \cref{real_add_ident,real_add_assoc,real_add_comm}.
                $f(y) + \neg{(f(x))} \leq d((x,y))$ by \cref{real_leq_trans}.
                $f(y) - f(x) \leq d((x,y))$ by \cref{real_sub}.
                $f(y) - f(x) = \neg{(f(x) - f(y))}$ by \cref{real_sub_swap_neg}.
                $\neg{(f(x) - f(y))} \leq d((x,y))$.
                $\abs{(f(x) - f(y))} \leq d((x,y))$ by \cref{real_abs_leq_if_pm_leq}.
                $f(x)\in\reals$ and $f(y)\in\reals$ by \cref{point_set_distance}.
                $\neg{(f(y))}\in\reals$ by \cref{real_add_inverse}.
                $f(x) + \neg{(f(y))}\in\reals$ by \cref{real_add_closed}.
                $f(x) - f(y)\in\reals$ by \cref{real_sub}.
                $(f(x),f(y))\in\reals\times\reals$ by \cref{times_tuple_intro}.
                $\abs{(f(x) - f(y))}\in\reals$ by \cref{real_abs_in_reals}.
                Let $p = (f(x),f(y))$.
                $\fst{p} = f(x)$ and $\snd{p} = f(y)$ by \cref{fst_eq,snd_eq}.
                $\abs{(\fst{p} - \snd{p})} = \abs{(f(x) - f(y))}$.
                $(p,\abs{(f(x) - f(y))})\in\standardMetricR$ by \cref{standard_metric_r}.
                $\apply{\standardMetricR}{(f(x),f(y))} = \abs{(f(x) - f(y))}$
                    by \cref{standard_metric_is_metric,metric_on,funs_elim,function_apply_intro}.
                $\apply{\standardMetricR}{(f(x),f(y))} \leq d((x,y))$.
                $(x,y)\in X\times X$ by \cref{times_tuple_intro}.
                $d\in\funs{X\times X}{\reals}$ by \cref{metric_on}.
                $d((x,y))\in\reals$ and $\apply{\standardMetricR}{(f(x),f(y))}\in\reals$
                    by \cref{funs_type_apply}.
                $\apply{\standardMetricR}{(f(x),f(y))} < \epsilon$
                    by \cref{real_leq_split,real_lt_trans,real_lt_subst_left}.
        \end{subproof}
    \end{subproof}
    $f$ is continuous from $X$ to $\reals$ with respect to $T$ and $T_Y$
        by \cref{standard_metric_is_metric,metric_continuity_eps_delta}.
    $f$ is continuous from $X$ to $\reals$ with respect to $T$ and $\standardTopologyR$
        by \cref{standard_metric_topology,continuous_eq_codomain}.
\end{proof}

from §27 Item 6: Lebesgue number lemma

Lemma 376
lebesgue_number_lemma

Suppose $d$ is a metric on $X$.
Let $T = \metricTopology{d}{X}$.
Suppose $A$ is an open covering of $X$ with respect to $T$.
Suppose $X\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Suppose $X$ is compact with respect to $T$.
Then there exists $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and for all $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and for all $x,y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $d((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ there exists $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$.

LaTeX source
\begin{lemma}
\label{lebesgue_number_lemma}
    Suppose $d$ is a metric on $X$.
    Let $T = \metricTopology{d}{X}$.
    Suppose $A$ is an open covering of $X$ with respect to $T$.
    Suppose $X\neq\emptyset$.
    Suppose $X$ is compact with respect to $T$.
    Then there exists $\delta\in\reals$ such that $0 < \delta$ and
        for all $B$ such that $B\subseteq X$ and
            for all $x,y\in B$ we have $d((x,y)) < \delta$
        there exists $U\in A$ such that $B\subseteq U$.
\end{lemma}
Proof

Take $x_0$ such that $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Proposition 10.
Take $U_0\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in} U_0$ by Axiom 4, Definition 1, Definition 245, Definition 246.
Let $R = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times}\pow{X} \mid \text{there exists $x\in X$ such that there exists $D\in\pow{X}$ such that there exists $\delta\in\reals$ such that there exists $U\in A$ such that $w = (x,D)$ and $0 < \delta$ and $D = \metricBall{d}{X}{x}{\delta}$ and $\metricBall{d}{X}{x}{\delta + \delta} \subseteq U$}\}$.
For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ there exist $x,D$ such that $w = (x,D)$.
$R$ is a relation by Definition 12.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ there exists $D$ such that $x\mathrel{R}D$.

Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Take $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ by Axiom 4, Definition 1, Definition 245, Definition 246.
$U$ is open in $X$ with respect to $T$ by Definition 246.
$T$ is a topology on $X$ by Definition 182, Lemma 76, Lemma 194.
$U\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ by Definition 103.
$U\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ by Definition 1, Definition 101.
$U\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Proposition 156.
Take $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ and $\metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Lemma 195.
Let $\class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} / (1 + 1)$.
$1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 21.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 17.
$0 < 1$ by Proposition 462.
$1 < 1 + 1$ by Axiom 17, Axiom 37.
$(1 + 1)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < 1 + 1$ by Axiom 13, Axiom 36.
$(1 + 1)\class{latex-symbol-tip latex-symbol-id-neq}{\neq} 0$ by Lemma 20.
$\inv{(1 + 1)}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $\inv{(1 + 1)} > 0$ by Axiom 22, Proposition 463.
$\class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)}$ and $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 14, Definition 65.
$0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ by Axiom 38, Definition 65, Lemma 82, Proposition 439.
Let $D = \metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}}$.
$D\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 1, Definition 180.
$D\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ by Proposition 155.

Claim: $\metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$.

$\class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)}$ by Definition 65.
$\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta} = (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)}) + (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)})$.
$(\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}) \rmul \inv{(1 + 1)} = (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)}) + (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)})$ by Lemma 9.
$\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta} = (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}) \rmul \inv{(1 + 1)}$.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul (1 + 1) = (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul 1) + (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul 1)$ by Axiom 23.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul 1 = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ by Axiom 20, Axiom 21.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul (1 + 1) = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.
$(\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}) \rmul \inv{(1 + 1)} = (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul (1 + 1)) \rmul \inv{(1 + 1)}$.
$(\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul (1 + 1)) \rmul \inv{(1 + 1)} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul ((1 + 1) \rmul \inv{(1 + 1)})$ by Axiom 19.
$(1 + 1) \rmul \inv{(1 + 1)} = 1$ by Axiom 22.
$\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul 1$.
$\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ by Axiom 21.

Claim: For all $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}}$ we have $y\class{latex-symbol-tip latex-symbol-id-in}{\in} U$.

Fix $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}}$.
$y\class{latex-symbol-tip latex-symbol-id-in}{\in}\metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}}$ by Definition 180, Lemma 83.
$y\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ by Definition 1.

$\metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Definition 1.

$(x,D)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$.
$x\mathrel{R}D$ by Definition 12.

Take $g$ such that $g$ is a function on $X$ and for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $x\mathrel{R}\apply{g}{x}$ by Axiom 54.
Let $C = \img{g}{X}$.

Claim: For all $D$ such that $D\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ we have $D$ is open in $X$ with respect to $T$.

Fix $D$ such that $D\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Take $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $(x,D)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ by Proposition 235.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ by Axiom 54.
$D = \apply{g}{x}$ by Proposition 349.
$x\mathrel{R}D$ by Axiom 54.
Take $x_1,D_1,\class{latex-symbol-tip latex-symbol-id-delta}{\delta},U$ such that $x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $D_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ and $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $(x,D) = (x_1,D_1)$ and $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and $D_1 = \metricBall{d}{X}{x_1}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}}$ and $\metricBall{d}{X}{x_1}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Definition 12.
$x = x_1$ and $D = D_1$ by Axiom 6.
$D\class{latex-symbol-tip latex-symbol-id-in}{\in}\metricBasis{d}{X}$ by Definition 180, Definition 181, Proposition 155.
Let $B = \metricBasis{d}{X}$.
$B$ is a basis on $X$ by Lemma 194.
$T = \basisTopology{B}{X}$ by Definition 182.
$D\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ by Lemma 77.
$T$ is a topology on $X$ by Lemma 76.
$D$ is open in $X$ with respect to $T$ by Definition 103.

Claim: For all $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{C}$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
$x\mathrel{R}\apply{g}{x}$ by Axiom 54.
Take $x_1,D,\class{latex-symbol-tip latex-symbol-id-delta}{\delta},U$ such that $x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $D\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ and $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $(x,\apply{g}{x}) = (x_1,D)$ and $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and $D = \metricBall{d}{X}{x_1}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}}$ and $\metricBall{d}{X}{x_1}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Definition 12.
$x = x_1$ and $\apply{g}{x} = D$ by Axiom 6.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ by Definition 176, Definition 179, Definition 180, Lemma 82.
$\apply{g}{x}\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Proposition 235, Proposition 348.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{C}$ by Axiom 4.

$C$ is a covering of $X$ by Definition 1, Definition 245.
$C$ is an open covering of $X$ with respect to $T$ by Definition 246.
Take $F$ such that $F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $F$ is finite and $F$ is a covering of $X$ by Definition 247.
$F$ is inhabited by Axiom 4, Definition 1, Definition 245, Proposition 10.
Let $S = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in} F\class{latex-symbol-tip latex-symbol-id-times}{\times}\reals \mid \text{there exists $D\in F$ such that there exists $\delta\in\reals$ such that there exists $x\in X$ such that there exists $U\in A$ such that $w = (D,\delta)$ and $D = \apply{g}{x}$ and $0 < \delta$ and $D = \metricBall{d}{X}{x}{\delta}$ and $\metricBall{d}{X}{x}{\delta + \delta}\subseteq U$}\}$.
For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} S$ there exist $D,\class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ such that $w = (D,\class{latex-symbol-tip latex-symbol-id-delta}{\delta})$.
$S$ is a relation by Definition 12.

Claim: For all $D\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ there exists $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ such that $D\mathrel{S}\class{latex-symbol-tip latex-symbol-id-delta}{\delta}$.

Fix $D\class{latex-symbol-tip latex-symbol-id-in}{\in} F$.
$D\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Definition 1.
Take $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $(x,D)\class{latex-symbol-tip latex-symbol-id-in}{\in} g$ by Proposition 235.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ by Axiom 54.
$D = \apply{g}{x}$ by Proposition 349.
$x\mathrel{R}D$ by Axiom 54.
Take $x_1,D_1,\class{latex-symbol-tip latex-symbol-id-delta}{\delta},U$ such that $x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $D_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ and $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $(x,D) = (x_1,D_1)$ and $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and $D_1 = \metricBall{d}{X}{x_1}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}}$ and $\metricBall{d}{X}{x_1}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Definition 12.
$x = x_1$ and $D = D_1$ by Axiom 6.
$(D,\class{latex-symbol-tip latex-symbol-id-delta}{\delta})\class{latex-symbol-tip latex-symbol-id-in}{\in} F\class{latex-symbol-tip latex-symbol-id-times}{\times}\reals$ by Proposition 115.
$(D,\class{latex-symbol-tip latex-symbol-id-delta}{\delta})\class{latex-symbol-tip latex-symbol-id-in}{\in} S$ by Proposition 115.
$D\mathrel{S}\class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ by Definition 12.

Take $e$ such that $e$ is a function on $F$ and for all $D\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $D\mathrel{S}\apply{e}{D}$ by Axiom 54.
Let $E = \img{e}{F}$.
$E$ is finite by Lemma 192.
Take $D_0$ such that $D_0\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ by Proposition 10.
$\apply{e}{D_0}\class{latex-symbol-tip latex-symbol-id-in}{\in} E$ by Proposition 235, Proposition 348.
$E\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Axiom 2.

Claim: For all $t$ such that $t\class{latex-symbol-tip latex-symbol-id-in}{\in} E$ we have $t\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < t$.

Fix $t$ such that $t\class{latex-symbol-tip latex-symbol-id-in}{\in} E$.
Take $D_1$ such that $D_1\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ and $(D_1,t)\class{latex-symbol-tip latex-symbol-id-in}{\in} e$ by Proposition 235.
$D_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{e}$ by Definition 1.
$t = \apply{e}{D_1}$ by Proposition 349.
$D_1\mathrel{S}t$ by Definition 1.
$(D_1,t)\class{latex-symbol-tip latex-symbol-id-in}{\in} S$ by Definition 12.
Take $D_2,\class{latex-symbol-tip latex-symbol-id-delta}{\delta},x,U$ such that $D_2\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ and $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $(D_1,t) = (D_2,\class{latex-symbol-tip latex-symbol-id-delta}{\delta})$ and $D_2 = \apply{g}{x}$ and $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and $D_2 = \metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}}$ and $\metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta} + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Definition 1.
$t = \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ by Axiom 6.
$t\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < t$ by Lemma 82, Lemma 83.

$E\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$ by Definition 1.
Take $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in} E$ such that $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ is a minimum of $E$ by Lemma 49.
$\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ by Definition 1.

Claim: For all $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and for all $x,y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $d((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ there exists $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$.

Fix $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and for all $x,y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $d((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$.

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

$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U_0$ by Proposition 11.

Claim: There exists $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$.

Follows by Definition 246.

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

Take $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ by Proposition 10.
Take $D\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ by Axiom 4, Definition 1, Definition 245.
$D\mathrel{S}\apply{e}{D}$ by Axiom 54.
$(D,\apply{e}{D})\class{latex-symbol-tip latex-symbol-id-in}{\in} S$ by Definition 12.
Take $D_1,\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1,x,U$ such that $D_1\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ and $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $(D,\apply{e}{D}) = (D_1,\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1)$ and $D_1 = \apply{g}{x}$ and $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ and $D_1 = \metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1}$ and $\metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1 + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Definition 1.
$D = D_1$ and $\apply{e}{D} = \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ by Axiom 6.
$\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1\class{latex-symbol-tip latex-symbol-id-in}{\in} E$ by Proposition 235, Proposition 348.
$\class{latex-symbol-tip latex-symbol-id-delta}{\delta} \class{latex-symbol-tip latex-symbol-id-leq}{\leq} \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ by Definition 74.

Claim: For all $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $y\class{latex-symbol-tip latex-symbol-id-in}{\in} U$.

Fix $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
$d((z,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$.
$z\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Definition 1.
$(z,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $(x,z)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Definition 180, Proposition 115.
$d\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X\class{latex-symbol-tip latex-symbol-id-times}{\times} X}{\reals}$ by Definition 179.
$d((z,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $d((x,z))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $d((x,y))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Proposition 361.
$z\class{latex-symbol-tip latex-symbol-id-in}{\in}\metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1}$ by Axiom 6, Definition 180, Lemma 82.
$d((x,z)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ by Definition 180.

Claim: $d((z,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$.

We have $\class{latex-symbol-tip latex-symbol-id-delta}{\delta} < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ or $\class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ by Lemma 81.

Case. $\class{latex-symbol-tip latex-symbol-id-delta}{\delta} < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$.

$d((z,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ by Axiom 36.

Case. $\class{latex-symbol-tip latex-symbol-id-delta}{\delta} = \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$.

$d((z,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ by Lemma 83.

LaTeX source
\begin{byCase}
                    \caseOf{$\delta < \delta_1$.}
                        $d((z,y)) < \delta_1$ by \cref{real_lt_trans}.
                    \caseOf{$\delta = \delta_1$.}
                        $d((z,y)) < \delta_1$ by \cref{real_lt_subst_right}.
                    
\end{byCase}

$d((x,z)) + d((z,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1 + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ by Proposition 450.
$d((x,y)) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} d((x,z)) + d((z,y))$ by Definition 178, Definition 179.
$d((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1 + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ by Axiom 13, Axiom 36, Lemma 81, Lemma 82.
$y\class{latex-symbol-tip latex-symbol-id-in}{\in}\metricBall{d}{X}{x}{\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1 + \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1}$ by Definition 180.
$y\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ by Definition 1.

$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Definition 1.

Claim: There exists $V\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} V$.

Follows by Definition 1.

LaTeX source
\begin{byCase}
        \caseOf{$B = \emptyset$.}
            $B\subseteq U_0$ by \cref{emptyset_subseteq}.
            Show that there exists $U\in A$ such that $B\subseteq U$.
            \begin{subproof}
                Follows by \cref{open_covering}.
            \end{subproof}
        \caseOf{$B \neq \emptyset$.}
            Take $z$ such that $z\in B$ by \cref{nonempty_inhabited}.
            Take $D\in F$ such that $z\in D$ by \cref{covering,subseteq,unions_iff}.
            $D\mathrel{S}\apply{e}{D}$ by \cref{axiom_of_choice}.
            $(D,\apply{e}{D})\in S$ by \cref{relation}.
            Take $D_1,\delta_1,x,U$ such that $D_1\in F$ and $\delta_1\in\reals$ and $x\in X$ and $U\in A$ and
                $(D,\apply{e}{D}) = (D_1,\delta_1)$ and
                $D_1 = \apply{g}{x}$ and
                $0 < \delta_1$ and
                $D_1 = \metricBall{d}{X}{x}{\delta_1}$ and
                $\metricBall{d}{X}{x}{\delta_1 + \delta_1}\subseteq U$
                by \cref{subseteq}.
            $D = D_1$ and $\apply{e}{D} = \delta_1$ by \cref{pair_eq_iff}.
            $\delta_1\in E$ by \cref{function_apply_elim,img_iff}.
            $\delta \leq \delta_1$ by \cref{real_minimum}.
            Show that for all $y$ such that $y\in B$ we have $y\in U$.
            \begin{subproof}
                Fix $y$ such that $y\in B$.
                $d((z,y)) < \delta$.
                $z\in X$ and $y\in X$ by \cref{subseteq}.
                $(z,y)\in X\times X$ and $(x,z)\in X\times X$ and $(x,y)\in X\times X$
                    by \cref{times_tuple_intro,metric_ball}.
                $d\in\funs{X\times X}{\reals}$ by \cref{metric_on}.
                $d((z,y))\in\reals$ and $d((x,z))\in\reals$ and $d((x,y))\in\reals$
                    by \cref{funs_type_apply}.
                $z\in\metricBall{d}{X}{x}{\delta_1}$ by \cref{pair_eq_iff,real_lt_subst_left,metric_ball}.
                $d((x,z)) < \delta_1$ by \cref{metric_ball}.
                Show that $d((z,y)) < \delta_1$.
                \begin{subproof}
                    We have $\delta < \delta_1$ or $\delta = \delta_1$ by \cref{real_leq_split}.
                    \begin{byCase}
                    \caseOf{$\delta < \delta_1$.}
                        $d((z,y)) < \delta_1$ by \cref{real_lt_trans}.
                    \caseOf{$\delta = \delta_1$.}
                        $d((z,y)) < \delta_1$ by \cref{real_lt_subst_right}.
                    \end{byCase}
                \end{subproof}
                $d((x,z)) + d((z,y)) < \delta_1 + \delta_1$ by \cref{real_lt_add_two}.
                $d((x,y)) \leq d((x,z)) + d((z,y))$ by \cref{metric_on,metric_triangle_inequality}.
                $d((x,y)) < \delta_1 + \delta_1$
                    by \cref{real_add_closed,real_leq_split,real_lt_trans,real_lt_subst_left}.
                $y\in\metricBall{d}{X}{x}{\delta_1 + \delta_1}$ by \cref{metric_ball}.
                $y\in U$ by \cref{subseteq}.
            \end{subproof}
            $B\subseteq U$ by \cref{subseteq}.
            Show that there exists $V\in A$ such that $B\subseteq V$.
            \begin{subproof}
                Follows by \cref{subseteq}.
            \end{subproof}
        
\end{byCase}
Claim: There exists $\class{latex-symbol-tip latex-symbol-id-eta}{\eta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-eta}{\eta}$ and for all $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and for all $x,y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $d((x,y)) < \class{latex-symbol-tip latex-symbol-id-eta}{\eta}$ there exists $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$.

Trivial.

LaTeX source
\begin{proof}
    Take $x_0$ such that $x_0\in X$ by \cref{nonempty_inhabited}.
    Take $U_0\in A$ such that $x_0\in U_0$ by \cref{open_covering,covering,subseteq,unions_iff}.
    Let $R = \{w\in X\times\pow{X} \mid \text{there exists $x\in X$ such that there exists $D\in\pow{X}$ such that
        there exists $\delta\in\reals$ such that there exists $U\in A$ such that
        $w = (x,D)$ and
        $0 < \delta$ and
        $D = \metricBall{d}{X}{x}{\delta}$ and
        $\metricBall{d}{X}{x}{\delta + \delta} \subseteq U$}\}$.
    For all $w$ such that $w\in R$ there exist $x,D$ such that $w = (x,D)$.
    $R$ is a relation by \cref{relation}.
    Show that for all $x\in X$ there exists $D$ such that $x\mathrel{R}D$.
    \begin{subproof}
        Fix $x\in X$.
        Take $U\in A$ such that $x\in U$ by \cref{open_covering,covering,subseteq,unions_iff}.
        $U$ is open in $X$ with respect to $T$ by \cref{open_covering}.
        $T$ is a topology on $X$ by \cref{metric_basis_is_basis,basis_topology_is_topology,metric_topology}.
        $U\in T$ by \cref{open_in}.
        $U\in\pow{X}$ by \cref{topology_on,subseteq}.
        $U\subseteq X$ by \cref{powerset_elim}.
        Take $\epsilon\in\reals$ such that $0 < \epsilon$ and $\metricBall{d}{X}{x}{\epsilon}\subseteq U$
            by \cref{metric_open_iff}.
        Let $\delta = \epsilon / (1 + 1)$.
        $1\in\reals$ by \cref{real_mul_ident}.
        $0\in\reals$ by \cref{real_add_ident}.
        $0 < 1$ by \cref{real_zero_lt_one}.
        $1 < 1 + 1$ by \cref{real_lt_add,real_add_ident}.
        $(1 + 1)\in\reals$ and $0 < 1 + 1$ by \cref{real_add_closed,real_lt_trans}.
        $(1 + 1)\neq 0$ by \cref{real_pos_nonzero}.
        $\inv{(1 + 1)}\in\reals$ and $\inv{(1 + 1)} > 0$ by \cref{real_mul_inverse,real_inv_pos}.
        $\delta = \epsilon \rmul \inv{(1 + 1)}$ and $\delta\in\reals$ by \cref{real_div,real_mul_closed}.
        $0 < \delta$ by \cref{real_div,real_mul_zero,real_lt_mul_pos,real_lt_subst_left}.
        Let $D = \metricBall{d}{X}{x}{\delta}$.
        $D\subseteq X$ by \cref{metric_ball,subseteq}.
        $D\in\pow{X}$ by \cref{powerset_intro}.
        Show that $\metricBall{d}{X}{x}{\delta + \delta}\subseteq U$.
        \begin{subproof}
            $\delta = \epsilon \rmul \inv{(1 + 1)}$ by \cref{real_div}.
            $\delta + \delta =
                (\epsilon \rmul \inv{(1 + 1)}) + (\epsilon \rmul \inv{(1 + 1)})$.
            $(\epsilon + \epsilon) \rmul \inv{(1 + 1)}
                = (\epsilon \rmul \inv{(1 + 1)}) + (\epsilon \rmul \inv{(1 + 1)})$
                by \cref{real_right_distrib}.
            $\delta + \delta = (\epsilon + \epsilon) \rmul \inv{(1 + 1)}$.
            $\epsilon \rmul (1 + 1) = (\epsilon \rmul 1) + (\epsilon \rmul 1)$ by \cref{real_distrib}.
            $\epsilon \rmul 1 = \epsilon$ by \cref{real_mul_ident,real_mul_comm}.
            $\epsilon \rmul (1 + 1) = \epsilon + \epsilon$.
            $(\epsilon + \epsilon) \rmul \inv{(1 + 1)} = (\epsilon \rmul (1 + 1)) \rmul \inv{(1 + 1)}$.
            $(\epsilon \rmul (1 + 1)) \rmul \inv{(1 + 1)}
                = \epsilon \rmul ((1 + 1) \rmul \inv{(1 + 1)})$ by \cref{real_mul_assoc}.
            $(1 + 1) \rmul \inv{(1 + 1)} = 1$ by \cref{real_mul_inverse}.
            $\delta + \delta = \epsilon \rmul 1$.
            $\delta + \delta = \epsilon$ by \cref{real_mul_ident}.
            Show that for all $y$ such that $y\in\metricBall{d}{X}{x}{\delta + \delta}$ we have $y\in U$.
            \begin{subproof}
                Fix $y$ such that $y\in\metricBall{d}{X}{x}{\delta + \delta}$.
                $y\in\metricBall{d}{X}{x}{\epsilon}$ by \cref{real_lt_subst_right,metric_ball}.
                $y\in U$ by \cref{subseteq}.
            \end{subproof}
            $\metricBall{d}{X}{x}{\delta + \delta}\subseteq U$ by \cref{subseteq}.
        \end{subproof}
        $(x,D)\in R$.
        $x\mathrel{R}D$ by \cref{relation}.
    \end{subproof}
    Take $g$ such that $g$ is a function on $X$ and for all $x\in X$ we have $x\mathrel{R}\apply{g}{x}$
        by \cref{axiom_of_choice}.
    Let $C = \img{g}{X}$.
    Show that for all $D$ such that $D\in C$ we have $D$ is open in $X$ with respect to $T$.
    \begin{subproof}
        Fix $D$ such that $D\in C$.
        Take $x$ such that $x\in X$ and $(x,D)\in g$ by \cref{img_iff}.
        $x\in\dom{g}$ by \cref{axiom_of_choice}.
        $D = \apply{g}{x}$ by \cref{function_apply_iff}.
        $x\mathrel{R}D$ by \cref{axiom_of_choice}.
        Take $x_1,D_1,\delta,U$ such that $x_1\in X$ and $D_1\in\pow{X}$ and $\delta\in\reals$ and $U\in A$ and
            $(x,D) = (x_1,D_1)$ and
            $0 < \delta$ and
            $D_1 = \metricBall{d}{X}{x_1}{\delta}$ and
            $\metricBall{d}{X}{x_1}{\delta + \delta}\subseteq U$
            by \cref{relation}.
        $x = x_1$ and $D = D_1$ by \cref{pair_eq_iff}.
        $D\in\metricBasis{d}{X}$ by \cref{metric_ball,powerset_intro,metric_basis}.
        Let $B = \metricBasis{d}{X}$.
        $B$ is a basis on $X$ by \cref{metric_basis_is_basis}.
        $T = \basisTopology{B}{X}$ by \cref{metric_topology}.
        $D\in T$ by \cref{basis_elem_open_in_generated}.
        $T$ is a topology on $X$ by \cref{basis_topology_is_topology}.
        $D$ is open in $X$ with respect to $T$ by \cref{open_in}.
    \end{subproof}
    Show that for all $x$ such that $x\in X$ we have $x\in\unions{C}$.
    \begin{subproof}
        Fix $x$ such that $x\in X$.
        $x\mathrel{R}\apply{g}{x}$ by \cref{axiom_of_choice}.
        Take $x_1,D,\delta,U$ such that $x_1\in X$ and $D\in\pow{X}$ and $\delta\in\reals$ and $U\in A$ and
            $(x,\apply{g}{x}) = (x_1,D)$ and
            $0 < \delta$ and
            $D = \metricBall{d}{X}{x_1}{\delta}$ and
            $\metricBall{d}{X}{x_1}{\delta + \delta}\subseteq U$
            by \cref{relation}.
        $x = x_1$ and $\apply{g}{x} = D$ by \cref{pair_eq_iff}.
        $x\in D$
            by \cref{metric_ball,metric_on,metric_zero_characterization,real_lt_subst_left}.
        $\apply{g}{x}\in C$ by \cref{function_apply_elim,img_iff}.
        $x\in\unions{C}$ by \cref{unions_iff}.
    \end{subproof}
    $C$ is a covering of $X$ by \cref{subseteq,covering}.
    $C$ is an open covering of $X$ with respect to $T$ by \cref{open_covering}.
    Take $F$ such that $F\subseteq C$ and $F$ is finite and $F$ is a covering of $X$ by \cref{compact}.
    $F$ is inhabited by \cref{nonempty_inhabited,covering,subseteq,unions_iff}.
    Let $S = \{w\in F\times\reals \mid \text{there exists $D\in F$ such that there exists $\delta\in\reals$ such that
        there exists $x\in X$ such that there exists $U\in A$ such that
        $w = (D,\delta)$ and
        $D = \apply{g}{x}$ and
        $0 < \delta$ and
        $D = \metricBall{d}{X}{x}{\delta}$ and
        $\metricBall{d}{X}{x}{\delta + \delta}\subseteq U$}\}$.
    For all $w$ such that $w\in S$ there exist $D,\delta$ such that $w = (D,\delta)$.
    $S$ is a relation by \cref{relation}.
    Show that for all $D\in F$ there exists $\delta$ such that $D\mathrel{S}\delta$.
    \begin{subproof}
        Fix $D\in F$.
        $D\in C$ by \cref{subseteq}.
        Take $x$ such that $x\in X$ and $(x,D)\in g$ by \cref{img_iff}.
        $x\in\dom{g}$ by \cref{axiom_of_choice}.
        $D = \apply{g}{x}$ by \cref{function_apply_iff}.
        $x\mathrel{R}D$ by \cref{axiom_of_choice}.
        Take $x_1,D_1,\delta,U$ such that $x_1\in X$ and $D_1\in\pow{X}$ and $\delta\in\reals$ and $U\in A$ and
            $(x,D) = (x_1,D_1)$ and
            $0 < \delta$ and
            $D_1 = \metricBall{d}{X}{x_1}{\delta}$ and
            $\metricBall{d}{X}{x_1}{\delta + \delta}\subseteq U$
            by \cref{relation}.
        $x = x_1$ and $D = D_1$ by \cref{pair_eq_iff}.
        $(D,\delta)\in F\times\reals$ by \cref{times_tuple_intro}.
        $(D,\delta)\in S$ by \cref{times_tuple_intro}.
        $D\mathrel{S}\delta$ by \cref{relation}.
    \end{subproof}
    Take $e$ such that $e$ is a function on $F$ and for all $D\in F$ we have $D\mathrel{S}\apply{e}{D}$
        by \cref{axiom_of_choice}.
    Let $E = \img{e}{F}$.
    $E$ is finite by \cref{finite_image_function}.
    Take $D_0$ such that $D_0\in F$ by \cref{nonempty_inhabited}.
    $\apply{e}{D_0}\in E$ by \cref{function_apply_elim,img_iff}.
    $E\neq\emptyset$ by \cref{emptyset}.
    Show that for all $t$ such that $t\in E$ we have $t\in\reals$ and $0 < t$.
    \begin{subproof}
        Fix $t$ such that $t\in E$.
        Take $D_1$ such that $D_1\in F$ and $(D_1,t)\in e$ by \cref{img_iff}.
        $D_1\in\dom{e}$ by \cref{subseteq}.
        $t = \apply{e}{D_1}$ by \cref{function_apply_iff}.
        $D_1\mathrel{S}t$ by \cref{subseteq}.
        $(D_1,t)\in S$ by \cref{relation}.
        Take $D_2,\delta,x,U$ such that $D_2\in F$ and $\delta\in\reals$ and $x\in X$ and $U\in A$ and
            $(D_1,t) = (D_2,\delta)$ and
            $D_2 = \apply{g}{x}$ and
            $0 < \delta$ and
            $D_2 = \metricBall{d}{X}{x}{\delta}$ and
            $\metricBall{d}{X}{x}{\delta + \delta}\subseteq U$
            by \cref{subseteq}.
        $t = \delta$ by \cref{pair_eq_iff}.
        $t\in\reals$ and $0 < t$ by \cref{real_lt_subst_right,real_lt_subst_left}.
    \end{subproof}
    $E\subseteq\reals$ by \cref{subseteq}.
    Take $\delta\in E$ such that $\delta$ is a minimum of $E$ by \cref{finite_real_minimum}.
    $\delta\in\reals$ and $0 < \delta$ by \cref{subseteq}.
    Show that for all $B$ such that $B\subseteq X$ and
        for all $x,y\in B$ we have $d((x,y)) < \delta$
        there exists $U\in A$ such that $B\subseteq U$.
    \begin{subproof}
        Fix $B$ such that $B\subseteq X$ and
            for all $x,y\in B$ we have $d((x,y)) < \delta$.
        \begin{byCase}
        \caseOf{$B = \emptyset$.}
            $B\subseteq U_0$ by \cref{emptyset_subseteq}.
            Show that there exists $U\in A$ such that $B\subseteq U$.
            \begin{subproof}
                Follows by \cref{open_covering}.
            \end{subproof}
        \caseOf{$B \neq \emptyset$.}
            Take $z$ such that $z\in B$ by \cref{nonempty_inhabited}.
            Take $D\in F$ such that $z\in D$ by \cref{covering,subseteq,unions_iff}.
            $D\mathrel{S}\apply{e}{D}$ by \cref{axiom_of_choice}.
            $(D,\apply{e}{D})\in S$ by \cref{relation}.
            Take $D_1,\delta_1,x,U$ such that $D_1\in F$ and $\delta_1\in\reals$ and $x\in X$ and $U\in A$ and
                $(D,\apply{e}{D}) = (D_1,\delta_1)$ and
                $D_1 = \apply{g}{x}$ and
                $0 < \delta_1$ and
                $D_1 = \metricBall{d}{X}{x}{\delta_1}$ and
                $\metricBall{d}{X}{x}{\delta_1 + \delta_1}\subseteq U$
                by \cref{subseteq}.
            $D = D_1$ and $\apply{e}{D} = \delta_1$ by \cref{pair_eq_iff}.
            $\delta_1\in E$ by \cref{function_apply_elim,img_iff}.
            $\delta \leq \delta_1$ by \cref{real_minimum}.
            Show that for all $y$ such that $y\in B$ we have $y\in U$.
            \begin{subproof}
                Fix $y$ such that $y\in B$.
                $d((z,y)) < \delta$.
                $z\in X$ and $y\in X$ by \cref{subseteq}.
                $(z,y)\in X\times X$ and $(x,z)\in X\times X$ and $(x,y)\in X\times X$
                    by \cref{times_tuple_intro,metric_ball}.
                $d\in\funs{X\times X}{\reals}$ by \cref{metric_on}.
                $d((z,y))\in\reals$ and $d((x,z))\in\reals$ and $d((x,y))\in\reals$
                    by \cref{funs_type_apply}.
                $z\in\metricBall{d}{X}{x}{\delta_1}$ by \cref{pair_eq_iff,real_lt_subst_left,metric_ball}.
                $d((x,z)) < \delta_1$ by \cref{metric_ball}.
                Show that $d((z,y)) < \delta_1$.
                \begin{subproof}
                    We have $\delta < \delta_1$ or $\delta = \delta_1$ by \cref{real_leq_split}.
                    \begin{byCase}
                    \caseOf{$\delta < \delta_1$.}
                        $d((z,y)) < \delta_1$ by \cref{real_lt_trans}.
                    \caseOf{$\delta = \delta_1$.}
                        $d((z,y)) < \delta_1$ by \cref{real_lt_subst_right}.
                    \end{byCase}
                \end{subproof}
                $d((x,z)) + d((z,y)) < \delta_1 + \delta_1$ by \cref{real_lt_add_two}.
                $d((x,y)) \leq d((x,z)) + d((z,y))$ by \cref{metric_on,metric_triangle_inequality}.
                $d((x,y)) < \delta_1 + \delta_1$
                    by \cref{real_add_closed,real_leq_split,real_lt_trans,real_lt_subst_left}.
                $y\in\metricBall{d}{X}{x}{\delta_1 + \delta_1}$ by \cref{metric_ball}.
                $y\in U$ by \cref{subseteq}.
            \end{subproof}
            $B\subseteq U$ by \cref{subseteq}.
            Show that there exists $V\in A$ such that $B\subseteq V$.
            \begin{subproof}
                Follows by \cref{subseteq}.
            \end{subproof}
        \end{byCase}
    \end{subproof}
    Show that there exists $\eta\in\reals$ such that $0 < \eta$ and
        for all $B$ such that $B\subseteq X$ and
            for all $x,y\in B$ we have $d((x,y)) < \eta$
        there exists $U\in A$ such that $B\subseteq U$.
    \begin{subproof}
        Trivial.
    \end{subproof}
\end{proof}
Definition 253
lebesgue_number

$\class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ is a Lebesgue number for $A$ in $X$ with respect to $d$ iff $d$ is a metric on $X$ and $A$ is an open covering of $X$ with respect to $\metricTopology{d}{X}$ and $X\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and for all $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and for all $x,y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $d((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ there exists $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$.

LaTeX source
\begin{definition}
\label{lebesgue_number}
    $\delta$ is a Lebesgue number for $A$ in $X$ with respect to $d$ iff
        $d$ is a metric on $X$ and
        $A$ is an open covering of $X$ with respect to $\metricTopology{d}{X}$ and
        $X\neq\emptyset$ and
        $\delta\in\reals$ and $0 < \delta$ and
        for all $B$ such that $B\subseteq X$ and
            for all $x,y\in B$ we have $d((x,y)) < \delta$
        there exists $U\in A$ such that $B\subseteq U$.
\end{definition}
Definition 254
uniformly_continuous

$f$ is uniformly continuous from $X$ to $Y$ with respect to $d_X$ and $d_Y$ iff $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X}{Y}$ and $d_X$ is a metric on $X$ and $d_Y$ is a metric on $Y$ and for all $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ there exists $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and for all $x_0,x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $d_X((x_0,x_1)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

LaTeX source
\begin{definition}
\label{uniformly_continuous}
    $f$ is uniformly continuous from $X$ to $Y$ with respect to $d_X$ and $d_Y$ iff
        $f\in\funs{X}{Y}$ and
        $d_X$ is a metric on $X$ and
        $d_Y$ is a metric on $Y$ and
        for all $\epsilon\in\reals$ such that $0 < \epsilon$
            there exists $\delta\in\reals$ such that $0 < \delta$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \delta$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
\end{definition}
Theorem 68
uniform_continuity_theorem

Suppose $d_X$ is a metric on $X$.
Suppose $d_Y$ is a metric on $Y$.
Let $T_X = \metricTopology{d_X}{X}$.
Let $T_Y = \metricTopology{d_Y}{Y}$.
Suppose $f$ is continuous from $X$ to $Y$ with respect to $T_X$ and $T_Y$.
Suppose $X$ is compact with respect to $T_X$.
Then $f$ is uniformly continuous from $X$ to $Y$ with respect to $d_X$ and $d_Y$.

LaTeX source
\begin{theorem}
\label{uniform_continuity_theorem}
    Suppose $d_X$ is a metric on $X$.
    Suppose $d_Y$ is a metric on $Y$.
    Let $T_X = \metricTopology{d_X}{X}$.
    Let $T_Y = \metricTopology{d_Y}{Y}$.
    Suppose $f$ is continuous from $X$ to $Y$ with respect to $T_X$ and $T_Y$.
    Suppose $X$ is compact with respect to $T_X$.
    Then $f$ is uniformly continuous from $X$ to $Y$ with respect to $d_X$ and $d_Y$.
\end{theorem}
Proof

$f\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X}{Y}$ by Definition 55, Definition 160.

Claim: For all $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ there exists $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and for all $x_0,x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $d_X((x_0,x_1)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

Fix $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
Assume $0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.
Let $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} / (1 + 1)$.
$1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 21.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 17.
$0 < 1$ by Proposition 462.
$1 < 1 + 1$ by Axiom 17, Axiom 37.
$(1 + 1)\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < 1 + 1$ by Axiom 13, Axiom 36.
$(1 + 1)\class{latex-symbol-tip latex-symbol-id-neq}{\neq} 0$ by Lemma 20.
$\inv{(1 + 1)}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $\inv{(1 + 1)} > 0$ by Axiom 22, Proposition 463.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)}$ and $\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 14, Definition 65.
$0 < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0$ by Axiom 38, Definition 65, Lemma 82, Proposition 439.

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

Let $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_0 = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0$.
$\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_0$.

Claim: For all $x_0,x_1$ such that $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $d_X((x_0,x_1)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_0$ we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

Trivial.

$\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_0$ and for all $x_0,x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $d_X((x_0,x_1)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_0$ we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

Claim: There exists $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and for all $x_0,x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $d_X((x_0,x_1)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

Trivial.

Case. $X \class{latex-symbol-tip latex-symbol-id-neq}{\neq} \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.

Let $R = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-times}{\times}\reals \mid \text{$0 < \snd{w}$ and for all $y\in X$ if $d_X((\fst{w},y)) < \snd{w}$ then $d_Y((\apply{f}{\fst{w}},\apply{f}{y})) < \epsilon_0$}\}$.
$R$ is a relation by Definition 12, Proposition 121.
For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ there exists $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $x\mathrel{R}\class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ by Axiom 10, Axiom 11, Definition 12, Proposition 115, Theorem 29.
Take $g$ such that $g$ is a function on $X$ and for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $x\mathrel{R}\apply{g}{x}$ by Axiom 54.
Let $A = \{U\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X} \mid \class{latex-symbol-tip latex-symbol-id-exists}{\exists} x\class{latex-symbol-tip latex-symbol-id-in}{\in} X. U = \metricBall{d_X}{X}{x}{\apply{g}{x}}\}$.

For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $0 < \apply{g}{x}$ by Axiom 10, Axiom 11, Axiom 54, Definition 12.
For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\unions{A}$ by Axiom 4, Definition 1, Definition 176, Definition 179, Definition 180, Lemma 82, Proposition 155.
For all $U$ such that $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $U$ is open in $X$ with respect to $T_X$ by Axiom 10, Axiom 11, Axiom 54, Definition 1, Definition 103, Definition 115, Definition 180, Definition 181, Definition 182, Lemma 76, Lemma 77, Lemma 194, Proposition 114, Proposition 155.
$A$ is an open covering of $X$ with respect to $T_X$ by Definition 1, Definition 245, Definition 246.

Take $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ and for all $B$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and for all $x,y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $d_X((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ there exists $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Lemma 376.

Claim: For all $x_0,x_1$ such that $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $d_X((x_0,x_1)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

Fix $x_0$.
Fix $x_1$.
Assume $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $d_X((x_0,x_1)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$.
Let $B = \{x_0,x_1\}$.
$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 1, Proposition 19.

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$ we have $d_X((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$.

Fix $x$.
Assume $x\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
Fix $y$.
Assume $y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$.
$x = x_0$ or $x = x_1$ by Proposition 19.
$y = x_0$ or $y = x_1$ by Proposition 19.

Case. $x = x_0$.
Case. $y = x_0$.

$d_X((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ by Definition 176, Definition 179, Lemma 82.

Case. $y \class{latex-symbol-tip latex-symbol-id-neq}{\neq} x_0$.

$y = x_1$.
$d_X((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$.

LaTeX source
\begin{byCase}
                        \caseOf{$y = x_0$.}
                            $d_X((x,y)) < \delta_1$ by \cref{metric_zero_characterization,metric_on,real_lt_subst_left}.
                        \caseOf{$y \neq x_0$.}
                            $y = x_1$.
                            $d_X((x,y)) < \delta_1$.
                        
\end{byCase}
Case. $x \class{latex-symbol-tip latex-symbol-id-neq}{\neq} x_0$.

$x = x_1$.

Case. $y = x_0$.

$d_X((x_1,x_0)) = d_X((x_0,x_1))$ by Definition 177, Definition 179.
$d_X((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$.

Case. $y \class{latex-symbol-tip latex-symbol-id-neq}{\neq} x_0$.

$y = x_1$.
$d_X((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ by Definition 176, Definition 179, Lemma 82.

LaTeX source
\begin{byCase}
                        \caseOf{$y = x_0$.}
                            $d_X((x_1,x_0)) = d_X((x_0,x_1))$ by \cref{metric_symmetric,metric_on}.
                            $d_X((x,y)) < \delta_1$.
                        \caseOf{$y \neq x_0$.}
                            $y = x_1$.
                            $d_X((x,y)) < \delta_1$ by \cref{metric_zero_characterization,metric_on,real_lt_subst_left}.
                        
\end{byCase}
LaTeX source
\begin{byCase}
                    \caseOf{$x = x_0$.}
                        \begin{byCase}
                        \caseOf{$y = x_0$.}
                            $d_X((x,y)) < \delta_1$ by \cref{metric_zero_characterization,metric_on,real_lt_subst_left}.
                        \caseOf{$y \neq x_0$.}
                            $y = x_1$.
                            $d_X((x,y)) < \delta_1$.
                        \end{byCase}
                    \caseOf{$x \neq x_0$.}
                        $x = x_1$.
                        \begin{byCase}
                        \caseOf{$y = x_0$.}
                            $d_X((x_1,x_0)) = d_X((x_0,x_1))$ by \cref{metric_symmetric,metric_on}.
                            $d_X((x,y)) < \delta_1$.
                        \caseOf{$y \neq x_0$.}
                            $y = x_1$.
                            $d_X((x,y)) < \delta_1$ by \cref{metric_zero_characterization,metric_on,real_lt_subst_left}.
                        \end{byCase}
                    
\end{byCase}

$B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and for all $x,y\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ we have $d_X((x,y)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$.
Take $U$ such that $U\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ and $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Lemma 376.
Take $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $U = \metricBall{d_X}{X}{x}{\apply{g}{x}}$.
$d_X((x,x_0)) < \apply{g}{x}$ and $d_X((x,x_1)) < \apply{g}{x}$ by Definition 1, Definition 180, Proposition 16, Proposition 17.
$(x,\apply{g}{x})\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ by Axiom 54, Definition 12.
For all $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ if $d_X((x,y)) < \apply{g}{x}$ then $d_Y((\apply{f}{x},\apply{f}{y})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0$ by Axiom 10, Axiom 11.
$d_Y((\apply{f}{x},\apply{f}{x_0})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0$ and $d_Y((\apply{f}{x},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0$.
$\apply{f}{x_0}\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ and $\apply{f}{x}\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ and $\apply{f}{x_1}\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ by Proposition 361.
$d_Y((\apply{f}{x_0},\apply{f}{x})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0$ by Definition 177, Definition 179, Lemma 82.
Let $s = d_Y((\apply{f}{x_0},\apply{f}{x})) + d_Y((\apply{f}{x},\apply{f}{x_1}))$.
$d_Y((\apply{f}{x_0},\apply{f}{x_1})) \class{latex-symbol-tip latex-symbol-id-leq}{\leq} s$ by Definition 178, Definition 179.
$d_Y\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{Y\class{latex-symbol-tip latex-symbol-id-times}{\times} Y}{\reals}$ by Definition 179.
$(\apply{f}{x_0},\apply{f}{x})\class{latex-symbol-tip latex-symbol-id-in}{\in} Y\class{latex-symbol-tip latex-symbol-id-times}{\times} Y$ and $(\apply{f}{x},\apply{f}{x_1})\class{latex-symbol-tip latex-symbol-id-in}{\in} Y\class{latex-symbol-tip latex-symbol-id-times}{\times} Y$ by Proposition 115.
$d_Y((\apply{f}{x_0},\apply{f}{x}))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $d_Y((\apply{f}{x},\apply{f}{x_1}))\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Proposition 361.
$s < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0$ by Proposition 450.
$d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0$ by Axiom 13, Axiom 36, Lemma 81, Lemma 82, Proposition 115, Proposition 361.

$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)}$ by Definition 65.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 = (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)}) + (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)})$.
$(\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}) \rmul \inv{(1 + 1)} = (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)}) + (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul \inv{(1 + 1)})$ by Lemma 9.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 = (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}) \rmul \inv{(1 + 1)}$.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul (1 + 1) = (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul 1) + (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul 1)$ by Axiom 23.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul 1 = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ by Axiom 20, Axiom 21.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul (1 + 1) = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.
$(\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}) \rmul \inv{(1 + 1)} = (\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul (1 + 1)) \rmul \inv{(1 + 1)}$.
$(\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul (1 + 1)) \rmul \inv{(1 + 1)} = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul ((1 + 1) \rmul \inv{(1 + 1)})$ by Axiom 19.
$(1 + 1) \rmul \inv{(1 + 1)} = 1$ by Axiom 22.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon} \rmul 1$.
$\class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 + \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}_0 = \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ by Axiom 21.
$d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$ by Lemma 83.

$\class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ and for all $x_0,x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $d_X((x_0,x_1)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$ we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.
Take $\class{latex-symbol-tip latex-symbol-id-eta}{\eta}$ such that $\class{latex-symbol-tip latex-symbol-id-eta}{\eta} = \class{latex-symbol-tip latex-symbol-id-delta}{\delta}_1$.
$\class{latex-symbol-tip latex-symbol-id-eta}{\eta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0 < \class{latex-symbol-tip latex-symbol-id-eta}{\eta}$ and for all $x_0,x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $d_X((x_0,x_1)) < \class{latex-symbol-tip latex-symbol-id-eta}{\eta}$ we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

Claim: There exists $\class{latex-symbol-tip latex-symbol-id-delta}{\delta}\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ such that $0 < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ and for all $x_0,x_1\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $d_X((x_0,x_1)) < \class{latex-symbol-tip latex-symbol-id-delta}{\delta}$ we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \class{latex-symbol-tip latex-symbol-id-epsilon}{\epsilon}$.

Trivial.

LaTeX source
\begin{byCase}
        \caseOf{$X = \emptyset$.}
            Let $\delta_0 = \epsilon_0$.
            $\delta_0\in\reals$ and $0 < \delta_0$.
            Show that for all $x_0,x_1$ such that $x_0\in X$ and $x_1\in X$ and $d_X((x_0,x_1)) < \delta_0$
                we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            \begin{subproof}
                Trivial.
            \end{subproof}
            $\delta_0\in\reals$ and $0 < \delta_0$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \delta_0$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            Show that there exists $\delta\in\reals$ such that $0 < \delta$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \delta$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            \begin{subproof}
                Trivial.
            \end{subproof}
        \caseOf{$X \neq \emptyset$.}
            Let $R = \{w\in X\times\reals \mid \text{$0 < \snd{w}$ and
                for all $y\in X$ if $d_X((\fst{w},y)) < \snd{w}$ then
                $d_Y((\apply{f}{\fst{w}},\apply{f}{y})) < \epsilon_0$}\}$.
            $R$ is a relation by \cref{times_elem_is_tuple,relation}.
            For all $x\in X$ there exists $\delta\in\reals$ such that $x\mathrel{R}\delta$
                by \cref{metric_continuity_eps_delta,times_tuple_intro,fst_eq,snd_eq,relation}.
            Take $g$ such that $g$ is a function on $X$ and for all $x\in X$ we have $x\mathrel{R}\apply{g}{x}$
                by \cref{axiom_of_choice}.
            Let $A = \{U\in\pow{X} \mid \exists x\in X. U = \metricBall{d_X}{X}{x}{\apply{g}{x}}\}$.

            For all $x\in X$ we have $0 < \apply{g}{x}$ by \cref{axiom_of_choice,fst_eq,snd_eq,relation}.
            For all $x\in X$ we have $x\in\unions{A}$
                by \cref{metric_zero_characterization,metric_on,real_lt_subst_left,metric_ball,subseteq,powerset_intro,unions_iff}.
            For all $U$ such that $U\in A$ we have $U$ is open in $X$ with respect to $T_X$
                by \cref{axiom_of_choice,fst_eq,snd_eq,times_tuple_elim,metric_ball,subseteq,powerset_intro,metric_basis,metric_basis_is_basis,basis_elem_open_in_generated,basis_for_topology,metric_topology,open_in,basis_topology_is_topology}.
            $A$ is an open covering of $X$ with respect to $T_X$ by \cref{subseteq,covering,open_covering}.

            Take $\delta_1\in\reals$ such that $0 < \delta_1$ and
                for all $B$ such that $B\subseteq X$ and
                    for all $x,y\in B$ we have $d_X((x,y)) < \delta_1$
                there exists $U\in A$ such that $B\subseteq U$
                by \cref{lebesgue_number_lemma}.

            Show that for all $x_0,x_1$ such that $x_0\in X$ and $x_1\in X$ and $d_X((x_0,x_1)) < \delta_1$
                we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            \begin{subproof}
                Fix $x_0$.
                Fix $x_1$.
                Assume $x_0\in X$ and $x_1\in X$ and $d_X((x_0,x_1)) < \delta_1$.
        Let $B = \{x_0,x_1\}$.
                $B\subseteq X$ by \cref{upair_iff,subseteq}.
                Show that for all $x\in B$ we have for all $y\in B$ we have $d_X((x,y)) < \delta_1$.
                \begin{subproof}
                    Fix $x$.
                    Assume $x\in B$.
                    Fix $y$.
                    Assume $y\in B$.
                    $x = x_0$ or $x = x_1$ by \cref{upair_iff}.
                    $y = x_0$ or $y = x_1$ by \cref{upair_iff}.
                    \begin{byCase}
                    \caseOf{$x = x_0$.}
                        \begin{byCase}
                        \caseOf{$y = x_0$.}
                            $d_X((x,y)) < \delta_1$ by \cref{metric_zero_characterization,metric_on,real_lt_subst_left}.
                        \caseOf{$y \neq x_0$.}
                            $y = x_1$.
                            $d_X((x,y)) < \delta_1$.
                        \end{byCase}
                    \caseOf{$x \neq x_0$.}
                        $x = x_1$.
                        \begin{byCase}
                        \caseOf{$y = x_0$.}
                            $d_X((x_1,x_0)) = d_X((x_0,x_1))$ by \cref{metric_symmetric,metric_on}.
                            $d_X((x,y)) < \delta_1$.
                        \caseOf{$y \neq x_0$.}
                            $y = x_1$.
                            $d_X((x,y)) < \delta_1$ by \cref{metric_zero_characterization,metric_on,real_lt_subst_left}.
                        \end{byCase}
                    \end{byCase}
                \end{subproof}
                $B\subseteq X$ and for all $x,y\in B$ we have $d_X((x,y)) < \delta_1$.
                Take $U$ such that $U\in A$ and $B\subseteq U$ by \cref{lebesgue_number_lemma}.
                Take $x\in X$ such that $U = \metricBall{d_X}{X}{x}{\apply{g}{x}}$.
                $d_X((x,x_0)) < \apply{g}{x}$ and
                    $d_X((x,x_1)) < \apply{g}{x}$ by \cref{upair_intro_left,upair_intro_right,subseteq,metric_ball}.
                $(x,\apply{g}{x})\in R$ by \cref{axiom_of_choice,relation}.
                For all $y\in X$ if $d_X((x,y)) < \apply{g}{x}$ then
                    $d_Y((\apply{f}{x},\apply{f}{y})) < \epsilon_0$
                    by \cref{fst_eq,snd_eq}.
                $d_Y((\apply{f}{x},\apply{f}{x_0})) < \epsilon_0$ and
                    $d_Y((\apply{f}{x},\apply{f}{x_1})) < \epsilon_0$.
                $\apply{f}{x_0}\in Y$ and $\apply{f}{x}\in Y$ and $\apply{f}{x_1}\in Y$ by \cref{funs_type_apply}.
                $d_Y((\apply{f}{x_0},\apply{f}{x})) < \epsilon_0$ by \cref{metric_symmetric,metric_on,real_lt_subst_left}.
                Let $s = d_Y((\apply{f}{x_0},\apply{f}{x})) + d_Y((\apply{f}{x},\apply{f}{x_1}))$.
                $d_Y((\apply{f}{x_0},\apply{f}{x_1})) \leq s$ by \cref{metric_on,metric_triangle_inequality}.
                $d_Y\in\funs{Y\times Y}{\reals}$ by \cref{metric_on}.
                $(\apply{f}{x_0},\apply{f}{x})\in Y\times Y$ and
                    $(\apply{f}{x},\apply{f}{x_1})\in Y\times Y$ by \cref{times_tuple_intro}.
                $d_Y((\apply{f}{x_0},\apply{f}{x}))\in\reals$ and
                    $d_Y((\apply{f}{x},\apply{f}{x_1}))\in\reals$ by \cref{funs_type_apply}.
                $s < \epsilon_0 + \epsilon_0$ by \cref{real_lt_add_two}.
                $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon_0 + \epsilon_0$
                    by \cref{times_tuple_intro,funs_type_apply,real_add_closed,real_leq_split,real_lt_trans,real_lt_subst_left}.

                $\epsilon_0 = \epsilon \rmul \inv{(1 + 1)}$ by \cref{real_div}.
                $\epsilon_0 + \epsilon_0 =
                    (\epsilon \rmul \inv{(1 + 1)}) + (\epsilon \rmul \inv{(1 + 1)})$.
                $(\epsilon + \epsilon) \rmul \inv{(1 + 1)}
                    = (\epsilon \rmul \inv{(1 + 1)}) + (\epsilon \rmul \inv{(1 + 1)})$
                    by \cref{real_right_distrib}.
                $\epsilon_0 + \epsilon_0 = (\epsilon + \epsilon) \rmul \inv{(1 + 1)}$.
                $\epsilon \rmul (1 + 1) = (\epsilon \rmul 1) + (\epsilon \rmul 1)$ by \cref{real_distrib}.
                $\epsilon \rmul 1 = \epsilon$ by \cref{real_mul_ident,real_mul_comm}.
                $\epsilon \rmul (1 + 1) = \epsilon + \epsilon$.
                $(\epsilon + \epsilon) \rmul \inv{(1 + 1)} = (\epsilon \rmul (1 + 1)) \rmul \inv{(1 + 1)}$.
                $(\epsilon \rmul (1 + 1)) \rmul \inv{(1 + 1)}
                    = \epsilon \rmul ((1 + 1) \rmul \inv{(1 + 1)})$ by \cref{real_mul_assoc}.
                $(1 + 1) \rmul \inv{(1 + 1)} = 1$ by \cref{real_mul_inverse}.
                $\epsilon_0 + \epsilon_0 = \epsilon \rmul 1$.
                $\epsilon_0 + \epsilon_0 = \epsilon$ by \cref{real_mul_ident}.
                $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$ by \cref{real_lt_subst_right}.
            \end{subproof}
            $\delta_1\in\reals$ and $0 < \delta_1$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \delta_1$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            Take $\eta$ such that $\eta = \delta_1$.
            $\eta\in\reals$ and $0 < \eta$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \eta$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            Show that there exists $\delta\in\reals$ such that $0 < \delta$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \delta$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            \begin{subproof}
                Trivial.
            \end{subproof}
        
\end{byCase}

$f$ is uniformly continuous from $X$ to $Y$ with respect to $d_X$ and $d_Y$ by Definition 254.

LaTeX source
\begin{proof}
    $f\in\funs{X}{Y}$ by \cref{continuous,funs}.
    Show that for all $\epsilon\in\reals$ such that $0 < \epsilon$
        there exists $\delta\in\reals$ such that $0 < \delta$ and
            for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \delta$
                we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
    \begin{subproof}
        Fix $\epsilon\in\reals$.
        Assume $0 < \epsilon$.
        Let $\epsilon_0 = \epsilon / (1 + 1)$.
        $1\in\reals$ by \cref{real_mul_ident}.
        $0\in\reals$ by \cref{real_add_ident}.
        $0 < 1$ by \cref{real_zero_lt_one}.
        $1 < 1 + 1$ by \cref{real_lt_add,real_add_ident}.
        $(1 + 1)\in\reals$ and $0 < 1 + 1$ by \cref{real_add_closed,real_lt_trans}.
        $(1 + 1)\neq 0$ by \cref{real_pos_nonzero}.
        $\inv{(1 + 1)}\in\reals$ and $\inv{(1 + 1)} > 0$ by \cref{real_mul_inverse,real_inv_pos}.
        $\epsilon_0 = \epsilon \rmul \inv{(1 + 1)}$ and $\epsilon_0\in\reals$ by \cref{real_div,real_mul_closed}.
        $0 < \epsilon_0$ by \cref{real_div,real_mul_zero,real_lt_mul_pos,real_lt_subst_left}.
        \begin{byCase}
        \caseOf{$X = \emptyset$.}
            Let $\delta_0 = \epsilon_0$.
            $\delta_0\in\reals$ and $0 < \delta_0$.
            Show that for all $x_0,x_1$ such that $x_0\in X$ and $x_1\in X$ and $d_X((x_0,x_1)) < \delta_0$
                we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            \begin{subproof}
                Trivial.
            \end{subproof}
            $\delta_0\in\reals$ and $0 < \delta_0$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \delta_0$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            Show that there exists $\delta\in\reals$ such that $0 < \delta$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \delta$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            \begin{subproof}
                Trivial.
            \end{subproof}
        \caseOf{$X \neq \emptyset$.}
            Let $R = \{w\in X\times\reals \mid \text{$0 < \snd{w}$ and
                for all $y\in X$ if $d_X((\fst{w},y)) < \snd{w}$ then
                $d_Y((\apply{f}{\fst{w}},\apply{f}{y})) < \epsilon_0$}\}$.
            $R$ is a relation by \cref{times_elem_is_tuple,relation}.
            For all $x\in X$ there exists $\delta\in\reals$ such that $x\mathrel{R}\delta$
                by \cref{metric_continuity_eps_delta,times_tuple_intro,fst_eq,snd_eq,relation}.
            Take $g$ such that $g$ is a function on $X$ and for all $x\in X$ we have $x\mathrel{R}\apply{g}{x}$
                by \cref{axiom_of_choice}.
            Let $A = \{U\in\pow{X} \mid \exists x\in X. U = \metricBall{d_X}{X}{x}{\apply{g}{x}}\}$.

            For all $x\in X$ we have $0 < \apply{g}{x}$ by \cref{axiom_of_choice,fst_eq,snd_eq,relation}.
            For all $x\in X$ we have $x\in\unions{A}$
                by \cref{metric_zero_characterization,metric_on,real_lt_subst_left,metric_ball,subseteq,powerset_intro,unions_iff}.
            For all $U$ such that $U\in A$ we have $U$ is open in $X$ with respect to $T_X$
                by \cref{axiom_of_choice,fst_eq,snd_eq,times_tuple_elim,metric_ball,subseteq,powerset_intro,metric_basis,metric_basis_is_basis,basis_elem_open_in_generated,basis_for_topology,metric_topology,open_in,basis_topology_is_topology}.
            $A$ is an open covering of $X$ with respect to $T_X$ by \cref{subseteq,covering,open_covering}.

            Take $\delta_1\in\reals$ such that $0 < \delta_1$ and
                for all $B$ such that $B\subseteq X$ and
                    for all $x,y\in B$ we have $d_X((x,y)) < \delta_1$
                there exists $U\in A$ such that $B\subseteq U$
                by \cref{lebesgue_number_lemma}.

            Show that for all $x_0,x_1$ such that $x_0\in X$ and $x_1\in X$ and $d_X((x_0,x_1)) < \delta_1$
                we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            \begin{subproof}
                Fix $x_0$.
                Fix $x_1$.
                Assume $x_0\in X$ and $x_1\in X$ and $d_X((x_0,x_1)) < \delta_1$.
        Let $B = \{x_0,x_1\}$.
                $B\subseteq X$ by \cref{upair_iff,subseteq}.
                Show that for all $x\in B$ we have for all $y\in B$ we have $d_X((x,y)) < \delta_1$.
                \begin{subproof}
                    Fix $x$.
                    Assume $x\in B$.
                    Fix $y$.
                    Assume $y\in B$.
                    $x = x_0$ or $x = x_1$ by \cref{upair_iff}.
                    $y = x_0$ or $y = x_1$ by \cref{upair_iff}.
                    \begin{byCase}
                    \caseOf{$x = x_0$.}
                        \begin{byCase}
                        \caseOf{$y = x_0$.}
                            $d_X((x,y)) < \delta_1$ by \cref{metric_zero_characterization,metric_on,real_lt_subst_left}.
                        \caseOf{$y \neq x_0$.}
                            $y = x_1$.
                            $d_X((x,y)) < \delta_1$.
                        \end{byCase}
                    \caseOf{$x \neq x_0$.}
                        $x = x_1$.
                        \begin{byCase}
                        \caseOf{$y = x_0$.}
                            $d_X((x_1,x_0)) = d_X((x_0,x_1))$ by \cref{metric_symmetric,metric_on}.
                            $d_X((x,y)) < \delta_1$.
                        \caseOf{$y \neq x_0$.}
                            $y = x_1$.
                            $d_X((x,y)) < \delta_1$ by \cref{metric_zero_characterization,metric_on,real_lt_subst_left}.
                        \end{byCase}
                    \end{byCase}
                \end{subproof}
                $B\subseteq X$ and for all $x,y\in B$ we have $d_X((x,y)) < \delta_1$.
                Take $U$ such that $U\in A$ and $B\subseteq U$ by \cref{lebesgue_number_lemma}.
                Take $x\in X$ such that $U = \metricBall{d_X}{X}{x}{\apply{g}{x}}$.
                $d_X((x,x_0)) < \apply{g}{x}$ and
                    $d_X((x,x_1)) < \apply{g}{x}$ by \cref{upair_intro_left,upair_intro_right,subseteq,metric_ball}.
                $(x,\apply{g}{x})\in R$ by \cref{axiom_of_choice,relation}.
                For all $y\in X$ if $d_X((x,y)) < \apply{g}{x}$ then
                    $d_Y((\apply{f}{x},\apply{f}{y})) < \epsilon_0$
                    by \cref{fst_eq,snd_eq}.
                $d_Y((\apply{f}{x},\apply{f}{x_0})) < \epsilon_0$ and
                    $d_Y((\apply{f}{x},\apply{f}{x_1})) < \epsilon_0$.
                $\apply{f}{x_0}\in Y$ and $\apply{f}{x}\in Y$ and $\apply{f}{x_1}\in Y$ by \cref{funs_type_apply}.
                $d_Y((\apply{f}{x_0},\apply{f}{x})) < \epsilon_0$ by \cref{metric_symmetric,metric_on,real_lt_subst_left}.
                Let $s = d_Y((\apply{f}{x_0},\apply{f}{x})) + d_Y((\apply{f}{x},\apply{f}{x_1}))$.
                $d_Y((\apply{f}{x_0},\apply{f}{x_1})) \leq s$ by \cref{metric_on,metric_triangle_inequality}.
                $d_Y\in\funs{Y\times Y}{\reals}$ by \cref{metric_on}.
                $(\apply{f}{x_0},\apply{f}{x})\in Y\times Y$ and
                    $(\apply{f}{x},\apply{f}{x_1})\in Y\times Y$ by \cref{times_tuple_intro}.
                $d_Y((\apply{f}{x_0},\apply{f}{x}))\in\reals$ and
                    $d_Y((\apply{f}{x},\apply{f}{x_1}))\in\reals$ by \cref{funs_type_apply}.
                $s < \epsilon_0 + \epsilon_0$ by \cref{real_lt_add_two}.
                $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon_0 + \epsilon_0$
                    by \cref{times_tuple_intro,funs_type_apply,real_add_closed,real_leq_split,real_lt_trans,real_lt_subst_left}.

                $\epsilon_0 = \epsilon \rmul \inv{(1 + 1)}$ by \cref{real_div}.
                $\epsilon_0 + \epsilon_0 =
                    (\epsilon \rmul \inv{(1 + 1)}) + (\epsilon \rmul \inv{(1 + 1)})$.
                $(\epsilon + \epsilon) \rmul \inv{(1 + 1)}
                    = (\epsilon \rmul \inv{(1 + 1)}) + (\epsilon \rmul \inv{(1 + 1)})$
                    by \cref{real_right_distrib}.
                $\epsilon_0 + \epsilon_0 = (\epsilon + \epsilon) \rmul \inv{(1 + 1)}$.
                $\epsilon \rmul (1 + 1) = (\epsilon \rmul 1) + (\epsilon \rmul 1)$ by \cref{real_distrib}.
                $\epsilon \rmul 1 = \epsilon$ by \cref{real_mul_ident,real_mul_comm}.
                $\epsilon \rmul (1 + 1) = \epsilon + \epsilon$.
                $(\epsilon + \epsilon) \rmul \inv{(1 + 1)} = (\epsilon \rmul (1 + 1)) \rmul \inv{(1 + 1)}$.
                $(\epsilon \rmul (1 + 1)) \rmul \inv{(1 + 1)}
                    = \epsilon \rmul ((1 + 1) \rmul \inv{(1 + 1)})$ by \cref{real_mul_assoc}.
                $(1 + 1) \rmul \inv{(1 + 1)} = 1$ by \cref{real_mul_inverse}.
                $\epsilon_0 + \epsilon_0 = \epsilon \rmul 1$.
                $\epsilon_0 + \epsilon_0 = \epsilon$ by \cref{real_mul_ident}.
                $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$ by \cref{real_lt_subst_right}.
            \end{subproof}
            $\delta_1\in\reals$ and $0 < \delta_1$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \delta_1$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            Take $\eta$ such that $\eta = \delta_1$.
            $\eta\in\reals$ and $0 < \eta$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \eta$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            Show that there exists $\delta\in\reals$ such that $0 < \delta$ and
                for all $x_0,x_1\in X$ such that $d_X((x_0,x_1)) < \delta$
                    we have $d_Y((\apply{f}{x_0},\apply{f}{x_1})) < \epsilon$.
            \begin{subproof}
                Trivial.
            \end{subproof}
        \end{byCase}
    \end{subproof}
    $f$ is uniformly continuous from $X$ to $Y$ with respect to $d_X$ and $d_Y$ by \cref{uniformly_continuous}.
\end{proof}
Definition 255
isolated_point

$x$ is an isolated point of $X$ with respect to $T$ iff $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $\{x\}$ is open in $X$ with respect to $T$.

LaTeX source
\begin{definition}
\label{isolated_point}
    $x$ is an isolated point of $X$ with respect to $T$ iff
        $x\in X$ and $\{x\}$ is open in $X$ with respect to $T$.
\end{definition}
Lemma 377
open_set_shrink_away_point

Assume $T$ is a topology on $X$.
Assume $X$ is Hausdorff with respect to $T$.
Assume $U$ is open in $X$ with respect to $T$.
Assume $U\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Assume $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Assume for all $z\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $z$ is not an isolated point of $X$ with respect to $T$.
Then there exists $V$ such that $V$ is open in $X$ with respect to $T$ and $V\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $V\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ and $x\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{V}{X}{T}$.

LaTeX source
\begin{lemma}
\label{open_set_shrink_away_point}
    Assume $T$ is a topology on $X$.
    Assume $X$ is Hausdorff with respect to $T$.
    Assume $U$ is open in $X$ with respect to $T$.
    Assume $U\neq\emptyset$.
    Assume $x\in X$.
    Assume for all $z\in X$ we have $z$ is not an isolated point of $X$ with respect to $T$.
    Then there exists $V$ such that
        $V$ is open in $X$ with respect to $T$ and
        $V\neq\emptyset$ and
        $V\subseteq U$ and
        $x\notin\closure{V}{X}{T}$.
\end{lemma}
Proof
Claim: There exists $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ and $y\class{latex-symbol-tip latex-symbol-id-neq}{\neq} x$.
Case. $x\class{latex-symbol-tip latex-symbol-id-in}{\in} U$.

Suppose not.

Claim: For all $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ we have $z\class{latex-symbol-tip latex-symbol-id-in}{\in}\{x\}$.

Fix $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} U$.
$z = x$.
$z\class{latex-symbol-tip latex-symbol-id-in}{\in}\{x\}$ by Proposition 20.

$U\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\{x\}$ by Definition 1.
$\{x\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Proposition 25.
$U = \{x\}$ by Proposition 3.
$\{x\}$ is open in $X$ with respect to $T$ by Definition 103.
$x$ is an isolated point of $X$ with respect to $T$ by Definition 255.
Contradiction.

Case. $x\class{latex-symbol-tip latex-symbol-id-notin}{\notin} U$.

Take $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ by Proposition 10.
$y\class{latex-symbol-tip latex-symbol-id-neq}{\neq} x$ by Definition 1, Definition 103.

Claim: There exists $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ and $z\class{latex-symbol-tip latex-symbol-id-neq}{\neq} x$.

Trivial.

LaTeX source
\begin{byCase}
        \caseOf{$x\in U$.}
            Suppose not.
            Show that for all $z$ such that $z\in U$ we have $z\in\{x\}$.
            \begin{subproof}
                Fix $z$ such that $z\in U$.
                $z = x$.
                $z\in\{x\}$ by \cref{singleton_intro}.
            \end{subproof}
            $U\subseteq\{x\}$ by \cref{subseteq}.
            $\{x\}\subseteq U$ by \cref{singleton_subset_intro}.
            $U = \{x\}$ by \cref{subseteq_antisymmetric}.
            $\{x\}$ is open in $X$ with respect to $T$ by \cref{open_in}.
            $x$ is an isolated point of $X$ with respect to $T$ by \cref{isolated_point}.
            Contradiction.
        \caseOf{$x\notin U$.}
            Take $y$ such that $y\in U$ by \cref{nonempty_inhabited}.
            $y\neq x$ by \cref{open_in,subseteq}.
            Show that there exists $z$ such that $z\in U$ and $z\neq x$.
            \begin{subproof}
                Trivial.
            \end{subproof}
        
\end{byCase}

Take $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} U$ and $y\class{latex-symbol-tip latex-symbol-id-neq}{\neq} x$.
$U\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ by Definition 103.
$U\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ by Definition 1, Definition 101.
$U\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Proposition 156.
$y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Definition 1.
Take $W_1,W_2$ such that $W_1$ is a neighborhood of $x$ in $X$ with respect to $T$ and $W_2$ is a neighborhood of $y$ in $X$ with respect to $T$ and $W_1$ is disjoint from $W_2$ by Definition 156.
Let $V = U\inter W_2$.
$W_2$ is open in $X$ with respect to $T$ by Definition 153.
$V$ is open in $X$ with respect to $T$ by Definition 5, Definition 101, Definition 103.
$y\class{latex-symbol-tip latex-symbol-id-in}{\in} V$ by Definition 153, Proposition 61.
$V\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Axiom 2.
$V\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ by Proposition 73.

Claim: For all $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} V$ we have $z\class{latex-symbol-tip latex-symbol-id-in}{\in} X\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} W_1$.

Fix $z$ such that $z\class{latex-symbol-tip latex-symbol-id-in}{\in} V$.
Suppose not.
$z\class{latex-symbol-tip latex-symbol-id-in}{\in} W_1$.
$z\class{latex-symbol-tip latex-symbol-id-in}{\in} U\inter W_2$ by Definition 5.
$z\class{latex-symbol-tip latex-symbol-id-in}{\in} W_2$ by Proposition 63.
$z\class{latex-symbol-tip latex-symbol-id-in}{\in} W_1\inter W_2$ by Proposition 61.
Contradiction by Definition 3.

$V\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} W_1$ by Definition 1.
$W_1$ is open in $X$ with respect to $T$ by Definition 153.
$W_1\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ by Definition 103.
$W_1\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 1, Definition 101, Proposition 156.
$X\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} W_1\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Proposition 97.
$X\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} (X\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} W_1) = W_1$ by Proposition 92.
$X\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} W_1$ is closed in $X$ with respect to $T$ by Definition 103, Definition 149, Proposition 97.
$V\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ by Definition 103.
$V\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ by Definition 1, Definition 101.
$V\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Proposition 156.
$\closure{V}{X}{T}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} W_1$ by Lemma 147.
$x\class{latex-symbol-tip latex-symbol-id-notin}{\notin} X\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} W_1$ by Definition 153, Proposition 87.
$x\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{V}{X}{T}$ by Definition 1.

LaTeX source
\begin{proof}
    Show that there exists $y$ such that $y\in U$ and $y\neq x$.
    \begin{subproof}
        \begin{byCase}
        \caseOf{$x\in U$.}
            Suppose not.
            Show that for all $z$ such that $z\in U$ we have $z\in\{x\}$.
            \begin{subproof}
                Fix $z$ such that $z\in U$.
                $z = x$.
                $z\in\{x\}$ by \cref{singleton_intro}.
            \end{subproof}
            $U\subseteq\{x\}$ by \cref{subseteq}.
            $\{x\}\subseteq U$ by \cref{singleton_subset_intro}.
            $U = \{x\}$ by \cref{subseteq_antisymmetric}.
            $\{x\}$ is open in $X$ with respect to $T$ by \cref{open_in}.
            $x$ is an isolated point of $X$ with respect to $T$ by \cref{isolated_point}.
            Contradiction.
        \caseOf{$x\notin U$.}
            Take $y$ such that $y\in U$ by \cref{nonempty_inhabited}.
            $y\neq x$ by \cref{open_in,subseteq}.
            Show that there exists $z$ such that $z\in U$ and $z\neq x$.
            \begin{subproof}
                Trivial.
            \end{subproof}
        \end{byCase}
    \end{subproof}
    Take $y$ such that $y\in U$ and $y\neq x$.
    $U\in T$ by \cref{open_in}.
    $U\in\pow{X}$ by \cref{topology_on,subseteq}.
    $U\subseteq X$ by \cref{powerset_elim}.
    $y\in X$ by \cref{subseteq}.
    Take $W_1,W_2$ such that
        $W_1$ is a neighborhood of $x$ in $X$ with respect to $T$ and
        $W_2$ is a neighborhood of $y$ in $X$ with respect to $T$ and
        $W_1$ is disjoint from $W_2$ by \cref{hausdorff}.
    Let $V = U\inter W_2$.
    $W_2$ is open in $X$ with respect to $T$ by \cref{neighborhood}.
    $V$ is open in $X$ with respect to $T$ by \cref{open_in,topology_on,inter}.
    $y\in V$ by \cref{inter_intro,neighborhood}.
    $V\neq\emptyset$ by \cref{emptyset}.
    $V\subseteq U$ by \cref{inter_lower_left}.
    Show that for all $z$ such that $z\in V$ we have $z\in X\setminus W_1$.
    \begin{subproof}
        Fix $z$ such that $z\in V$.
        Suppose not.
        $z\in W_1$.
        $z\in U\inter W_2$ by \cref{inter}.
        $z\in W_2$ by \cref{inter_elim_right}.
        $z\in W_1\inter W_2$ by \cref{inter_intro}.
        Contradiction by \cref{disjoint}.
    \end{subproof}
    $V\subseteq X\setminus W_1$ by \cref{subseteq}.
    $W_1$ is open in $X$ with respect to $T$ by \cref{neighborhood}.
    $W_1\in T$ by \cref{open_in}.
    $W_1\subseteq X$ by \cref{topology_on,subseteq,powerset_elim}.
    $X\setminus W_1\subseteq X$ by \cref{setminus_subseteq}.
    $X\setminus (X\setminus W_1) = W_1$ by \cref{double_relative_complement}.
    $X\setminus W_1$ is closed in $X$ with respect to $T$ by \cref{closed_in,open_in,setminus_subseteq}.
    $V\in T$ by \cref{open_in}.
    $V\in\pow{X}$ by \cref{topology_on,subseteq}.
    $V\subseteq X$ by \cref{powerset_elim}.
    $\closure{V}{X}{T}\subseteq X\setminus W_1$ by \cref{closure_subseteq_closed}.
    $x\notin X\setminus W_1$ by \cref{neighborhood,setminus_elim_right}.
    $x\notin\closure{V}{X}{T}$ by \cref{subseteq}.
\end{proof}
Lemma 378
countable_nonempty_surj_naturals

Suppose $X$ is countable.
Suppose $X\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then there exists $g$ such that $g$ is a surjection from $\naturals$ to $X$.

LaTeX source
\begin{lemma}
\label{countable_nonempty_surj_naturals}
    Suppose $X$ is countable.
    Suppose $X\neq\emptyset$.
    Then there exists $g$ such that $g$ is a surjection from $\naturals$ to $X$.
\end{lemma}
Proof

Take $f$ such that $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{X}{\naturals}$ by Definition 90.
$f\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{X}{\naturals}$ and for all $x,y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ such that $f(x) = f(y)$ we have $x = y$ by Definition 56.
Hence $f$ is a function by Proposition 356.
Therefore $f$ is a function from $X$ to $\naturals$ by Definition 55.
Take $x_0$ such that $x_0\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Proposition 10.
Let $A = \img{f}{X}$.
Let $R_1 = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals\class{latex-symbol-tip latex-symbol-id-times}{\times} X \mid \text{$\fst{w}\in A$ and $f(\snd{w}) = \fst{w}$}\}$.
Let $R_2 = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals\class{latex-symbol-tip latex-symbol-id-times}{\times} X \mid \text{$\fst{w}\notin A$ and $\snd{w} = x_0$}\}$.
Let $R = R_1\union R_2$.

Claim: $R_1$ is a relation.

For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R_1$ there exist $n,x$ such that $w = (n,x)$.
Hence $R_1$ is a relation by Definition 12.

Claim: $R_2$ is a relation.

For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R_2$ there exist $n,x$ such that $w = (n,x)$.
Thus $R_2$ is a relation by Definition 12.

Therefore $R$ is a relation by Proposition 180.
$R_1\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturals\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ and $R_2\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturals\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Definition 1.
We have $R\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturals\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 44.

Claim: For all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ there exists $x$ such that $n\mathrel{R}x$.

Fix $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.

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

Take $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ and $(x,n)\class{latex-symbol-tip latex-symbol-id-in}{\in} f$ by Proposition 235.
$f(x) = n$ by Proposition 346.
$(n,x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
Hence $(n,x)\class{latex-symbol-tip latex-symbol-id-in}{\in} R_1$.
Therefore $(n,x)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ by Proposition 38.
Thus $n\mathrel{R}x$ by Definition 12.

Case. $n\class{latex-symbol-tip latex-symbol-id-notin}{\notin} A$.

$(n,x_0)\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
Hence $(n,x_0)\class{latex-symbol-tip latex-symbol-id-in}{\in} R_2$.
Therefore $(n,x_0)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ by Proposition 39.
Thus $n\mathrel{R}x_0$ by Definition 12.

LaTeX source
\begin{byCase}
        \caseOf{$n\in A$.}
            Take $x$ such that $x\in X$ and $(x,n)\in f$ by \cref{img_iff}.
            $f(x) = n$ by \cref{function_apply_intro}.
            $(n,x)\in\naturals\times X$ by \cref{times_tuple_intro}.
            Hence $(n,x)\in R_1$.
            Therefore $(n,x)\in R$ by \cref{union_intro_left}.
            Thus $n\mathrel{R}x$ by \cref{relation}.
        \caseOf{$n\notin A$.}
            $(n,x_0)\in\naturals\times X$ by \cref{times_tuple_intro}.
            Hence $(n,x_0)\in R_2$.
            Therefore $(n,x_0)\in R$ by \cref{union_intro_right}.
            Thus $n\mathrel{R}x_0$ by \cref{relation}.
        
\end{byCase}

Take $g$ such that $g$ is a function on $\naturals$ and for all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $n\mathrel{R}g(n)$ by Axiom 54.
For all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $(n,g(n))\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ by Axiom 54, Definition 12.
For all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $(n,g(n))\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Definition 1.
For all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $g(n)\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Proposition 114.

Claim: $g$ is a function from $\naturals$ to $X$.
Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ there exists $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $g(n) = x$.

Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
Let $n = f(x)$.
$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Proposition 361.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{f}$ by Definition 55.
$(x,n)\class{latex-symbol-tip latex-symbol-id-in}{\in} f$ by Proposition 348.
$n\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Proposition 235.
Therefore $n\mathrel{R}g(n)$ by Axiom 54.
Hence $(n,g(n))\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ by Definition 12.

Claim: $f(g(n)) = n$.
Claim: $(n,g(n))\class{latex-symbol-tip latex-symbol-id-in}{\in} R_1$.

Suppose not.
$(n,g(n))\class{latex-symbol-tip latex-symbol-id-in}{\in} R_2$ by Axiom 5.
$\fst{(n,g(n))}\class{latex-symbol-tip latex-symbol-id-notin}{\notin} A$.
Hence $n\class{latex-symbol-tip latex-symbol-id-notin}{\notin} A$ by Axiom 10.
Contradiction.

$f(\snd{(n,g(n))}) = \fst{(n,g(n))}$.
Thus $f(g(n)) = n$ by Axiom 10, Axiom 11.

Thus $f(g(n)) = f(x)$.
$g(n)\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Proposition 361.
Therefore $g(n) = x$.
Therefore there exists $m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $g(m) = x$.

Therefore $g$ is a surjection from $\naturals$ to $X$ by Definition 57.

LaTeX source
\begin{proof}
    Take $f$ such that $f\in\inj{X}{\naturals}$ by \cref{countable}.
    $f\in\funs{X}{\naturals}$ and
        for all $x,y\in X$ such that $f(x) = f(y)$ we have $x = y$
        by \cref{inj}.
    Hence $f$ is a function by \cref{funs_is_function}.
    Therefore $f$ is a function from $X$ to $\naturals$ by \cref{funs}.
    Take $x_0$ such that $x_0\in X$ by \cref{nonempty_inhabited}.
    Let $A = \img{f}{X}$.
    Let $R_1 = \{w\in\naturals\times X \mid \text{$\fst{w}\in A$ and $f(\snd{w}) = \fst{w}$}\}$.
    Let $R_2 = \{w\in\naturals\times X \mid \text{$\fst{w}\notin A$ and $\snd{w} = x_0$}\}$.
    Let $R = R_1\union R_2$.
    Show that $R_1$ is a relation.
    \begin{subproof}
        For all $w$ such that $w\in R_1$ there exist $n,x$ such that $w = (n,x)$.
        Hence $R_1$ is a relation by \cref{relation}.
    \end{subproof}
    Show that $R_2$ is a relation.
    \begin{subproof}
        For all $w$ such that $w\in R_2$ there exist $n,x$ such that $w = (n,x)$.
        Thus $R_2$ is a relation by \cref{relation}.
    \end{subproof}
    Therefore $R$ is a relation by \cref{union_relations_is_relation}.
    $R_1\subseteq\naturals\times X$ and $R_2\subseteq\naturals\times X$ by \cref{subseteq}.
    We have $R\subseteq\naturals\times X$ by \cref{union_subsets_is_subset}.
    Show that for all $n\in\naturals$ there exists $x$ such that $n\mathrel{R}x$.
    \begin{subproof}
        Fix $n\in\naturals$.
        \begin{byCase}
        \caseOf{$n\in A$.}
            Take $x$ such that $x\in X$ and $(x,n)\in f$ by \cref{img_iff}.
            $f(x) = n$ by \cref{function_apply_intro}.
            $(n,x)\in\naturals\times X$ by \cref{times_tuple_intro}.
            Hence $(n,x)\in R_1$.
            Therefore $(n,x)\in R$ by \cref{union_intro_left}.
            Thus $n\mathrel{R}x$ by \cref{relation}.
        \caseOf{$n\notin A$.}
            $(n,x_0)\in\naturals\times X$ by \cref{times_tuple_intro}.
            Hence $(n,x_0)\in R_2$.
            Therefore $(n,x_0)\in R$ by \cref{union_intro_right}.
            Thus $n\mathrel{R}x_0$ by \cref{relation}.
        \end{byCase}
    \end{subproof}
    Take $g$ such that $g$ is a function on $\naturals$ and for all $n\in\naturals$ we have $n\mathrel{R}g(n)$
        by \cref{axiom_of_choice}.
    For all $n\in\naturals$ we have $(n,g(n))\in R$ by \cref{axiom_of_choice,relation}.
    For all $n\in\naturals$ we have $(n,g(n))\in\naturals\times X$ by \cref{subseteq}.
    For all $n\in\naturals$ we have $g(n)\in X$ by \cref{times_tuple_elim}.
    Show that $g$ is a function from $\naturals$ to $X$.
    \begin{subproof}
        Follows by \cref{funs_intro,funs}.
    \end{subproof}
    Show that for all $x\in X$ there exists $n\in\naturals$ such that $g(n) = x$.
    \begin{subproof}
        Fix $x\in X$.
        Let $n = f(x)$.
        $n\in\naturals$ by \cref{funs_type_apply}.
        $x\in\dom{f}$ by \cref{funs}.
        $(x,n)\in f$ by \cref{function_apply_elim}.
        $n\in A$ by \cref{img_iff}.
        Therefore $n\mathrel{R}g(n)$ by \cref{axiom_of_choice}.
        Hence $(n,g(n))\in R$ by \cref{relation}.
        Show that $f(g(n)) = n$.
        \begin{subproof}
            Show that $(n,g(n))\in R_1$.
            \begin{subproof}
                Suppose not.
                $(n,g(n))\in R_2$ by \cref{union_iff}.
                $\fst{(n,g(n))}\notin A$.
                Hence $n\notin A$ by \cref{fst_eq}.
                Contradiction.
            \end{subproof}
            $f(\snd{(n,g(n))}) = \fst{(n,g(n))}$.
            Thus $f(g(n)) = n$ by \cref{fst_eq,snd_eq}.
        \end{subproof}
        Thus $f(g(n)) = f(x)$.
        $g(n)\in X$ by \cref{funs_type_apply}.
        Therefore $g(n) = x$.
        Therefore there exists $m\in\naturals$ such that $g(m) = x$.
    \end{subproof}
    Therefore $g$ is a surjection from $\naturals$ to $X$ by \cref{surj}.
\end{proof}
Lemma 379
naturals_subseteq_reals

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

LaTeX source
\begin{lemma}
\label{naturals_subseteq_reals}
    $\naturals\subseteq\reals$.
\end{lemma}
Proof
Claim: For all $n$ such that $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.

Fix $n$ such that $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ or $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Axiom 5, Definition 81.

Case. $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.

$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 41, Definition 1.

Case. $n\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\naturalsPlus$.

$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$.
$n = 0$ by Proposition 22.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 17.
Thus $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.

LaTeX source
\begin{byCase}
        \caseOf{$n\in\naturalsPlus$.}
            $n\in\reals$ by \cref{real_naturals_subset_reals,subseteq}.
        \caseOf{$n\notin\naturalsPlus$.}
            $n\in\{0\}$.
            $n = 0$ by \cref{singleton_iff}.
            $0\in\reals$ by \cref{real_add_ident}.
            Thus $n\in\reals$.
        
\end{byCase}

Thus $\naturals\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$ by Definition 1.

LaTeX source
\begin{proof}
    Show that for all $n$ such that $n\in\naturals$ we have $n\in\reals$.
    \begin{subproof}
        Fix $n$ such that $n\in\naturals$.
        $n\in\naturalsPlus$ or $n\in\{0\}$ by \cref{naturals,union_iff}.
        \begin{byCase}
        \caseOf{$n\in\naturalsPlus$.}
            $n\in\reals$ by \cref{real_naturals_subset_reals,subseteq}.
        \caseOf{$n\notin\naturalsPlus$.}
            $n\in\{0\}$.
            $n = 0$ by \cref{singleton_iff}.
            $0\in\reals$ by \cref{real_add_ident}.
            Thus $n\in\reals$.
        \end{byCase}
    \end{subproof}
    Thus $\naturals\subseteq\reals$ by \cref{subseteq}.
\end{proof}
Lemma 380
natural_comparability

Suppose $m$ is a natural number.
Suppose $n$ is a natural number.
Then $m < n$ or $n < m$ or $m = n$.

LaTeX source
\begin{lemma}
\label{natural_comparability}
    Suppose $m$ is a natural number.
    Suppose $n$ is a natural number.
    Then $m < n$ or $n < m$ or $m = n$.
\end{lemma}
Proof

$m\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Definition 1, Lemma 379.
Thus $m < n$ or $n < m$ or $m = n$ by Axiom 34.

LaTeX source
\begin{proof}
    $m\in\reals$ and $n\in\reals$ by \cref{naturals_subseteq_reals,subseteq}.
    Thus $m < n$ or $n < m$ or $m = n$ by \cref{real_lt_trichotomy}.
\end{proof}
Lemma 381
finite_inhabited_naturals_largest

Suppose $F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturals$.
Suppose $F$ is finite.
Suppose $F$ is inhabited.
Then there exists $m\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ such that for all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $a\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$.

LaTeX source
\begin{lemma}
\label{finite_inhabited_naturals_largest}
    Suppose $F\subseteq\naturals$.
    Suppose $F$ is finite.
    Suppose $F$ is inhabited.
    Then there exists $m\in F$ such that for all $a\in F$ we have $a\leq m$.
\end{lemma}
Proof

$F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$ by Lemma 379, Proposition 6.
$F\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Lemma 323.
Take $m\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ such that $m$ is a maximum of $F$ by Lemma 47.
Thus for all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $a\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$ by Definition 73.

LaTeX source
\begin{proof}
    $F\subseteq\reals$ by \cref{naturals_subseteq_reals,subseteq_transitive}.
    $F\neq\emptyset$ by \cref{inhabited_nonempty}.
    Take $m\in F$ such that $m$ is a maximum of $F$ by \cref{finite_real_maximum}.
    Thus for all $a\in F$ we have $a\leq m$ by \cref{real_maximum}.
\end{proof}
Definition 256
shrinking_sequence_upto

$s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ iff $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $s$ is a function on $\{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n\}$ and $s(0) = c((X,g(0)))$ and for all $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ we have $s(k)$ is open in $X$ with respect to $T$ and $s(k)\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $g(k)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{s(k)}{X}{T}$ and for all $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $k < n$ we have $s(k + 1) = c((s(k),g(k + 1)))$ and $s(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s(k)$.

LaTeX source
\begin{definition}
\label{shrinking_sequence_upto}
    $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ iff
        $n\in\naturals$ and
        $s$ is a function on $\{k\in\naturals \mid k\leq n\}$ and
        $s(0) = c((X,g(0)))$ and
        for all $k\in\naturals$ such that $k\leq n$ we have
            $s(k)$ is open in $X$ with respect to $T$ and
            $s(k)\neq\emptyset$ and
            $g(k)\notin\closure{s(k)}{X}{T}$ and
        for all $k\in\naturals$ such that $k < n$ we have
            $s(k + 1) = c((s(k),g(k + 1)))$ and
            $s(k + 1)\subseteq s(k)$.
\end{definition}
Lemma 382
zero_in_naturals

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

LaTeX source
\begin{lemma}
\label{zero_in_naturals}
    $0\in\naturals$.
\end{lemma}
Proof

$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Proposition 20.
Hence $0\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus\union\{0\}$ by Proposition 39.
Thus $0\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Definition 81.

LaTeX source
\begin{proof}
    $0\in\{0\}$ by \cref{singleton_intro}.
    Hence $0\in\naturalsPlus\union\{0\}$ by \cref{union_intro_right}.
    Thus $0\in\naturals$ by \cref{naturals}.
\end{proof}
Lemma 383
naturals_closed_successor

Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Then $n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.

LaTeX source
\begin{lemma}
\label{naturals_closed_successor}
    Suppose $n\in\naturals$.
    Then $n + 1\in\naturals$.
\end{lemma}
Proof

$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ or $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Axiom 5, Definition 81.

Case. $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.

$n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ by Axiom 45.
Hence $n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus\union\{0\}$ by Proposition 38.
Thus $n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Definition 81.

Case. $n\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\naturalsPlus$.

$n = 0$ by Proposition 22.
$0 + 1 = 1$ by Axiom 17, Axiom 41, Axiom 42, Definition 1.
Thus $n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ by Axiom 42.
Hence $n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus\union\{0\}$ by Proposition 38.
Therefore $n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Definition 81.

LaTeX source
\begin{byCase}
    \caseOf{$n\in\naturalsPlus$.}
        $n + 1\in\naturalsPlus$ by \cref{real_naturals_closed_succ}.
        Hence $n + 1\in\naturalsPlus\union\{0\}$ by \cref{union_intro_left}.
        Thus $n + 1\in\naturals$ by \cref{naturals}.
    \caseOf{$n\notin\naturalsPlus$.}
        $n = 0$ by \cref{singleton_iff}.
        $0 + 1 = 1$ by \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_add_ident}.
        Thus $n + 1\in\naturalsPlus$ by \cref{real_one_in_naturals}.
        Hence $n + 1\in\naturalsPlus\union\{0\}$ by \cref{union_intro_left}.
        Therefore $n + 1\in\naturals$ by \cref{naturals}.
    
\end{byCase}
LaTeX source
\begin{proof}
    $n\in\naturalsPlus$ or $n\in\{0\}$ by \cref{naturals,union_iff}.
    \begin{byCase}
    \caseOf{$n\in\naturalsPlus$.}
        $n + 1\in\naturalsPlus$ by \cref{real_naturals_closed_succ}.
        Hence $n + 1\in\naturalsPlus\union\{0\}$ by \cref{union_intro_left}.
        Thus $n + 1\in\naturals$ by \cref{naturals}.
    \caseOf{$n\notin\naturalsPlus$.}
        $n = 0$ by \cref{singleton_iff}.
        $0 + 1 = 1$ by \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_add_ident}.
        Thus $n + 1\in\naturalsPlus$ by \cref{real_one_in_naturals}.
        Hence $n + 1\in\naturalsPlus\union\{0\}$ by \cref{union_intro_left}.
        Therefore $n + 1\in\naturals$ by \cref{naturals}.
    \end{byCase}
\end{proof}
Lemma 384
natural_nonnegative

Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Then $0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.

LaTeX source
\begin{lemma}
\label{natural_nonnegative}
    Suppose $n\in\naturals$.
    Then $0\leq n$.
\end{lemma}
Proof

$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ or $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Axiom 5, Definition 81.

Case. $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.

$1 < n$ or $1 = n$ by Axiom 43.
$0 < 1$ by Proposition 462.
Hence $0 < n$ by Axiom 17, Axiom 36, Axiom 41, Axiom 42, Definition 1, Lemma 83.
Thus $0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Lemma 231.

Case. $n\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\naturalsPlus$.

$n = 0$ by Proposition 22.
Thus $0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.

LaTeX source
\begin{byCase}
    \caseOf{$n\in\naturalsPlus$.}
        $1 < n$ or $1 = n$ by \cref{real_one_leq_naturalsplus}.
        $0 < 1$ by \cref{real_zero_lt_one}.
        Hence $0 < n$ by
            \cref{real_naturals_subset_reals,real_one_in_naturals,subseteq,real_add_ident,real_lt_trans,real_lt_subst_right}.
        Thus $0\leq n$ by \cref{real_lt_imp_leq}.
    \caseOf{$n\notin\naturalsPlus$.}
        $n = 0$ by \cref{singleton_iff}.
        Thus $0\leq n$.
    
\end{byCase}
LaTeX source
\begin{proof}
    $n\in\naturalsPlus$ or $n\in\{0\}$ by \cref{naturals,union_iff}.
    \begin{byCase}
    \caseOf{$n\in\naturalsPlus$.}
        $1 < n$ or $1 = n$ by \cref{real_one_leq_naturalsplus}.
        $0 < 1$ by \cref{real_zero_lt_one}.
        Hence $0 < n$ by
            \cref{real_naturals_subset_reals,real_one_in_naturals,subseteq,real_add_ident,real_lt_trans,real_lt_subst_right}.
        Thus $0\leq n$ by \cref{real_lt_imp_leq}.
    \caseOf{$n\notin\naturalsPlus$.}
        $n = 0$ by \cref{singleton_iff}.
        Thus $0\leq n$.
    \end{byCase}
\end{proof}
Lemma 385
natural_lt_successor

Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Then $n < n + 1$.

LaTeX source
\begin{lemma}
\label{natural_lt_successor}
    Suppose $n\in\naturals$.
    Then $n < n + 1$.
\end{lemma}
Proof

$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $0\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ and $1\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$ by Axiom 17, Axiom 41, Axiom 42, Definition 1, Lemma 379.
$0 < 1$ by Proposition 462.
$0 + n < 1 + n$ by Axiom 37.
$0 + n = n$ and $1 + n = n + 1$ by Axiom 16, Axiom 17.
Thus $n < n + 1$ by Lemma 82, Lemma 83.

LaTeX source
\begin{proof}
    $n\in\reals$ and $0\in\reals$ and $1\in\reals$
        by \cref{naturals_subseteq_reals,real_one_in_naturals,real_naturals_subset_reals,subseteq,real_add_ident}.
    $0 < 1$ by \cref{real_zero_lt_one}.
    $0 + n < 1 + n$ by \cref{real_lt_add}.
    $0 + n = n$ and $1 + n = n + 1$ by \cref{real_add_ident,real_add_comm}.
    Thus $n < n + 1$ by \cref{real_lt_subst_left,real_lt_subst_right}.
\end{proof}
Lemma 386
natural_lt_successor_split

Suppose $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Suppose $k < n + 1$.
Then $k < n$ or $k = n$.

LaTeX source
\begin{lemma}
\label{natural_lt_successor_split}
    Suppose $k\in\naturals$ and $n\in\naturals$.
    Suppose $k < n + 1$.
    Then $k < n$ or $k = n$.
\end{lemma}
Proof

$k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ or $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Axiom 5, Definition 81.
$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ or $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Axiom 5, Definition 81.

Case. $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.
Case. $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.

$k < n$ or $k = n$ or $k = n + 1$ by Axiom 44.
Thus $k < n$ or $k = n$ by Axiom 39, Axiom 41, Axiom 45, Definition 1, Lemma 83.

Case. $k\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\naturalsPlus$.

$k = 0$ by Proposition 22.
$0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Lemma 384.
$0\class{latex-symbol-tip latex-symbol-id-neq}{\neq} n$ by Axiom 35, Axiom 41, Axiom 42, Axiom 43, Definition 1, Proposition 462.
Hence $0 < n$ by Lemma 81.
Thus $k < n$.

LaTeX source
\begin{byCase}
        \caseOf{$k\in\naturalsPlus$.}
            $k < n$ or $k = n$ or $k = n + 1$ by \cref{real_succ_discrete}.
            Thus $k < n$ or $k = n$ by
                \cref{real_naturals_subset_reals,real_naturals_closed_succ,subseteq,real_lt_irreflexive,real_lt_subst_right}.
        \caseOf{$k\notin\naturalsPlus$.}
            $k = 0$ by \cref{singleton_iff}.
            $0\leq n$ by \cref{natural_nonnegative}.
            $0\neq n$ by
                \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_one_leq_naturalsplus,real_zero_lt_one,real_lt_asym}.
            Hence $0 < n$ by \cref{real_leq_split}.
            Thus $k < n$.
        
\end{byCase}
Case. $n\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\naturalsPlus$.

$n = 0$ by Proposition 22.

Case. $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.
Claim: $k < n$ or $k = n$.

Suppose not.
$1 < k$ or $1 = k$ by Axiom 43.
$n + 1 = 1$ by Axiom 17, Axiom 41, Axiom 42, Definition 1.
$k < 1$ by Lemma 83.
Contradiction by Axiom 35, Axiom 39, Axiom 41, Axiom 42, Definition 1, Lemma 82.

Case. $k\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\naturalsPlus$.

$k = 0$ by Proposition 22.
Thus $k = n$.

LaTeX source
\begin{byCase}
        \caseOf{$k\in\naturalsPlus$.}
            Show that $k < n$ or $k = n$.
            \begin{subproof}
                Suppose not.
                $1 < k$ or $1 = k$ by \cref{real_one_leq_naturalsplus}.
                $n + 1 = 1$ by
                    \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_add_ident}.
                $k < 1$ by \cref{real_lt_subst_right}.
                Contradiction by
                    \cref{real_naturals_subset_reals,real_one_in_naturals,subseteq,real_lt_asym,real_lt_irreflexive,real_lt_subst_left}.
            \end{subproof}
        \caseOf{$k\notin\naturalsPlus$.}
            $k = 0$ by \cref{singleton_iff}.
            Thus $k = n$.
        
\end{byCase}
LaTeX source
\begin{byCase}
    \caseOf{$n\in\naturalsPlus$.}
        \begin{byCase}
        \caseOf{$k\in\naturalsPlus$.}
            $k < n$ or $k = n$ or $k = n + 1$ by \cref{real_succ_discrete}.
            Thus $k < n$ or $k = n$ by
                \cref{real_naturals_subset_reals,real_naturals_closed_succ,subseteq,real_lt_irreflexive,real_lt_subst_right}.
        \caseOf{$k\notin\naturalsPlus$.}
            $k = 0$ by \cref{singleton_iff}.
            $0\leq n$ by \cref{natural_nonnegative}.
            $0\neq n$ by
                \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_one_leq_naturalsplus,real_zero_lt_one,real_lt_asym}.
            Hence $0 < n$ by \cref{real_leq_split}.
            Thus $k < n$.
        \end{byCase}
    \caseOf{$n\notin\naturalsPlus$.}
        $n = 0$ by \cref{singleton_iff}.
        \begin{byCase}
        \caseOf{$k\in\naturalsPlus$.}
            Show that $k < n$ or $k = n$.
            \begin{subproof}
                Suppose not.
                $1 < k$ or $1 = k$ by \cref{real_one_leq_naturalsplus}.
                $n + 1 = 1$ by
                    \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_add_ident}.
                $k < 1$ by \cref{real_lt_subst_right}.
                Contradiction by
                    \cref{real_naturals_subset_reals,real_one_in_naturals,subseteq,real_lt_asym,real_lt_irreflexive,real_lt_subst_left}.
            \end{subproof}
        \caseOf{$k\notin\naturalsPlus$.}
            $k = 0$ by \cref{singleton_iff}.
            Thus $k = n$.
        \end{byCase}
    
\end{byCase}
LaTeX source
\begin{proof}
    $k\in\naturalsPlus$ or $k\in\{0\}$ by \cref{naturals,union_iff}.
    $n\in\naturalsPlus$ or $n\in\{0\}$ by \cref{naturals,union_iff}.
    \begin{byCase}
    \caseOf{$n\in\naturalsPlus$.}
        \begin{byCase}
        \caseOf{$k\in\naturalsPlus$.}
            $k < n$ or $k = n$ or $k = n + 1$ by \cref{real_succ_discrete}.
            Thus $k < n$ or $k = n$ by
                \cref{real_naturals_subset_reals,real_naturals_closed_succ,subseteq,real_lt_irreflexive,real_lt_subst_right}.
        \caseOf{$k\notin\naturalsPlus$.}
            $k = 0$ by \cref{singleton_iff}.
            $0\leq n$ by \cref{natural_nonnegative}.
            $0\neq n$ by
                \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_one_leq_naturalsplus,real_zero_lt_one,real_lt_asym}.
            Hence $0 < n$ by \cref{real_leq_split}.
            Thus $k < n$.
        \end{byCase}
    \caseOf{$n\notin\naturalsPlus$.}
        $n = 0$ by \cref{singleton_iff}.
        \begin{byCase}
        \caseOf{$k\in\naturalsPlus$.}
            Show that $k < n$ or $k = n$.
            \begin{subproof}
                Suppose not.
                $1 < k$ or $1 = k$ by \cref{real_one_leq_naturalsplus}.
                $n + 1 = 1$ by
                    \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_add_ident}.
                $k < 1$ by \cref{real_lt_subst_right}.
                Contradiction by
                    \cref{real_naturals_subset_reals,real_one_in_naturals,subseteq,real_lt_asym,real_lt_irreflexive,real_lt_subst_left}.
            \end{subproof}
        \caseOf{$k\notin\naturalsPlus$.}
            $k = 0$ by \cref{singleton_iff}.
            Thus $k = n$.
        \end{byCase}
    \end{byCase}
\end{proof}
Lemma 387
natural_successor_leq

Suppose $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Suppose $k < n$.
Then $k + 1\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.

LaTeX source
\begin{lemma}
\label{natural_successor_leq}
    Suppose $k\in\naturals$ and $n\in\naturals$.
    Suppose $k < n$.
    Then $k + 1\leq n$.
\end{lemma}
Proof

$k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Lemma 383.
$k + 1 < n$ or $n < k + 1$ or $k + 1 = n$ by Lemma 380.

Claim: It is wrong that $n < k + 1$.

Suppose not.
$n < k$ or $n = k$ by Lemma 386.
Contradiction by Axiom 35, Axiom 39, Definition 1, Lemma 83, Lemma 379.

Thus $k + 1 < n$ or $k + 1 = n$.
Therefore $k + 1\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.

LaTeX source
\begin{proof}
    $k + 1\in\naturals$ by \cref{naturals_closed_successor}.
    $k + 1 < n$ or $n < k + 1$ or $k + 1 = n$ by \cref{natural_comparability}.
    Show that it is wrong that $n < k + 1$.
    \begin{subproof}
        Suppose not.
        $n < k$ or $n = k$ by \cref{natural_lt_successor_split}.
        Contradiction by
            \cref{naturals_subseteq_reals,subseteq,real_lt_asym,real_lt_irreflexive,real_lt_subst_right}.
    \end{subproof}
    Thus $k + 1 < n$ or $k + 1 = n$.
    Therefore $k + 1\leq n$.
\end{proof}
Lemma 388
natural_leq_successor_split

Suppose $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Suppose $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n + 1$.
Then $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ or $k = n + 1$.

LaTeX source
\begin{lemma}
\label{natural_leq_successor_split}
    Suppose $k\in\naturals$ and $n\in\naturals$.
    Suppose $k\leq n + 1$.
    Then $k\leq n$ or $k = n + 1$.
\end{lemma}
Proof

$k < n + 1$ or $k = n + 1$ by Lemma 81.

Case. $k = n + 1$.

Trivial.

Case. $k\class{latex-symbol-tip latex-symbol-id-neq}{\neq} n + 1$.

$k < n$ or $k = n$ by Lemma 386.
Hence $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.

LaTeX source
\begin{byCase}
    \caseOf{$k = n + 1$.}
        Trivial.
    \caseOf{$k\neq n + 1$.}
        $k < n$ or $k = n$ by \cref{natural_lt_successor_split}.
        Hence $k\leq n$.
    
\end{byCase}
LaTeX source
\begin{proof}
    $k < n + 1$ or $k = n + 1$ by \cref{real_leq_split}.
    \begin{byCase}
    \caseOf{$k = n + 1$.}
        Trivial.
    \caseOf{$k\neq n + 1$.}
        $k < n$ or $k = n$ by \cref{natural_lt_successor_split}.
        Hence $k\leq n$.
    \end{byCase}
\end{proof}
Lemma 389
natural_segment_zero

$\{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0\} = \{0\}$.

LaTeX source
\begin{lemma}
\label{natural_segment_zero}
    $\{k\in\naturals \mid k\leq 0\} = \{0\}$.
\end{lemma}
Proof

Let $I = \{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0\}$.

Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$.

Fix $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0$ by Definition 1.
$0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} k$ by Lemma 384.
$k = 0$ by Axiom 17, Definition 1, Lemma 25, Lemma 379.
Thus $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Proposition 20.

$I\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\{0\}$ by Definition 1.

Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.

Fix $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$.
$k = 0$ by Proposition 22.
Thus $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0$ by Lemma 382.

$\{0\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} I$ by Definition 1.
Thus $I = \{0\}$ by Proposition 3.

LaTeX source
\begin{proof}
    Let $I = \{k\in\naturals \mid k\leq 0\}$.
    Show that for all $k\in I$ we have $k\in\{0\}$.
    \begin{subproof}
        Fix $k\in I$.
        $k\in\naturals$ and $k\leq 0$ by \cref{subseteq}.
        $0\leq k$ by \cref{natural_nonnegative}.
        $k = 0$ by \cref{naturals_subseteq_reals,subseteq,real_add_ident,real_leq_antisym}.
        Thus $k\in\{0\}$ by \cref{singleton_intro}.
    \end{subproof}
    $I\subseteq\{0\}$ by \cref{subseteq}.
    Show that for all $k\in\{0\}$ we have $k\in I$.
    \begin{subproof}
        Fix $k\in\{0\}$.
        $k = 0$ by \cref{singleton_iff}.
        Thus $k\in\naturals$ and $k\leq 0$ by \cref{zero_in_naturals}.
    \end{subproof}
    $\{0\}\subseteq I$ by \cref{subseteq}.
    Thus $I = \{0\}$ by \cref{subseteq_antisymmetric}.
\end{proof}
Lemma 390
shrinking_sequence_exists

Assume $T$ is a topology on $X$.
Assume $X\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Suppose $g$ is a function from $\naturals$ to $X$.
Suppose for all $U,x$ such that $U$ is open in $X$ with respect to $T$ and $U\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $c((U,x))$ is open in $X$ with respect to $T$ and $c((U,x))\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $c((U,x))\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ and $x\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{c((U,x))}{X}{T}$.
Then for all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ there exists $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$.

LaTeX source
\begin{lemma}
\label{shrinking_sequence_exists}
    Assume $T$ is a topology on $X$.
    Assume $X\neq\emptyset$.
    Suppose $g$ is a function from $\naturals$ to $X$.
    Suppose for all $U,x$ such that
        $U$ is open in $X$ with respect to $T$ and
        $U\neq\emptyset$ and
        $x\in X$
    we have
        $c((U,x))$ is open in $X$ with respect to $T$ and
        $c((U,x))\neq\emptyset$ and
        $c((U,x))\subseteq U$ and
        $x\notin\closure{c((U,x))}{X}{T}$.
    Then for all $n\in\naturals$ there exists $s$ such that
        $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$.
\end{lemma}
Proof

Fix $m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Let $A = \{n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid \text{there exists $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$}\}$.
$X\class{latex-symbol-tip latex-symbol-id-in}{\in} T$ by Definition 101.
Hence $X$ is open in $X$ with respect to $T$ by Definition 103.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Lemma 382.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ by Definition 55.
Therefore $g(0)\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Proposition 361.
Let $V = c((X,g(0)))$.
$V$ is open in $X$ with respect to $T$ and $V\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $V\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ and $g(0)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{V}{X}{T}$ by assumption.
Let $s_0 = \{(0,V)\}$.
For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} s_0$ there exist $x, y$ such that $w = (x,y)$ by Definition 12, Proposition 22.
Hence $s_0$ is a relation by Definition 12.

Claim: For all $a,b,b'$ such that $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} s_0$ and $(a,b')\class{latex-symbol-tip latex-symbol-id-in}{\in} s_0$ we have $b = b'$.

Fix $a$.
Fix $b$.
Fix $b'$.
Assume $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} s_0$ and $(a,b')\class{latex-symbol-tip latex-symbol-id-in}{\in} s_0$.
Hence $(a,b) = (0,V)$ and $(a,b') = (0,V)$ by Proposition 22.
Thus $b = V$ and $b' = V$ by Axiom 6.

Hence $s_0$ is a function by Definition 51.

Claim: For all $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$.
Take $y$ such that $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} s_0$ by Proposition 199.
Hence $(x,y) = (0,V)$ by Proposition 22.
Thus $x = 0$ by Axiom 6.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Proposition 20.

We have $\dom{s_0}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\{0\}$ by Definition 1.
$(0,V)\class{latex-symbol-tip latex-symbol-id-in}{\in} s_0$ by Proposition 20.
$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$ by Proposition 200.
Thus $\{0\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{s_0}$ by Proposition 25.
Therefore $\dom{s_0} = \{0\}$ by Proposition 3.
Let $I_0 = \{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0\}$.
For all $k$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I_0$ iff $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Lemma 389.
$I_0 = \{0\}$ by Axiom 1 [Set extensionality].

Claim: $s_0$ is a function on $I_0$.

Trivial.

Claim: $s_0(0) = c((X,g(0)))$.

$(0,V)\class{latex-symbol-tip latex-symbol-id-in}{\in} s_0$ by Proposition 22.
Therefore $s_0(0) = c((X,g(0)))$ by Proposition 346.

Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0$ we have $s_0(k)$ is open in $X$ with respect to $T$ and $s_0(k)\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $g(k)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{s_0(k)}{X}{T}$.

Fix $k$ such that $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0$.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in} I_0$ by Definition 1.
Hence $k = 0$ by Lemma 389, Proposition 22.
$(0,V)\class{latex-symbol-tip latex-symbol-id-in}{\in} s_0$ by Proposition 22.
Hence $s_0(k) = V$ by Proposition 346.
Thus $s_0(k)$ is open in $X$ with respect to $T$ and $s_0(k)\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $g(k)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{s_0(k)}{X}{T}$.

Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $k < 0$ we have $s_0(k + 1) = c((s_0(k),g(k + 1)))$ and $s_0(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0(k)$.

Fix $k$ such that $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $k < 0$.

Claim: $s_0(k + 1) = c((s_0(k),g(k + 1)))$ and $s_0(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0(k)$.

Suppose not.
$0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} k$ by Lemma 384.
$0 < k$ or $0 = k$ by Lemma 81.
Contradiction by Axiom 17, Axiom 35, Axiom 39, Definition 1, Lemma 82, Lemma 379.

Therefore $s_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ by Definition 256, Lemma 382.
Thus $0\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 1, Lemma 382.

Claim: For all $n\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

Fix $n\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Take $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ by Definition 1.
$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Definition 256.
Let $I = \{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n\}$.
$s$ is a function by Definition 256.
For all $k$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$ iff $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 256.
Hence $\dom{s} = I$ by Axiom 1 [Set extensionality].
$n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Lemma 383.
$n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{g}$ by Definition 55.
Therefore $g(n + 1)\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Proposition 361.
$n\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
We have $s(n)$ is open in $X$ with respect to $T$ and $s(n)\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $g(n)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{s(n)}{X}{T}$ by Definition 256.
Let $W = c((s(n),g(n + 1)))$.
$W$ is open in $X$ with respect to $T$ and $W\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $W\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s(n)$ and $g(n + 1)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{W}{X}{T}$ by assumption.
Let $t = s\union\{(n + 1,W)\}$.
For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ there exist $x, y$ such that $w = (x,y)$ by Axiom 5, Definition 12, Proposition 22.
Hence $t$ is a relation by Definition 12.

Claim: For all $a,b,b'$ such that $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ and $(a,b')\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ we have $b = b'$.

Fix $a$.
Fix $b$.
Fix $b'$.
Assume $(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ and $(a,b')\class{latex-symbol-tip latex-symbol-id-in}{\in} t$.

Case. $a = n + 1$.

$(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ or $(a,b) = (n + 1,W)$ by Axiom 5, Proposition 22.

Claim: $(a,b)\class{latex-symbol-tip latex-symbol-id-notin}{\notin} s$.

Suppose not.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$ by Proposition 200.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
Hence $a\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Definition 1.
$n < a$ by Lemma 83, Lemma 385.
$a < n$ or $a = n$ by Lemma 81.
Contradiction by Axiom 35, Axiom 39, Definition 1, Lemma 82, Lemma 379.

Hence $(a,b) = (n + 1,W)$.
$(a,b')\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ or $(a,b') = (n + 1,W)$ by Axiom 5, Proposition 22.

Claim: $(a,b')\class{latex-symbol-tip latex-symbol-id-notin}{\notin} s$.

Suppose not.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$ by Proposition 200.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
Hence $a\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Definition 1.
$n < a$ by Lemma 83, Lemma 385.
$a < n$ or $a = n$ by Lemma 81.
Contradiction by Axiom 35, Axiom 39, Definition 1, Lemma 82, Lemma 379.

Hence $(a,b') = (n + 1,W)$.
Thus $b = W$ and $b' = W$ by Axiom 6.

Case. $a \class{latex-symbol-tip latex-symbol-id-neq}{\neq} n + 1$.

$(a,b)\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ by Axiom 5, Axiom 6, Proposition 22.
$(a,b')\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ by Axiom 5, Axiom 6, Proposition 22.
Thus $b = b'$ by Proposition 345.

LaTeX source
\begin{byCase}
            \caseOf{$a = n + 1$.}
                $(a,b)\in s$ or $(a,b) = (n + 1,W)$ by \cref{union_iff,singleton_iff}.
                Show that $(a,b)\notin s$.
                \begin{subproof}
                    Suppose not.
                    $a\in\dom{s}$ by \cref{dom_intro}.
                    $a\in I$.
                    Hence $a\leq n$ by \cref{subseteq}.
                    $n < a$ by \cref{natural_lt_successor,real_lt_subst_right}.
                    $a < n$ or $a = n$ by \cref{real_leq_split}.
                    Contradiction by
                        \cref{naturals_subseteq_reals,subseteq,real_lt_asym,real_lt_irreflexive,real_lt_subst_left}.
                \end{subproof}
                Hence $(a,b) = (n + 1,W)$.
                $(a,b')\in s$ or $(a,b') = (n + 1,W)$ by \cref{union_iff,singleton_iff}.
                Show that $(a,b')\notin s$.
                \begin{subproof}
                    Suppose not.
                    $a\in\dom{s}$ by \cref{dom_intro}.
                    $a\in I$.
                    Hence $a\leq n$ by \cref{subseteq}.
                    $n < a$ by \cref{natural_lt_successor,real_lt_subst_right}.
                    $a < n$ or $a = n$ by \cref{real_leq_split}.
                    Contradiction by
                        \cref{naturals_subseteq_reals,subseteq,real_lt_asym,real_lt_irreflexive,real_lt_subst_left}.
                \end{subproof}
                Hence $(a,b') = (n + 1,W)$.
                Thus $b = W$ and $b' = W$ by \cref{pair_eq_iff}.
            \caseOf{$a \neq n + 1$.}
                $(a,b)\in s$ by \cref{union_iff,singleton_iff,pair_eq_iff}.
                $(a,b')\in s$ by \cref{union_iff,singleton_iff,pair_eq_iff}.
                Thus $b = b'$ by \cref{function_rightunique}.
            
\end{byCase}

Hence $t$ is a function by Definition 51.
Let $J = \{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n + 1\}$.

Claim: For all $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t}$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in} J$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t}$.
Take $y$ such that $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ by Proposition 199.
$(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ or $(x,y) = (n + 1,W)$ by Axiom 5, Proposition 22.

Case. $(x,y) = (n + 1,W)$.

$x = n + 1$ by Axiom 6.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Lemma 383.
Thus $x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n + 1$.

Case. $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} s$.

$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$ by Proposition 200.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Definition 1.
$n\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n + 1$ by Lemma 231, Lemma 385.
Thus $x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n + 1$ by Definition 1, Lemma 23, Lemma 379, Lemma 383.

LaTeX source
\begin{byCase}
            \caseOf{$(x,y) = (n + 1,W)$.}
                $x = n + 1$ by \cref{pair_eq_iff}.
                Hence $x\in\naturals$ by \cref{naturals_closed_successor}.
                Thus $x\leq n + 1$.
            \caseOf{$(x,y)\in s$.}
                $x\in\dom{s}$ by \cref{dom_intro}.
                $x\in I$.
                Hence $x\in\naturals$ and $x\leq n$ by \cref{subseteq}.
                $n\leq n + 1$ by \cref{natural_lt_successor,real_lt_imp_leq}.
                Thus $x\leq n + 1$ by
                    \cref{naturals_subseteq_reals,naturals_closed_successor,subseteq,real_leq_trans}.
            
\end{byCase}

Hence $\dom{t}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} J$ by Definition 1.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t}$.

Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in} J$.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n + 1$ by Definition 1.
$x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ or $x = n + 1$ by Lemma 388.

Case. $x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.

$x\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$.
Take $y$ such that $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ by Proposition 199.
Hence $(x,y)\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ by Proposition 38.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t}$ by Proposition 200.

Case. $x\not\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.

$x = n + 1$.
$(x,W) = (n + 1,W)$ by Axiom 6.
Hence $(x,W)\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ by Proposition 20, Proposition 39.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t}$ by Proposition 200.

LaTeX source
\begin{byCase}
            \caseOf{$x\leq n$.}
                $x\in I$.
                $x\in\dom{s}$.
                Take $y$ such that $(x,y)\in s$ by \cref{dom_iff}.
                Hence $(x,y)\in t$ by \cref{union_intro_left}.
                Thus $x\in\dom{t}$ by \cref{dom_intro}.
            \caseOf{$x\not\leq n$.}
                $x = n + 1$.
                $(x,W) = (n + 1,W)$ by \cref{pair_eq_iff}.
                Hence $(x,W)\in t$ by \cref{union_intro_right,singleton_intro}.
                Thus $x\in\dom{t}$ by \cref{dom_intro}.
            
\end{byCase}

Hence $J\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{t}$ by Definition 1.
Therefore $\dom{t} = J$ by Proposition 3.

Claim: $t$ is a function on $J$.

Trivial.

Claim: $t(0) = c((X,g(0)))$.

$0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Lemma 384.
Hence $0\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 1, Lemma 382.
Thus $0\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$.
$(0,s(0))\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ by Proposition 348.
Hence $(0,s(0))\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ by Proposition 38.
Thus $t(0) = s(0)$ by Proposition 346.
Therefore $t(0) = c((X,g(0)))$ by Definition 256.

Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n + 1$ we have $t(k)$ is open in $X$ with respect to $T$ and $t(k)\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $g(k)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{t(k)}{X}{T}$.

Fix $k$ such that $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n + 1$.

Case. $k = n + 1$.

$(k,W) = (n + 1,W)$ by Axiom 6.
Hence $(k,W)\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ by Proposition 20, Proposition 39.
Hence $t(k) = W$ by Proposition 346.
Thus $t(k)$ is open in $X$ with respect to $T$ and $t(k)\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $g(k)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{t(k)}{X}{T}$.

Case. $k\class{latex-symbol-tip latex-symbol-id-neq}{\neq} n + 1$.

$k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Lemma 388.
Hence $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 1.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$.
$(k,s(k))\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ by Proposition 348.
Therefore $(k,s(k))\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ by Proposition 38.
Thus $t(k) = s(k)$ by Proposition 346.
We have $t(k)$ is open in $X$ with respect to $T$ and $t(k)\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $g(k)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{t(k)}{X}{T}$ by Definition 256.

LaTeX source
\begin{byCase}
            \caseOf{$k = n + 1$.}
                $(k,W) = (n + 1,W)$ by \cref{pair_eq_iff}.
                Hence $(k,W)\in t$ by \cref{union_intro_right,singleton_intro}.
                Hence $t(k) = W$ by \cref{function_apply_intro}.
                Thus $t(k)$ is open in $X$ with respect to $T$ and
                    $t(k)\neq\emptyset$ and
                    $g(k)\notin\closure{t(k)}{X}{T}$.
            \caseOf{$k\neq n + 1$.}
                $k\leq n$ by \cref{natural_leq_successor_split}.
                Hence $k\in I$ by \cref{subseteq}.
                $k\in\dom{s}$.
                $(k,s(k))\in s$ by \cref{function_apply_elim}.
                Therefore $(k,s(k))\in t$ by \cref{union_intro_left}.
                Thus $t(k) = s(k)$ by \cref{function_apply_intro}.
                We have $t(k)$ is open in $X$ with respect to $T$ and
                    $t(k)\neq\emptyset$ and
                    $g(k)\notin\closure{t(k)}{X}{T}$ by \cref{shrinking_sequence_upto}.
            
\end{byCase}
Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $k < n + 1$ we have $t(k + 1) = c((t(k),g(k + 1)))$ and $t(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} t(k)$.

Fix $k$ such that $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $k < n + 1$.
$k < n$ or $k = n$ by Lemma 386.

Case. $k = n$.

$(k + 1,W) = (n + 1,W)$ by Axiom 6.
Hence $(k + 1,W)\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ by Proposition 20, Proposition 39.
Hence $t(k + 1) = W$ by Proposition 346.
$k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.
Hence $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 1.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$.
$(k,s(k))\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ by Proposition 348.
Hence $(k,s(k))\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ by Proposition 38.
Hence $t(k) = s(k)$ by Proposition 346.
Thus $t(k + 1) = c((t(k),g(k + 1)))$ and $t(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} t(k)$.

Case. $k\class{latex-symbol-tip latex-symbol-id-neq}{\neq} n$.

$k < n$.
$k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ and $k + 1\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Lemma 231, Lemma 387.
Hence $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ and $k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 1, Lemma 383.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$ and $k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$.
$(k + 1,s(k + 1))\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ and $(k,s(k))\class{latex-symbol-tip latex-symbol-id-in}{\in} s$ by Proposition 348.
Therefore $(k + 1,s(k + 1))\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ and $(k,s(k))\class{latex-symbol-tip latex-symbol-id-in}{\in} t$ by Proposition 38.
Thus $t(k + 1) = s(k + 1)$ and $t(k) = s(k)$ by Proposition 346.
We have $t(k + 1) = c((t(k),g(k + 1)))$ and $t(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} t(k)$ by Definition 256.

LaTeX source
\begin{byCase}
            \caseOf{$k = n$.}
                $(k + 1,W) = (n + 1,W)$ by \cref{pair_eq_iff}.
                Hence $(k + 1,W)\in t$ by \cref{union_intro_right,singleton_intro}.
                Hence $t(k + 1) = W$ by \cref{function_apply_intro}.
                $k\leq n$.
                Hence $k\in I$ by \cref{subseteq}.
                $k\in\dom{s}$.
                $(k,s(k))\in s$ by \cref{function_apply_elim}.
                Hence $(k,s(k))\in t$ by \cref{union_intro_left}.
                Hence $t(k) = s(k)$ by \cref{function_apply_intro}.
                Thus $t(k + 1) = c((t(k),g(k + 1)))$ and $t(k + 1)\subseteq t(k)$.
            \caseOf{$k\neq n$.}
                $k < n$.
                $k\leq n$ and $k + 1\leq n$ by \cref{real_lt_imp_leq,natural_successor_leq}.
                Hence $k\in I$ and $k + 1\in I$ by \cref{naturals_closed_successor,subseteq}.
                $k\in\dom{s}$ and $k + 1\in\dom{s}$.
                $(k + 1,s(k + 1))\in s$ and $(k,s(k))\in s$
                    by \cref{function_apply_elim}.
                Therefore $(k + 1,s(k + 1))\in t$ and $(k,s(k))\in t$ by \cref{union_intro_left}.
                Thus $t(k + 1) = s(k + 1)$ and $t(k) = s(k)$ by \cref{function_apply_intro}.
                We have $t(k + 1) = c((t(k),g(k + 1)))$ and $t(k + 1)\subseteq t(k)$
                    by \cref{shrinking_sequence_upto}.
            
\end{byCase}

Therefore $t$ is a shrinking sequence up to $n + 1$ for $g$ and $c$ in $X$ with respect to $T$ by Definition 256.
Thus $n + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 1, Lemma 383.

$0 + 1 = 1$ by Axiom 17, Axiom 41, Axiom 42, Definition 1.
Hence $1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturals$ by Definition 1.
Therefore $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$ by Lemma 379, Proposition 6.
$\naturalsPlus\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Axiom 46.

Claim: For all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $n\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

Fix $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ or $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Axiom 5, Definition 81.
Thus $n\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 1, Proposition 22.

Therefore $\naturals\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Definition 1.
Hence $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 1.
Thus there exists $s$ such that $s$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$ by Definition 1.

LaTeX source
\begin{proof}
    Fix $m\in\naturals$.
    Let $A = \{n\in\naturals \mid \text{there exists $s$ such that
        $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$}\}$.
    $X\in T$ by \cref{topology_on}.
    Hence $X$ is open in $X$ with respect to $T$ by \cref{open_in}.
    $0\in\naturals$ by \cref{zero_in_naturals}.
    $0\in\dom{g}$ by \cref{funs}.
    Therefore $g(0)\in X$ by \cref{funs_type_apply}.
    Let $V = c((X,g(0)))$.
    $V$ is open in $X$ with respect to $T$ and
        $V\neq\emptyset$ and
        $V\subseteq X$ and
        $g(0)\notin\closure{V}{X}{T}$ by assumption.
    Let $s_0 = \{(0,V)\}$.
    For all $w$ such that $w\in s_0$ there exist $x, y$ such that $w = (x,y)$ by \cref{singleton_iff,relation}.
    Hence $s_0$ is a relation by \cref{relation}.
    Show that for all $a,b,b'$ such that $(a,b)\in s_0$ and $(a,b')\in s_0$ we have $b = b'$.
    \begin{subproof}
        Fix $a$.
        Fix $b$.
        Fix $b'$.
        Assume $(a,b)\in s_0$ and $(a,b')\in s_0$.
        Hence $(a,b) = (0,V)$ and $(a,b') = (0,V)$ by \cref{singleton_iff}.
        Thus $b = V$ and $b' = V$ by \cref{pair_eq_iff}.
    \end{subproof}
    Hence $s_0$ is a function by \cref{rightunique}.
    Show that for all $x$ such that $x\in\dom{s_0}$ we have $x\in\{0\}$.
    \begin{subproof}
        Fix $x$ such that $x\in\dom{s_0}$.
        Take $y$ such that $(x,y)\in s_0$ by \cref{dom_iff}.
        Hence $(x,y) = (0,V)$ by \cref{singleton_iff}.
        Thus $x = 0$ by \cref{pair_eq_iff}.
        Hence $x\in\{0\}$ by \cref{singleton_intro}.
    \end{subproof}
    We have $\dom{s_0}\subseteq\{0\}$ by \cref{subseteq}.
    $(0,V)\in s_0$ by \cref{singleton_intro}.
    $0\in\dom{s_0}$ by \cref{dom_intro}.
    Thus $\{0\}\subseteq\dom{s_0}$ by \cref{singleton_subset_intro}.
    Therefore $\dom{s_0} = \{0\}$ by \cref{subseteq_antisymmetric}.
    Let $I_0 = \{k\in\naturals \mid k\leq 0\}$.
    For all $k$ we have $k\in I_0$ iff $k\in\{0\}$ by \cref{natural_segment_zero}.
    $I_0 = \{0\}$ by \cref{setext}.
    Show that $s_0$ is a function on $I_0$.
    \begin{subproof}
        Trivial.
    \end{subproof}
    Show that $s_0(0) = c((X,g(0)))$.
    \begin{subproof}
        $(0,V)\in s_0$ by \cref{singleton_iff}.
        Therefore $s_0(0) = c((X,g(0)))$ by \cref{function_apply_intro}.
    \end{subproof}
    Show that for all $k\in\naturals$ such that $k\leq 0$ we have
        $s_0(k)$ is open in $X$ with respect to $T$ and
        $s_0(k)\neq\emptyset$ and
        $g(k)\notin\closure{s_0(k)}{X}{T}$.
    \begin{subproof}
        Fix $k$ such that $k\in\naturals$ and $k\leq 0$.
        $k\in I_0$ by \cref{subseteq}.
        Hence $k = 0$ by \cref{natural_segment_zero,singleton_iff}.
        $(0,V)\in s_0$ by \cref{singleton_iff}.
        Hence $s_0(k) = V$ by \cref{function_apply_intro}.
        Thus $s_0(k)$ is open in $X$ with respect to $T$ and
            $s_0(k)\neq\emptyset$ and
            $g(k)\notin\closure{s_0(k)}{X}{T}$.
    \end{subproof}
    Show that for all $k\in\naturals$ such that $k < 0$ we have
        $s_0(k + 1) = c((s_0(k),g(k + 1)))$ and
        $s_0(k + 1)\subseteq s_0(k)$.
    \begin{subproof}
        Fix $k$ such that $k\in\naturals$ and $k < 0$.
        Show that $s_0(k + 1) = c((s_0(k),g(k + 1)))$ and
            $s_0(k + 1)\subseteq s_0(k)$.
        \begin{subproof}
            Suppose not.
            $0\leq k$ by \cref{natural_nonnegative}.
            $0 < k$ or $0 = k$ by \cref{real_leq_split}.
            Contradiction by
                \cref{naturals_subseteq_reals,subseteq,real_add_ident,real_lt_asym,real_lt_irreflexive,real_lt_subst_left}.
        \end{subproof}
    \end{subproof}
    Therefore $s_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$
        by \cref{shrinking_sequence_upto,zero_in_naturals}.
    Thus $0\in A$ by \cref{zero_in_naturals,subseteq}.
    Show that for all $n\in A$ we have $n + 1\in A$.
    \begin{subproof}
        Fix $n\in A$.
        Take $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ by \cref{subseteq}.
        $n\in\naturals$ by \cref{shrinking_sequence_upto}.
        Let $I = \{k\in\naturals \mid k\leq n\}$.
        $s$ is a function by \cref{shrinking_sequence_upto}.
        For all $k$ we have $k\in\dom{s}$ iff $k\in I$ by \cref{shrinking_sequence_upto}.
        Hence $\dom{s} = I$ by \cref{setext}.
        $n + 1\in\naturals$ by \cref{naturals_closed_successor}.
        $n + 1\in\dom{g}$ by \cref{funs}.
        Therefore $g(n + 1)\in X$ by \cref{funs_type_apply}.
        $n\in I$.
        We have $s(n)$ is open in $X$ with respect to $T$ and
            $s(n)\neq\emptyset$ and
            $g(n)\notin\closure{s(n)}{X}{T}$ by \cref{shrinking_sequence_upto}.
        Let $W = c((s(n),g(n + 1)))$.
        $W$ is open in $X$ with respect to $T$ and
            $W\neq\emptyset$ and
            $W\subseteq s(n)$ and
            $g(n + 1)\notin\closure{W}{X}{T}$ by assumption.
        Let $t = s\union\{(n + 1,W)\}$.
        For all $w$ such that $w\in t$ there exist $x, y$ such that $w = (x,y)$ by \cref{union_iff,singleton_iff,relation}.
        Hence $t$ is a relation by \cref{relation}.
        Show that for all $a,b,b'$ such that $(a,b)\in t$ and $(a,b')\in t$ we have $b = b'$.
        \begin{subproof}
            Fix $a$.
            Fix $b$.
            Fix $b'$.
            Assume $(a,b)\in t$ and $(a,b')\in t$.
            \begin{byCase}
            \caseOf{$a = n + 1$.}
                $(a,b)\in s$ or $(a,b) = (n + 1,W)$ by \cref{union_iff,singleton_iff}.
                Show that $(a,b)\notin s$.
                \begin{subproof}
                    Suppose not.
                    $a\in\dom{s}$ by \cref{dom_intro}.
                    $a\in I$.
                    Hence $a\leq n$ by \cref{subseteq}.
                    $n < a$ by \cref{natural_lt_successor,real_lt_subst_right}.
                    $a < n$ or $a = n$ by \cref{real_leq_split}.
                    Contradiction by
                        \cref{naturals_subseteq_reals,subseteq,real_lt_asym,real_lt_irreflexive,real_lt_subst_left}.
                \end{subproof}
                Hence $(a,b) = (n + 1,W)$.
                $(a,b')\in s$ or $(a,b') = (n + 1,W)$ by \cref{union_iff,singleton_iff}.
                Show that $(a,b')\notin s$.
                \begin{subproof}
                    Suppose not.
                    $a\in\dom{s}$ by \cref{dom_intro}.
                    $a\in I$.
                    Hence $a\leq n$ by \cref{subseteq}.
                    $n < a$ by \cref{natural_lt_successor,real_lt_subst_right}.
                    $a < n$ or $a = n$ by \cref{real_leq_split}.
                    Contradiction by
                        \cref{naturals_subseteq_reals,subseteq,real_lt_asym,real_lt_irreflexive,real_lt_subst_left}.
                \end{subproof}
                Hence $(a,b') = (n + 1,W)$.
                Thus $b = W$ and $b' = W$ by \cref{pair_eq_iff}.
            \caseOf{$a \neq n + 1$.}
                $(a,b)\in s$ by \cref{union_iff,singleton_iff,pair_eq_iff}.
                $(a,b')\in s$ by \cref{union_iff,singleton_iff,pair_eq_iff}.
                Thus $b = b'$ by \cref{function_rightunique}.
            \end{byCase}
        \end{subproof}
        Hence $t$ is a function by \cref{rightunique}.
        Let $J = \{k\in\naturals \mid k\leq n + 1\}$.
        Show that for all $x$ such that $x\in\dom{t}$ we have $x\in J$.
        \begin{subproof}
            Fix $x$ such that $x\in\dom{t}$.
            Take $y$ such that $(x,y)\in t$ by \cref{dom_iff}.
            $(x,y)\in s$ or $(x,y) = (n + 1,W)$ by \cref{union_iff,singleton_iff}.
            \begin{byCase}
            \caseOf{$(x,y) = (n + 1,W)$.}
                $x = n + 1$ by \cref{pair_eq_iff}.
                Hence $x\in\naturals$ by \cref{naturals_closed_successor}.
                Thus $x\leq n + 1$.
            \caseOf{$(x,y)\in s$.}
                $x\in\dom{s}$ by \cref{dom_intro}.
                $x\in I$.
                Hence $x\in\naturals$ and $x\leq n$ by \cref{subseteq}.
                $n\leq n + 1$ by \cref{natural_lt_successor,real_lt_imp_leq}.
                Thus $x\leq n + 1$ by
                    \cref{naturals_subseteq_reals,naturals_closed_successor,subseteq,real_leq_trans}.
            \end{byCase}
        \end{subproof}
        Hence $\dom{t}\subseteq J$ by \cref{subseteq}.
        Show that for all $x\in J$ we have $x\in\dom{t}$.
        \begin{subproof}
            Fix $x\in J$.
            $x\in\naturals$ and $x\leq n + 1$ by \cref{subseteq}.
            $x\leq n$ or $x = n + 1$ by \cref{natural_leq_successor_split}.
            \begin{byCase}
            \caseOf{$x\leq n$.}
                $x\in I$.
                $x\in\dom{s}$.
                Take $y$ such that $(x,y)\in s$ by \cref{dom_iff}.
                Hence $(x,y)\in t$ by \cref{union_intro_left}.
                Thus $x\in\dom{t}$ by \cref{dom_intro}.
            \caseOf{$x\not\leq n$.}
                $x = n + 1$.
                $(x,W) = (n + 1,W)$ by \cref{pair_eq_iff}.
                Hence $(x,W)\in t$ by \cref{union_intro_right,singleton_intro}.
                Thus $x\in\dom{t}$ by \cref{dom_intro}.
            \end{byCase}
        \end{subproof}
        Hence $J\subseteq\dom{t}$ by \cref{subseteq}.
        Therefore $\dom{t} = J$ by \cref{subseteq_antisymmetric}.
        Show that $t$ is a function on $J$.
        \begin{subproof}
            Trivial.
        \end{subproof}
        Show that $t(0) = c((X,g(0)))$.
        \begin{subproof}
            $0\leq n$ by \cref{natural_nonnegative}.
            Hence $0\in I$ by \cref{zero_in_naturals,subseteq}.
            Thus $0\in\dom{s}$.
            $(0,s(0))\in s$ by \cref{function_apply_elim}.
            Hence $(0,s(0))\in t$ by \cref{union_intro_left}.
            Thus $t(0) = s(0)$ by \cref{function_apply_intro}.
            Therefore $t(0) = c((X,g(0)))$ by \cref{shrinking_sequence_upto}.
        \end{subproof}
        Show that for all $k\in\naturals$ such that $k\leq n + 1$ we have
            $t(k)$ is open in $X$ with respect to $T$ and
            $t(k)\neq\emptyset$ and
            $g(k)\notin\closure{t(k)}{X}{T}$.
        \begin{subproof}
            Fix $k$ such that $k\in\naturals$ and $k\leq n + 1$.
            \begin{byCase}
            \caseOf{$k = n + 1$.}
                $(k,W) = (n + 1,W)$ by \cref{pair_eq_iff}.
                Hence $(k,W)\in t$ by \cref{union_intro_right,singleton_intro}.
                Hence $t(k) = W$ by \cref{function_apply_intro}.
                Thus $t(k)$ is open in $X$ with respect to $T$ and
                    $t(k)\neq\emptyset$ and
                    $g(k)\notin\closure{t(k)}{X}{T}$.
            \caseOf{$k\neq n + 1$.}
                $k\leq n$ by \cref{natural_leq_successor_split}.
                Hence $k\in I$ by \cref{subseteq}.
                $k\in\dom{s}$.
                $(k,s(k))\in s$ by \cref{function_apply_elim}.
                Therefore $(k,s(k))\in t$ by \cref{union_intro_left}.
                Thus $t(k) = s(k)$ by \cref{function_apply_intro}.
                We have $t(k)$ is open in $X$ with respect to $T$ and
                    $t(k)\neq\emptyset$ and
                    $g(k)\notin\closure{t(k)}{X}{T}$ by \cref{shrinking_sequence_upto}.
            \end{byCase}
        \end{subproof}
        Show that for all $k\in\naturals$ such that $k < n + 1$ we have
            $t(k + 1) = c((t(k),g(k + 1)))$ and
            $t(k + 1)\subseteq t(k)$.
        \begin{subproof}
            Fix $k$ such that $k\in\naturals$ and $k < n + 1$.
            $k < n$ or $k = n$ by \cref{natural_lt_successor_split}.
            \begin{byCase}
            \caseOf{$k = n$.}
                $(k + 1,W) = (n + 1,W)$ by \cref{pair_eq_iff}.
                Hence $(k + 1,W)\in t$ by \cref{union_intro_right,singleton_intro}.
                Hence $t(k + 1) = W$ by \cref{function_apply_intro}.
                $k\leq n$.
                Hence $k\in I$ by \cref{subseteq}.
                $k\in\dom{s}$.
                $(k,s(k))\in s$ by \cref{function_apply_elim}.
                Hence $(k,s(k))\in t$ by \cref{union_intro_left}.
                Hence $t(k) = s(k)$ by \cref{function_apply_intro}.
                Thus $t(k + 1) = c((t(k),g(k + 1)))$ and $t(k + 1)\subseteq t(k)$.
            \caseOf{$k\neq n$.}
                $k < n$.
                $k\leq n$ and $k + 1\leq n$ by \cref{real_lt_imp_leq,natural_successor_leq}.
                Hence $k\in I$ and $k + 1\in I$ by \cref{naturals_closed_successor,subseteq}.
                $k\in\dom{s}$ and $k + 1\in\dom{s}$.
                $(k + 1,s(k + 1))\in s$ and $(k,s(k))\in s$
                    by \cref{function_apply_elim}.
                Therefore $(k + 1,s(k + 1))\in t$ and $(k,s(k))\in t$ by \cref{union_intro_left}.
                Thus $t(k + 1) = s(k + 1)$ and $t(k) = s(k)$ by \cref{function_apply_intro}.
                We have $t(k + 1) = c((t(k),g(k + 1)))$ and $t(k + 1)\subseteq t(k)$
                    by \cref{shrinking_sequence_upto}.
            \end{byCase}
        \end{subproof}
        Therefore $t$ is a shrinking sequence up to $n + 1$ for $g$ and $c$ in $X$ with respect to $T$
            by \cref{shrinking_sequence_upto}.
        Thus $n + 1\in A$ by \cref{naturals_closed_successor,subseteq}.
    \end{subproof}
    $0 + 1 = 1$ by \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_add_ident}.
    Hence $1\in A$.
    $A\subseteq\naturals$ by \cref{subseteq}.
    Therefore $A\subseteq\reals$ by \cref{naturals_subseteq_reals,subseteq_transitive}.
    $\naturalsPlus\subseteq A$ by \cref{real_naturals_smallest}.
    Show that for all $n\in\naturals$ we have $n\in A$.
    \begin{subproof}
        Fix $n\in\naturals$.
        $n\in\naturalsPlus$ or $n\in\{0\}$ by \cref{naturals,union_iff}.
        Thus $n\in A$ by \cref{subseteq,singleton_iff}.
    \end{subproof}
    Therefore $\naturals\subseteq A$ by \cref{subseteq}.
    Hence $m\in A$ by \cref{subseteq}.
    Thus there exists $s$ such that $s$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$ by \cref{subseteq}.
\end{proof}
Lemma 391
shrinking_sequence_restriction

Suppose $s$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$.
Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Suppose $n\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$.
Let $I = \{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n\}$.
Then $\restrl{s}{I}$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$.

LaTeX source
\begin{lemma}
\label{shrinking_sequence_restriction}
    Suppose $s$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$.
    Suppose $n\in\naturals$.
    Suppose $n\leq m$.
    Let $I = \{k\in\naturals \mid k\leq n\}$.
    Then $\restrl{s}{I}$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$.
\end{lemma}
Proof

$m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Definition 256.
Let $J = \{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m\}$.
$s$ is a function by Definition 256.
For all $k$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$ iff $k\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 256.
Hence $\dom{s} = J$ by Axiom 1 [Set extensionality].

Claim: $I\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} J$.
Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in} J$.

Fix $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Definition 1.
Hence $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$ by Definition 1, Lemma 23, Lemma 379.

Follows by Definition 1.

Let $t = \restrl{s}{I}$.
$t$ is a function by Proposition 383.
We have $\dom{t} = \dom{s}\inter I$ by Corollary 3.
Hence $\dom{t} = I$ by Proposition 70.

Claim: $t$ is a function on $I$.

Trivial.

Claim: $t(0) = c((X,g(0)))$.

$0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Lemma 384.
Hence $0\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 1, Lemma 382.
We have $0\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t}$ and $0\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$.
Thus $t(0) = s(0)$ by Proposition 384.
Therefore $t(0) = c((X,g(0)))$ by Definition 256.

Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ we have $t(k)$ is open in $X$ with respect to $T$ and $t(k)\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $g(k)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{t(k)}{X}{T}$.

Fix $k$ such that $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ and $k\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 1.
We have $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t}$ and $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$.
Hence $t(k) = s(k)$ by Proposition 384.
Therefore $t(k)$ is open in $X$ with respect to $T$ and $t(k)\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $g(k)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{t(k)}{X}{T}$ by Definition 256.

Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $k < n$ we have $t(k + 1) = c((t(k),g(k + 1)))$ and $t(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} t(k)$.

Fix $k$ such that $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $k < n$.
$k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ and $k + 1\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$ by Lemma 231, Lemma 387.
Hence $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ and $k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 1, Lemma 383.
Thus $k\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ and $k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 1.
Therefore $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t}$ and $k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t}$.
Thus $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$ and $k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s}$.
$n < m$ or $n = m$ by Lemma 81.
Hence $k < m$ by Axiom 36, Definition 1, Lemma 83, Lemma 379.
Therefore $t(k) = s(k)$ and $t(k + 1) = s(k + 1)$ by Proposition 384.
We have $t(k + 1) = c((t(k),g(k + 1)))$ and $t(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} t(k)$ by Definition 256.

Therefore $t$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ by Definition 256.

LaTeX source
\begin{proof}
    $m\in\naturals$ by \cref{shrinking_sequence_upto}.
    Let $J = \{k\in\naturals \mid k\leq m\}$.
    $s$ is a function by \cref{shrinking_sequence_upto}.
    For all $k$ we have $k\in\dom{s}$ iff $k\in J$ by \cref{shrinking_sequence_upto}.
    Hence $\dom{s} = J$ by \cref{setext}.
    Show that $I\subseteq J$.
    \begin{subproof}
        Show that for all $k\in I$ we have $k\in J$.
        \begin{subproof}
            Fix $k\in I$.
            $k\in\naturals$ and $k\leq n$ by \cref{subseteq}.
            Hence $k\leq m$ by
                \cref{naturals_subseteq_reals,subseteq,real_leq_trans}.
        \end{subproof}
        Follows by \cref{subseteq}.
    \end{subproof}
    Let $t = \restrl{s}{I}$.
    $t$ is a function by \cref{restrl_of_function_is_function}.
    We have $\dom{t} = \dom{s}\inter I$ by \cref{dom_of_restrl_eq_inter}.
    Hence $\dom{t} = I$ by \cref{inter_absorb_supseteq_left}.
    Show that $t$ is a function on $I$.
    \begin{subproof}
        Trivial.
    \end{subproof}
    Show that $t(0) = c((X,g(0)))$.
    \begin{subproof}
        $0\leq n$ by \cref{natural_nonnegative}.
        Hence $0\in I$ by \cref{zero_in_naturals,subseteq}.
        We have $0\in\dom{t}$ and $0\in\dom{s}$.
        Thus $t(0) = s(0)$ by \cref{restrl_of_function_apply}.
        Therefore $t(0) = c((X,g(0)))$ by \cref{shrinking_sequence_upto}.
    \end{subproof}
    Show that for all $k\in\naturals$ such that $k\leq n$ we have
        $t(k)$ is open in $X$ with respect to $T$ and
        $t(k)\neq\emptyset$ and
        $g(k)\notin\closure{t(k)}{X}{T}$.
    \begin{subproof}
        Fix $k$ such that $k\in\naturals$ and $k\leq n$.
        $k\in I$ and $k\in J$ by \cref{subseteq}.
        We have $k\in\dom{t}$ and $k\in\dom{s}$.
        Hence $t(k) = s(k)$ by \cref{restrl_of_function_apply}.
        Therefore $t(k)$ is open in $X$ with respect to $T$ and
            $t(k)\neq\emptyset$ and
            $g(k)\notin\closure{t(k)}{X}{T}$ by \cref{shrinking_sequence_upto}.
    \end{subproof}
    Show that for all $k\in\naturals$ such that $k < n$ we have
        $t(k + 1) = c((t(k),g(k + 1)))$ and
        $t(k + 1)\subseteq t(k)$.
    \begin{subproof}
        Fix $k$ such that $k\in\naturals$ and $k < n$.
        $k\leq n$ and $k + 1\leq n$ by \cref{real_lt_imp_leq,natural_successor_leq}.
        Hence $k\in I$ and $k + 1\in I$ by \cref{naturals_closed_successor,subseteq}.
        Thus $k\in J$ and $k + 1\in J$ by \cref{subseteq}.
        Therefore $k\in\dom{t}$ and $k + 1\in\dom{t}$.
        Thus $k\in\dom{s}$ and $k + 1\in\dom{s}$.
        $n < m$ or $n = m$ by \cref{real_leq_split}.
        Hence $k < m$ by
            \cref{naturals_subseteq_reals,subseteq,real_lt_trans,real_lt_subst_right}.
        Therefore $t(k) = s(k)$ and $t(k + 1) = s(k + 1)$ by \cref{restrl_of_function_apply}.
        We have $t(k + 1) = c((t(k),g(k + 1)))$ and $t(k + 1)\subseteq t(k)$
            by \cref{shrinking_sequence_upto}.
    \end{subproof}
    Therefore $t$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$
        by \cref{shrinking_sequence_upto}.
\end{proof}
Lemma 392
shrinking_sequence_unique

Suppose $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$.
Suppose $t$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$.
Then $s = t$.

LaTeX source
\begin{lemma}
\label{shrinking_sequence_unique}
    Suppose $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$.
    Suppose $t$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$.
    Then $s = t$.
\end{lemma}
Proof

Let $A = \{m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid \text{for all $s_0,t_0$ such that $s_0$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$ and $t_0$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$ we have $s_0 = t_0$}\}$.
$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturals$ by Definition 1.

Claim: $0\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Claim: For all $s_0,t_0$ such that $s_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ and $t_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ we have $s_0 = t_0$.

Fix $s_0$.
Fix $t_0$.
Assume $s_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ and $t_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$.
Let $I = \{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0\}$.
$s_0$ is a function by Definition 256.
For all $k$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$ iff $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 256.
Hence $\dom{s_0} = I$ by Axiom 1 [Set extensionality].
$s_0(0) = c((X,g(0)))$ by Definition 256.
$t_0$ is a function by Definition 256.
For all $k$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t_0}$ iff $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 256.
Hence $\dom{t_0} = I$ by Axiom 1 [Set extensionality].
$t_0(0) = c((X,g(0)))$ by Definition 256.
For all $k$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ iff $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Lemma 389.
Hence $I = \{0\}$ by Axiom 1 [Set extensionality].

Claim: For all $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$ we have $s_0(x) = t_0(x)$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$.
$x = 0$ by Proposition 22.
Thus $s_0(x) = c((X,g(0)))$ and $t_0(x) = c((X,g(0)))$ by Definition 256.

Claim: $s_0\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} t_0$.

$\dom{s_0}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{t_0}$ by Proposition 2.
Follows by Proposition 350.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t_0}$ we have $t_0(x) = s_0(x)$.

Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t_0}$.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$ by Definition 1.
Hence $s_0(x) = t_0(x)$ by Definition 1.

Claim: $t_0\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0$.

$\dom{t_0}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{s_0}$ by Proposition 2.
Follows by Proposition 350.

Therefore $s_0 = t_0$ by Proposition 3.

Hence $0\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Lemma 382.

Claim: For all $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $m + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

Fix $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
$m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Definition 1.

Claim: For all $s_0,t_0$ such that $s_0$ is a shrinking sequence up to $m + 1$ for $g$ and $c$ in $X$ with respect to $T$ and $t_0$ is a shrinking sequence up to $m + 1$ for $g$ and $c$ in $X$ with respect to $T$ we have $s_0 = t_0$.

Fix $s_0$.
Fix $t_0$.
Assume $s_0$ is a shrinking sequence up to $m + 1$ for $g$ and $c$ in $X$ with respect to $T$ and $t_0$ is a shrinking sequence up to $m + 1$ for $g$ and $c$ in $X$ with respect to $T$.
Let $I = \{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m\}$.
Let $J = \{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid k\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m + 1\}$.
Let $s_1 = \restrl{s_0}{I}$.
Let $t_1 = \restrl{t_0}{I}$.
$m\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m + 1$ by Lemma 231, Lemma 385.
$s_1$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$ by Lemma 391.
$t_1$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$ by Lemma 391.
Hence $s_1 = t_1$ by Definition 1.
$s_0$ is a function by Definition 256.
For all $x$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$ iff $x\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 256.
Hence $\dom{s_0} = J$ by Axiom 1 [Set extensionality].
$t_0$ is a function by Definition 256.
For all $x$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t_0}$ iff $x\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 256.
Hence $\dom{t_0} = J$ by Axiom 1 [Set extensionality].
$s_1$ is a function by Definition 256.
For all $x$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_1}$ iff $x\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 256.
Hence $\dom{s_1} = I$ by Axiom 1 [Set extensionality].
$t_1$ is a function by Definition 256.
For all $x$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t_1}$ iff $x\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 256.
Hence $\dom{t_1} = I$ by Axiom 1 [Set extensionality].

Claim: $I\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} J$.
Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ we have $x\class{latex-symbol-tip latex-symbol-id-in}{\in} J$.

Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$ by Definition 1.
Hence $x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m + 1$ by Definition 1, Lemma 23, Lemma 379, Lemma 383.

Follows by Definition 1.

Claim: For all $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$ we have $s_0(x) = t_0(x)$.

Fix $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m + 1$ by Definition 1.
$x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$ or $x = m + 1$ by Lemma 388.

Case. $x\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$.

Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 1.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_1}$ and $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t_1}$.
Hence $s_0(x) = s_1(x)$ and $t_0(x) = t_1(x)$ by Proposition 384.
Thus $s_1(x) = t_1(x)$.
Therefore $s_0(x) = t_0(x)$.

Case. $x\not\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$.

$x = m + 1$.
$m\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
Hence $m\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_1}$ and $m\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t_1}$.
Therefore $s_0(m) = s_1(m)$ and $t_0(m) = t_1(m)$ by Proposition 384.
Thus $s_0(m) = t_0(m)$.
Therefore $s_0(m + 1) = c((s_0(m),g(m + 1)))$ by Definition 256, Lemma 385.
Hence $t_0(m + 1) = c((t_0(m),g(m + 1)))$ by Definition 256, Lemma 385.
$s_0(x) = c((s_0(m),g(m + 1)))$ and $t_0(x) = c((t_0(m),g(m + 1)))$.
Thus $s_0(x) = t_0(x)$.

LaTeX source
\begin{byCase}
                \caseOf{$x\leq m$.}
                    Hence $x\in I$ by \cref{subseteq}.
                    Thus $x\in\dom{s_1}$ and $x\in\dom{t_1}$.
                    Hence $s_0(x) = s_1(x)$ and $t_0(x) = t_1(x)$ by \cref{restrl_of_function_apply}.
                    Thus $s_1(x) = t_1(x)$.
                    Therefore $s_0(x) = t_0(x)$.
                \caseOf{$x\not\leq m$.}
                    $x = m + 1$.
                    $m\in I$.
                    Hence $m\in\dom{s_1}$ and $m\in\dom{t_1}$.
                    Therefore $s_0(m) = s_1(m)$ and $t_0(m) = t_1(m)$ by \cref{restrl_of_function_apply}.
                    Thus $s_0(m) = t_0(m)$.
                    Therefore $s_0(m + 1) = c((s_0(m),g(m + 1)))$ by
                        \cref{shrinking_sequence_upto,natural_lt_successor}.
                    Hence $t_0(m + 1) = c((t_0(m),g(m + 1)))$ by
                        \cref{shrinking_sequence_upto,natural_lt_successor}.
                    $s_0(x) = c((s_0(m),g(m + 1)))$ and
                        $t_0(x) = c((t_0(m),g(m + 1)))$.
                    Thus $s_0(x) = t_0(x)$.
                
\end{byCase}
Claim: $s_0\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} t_0$.

$\dom{s_0}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{t_0}$ by Proposition 2.
Follows by Proposition 350.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t_0}$ we have $t_0(x) = s_0(x)$.

Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{t_0}$.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$ by Definition 1.
Hence $s_0(x) = t_0(x)$ by Definition 1.

Claim: $t_0\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0$.

$\dom{t_0}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{s_0}$ by Proposition 2.
Follows by Proposition 350.

Therefore $s_0 = t_0$ by Proposition 3.

Hence $m + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Lemma 383.

$0 + 1 = 1$ by Axiom 17, Axiom 41, Axiom 42, Definition 1.
Hence $1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$ by Lemma 379, Proposition 6.
$\naturalsPlus\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Axiom 46.

Claim: For all $m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

Fix $m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
$m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ or $m\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Axiom 5, Definition 81.
Thus $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 1, Proposition 22.

Therefore $\naturals\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Definition 1.
$n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Definition 256.
Hence $n\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 1.
Thus $s = t$ by Definition 1.

LaTeX source
\begin{proof}
    Let $A = \{m\in\naturals \mid \text{for all $s_0,t_0$ such that
        $s_0$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$ and
        $t_0$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$
        we have $s_0 = t_0$}\}$.
    $A\subseteq\naturals$ by \cref{subseteq}.
    Show that $0\in A$.
    \begin{subproof}
        Show that for all $s_0,t_0$ such that
            $s_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ and
            $t_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$
        we have $s_0 = t_0$.
        \begin{subproof}
            Fix $s_0$.
            Fix $t_0$.
            Assume $s_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ and
                $t_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$.
            Let $I = \{k\in\naturals \mid k\leq 0\}$.
            $s_0$ is a function by \cref{shrinking_sequence_upto}.
            For all $k$ we have $k\in\dom{s_0}$ iff $k\in I$ by \cref{shrinking_sequence_upto}.
            Hence $\dom{s_0} = I$ by \cref{setext}.
            $s_0(0) = c((X,g(0)))$ by \cref{shrinking_sequence_upto}.
            $t_0$ is a function by \cref{shrinking_sequence_upto}.
            For all $k$ we have $k\in\dom{t_0}$ iff $k\in I$ by \cref{shrinking_sequence_upto}.
            Hence $\dom{t_0} = I$ by \cref{setext}.
            $t_0(0) = c((X,g(0)))$ by \cref{shrinking_sequence_upto}.
            For all $k$ we have $k\in I$ iff $k\in\{0\}$ by \cref{natural_segment_zero}.
            Hence $I = \{0\}$ by \cref{setext}.
            Show that for all $x$ such that $x\in\dom{s_0}$ we have $s_0(x) = t_0(x)$.
            \begin{subproof}
                Fix $x$ such that $x\in\dom{s_0}$.
                $x = 0$ by \cref{singleton_iff}.
                Thus $s_0(x) = c((X,g(0)))$ and $t_0(x) = c((X,g(0)))$
                    by \cref{shrinking_sequence_upto}.
            \end{subproof}
            Show that $s_0\subseteq t_0$.
            \begin{subproof}
                $\dom{s_0}\subseteq\dom{t_0}$ by \cref{subseteq_refl}.
                Follows by \cref{fun_subseteq}.
            \end{subproof}
            Show that for all $x\in\dom{t_0}$ we have $t_0(x) = s_0(x)$.
            \begin{subproof}
                Fix $x\in\dom{t_0}$.
                $x\in\dom{s_0}$ by \cref{subseteq}.
                Hence $s_0(x) = t_0(x)$ by \cref{subseteq}.
            \end{subproof}
            Show that $t_0\subseteq s_0$.
            \begin{subproof}
                $\dom{t_0}\subseteq\dom{s_0}$ by \cref{subseteq_refl}.
                Follows by \cref{fun_subseteq}.
            \end{subproof}
            Therefore $s_0 = t_0$ by \cref{subseteq_antisymmetric}.
        \end{subproof}
        Hence $0\in A$ by \cref{zero_in_naturals}.
    \end{subproof}
    Show that for all $m\in A$ we have $m + 1\in A$.
    \begin{subproof}
        Fix $m\in A$.
        $m\in\naturals$ by \cref{subseteq}.
        Show that for all $s_0,t_0$ such that
            $s_0$ is a shrinking sequence up to $m + 1$ for $g$ and $c$ in $X$ with respect to $T$ and
            $t_0$ is a shrinking sequence up to $m + 1$ for $g$ and $c$ in $X$ with respect to $T$
        we have $s_0 = t_0$.
        \begin{subproof}
            Fix $s_0$.
            Fix $t_0$.
            Assume $s_0$ is a shrinking sequence up to $m + 1$ for $g$ and $c$ in $X$ with respect to $T$ and
                $t_0$ is a shrinking sequence up to $m + 1$ for $g$ and $c$ in $X$ with respect to $T$.
            Let $I = \{k\in\naturals \mid k\leq m\}$.
            Let $J = \{k\in\naturals \mid k\leq m + 1\}$.
            Let $s_1 = \restrl{s_0}{I}$.
            Let $t_1 = \restrl{t_0}{I}$.
            $m\leq m + 1$ by \cref{natural_lt_successor,real_lt_imp_leq}.
            $s_1$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$
                by \cref{shrinking_sequence_restriction}.
            $t_1$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$
                by \cref{shrinking_sequence_restriction}.
            Hence $s_1 = t_1$ by \cref{subseteq}.
            $s_0$ is a function by \cref{shrinking_sequence_upto}.
            For all $x$ we have $x\in\dom{s_0}$ iff $x\in J$ by \cref{shrinking_sequence_upto}.
            Hence $\dom{s_0} = J$ by \cref{setext}.
            $t_0$ is a function by \cref{shrinking_sequence_upto}.
            For all $x$ we have $x\in\dom{t_0}$ iff $x\in J$ by \cref{shrinking_sequence_upto}.
            Hence $\dom{t_0} = J$ by \cref{setext}.
            $s_1$ is a function by \cref{shrinking_sequence_upto}.
            For all $x$ we have $x\in\dom{s_1}$ iff $x\in I$ by \cref{shrinking_sequence_upto}.
            Hence $\dom{s_1} = I$ by \cref{setext}.
            $t_1$ is a function by \cref{shrinking_sequence_upto}.
            For all $x$ we have $x\in\dom{t_1}$ iff $x\in I$ by \cref{shrinking_sequence_upto}.
            Hence $\dom{t_1} = I$ by \cref{setext}.
            Show that $I\subseteq J$.
            \begin{subproof}
                Show that for all $x\in I$ we have $x\in J$.
                \begin{subproof}
                    Fix $x\in I$.
                    $x\in\naturals$ and $x\leq m$ by \cref{subseteq}.
                    Hence $x\leq m + 1$ by
                        \cref{naturals_subseteq_reals,naturals_closed_successor,subseteq,real_leq_trans}.
                \end{subproof}
                Follows by \cref{subseteq}.
            \end{subproof}
            Show that for all $x$ such that $x\in\dom{s_0}$ we have $s_0(x) = t_0(x)$.
            \begin{subproof}
                Fix $x$ such that $x\in\dom{s_0}$.
                $x\in\naturals$ and $x\leq m + 1$ by \cref{subseteq}.
                $x\leq m$ or $x = m + 1$ by \cref{natural_leq_successor_split}.
                \begin{byCase}
                \caseOf{$x\leq m$.}
                    Hence $x\in I$ by \cref{subseteq}.
                    Thus $x\in\dom{s_1}$ and $x\in\dom{t_1}$.
                    Hence $s_0(x) = s_1(x)$ and $t_0(x) = t_1(x)$ by \cref{restrl_of_function_apply}.
                    Thus $s_1(x) = t_1(x)$.
                    Therefore $s_0(x) = t_0(x)$.
                \caseOf{$x\not\leq m$.}
                    $x = m + 1$.
                    $m\in I$.
                    Hence $m\in\dom{s_1}$ and $m\in\dom{t_1}$.
                    Therefore $s_0(m) = s_1(m)$ and $t_0(m) = t_1(m)$ by \cref{restrl_of_function_apply}.
                    Thus $s_0(m) = t_0(m)$.
                    Therefore $s_0(m + 1) = c((s_0(m),g(m + 1)))$ by
                        \cref{shrinking_sequence_upto,natural_lt_successor}.
                    Hence $t_0(m + 1) = c((t_0(m),g(m + 1)))$ by
                        \cref{shrinking_sequence_upto,natural_lt_successor}.
                    $s_0(x) = c((s_0(m),g(m + 1)))$ and
                        $t_0(x) = c((t_0(m),g(m + 1)))$.
                    Thus $s_0(x) = t_0(x)$.
                \end{byCase}
            \end{subproof}
            Show that $s_0\subseteq t_0$.
            \begin{subproof}
                $\dom{s_0}\subseteq\dom{t_0}$ by \cref{subseteq_refl}.
                Follows by \cref{fun_subseteq}.
            \end{subproof}
            Show that for all $x\in\dom{t_0}$ we have $t_0(x) = s_0(x)$.
            \begin{subproof}
                Fix $x\in\dom{t_0}$.
                $x\in\dom{s_0}$ by \cref{subseteq}.
                Hence $s_0(x) = t_0(x)$ by \cref{subseteq}.
            \end{subproof}
            Show that $t_0\subseteq s_0$.
            \begin{subproof}
                $\dom{t_0}\subseteq\dom{s_0}$ by \cref{subseteq_refl}.
                Follows by \cref{fun_subseteq}.
            \end{subproof}
            Therefore $s_0 = t_0$ by \cref{subseteq_antisymmetric}.
        \end{subproof}
        Hence $m + 1\in A$ by \cref{naturals_closed_successor}.
    \end{subproof}
    $0 + 1 = 1$ by \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_add_ident}.
    Hence $1\in A$.
    $A\subseteq\reals$ by \cref{naturals_subseteq_reals,subseteq_transitive}.
    $\naturalsPlus\subseteq A$ by \cref{real_naturals_smallest}.
    Show that for all $m\in\naturals$ we have $m\in A$.
    \begin{subproof}
        Fix $m\in\naturals$.
        $m\in\naturalsPlus$ or $m\in\{0\}$ by \cref{naturals,union_iff}.
        Thus $m\in A$ by \cref{subseteq,singleton_iff}.
    \end{subproof}
    Therefore $\naturals\subseteq A$ by \cref{subseteq}.
    $n\in\naturals$ by \cref{shrinking_sequence_upto}.
    Hence $n\in A$ by \cref{subseteq}.
    Thus $s = t$ by \cref{subseteq}.
\end{proof}
Lemma 393
shrinking_sequence_terms_nested

Suppose $s$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$.
Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Suppose $n\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$.
Then $s(m)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s(n)$.

LaTeX source
\begin{lemma}
\label{shrinking_sequence_terms_nested}
    Suppose $s$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$.
    Suppose $n\in\naturals$.
    Suppose $n\leq m$.
    Then $s(m)\subseteq s(n)$.
\end{lemma}
Proof

Let $A = \{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid \text{for all $s_0,n_0$ we have if $s_0$ is a shrinking sequence up to $k$ for $g$ and $c$ in $X$ with respect to $T$ and $n_0\in\naturals$ and $n_0\leq k$ then $s_0(k)\subseteq s_0(n_0)$}\}$.
$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturals$ by Definition 1.

Claim: $0\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
Claim: For all $s_0,n_0$ we have if $s_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ and $n_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $n_0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0$ then $s_0(0)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0(n_0)$.

Fix $s_0$.
Fix $n_0$.
Assume $s_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ and $n_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $n_0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0$.
$0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n_0$ by Lemma 384.
Hence $n_0 = 0$ by Axiom 17, Definition 1, Lemma 25, Lemma 379.
Thus $s_0(0)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0(n_0)$ by Proposition 2.

Hence $0\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Lemma 382.

Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

Fix $k\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Definition 1.

Claim: For all $s_0,n_0$ we have if $s_0$ is a shrinking sequence up to $k + 1$ for $g$ and $c$ in $X$ with respect to $T$ and $n_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $n_0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} k + 1$ then $s_0(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0(n_0)$.

Fix $s_0$.
Fix $n_0$.
Assume $s_0$ is a shrinking sequence up to $k + 1$ for $g$ and $c$ in $X$ with respect to $T$ and $n_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $n_0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} k + 1$.
$n_0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} k$ or $n_0 = k + 1$ by Lemma 388.

Case. $n_0 = k + 1$.

Thus $s_0(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0(n_0)$ by Proposition 2.

Case. $n_0\class{latex-symbol-tip latex-symbol-id-neq}{\neq} k + 1$.

$n_0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} k$.
$s_0(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0(k)$ by Definition 256, Lemma 385.
Let $I = \{i\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid i\class{latex-symbol-tip latex-symbol-id-leq}{\leq} k\}$.
Let $J = \{i\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid i\class{latex-symbol-tip latex-symbol-id-leq}{\leq} k + 1\}$.
$s_0$ is a function by Definition 256.
For all $i$ we have $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{s_0}$ iff $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 256.
Hence $\dom{s_0} = J$ by Axiom 1 [Set extensionality].

Claim: $I\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} J$.
Claim: For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ we have $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$.

Fix $i\class{latex-symbol-tip latex-symbol-id-in}{\in} I$.
$i\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $i\class{latex-symbol-tip latex-symbol-id-leq}{\leq} k$ by Definition 1.
Hence $i\class{latex-symbol-tip latex-symbol-id-leq}{\leq} k + 1$ by Definition 1, Lemma 23, Lemma 231, Lemma 379, Lemma 383, Lemma 385.

Follows by Definition 1.

Hence $I\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{s_0}$ by Definition 1.
Let $t_0 = \restrl{s_0}{I}$.
$t_0$ is a shrinking sequence up to $k$ for $g$ and $c$ in $X$ with respect to $T$ by Lemma 231, Lemma 385, Lemma 391.
Hence $t_0(k)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} t_0(n_0)$ by Definition 1.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ and $n_0\class{latex-symbol-tip latex-symbol-id-in}{\in} I$ by Definition 1.
Thus $t_0(k) = s_0(k)$ and $t_0(n_0) = s_0(n_0)$ by Proposition 384.
We have $s_0(k)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0(n_0)$ by Definition 1.
Therefore $s_0(k + 1)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s_0(n_0)$ by Proposition 6.

LaTeX source
\begin{byCase}
            \caseOf{$n_0 = k + 1$.}
                Thus $s_0(k + 1)\subseteq s_0(n_0)$ by \cref{subseteq_refl}.
            \caseOf{$n_0\neq k + 1$.}
                $n_0\leq k$.
                $s_0(k + 1)\subseteq s_0(k)$ by
                    \cref{shrinking_sequence_upto,natural_lt_successor}.
                Let $I = \{i\in\naturals \mid i\leq k\}$.
                Let $J = \{i\in\naturals \mid i\leq k + 1\}$.
                $s_0$ is a function by \cref{shrinking_sequence_upto}.
                For all $i$ we have $i\in\dom{s_0}$ iff $i\in J$ by \cref{shrinking_sequence_upto}.
                Hence $\dom{s_0} = J$ by \cref{setext}.
                Show that $I\subseteq J$.
                \begin{subproof}
                    Show that for all $i\in I$ we have $i\in J$.
                    \begin{subproof}
                        Fix $i\in I$.
                        $i\in\naturals$ and $i\leq k$ by \cref{subseteq}.
                        Hence $i\leq k + 1$ by
                            \cref{naturals_subseteq_reals,naturals_closed_successor,subseteq,natural_lt_successor,real_lt_imp_leq,real_leq_trans}.
                    \end{subproof}
                    Follows by \cref{subseteq}.
                \end{subproof}
                Hence $I\subseteq\dom{s_0}$ by \cref{subseteq}.
                Let $t_0 = \restrl{s_0}{I}$.
                $t_0$ is a shrinking sequence up to $k$ for $g$ and $c$ in $X$ with respect to $T$
                    by \cref{shrinking_sequence_restriction,natural_lt_successor,real_lt_imp_leq}.
                Hence $t_0(k)\subseteq t_0(n_0)$ by \cref{subseteq}.
                $k\in I$ and $n_0\in I$ by \cref{subseteq}.
                Thus $t_0(k) = s_0(k)$ and $t_0(n_0) = s_0(n_0)$ by \cref{restrl_of_function_apply}.
                We have $s_0(k)\subseteq s_0(n_0)$ by \cref{subseteq}.
                Therefore $s_0(k + 1)\subseteq s_0(n_0)$ by \cref{subseteq_transitive}.
            
\end{byCase}

Hence $k + 1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Lemma 383.

$0 + 1 = 1$ by Axiom 17, Axiom 41, Axiom 42, Definition 1.
Hence $1\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.
$A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$ by Lemma 379, Proposition 6.
$\naturalsPlus\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Axiom 46.

Claim: For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $k\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

Fix $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
$k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ or $k\class{latex-symbol-tip latex-symbol-id-in}{\in}\{0\}$ by Axiom 5, Definition 81.
Thus $k\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 1, Proposition 22.

Therefore $\naturals\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} A$ by Definition 1.
$m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Definition 256.
Hence $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 1.
Thus $s(m)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} s(n)$ by Definition 1.

LaTeX source
\begin{proof}
    Let $A = \{k\in\naturals \mid \text{for all $s_0,n_0$ we have
        if $s_0$ is a shrinking sequence up to $k$ for $g$ and $c$ in $X$ with respect to $T$ and
            $n_0\in\naturals$ and $n_0\leq k$
        then $s_0(k)\subseteq s_0(n_0)$}\}$.
    $A\subseteq\naturals$ by \cref{subseteq}.
    Show that $0\in A$.
    \begin{subproof}
        Show that for all $s_0,n_0$ we have
            if $s_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ and
                $n_0\in\naturals$ and $n_0\leq 0$
            then $s_0(0)\subseteq s_0(n_0)$.
        \begin{subproof}
            Fix $s_0$.
            Fix $n_0$.
            Assume $s_0$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ and
                $n_0\in\naturals$ and $n_0\leq 0$.
            $0\leq n_0$ by \cref{natural_nonnegative}.
            Hence $n_0 = 0$ by
                \cref{naturals_subseteq_reals,subseteq,real_add_ident,real_leq_antisym}.
            Thus $s_0(0)\subseteq s_0(n_0)$ by \cref{subseteq_refl}.
        \end{subproof}
        Hence $0\in A$ by \cref{zero_in_naturals}.
    \end{subproof}
    Show that for all $k\in A$ we have $k + 1\in A$.
    \begin{subproof}
        Fix $k\in A$.
        $k\in\naturals$ by \cref{subseteq}.
        Show that for all $s_0,n_0$ we have
            if $s_0$ is a shrinking sequence up to $k + 1$ for $g$ and $c$ in $X$ with respect to $T$ and
                $n_0\in\naturals$ and $n_0\leq k + 1$
            then $s_0(k + 1)\subseteq s_0(n_0)$.
        \begin{subproof}
            Fix $s_0$.
            Fix $n_0$.
            Assume $s_0$ is a shrinking sequence up to $k + 1$ for $g$ and $c$ in $X$ with respect to $T$ and
                $n_0\in\naturals$ and $n_0\leq k + 1$.
            $n_0\leq k$ or $n_0 = k + 1$ by \cref{natural_leq_successor_split}.
            \begin{byCase}
            \caseOf{$n_0 = k + 1$.}
                Thus $s_0(k + 1)\subseteq s_0(n_0)$ by \cref{subseteq_refl}.
            \caseOf{$n_0\neq k + 1$.}
                $n_0\leq k$.
                $s_0(k + 1)\subseteq s_0(k)$ by
                    \cref{shrinking_sequence_upto,natural_lt_successor}.
                Let $I = \{i\in\naturals \mid i\leq k\}$.
                Let $J = \{i\in\naturals \mid i\leq k + 1\}$.
                $s_0$ is a function by \cref{shrinking_sequence_upto}.
                For all $i$ we have $i\in\dom{s_0}$ iff $i\in J$ by \cref{shrinking_sequence_upto}.
                Hence $\dom{s_0} = J$ by \cref{setext}.
                Show that $I\subseteq J$.
                \begin{subproof}
                    Show that for all $i\in I$ we have $i\in J$.
                    \begin{subproof}
                        Fix $i\in I$.
                        $i\in\naturals$ and $i\leq k$ by \cref{subseteq}.
                        Hence $i\leq k + 1$ by
                            \cref{naturals_subseteq_reals,naturals_closed_successor,subseteq,natural_lt_successor,real_lt_imp_leq,real_leq_trans}.
                    \end{subproof}
                    Follows by \cref{subseteq}.
                \end{subproof}
                Hence $I\subseteq\dom{s_0}$ by \cref{subseteq}.
                Let $t_0 = \restrl{s_0}{I}$.
                $t_0$ is a shrinking sequence up to $k$ for $g$ and $c$ in $X$ with respect to $T$
                    by \cref{shrinking_sequence_restriction,natural_lt_successor,real_lt_imp_leq}.
                Hence $t_0(k)\subseteq t_0(n_0)$ by \cref{subseteq}.
                $k\in I$ and $n_0\in I$ by \cref{subseteq}.
                Thus $t_0(k) = s_0(k)$ and $t_0(n_0) = s_0(n_0)$ by \cref{restrl_of_function_apply}.
                We have $s_0(k)\subseteq s_0(n_0)$ by \cref{subseteq}.
                Therefore $s_0(k + 1)\subseteq s_0(n_0)$ by \cref{subseteq_transitive}.
            \end{byCase}
        \end{subproof}
        Hence $k + 1\in A$ by \cref{naturals_closed_successor}.
    \end{subproof}
    $0 + 1 = 1$ by \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_add_ident}.
    Hence $1\in A$.
    $A\subseteq\reals$ by \cref{naturals_subseteq_reals,subseteq_transitive}.
    $\naturalsPlus\subseteq A$ by \cref{real_naturals_smallest}.
    Show that for all $k\in\naturals$ we have $k\in A$.
    \begin{subproof}
        Fix $k\in\naturals$.
        $k\in\naturalsPlus$ or $k\in\{0\}$ by \cref{naturals,union_iff}.
        Thus $k\in A$ by \cref{subseteq,singleton_iff}.
    \end{subproof}
    Therefore $\naturals\subseteq A$ by \cref{subseteq}.
    $m\in\naturals$ by \cref{shrinking_sequence_upto}.
    Hence $m\in A$ by \cref{subseteq}.
    Thus $s(m)\subseteq s(n)$ by \cref{subseteq}.
\end{proof}
Theorem 69
compact_hausdorff_no_isolated_uncountable

Assume $T$ is a topology on $X$.
Assume $X$ is compact with respect to $T$.
Assume $X$ is Hausdorff with respect to $T$.
Assume $X\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Suppose for all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $x$ is not an isolated point of $X$ with respect to $T$.
Then $X$ is not countable.

LaTeX source
\begin{theorem}
\label{compact_hausdorff_no_isolated_uncountable}
    Assume $T$ is a topology on $X$.
    Assume $X$ is compact with respect to $T$.
    Assume $X$ is Hausdorff with respect to $T$.
    Assume $X\neq\emptyset$.
    Suppose for all $x\in X$ we have $x$ is not an isolated point of $X$ with respect to $T$.
    Then $X$ is not countable.
\end{theorem}
Proof

Suppose not.
Take $g$ such that $g$ is a surjection from $\naturals$ to $X$ by Lemma 378.
$g$ is a function from $\naturals$ to $X$ by Lemma 5.

Let $D = \{p\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}\class{latex-symbol-tip latex-symbol-id-times}{\times} X \mid \text{$\fst{p}$ is open in $X$ with respect to $T$ and $\fst{p}\neq\emptyset$}\}$.
Let $R = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in} D\class{latex-symbol-tip latex-symbol-id-times}{\times}\pow{X} \mid \text{there exist $p,V$ such that $p\in D$ and $V\in\pow{X}$ and $w = (p,V)$ and $V$ is open in $X$ with respect to $T$ and $V\neq\emptyset$ and $V\subseteq\fst{p}$ and $\snd{p}\notin\closure{V}{X}{T}$}\}$.
For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ there exist $p,V$ such that $w = (p,V)$ by Definition 12.
Hence $R$ is a relation by Definition 12.

Claim: For all $p\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ there exists $V$ such that $p\mathrel{R}V$.

Fix $p\class{latex-symbol-tip latex-symbol-id-in}{\in} D$.
$p\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Definition 1.
Take $U,x$ such that $p = (U,x)$ and $U\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ and $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Proposition 121.
$U = \fst{p}$ and $x = \snd{p}$ by Axiom 10, Axiom 11.
Hence $U$ is open in $X$ with respect to $T$ and $U\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Definition 1.
Take $V$ such that $V$ is open in $X$ with respect to $T$ and $V\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $V\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ and $x\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{V}{X}{T}$ by Lemma 377.
$V\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Axiom 12, Definition 1, Definition 101, Definition 103.
Hence $V\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ by Proposition 155.
$(p,V)\class{latex-symbol-tip latex-symbol-id-in}{\in} D\class{latex-symbol-tip latex-symbol-id-times}{\times}\pow{X}$ by Proposition 115.
Hence $(p,V)\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ by Proposition 115, Proposition 155.
Thus $p\mathrel{R}V$ by Definition 12.

Take $c$ such that $c$ is a function on $D$ and for all $p\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ we have $p\mathrel{R}c(p)$ by Axiom 54.

Claim: For all $U,x$ such that $U$ is open in $X$ with respect to $T$ and $U\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $c((U,x))$ is open in $X$ with respect to $T$ and $c((U,x))\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $c((U,x))\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ and $x\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{c((U,x))}{X}{T}$.

Fix $U$.
Fix $x$.
Assume $U$ is open in $X$ with respect to $T$ and $U\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$.
$U\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Axiom 12, Definition 1, Definition 101, Definition 103.
Therefore $U\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ by Proposition 155.
$(U,x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}\class{latex-symbol-tip latex-symbol-id-times}{\times} X$ by Proposition 115.
Thus $\fst{(U,x)} = U$ by Axiom 10.
Therefore $\fst{(U,x)}$ is open in $X$ with respect to $T$ and $\fst{(U,x)}\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Thus $(U,x)\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ by Proposition 115.
We have $\dom{c} = D$ by definition.
Therefore $(U,x)\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{c}$ by Definition 1.
$((U,x),c((U,x)))\class{latex-symbol-tip latex-symbol-id-in}{\in} c$ by Proposition 348.
Thus $((U,x),c((U,x)))\class{latex-symbol-tip latex-symbol-id-in}{\in} R$ by Proposition 349.
Take $p,V$ such that $p\class{latex-symbol-tip latex-symbol-id-in}{\in} D$ and $V\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ and $((U,x),c((U,x))) = (p,V)$ and $V$ is open in $X$ with respect to $T$ and $V\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $V\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\fst{p}$ and $\snd{p}\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{V}{X}{T}$ by Definition 1.
$p = (U,x)$ and $c((U,x)) = V$ by Axiom 6.
Thus $\fst{p} = U$ and $\snd{p} = x$ by Axiom 10, Axiom 11.
Therefore $c((U,x))$ is open in $X$ with respect to $T$ and $c((U,x))\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $c((U,x))\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} U$ and $x\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{c((U,x))}{X}{T}$.

Claim: For all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ there exists $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$.

Follows by Lemma 390.

Let $C = \{A\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X} \mid \text{there exists $n\in\naturals$ such that there exists $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and $A = \closure{s(n)}{X}{T}$}\}$.

Claim: $C$ has the finite intersection property.
Claim: $C$ is inhabited.

$0\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Lemma 382.
Take $s$ such that $s$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ by Definition 1.
Let $A_0 = \closure{s(0)}{X}{T}$.
$0\class{latex-symbol-tip latex-symbol-id-leq}{\leq} 0$.
Hence $s(0)$ is open in $X$ with respect to $T$ by Definition 256.
Therefore $s(0)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Axiom 12, Definition 1, Definition 101, Definition 103.
Thus $A_0$ is closed in $X$ with respect to $T$ by Lemma 144.
Therefore $A_0\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 149.
Thus $A_0\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ by Proposition 155.
$A_0\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Definition 1, Lemma 382.
Therefore $C$ is inhabited.

Claim: 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}$.

Fix $F$ such that $F\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} C$ and $F$ is finite and inhabited.
Let $R_0 = \{w\class{latex-symbol-tip latex-symbol-id-in}{\in} F\class{latex-symbol-tip latex-symbol-id-times}{\times}\naturals \mid \text{there exists $A\in F$ such that there exists $n\in\naturals$ such that there exists $s$ such that $w = (A,n)$ and $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and $A = \closure{s(n)}{X}{T}$}\}$.
For all $w$ such that $w\class{latex-symbol-tip latex-symbol-id-in}{\in} R_0$ there exist $A,n$ such that $w = (A,n)$ by Definition 12, Proposition 121.
Hence $R_0$ is a relation by Definition 12.

Claim: For all $A\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ there exists $n$ such that $A\mathrel{R_0}n$.

Fix $A\class{latex-symbol-tip latex-symbol-id-in}{\in} F$.
$A\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Definition 1.
Take $n$ such that $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and there exists $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and $A = \closure{s(n)}{X}{T}$ by Definition 1.
Take $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and $A = \closure{s(n)}{X}{T}$.
$(A,n)\class{latex-symbol-tip latex-symbol-id-in}{\in} F\class{latex-symbol-tip latex-symbol-id-times}{\times}\naturals$ by Proposition 115.
Hence $(A,n)\class{latex-symbol-tip latex-symbol-id-in}{\in} R_0$ by Proposition 115.
Therefore $A\mathrel{R_0}n$ by Definition 12.

Take $h$ such that $h$ is a function on $F$ and for all $A\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $A\mathrel{R_0}h(A)$ by Axiom 54.
Let $N = \img{h}{F}$.
We have $N\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturals$ and $N$ is finite and $N$ is inhabited by Axiom 6, Definition 1, Lemma 192, Proposition 10, Proposition 235, Proposition 348, Proposition 349.
Take $m\class{latex-symbol-tip latex-symbol-id-in}{\in} N$ such that for all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} N$ we have $a\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$ by Lemma 381.
Take $u$ such that $u$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$ by Definition 1.
$m\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$.
Hence $u(m)\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Definition 256.
Take $y$ such that $y\class{latex-symbol-tip latex-symbol-id-in}{\in} u(m)$ by Proposition 10.

Claim: $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\inters{F}$.
Claim: For all $A\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ we have $y\class{latex-symbol-tip latex-symbol-id-in}{\in} A$.

Fix $A\class{latex-symbol-tip latex-symbol-id-in}{\in} F$.
$A\mathrel{R_0}h(A)$ by Proposition 349.
Hence $(A,h(A))\class{latex-symbol-tip latex-symbol-id-in}{\in} R_0$ by Definition 12.
$h(A)\class{latex-symbol-tip latex-symbol-id-in}{\in} N$ by Proposition 235, Proposition 348.
Therefore $h(A)\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$ by Definition 1.
$h(A)\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Definition 1.
Take $A_1,n_1,s_A$ such that $A_1\class{latex-symbol-tip latex-symbol-id-in}{\in} F$ and $n_1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $(A,h(A)) = (A_1,n_1)$ and $s_A$ is a shrinking sequence up to $n_1$ for $g$ and $c$ in $X$ with respect to $T$ and $A_1 = \closure{s_A(n_1)}{X}{T}$ by Definition 1.
$A = A_1$ and $h(A) = n_1$ by Axiom 6.
Let $I_A = \{i\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid i\class{latex-symbol-tip latex-symbol-id-leq}{\leq} h(A)\}$.
Let $v = \restrl{u}{I_A}$.
$v$ is a shrinking sequence up to $h(A)$ for $g$ and $c$ in $X$ with respect to $T$ by Lemma 391.
Hence $v = s_A$ by Lemma 392.
Therefore $u(m)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} u(h(A))$ by Lemma 393.
Thus $y\class{latex-symbol-tip latex-symbol-id-in}{\in} u(h(A))$ by Definition 1.

Claim: $I_A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\dom{u}$.

Let $J = \{i\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals \mid i\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m\}$.
$u$ is a function by Definition 256.
For all $i$ we have $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{u}$ iff $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 256.
Hence $\dom{u} = J$ by Axiom 1 [Set extensionality].

Claim: For all $i\class{latex-symbol-tip latex-symbol-id-in}{\in} I_A$ we have $i\class{latex-symbol-tip latex-symbol-id-in}{\in}\dom{u}$.

Fix $i\class{latex-symbol-tip latex-symbol-id-in}{\in} I_A$.
$i\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and $i\class{latex-symbol-tip latex-symbol-id-leq}{\leq} h(A)$ by Definition 1.
Hence $i\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$ by Definition 1, Lemma 23, Lemma 379.
Thus $i\class{latex-symbol-tip latex-symbol-id-in}{\in} J$ by Definition 1.

Follows by Definition 1.

$u$ is a function by Definition 256.
$h(A)\class{latex-symbol-tip latex-symbol-id-in}{\in} I_A$.
Hence $v(h(A)) = u(h(A))$ by Proposition 384.
$u(h(A)) = s_A(h(A))$ by Definition 1.
Therefore $y\class{latex-symbol-tip latex-symbol-id-in}{\in} s_A(h(A))$ by Definition 1.
$h(A)\class{latex-symbol-tip latex-symbol-id-leq}{\leq} h(A)$.
Hence $s_A(h(A))$ is open in $X$ with respect to $T$ by Definition 256.
Hence $s_A(h(A))\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Axiom 12, Definition 1, Definition 101, Definition 103.
Therefore $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\closure{s_A(h(A))}{X}{T}$ by Lemma 146, Proposition 4.
Thus $y\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ by Definition 1.

Therefore $y\class{latex-symbol-tip latex-symbol-id-in}{\in}\inters{F}$ by Proposition 31.

Hence $\inters{F}\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Axiom 2.

Hence $C$ has the finite intersection property by Definition 91.

Claim: For all $A$ such that $A\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ we have $A$ is closed in $X$ with respect to $T$.

Fix $A$ such that $A\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Take $n$ such that $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ and there exists $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and $A = \closure{s(n)}{X}{T}$ by Definition 1.
Take $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and $A = \closure{s(n)}{X}{T}$.
$n\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.
Hence $s(n)$ is open in $X$ with respect to $T$ by Definition 256.
Hence $s(n)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Axiom 12, Definition 1, Definition 101, Definition 103.
Therefore $\closure{s(n)}{X}{T}$ is closed in $X$ with respect to $T$ by Lemma 144.
Thus $A$ is closed in $X$ with respect to $T$ by Definition 1.

Therefore $\inters{C}\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Theorem 64.
Take $x$ such that $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\inters{C}$ by Proposition 10.
Take $A_0$ such that $A_0\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Definition 91.
$x\class{latex-symbol-tip latex-symbol-id-in}{\in} A_0$ by Proposition 32.
Hence $x\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ by Definition 1, Definition 149.
Take $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ such that $g(n) = x$ by Definition 57.
Take $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ by Definition 1.
Let $B = \closure{s(n)}{X}{T}$.
$n\class{latex-symbol-tip latex-symbol-id-leq}{\leq} n$.
Hence $s(n)$ is open in $X$ with respect to $T$ by Definition 256.
Therefore $s(n)\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Axiom 12, Definition 1, Definition 101, Definition 103.
Thus $B$ is closed in $X$ with respect to $T$ by Lemma 144.
Therefore $B\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} X$ by Definition 149.
Thus $B\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{X}$ by Proposition 155.
$B\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Definition 1.
Thus $x\class{latex-symbol-tip latex-symbol-id-in}{\in} B$ by Proposition 32.
Therefore $g(n)\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\closure{s(n)}{X}{T}$ by Definition 256.
Contradiction.

LaTeX source
\begin{proof}
    Suppose not.
    Take $g$ such that $g$ is a surjection from $\naturals$ to $X$
        by \cref{countable_nonempty_surj_naturals}.
    $g$ is a function from $\naturals$ to $X$ by \cref{surj_to_fun}.

    Let $D = \{p\in\pow{X}\times X \mid \text{$\fst{p}$ is open in $X$ with respect to $T$ and $\fst{p}\neq\emptyset$}\}$.
    Let $R = \{w\in D\times\pow{X} \mid \text{there exist $p,V$ such that
        $p\in D$ and
        $V\in\pow{X}$ and
        $w = (p,V)$ and
        $V$ is open in $X$ with respect to $T$ and
        $V\neq\emptyset$ and
        $V\subseteq\fst{p}$ and
        $\snd{p}\notin\closure{V}{X}{T}$}\}$.
    For all $w$ such that $w\in R$ there exist $p,V$ such that $w = (p,V)$ by \cref{relation}.
    Hence $R$ is a relation by \cref{relation}.
    Show that for all $p\in D$ there exists $V$ such that $p\mathrel{R}V$.
    \begin{subproof}
        Fix $p\in D$.
        $p\in\pow{X}\times X$ by \cref{subseteq}.
        Take $U,x$ such that $p = (U,x)$ and $U\in\pow{X}$ and $x\in X$ by \cref{times_elem_is_tuple}.
        $U = \fst{p}$ and $x = \snd{p}$ by \cref{fst_eq,snd_eq}.
        Hence $U$ is open in $X$ with respect to $T$ and $U\neq\emptyset$ by \cref{subseteq}.
        Take $V$ such that
            $V$ is open in $X$ with respect to $T$ and
            $V\neq\emptyset$ and
            $V\subseteq U$ and
            $x\notin\closure{V}{X}{T}$ by \cref{open_set_shrink_away_point}.
        $V\subseteq X$ by \cref{open_in,topology_on,subseteq,pow_iff}.
        Hence $V\in\pow{X}$ by \cref{powerset_intro}.
        $(p,V)\in D\times\pow{X}$ by \cref{times_tuple_intro}.
        Hence $(p,V)\in R$ by \cref{times_tuple_intro,powerset_intro}.
        Thus $p\mathrel{R}V$ by \cref{relation}.
    \end{subproof}
    Take $c$ such that $c$ is a function on $D$ and for all $p\in D$ we have $p\mathrel{R}c(p)$
        by \cref{axiom_of_choice}.

    Show that for all $U,x$ such that
        $U$ is open in $X$ with respect to $T$ and
        $U\neq\emptyset$ and
        $x\in X$
    we have
        $c((U,x))$ is open in $X$ with respect to $T$ and
        $c((U,x))\neq\emptyset$ and
        $c((U,x))\subseteq U$ and
        $x\notin\closure{c((U,x))}{X}{T}$.
    \begin{subproof}
        Fix $U$.
        Fix $x$.
        Assume $U$ is open in $X$ with respect to $T$ and $U\neq\emptyset$ and $x\in X$.
        $U\subseteq X$ by \cref{open_in,topology_on,subseteq,pow_iff}.
        Therefore $U\in\pow{X}$ by \cref{powerset_intro}.
        $(U,x)\in\pow{X}\times X$ by \cref{times_tuple_intro}.
        Thus $\fst{(U,x)} = U$ by \cref{fst_eq}.
        Therefore $\fst{(U,x)}$ is open in $X$ with respect to $T$ and $\fst{(U,x)}\neq\emptyset$.
        Thus $(U,x)\in D$ by \cref{times_tuple_intro}.
        We have $\dom{c} = D$ by definition.
        Therefore $(U,x)\in\dom{c}$ by \cref{subseteq}.
        $((U,x),c((U,x)))\in c$ by \cref{function_apply_elim}.
        Thus $((U,x),c((U,x)))\in R$ by \cref{function_apply_iff}.
        Take $p,V$ such that $p\in D$ and $V\in\pow{X}$ and
            $((U,x),c((U,x))) = (p,V)$ and
            $V$ is open in $X$ with respect to $T$ and
            $V\neq\emptyset$ and
            $V\subseteq\fst{p}$ and
            $\snd{p}\notin\closure{V}{X}{T}$ by \cref{subseteq}.
        $p = (U,x)$ and $c((U,x)) = V$ by \cref{pair_eq_iff}.
        Thus $\fst{p} = U$ and $\snd{p} = x$ by \cref{fst_eq,snd_eq}.
        Therefore $c((U,x))$ is open in $X$ with respect to $T$ and
            $c((U,x))\neq\emptyset$ and
            $c((U,x))\subseteq U$ and
            $x\notin\closure{c((U,x))}{X}{T}$.
    \end{subproof}

    Show that for all $n\in\naturals$ there exists $s$ such that
        $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$.
    \begin{subproof}
        Follows by \cref{shrinking_sequence_exists}.
    \end{subproof}

    Let $C = \{A\in\pow{X} \mid \text{there exists $n\in\naturals$ such that there exists $s$ such that
        $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and
        $A = \closure{s(n)}{X}{T}$}\}$.
    Show that $C$ has the finite intersection property.
    \begin{subproof}
        Show that $C$ is inhabited.
        \begin{subproof}
            $0\in\naturals$ by \cref{zero_in_naturals}.
            Take $s$ such that $s$ is a shrinking sequence up to $0$ for $g$ and $c$ in $X$ with respect to $T$ by \cref{subseteq}.
            Let $A_0 = \closure{s(0)}{X}{T}$.
            $0\leq 0$.
            Hence $s(0)$ is open in $X$ with respect to $T$ by \cref{shrinking_sequence_upto}.
            Therefore $s(0)\subseteq X$ by \cref{open_in,topology_on,subseteq,pow_iff}.
            Thus $A_0$ is closed in $X$ with respect to $T$ by \cref{closure_closed_in}.
            Therefore $A_0\subseteq X$ by \cref{closed_in}.
            Thus $A_0\in\pow{X}$ by \cref{powerset_intro}.
            $A_0\in C$ by \cref{subseteq,zero_in_naturals}.
            Therefore $C$ is inhabited.
        \end{subproof}
        Show that for all $F$ such that $F\subseteq C$ and $F$ is finite and inhabited we have $\inters{F}\neq\emptyset$.
        \begin{subproof}
            Fix $F$ such that $F\subseteq C$ and $F$ is finite and inhabited.
            Let $R_0 = \{w\in F\times\naturals \mid \text{there exists $A\in F$ such that there exists $n\in\naturals$ such that there exists $s$ such that
                $w = (A,n)$ and
                $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and
                $A = \closure{s(n)}{X}{T}$}\}$.
            For all $w$ such that $w\in R_0$ there exist $A,n$ such that $w = (A,n)$ by \cref{times_elem_is_tuple,relation}.
            Hence $R_0$ is a relation by \cref{relation}.
            Show that for all $A\in F$ there exists $n$ such that $A\mathrel{R_0}n$.
            \begin{subproof}
                Fix $A\in F$.
                $A\in C$ by \cref{subseteq}.
                Take $n$ such that $n\in\naturals$ and there exists $s$ such that
                    $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and
                    $A = \closure{s(n)}{X}{T}$ by \cref{subseteq}.
                Take $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and
                    $A = \closure{s(n)}{X}{T}$.
                $(A,n)\in F\times\naturals$ by \cref{times_tuple_intro}.
                Hence $(A,n)\in R_0$ by \cref{times_tuple_intro}.
                Therefore $A\mathrel{R_0}n$ by \cref{relation}.
            \end{subproof}
            Take $h$ such that $h$ is a function on $F$ and for all $A\in F$ we have $A\mathrel{R_0}h(A)$
                by \cref{axiom_of_choice}.
            Let $N = \img{h}{F}$.
            We have $N\subseteq\naturals$ and $N$ is finite and $N$ is inhabited
                by \cref{img_iff,function_apply_iff,pair_eq_iff,subseteq,finite_image_function,nonempty_inhabited,function_apply_elim}.
            Take $m\in N$ such that for all $a\in N$ we have $a\leq m$
                by \cref{finite_inhabited_naturals_largest}.
            Take $u$ such that $u$ is a shrinking sequence up to $m$ for $g$ and $c$ in $X$ with respect to $T$ by \cref{subseteq}.
            $m\leq m$.
            Hence $u(m)\neq\emptyset$ by \cref{shrinking_sequence_upto}.
            Take $y$ such that $y\in u(m)$ by \cref{nonempty_inhabited}.
            Show that $y\in\inters{F}$.
            \begin{subproof}
                Show that for all $A\in F$ we have $y\in A$.
                \begin{subproof}
                    Fix $A\in F$.
                    $A\mathrel{R_0}h(A)$ by \cref{function_apply_iff}.
                    Hence $(A,h(A))\in R_0$ by \cref{relation}.
                    $h(A)\in N$ by \cref{function_apply_elim,img_iff}.
                    Therefore $h(A)\leq m$ by \cref{subseteq}.
                    $h(A)\in\naturals$ by \cref{subseteq}.
                    Take $A_1,n_1,s_A$ such that $A_1\in F$ and $n_1\in\naturals$ and
                        $(A,h(A)) = (A_1,n_1)$ and
                        $s_A$ is a shrinking sequence up to $n_1$ for $g$ and $c$ in $X$ with respect to $T$ and
                        $A_1 = \closure{s_A(n_1)}{X}{T}$ by \cref{subseteq}.
                    $A = A_1$ and $h(A) = n_1$ by \cref{pair_eq_iff}.
                    Let $I_A = \{i\in\naturals \mid i\leq h(A)\}$.
                    Let $v = \restrl{u}{I_A}$.
                    $v$ is a shrinking sequence up to $h(A)$ for $g$ and $c$ in $X$ with respect to $T$
                        by \cref{shrinking_sequence_restriction}.
                    Hence $v = s_A$ by \cref{shrinking_sequence_unique}.
                    Therefore $u(m)\subseteq u(h(A))$ by \cref{shrinking_sequence_terms_nested}.
                    Thus $y\in u(h(A))$ by \cref{subseteq}.
                    Show that $I_A\subseteq\dom{u}$.
                    \begin{subproof}
                        Let $J = \{i\in\naturals \mid i\leq m\}$.
                        $u$ is a function by \cref{shrinking_sequence_upto}.
                        For all $i$ we have $i\in\dom{u}$ iff $i\in J$ by \cref{shrinking_sequence_upto}.
                        Hence $\dom{u} = J$ by \cref{setext}.
                        Show that for all $i\in I_A$ we have $i\in\dom{u}$.
                        \begin{subproof}
                            Fix $i\in I_A$.
                            $i\in\naturals$ and $i\leq h(A)$ by \cref{subseteq}.
                            Hence $i\leq m$ by
                                \cref{naturals_subseteq_reals,subseteq,real_leq_trans}.
                            Thus $i\in J$ by \cref{subseteq}.
                        \end{subproof}
                        Follows by \cref{subseteq}.
                    \end{subproof}
                    $u$ is a function by \cref{shrinking_sequence_upto}.
                    $h(A)\in I_A$.
                    Hence $v(h(A)) = u(h(A))$ by \cref{restrl_of_function_apply}.
                    $u(h(A)) = s_A(h(A))$ by \cref{subseteq}.
                    Therefore $y\in s_A(h(A))$ by \cref{subseteq}.
                    $h(A)\leq h(A)$.
                    Hence $s_A(h(A))$ is open in $X$ with respect to $T$ by \cref{shrinking_sequence_upto}.
                    Hence $s_A(h(A))\subseteq X$ by \cref{open_in,topology_on,subseteq,pow_iff}.
                    Therefore $y\in\closure{s_A(h(A))}{X}{T}$ by \cref{subseteq_closure,elem_subseteq}.
                    Thus $y\in A$ by \cref{subseteq}.
                \end{subproof}
                Therefore $y\in\inters{F}$ by \cref{inters_intro}.
            \end{subproof}
            Hence $\inters{F}\neq\emptyset$ by \cref{emptyset}.
        \end{subproof}
        Hence $C$ has the finite intersection property by \cref{finite_intersection_property}.
    \end{subproof}

    Show that for all $A$ such that $A\in C$ we have $A$ is closed in $X$ with respect to $T$.
    \begin{subproof}
        Fix $A$ such that $A\in C$.
        Take $n$ such that $n\in\naturals$ and there exists $s$ such that
            $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and
            $A = \closure{s(n)}{X}{T}$ by \cref{subseteq}.
        Take $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ and
            $A = \closure{s(n)}{X}{T}$.
        $n\leq n$.
        Hence $s(n)$ is open in $X$ with respect to $T$ by \cref{shrinking_sequence_upto}.
        Hence $s(n)\subseteq X$ by \cref{open_in,topology_on,subseteq,pow_iff}.
        Therefore $\closure{s(n)}{X}{T}$ is closed in $X$ with respect to $T$ by \cref{closure_closed_in}.
        Thus $A$ is closed in $X$ with respect to $T$ by \cref{subseteq}.
    \end{subproof}

    Therefore $\inters{C}\neq\emptyset$ by \cref{compact_iff_finite_intersection_property}.
    Take $x$ such that $x\in\inters{C}$ by \cref{nonempty_inhabited}.
    Take $A_0$ such that $A_0\in C$ by \cref{finite_intersection_property}.
    $x\in A_0$ by \cref{inters_destr}.
    Hence $x\in X$ by \cref{subseteq,closed_in}.
    Take $n\in\naturals$ such that $g(n) = x$ by \cref{surj}.
    Take $s$ such that $s$ is a shrinking sequence up to $n$ for $g$ and $c$ in $X$ with respect to $T$ by \cref{subseteq}.
    Let $B = \closure{s(n)}{X}{T}$.
    $n\leq n$.
    Hence $s(n)$ is open in $X$ with respect to $T$ by \cref{shrinking_sequence_upto}.
    Therefore $s(n)\subseteq X$ by \cref{open_in,topology_on,subseteq,pow_iff}.
    Thus $B$ is closed in $X$ with respect to $T$ by \cref{closure_closed_in}.
    Therefore $B\subseteq X$ by \cref{closed_in}.
    Thus $B\in\pow{X}$ by \cref{powerset_intro}.
    $B\in C$ by \cref{subseteq}.
    Thus $x\in B$ by \cref{inters_destr}.
    Therefore $g(n)\notin\closure{s(n)}{X}{T}$ by \cref{shrinking_sequence_upto}.
    Contradiction.
\end{proof}
Corollary 12
real_closed_interval_uncountable

Suppose $a\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
Suppose $b\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
Suppose $a < b$.
Let $R = \realOrderRel$.
Let $T = \realOrderTopology$.
Let $Y = \intervalclosedrel{R}{\reals}{a}{b}$.
Let $T_Y = \subspaceTopology{T}{Y}$.
Then $Y$ is not countable.

LaTeX source
\begin{corollary}
\label{real_closed_interval_uncountable}
    Suppose $a\in\reals$.
    Suppose $b\in\reals$.
    Suppose $a < b$.
    Let $R = \realOrderRel$.
    Let $T = \realOrderTopology$.
    Let $Y = \intervalclosedrel{R}{\reals}{a}{b}$.
    Let $T_Y = \subspaceTopology{T}{Y}$.
    Then $Y$ is not countable.
\end{corollary}
Proof

$R$ is a simple order relation on $\reals$ and $\reals$ is a linear continuum with respect to $\realOrderRel$ by Lemma 322, Lemma 326.
$\reals$ has more than one element by Definition 231.
$T$ is the order topology on $\reals$ with respect to $R$ and $T$ is a topology on $\reals$ by Definition 134, Definition 233, Lemma 76, Lemma 113.

$a\mathrel{R}b$ by Lemma 320.
$a\class{latex-symbol-tip latex-symbol-id-neq}{\neq} b$ by Axiom 39, Lemma 83.
$a\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ and $b\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ by Definition 132.
$Y$ has more than one element by Definition 127.
$Y\class{latex-symbol-tip latex-symbol-id-neq}{\neq}\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Axiom 2.

$Y\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$ by Definition 1, Definition 132.

$\reals$ is Hausdorff with respect to $T$ and $Y$ is Hausdorff with respect to $T_Y$ by Theorem 17, Theorem 19.
$T_Y$ is a topology on $Y$ by Lemma 131.

$Y$ is compact with respect to $T_Y$ and $Y$ is connected with respect to $T_Y$ by Theorem 44, Corollary 11.

Claim: For all $x\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$ we have $x$ is not an isolated point of $Y$ with respect to $T_Y$.

Fix $x\class{latex-symbol-tip latex-symbol-id-in}{\in} Y$.
Suppose not.
$\{x\}$ is open in $Y$ with respect to $T_Y$ by Definition 255.
Take $y$ such that $y\class{latex-symbol-tip latex-symbol-id-neq}{\neq} x$ by Lemma 100.
$\{x\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} Y$ by Proposition 25.
$\{x\}$ is closed in $Y$ with respect to $T_Y$ by Lemma 40, Lemma 44, Proposition 16, Proposition 25, Theorem 14.
$\{x\} = \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ or $\{x\} = Y$ by Lemma 304.
$\{x\} = Y$ by Axiom 2, Proposition 22.
$y = x$ by Definition 1, Proposition 22.
Contradiction.

$Y$ is not countable by Theorem 69.

LaTeX source
\begin{proof}
    $R$ is a simple order relation on $\reals$ and
        $\reals$ is a linear continuum with respect to $\realOrderRel$
        by \cref{real_order_relation_simple,reals_linear_continuum}.
    $\reals$ has more than one element by \cref{linear_continuum}.
    $T$ is the order topology on $\reals$ with respect to $R$ and $T$ is a topology on $\reals$
        by \cref{real_order_topology,order_topology,order_basis_is_basis,basis_topology_is_topology}.

    $a\mathrel{R}b$ by \cref{real_order_relation_intro}.
    $a\neq b$ by \cref{real_lt_subst_right,real_lt_irreflexive}.
    $a\in Y$ and $b\in Y$ by \cref{intervalclosed_rel}.
    $Y$ has more than one element by \cref{more_than_one_element}.
    $Y\neq\emptyset$ by \cref{emptyset}.

    $Y\subseteq\reals$ by \cref{intervalclosed_rel,subseteq}.

    $\reals$ is Hausdorff with respect to $T$ and $Y$ is Hausdorff with respect to $T_Y$
        by \cref{order_topology_hausdorff,subspace_hausdorff}.
    $T_Y$ is a topology on $Y$ by \cref{subspace_topology_is_topology}.

    $Y$ is compact with respect to $T_Y$ and $Y$ is connected with respect to $T_Y$
        by \cref{real_closed_interval_compact,linear_continuum_connected}.

    Show that for all $x\in Y$ we have $x$ is not an isolated point of $Y$ with respect to $T_Y$.
    \begin{subproof}
        Fix $x\in Y$.
        Suppose not.
        $\{x\}$ is open in $Y$ with respect to $T_Y$ by \cref{isolated_point}.
        Take $y$ such that $y\neq x$ by \cref{more_than_one_element_has_other}.
        $\{x\}\subseteq Y$ by \cref{singleton_subset_intro}.
        $\{x\}$ is closed in $Y$ with respect to $T_Y$
            by \cref{singleton_subset_intro,pair_is_finite,upair_intro_left,subseteq_finite_is_finite,finite_point_set_closed_hausdorff}.
        $\{x\} = \emptyset$ or $\{x\} = Y$ by \cref{connected_iff_clopen}.
        $\{x\} = Y$ by \cref{singleton_iff,emptyset}.
        $y = x$ by \cref{subseteq,singleton_iff}.
        Contradiction.
    \end{subproof}

    $Y$ is not countable by \cref{compact_hausdorff_no_isolated_uncountable}.
\end{proof}