\import{topology/topological-space.tex}
\import{topology/separation.tex}
\import{topology/continuous.tex}
\import{topology/basis.tex}
\import{numbers.tex}
\import{function.tex}
\import{set.tex}
\import{cardinal.tex}
\import{relation.tex}
\import{relation/uniqueness.tex}
\import{set/cons.tex}
\import{set/powerset.tex}
\import{set/fixpoint.tex}
\import{set/product.tex}

\section{Urysohns Lemma}

\begin{definition}\label{minimum}
    $\min{X} = \{x \in X \mid \forall y \in X. x \leq y \}$.
\end{definition}


\begin{definition}\label{maximum}
    $\max{X} = \{x \in X \mid \forall y \in X. x \geq y \}$.
\end{definition}


\begin{definition}\label{intervalclosed}
    $\intervalclosed{a}{b} = \{x \in \reals \mid a \leq x \leq b\}$.
\end{definition}


\begin{definition}\label{intervalopen}
    $\intervalopen{a}{b} = \{ x \in \reals \mid a < x < b\}$.
\end{definition}


\begin{definition}\label{one_to_n_set}
    $\seq{m}{n} = \{x \in \naturals \mid  m \leq x \leq n\}$.   
\end{definition}


\begin{definition}\label{sequence}
    $X$ is a sequence iff $X$ is a function and $\dom{f} \subseteq \naturals$.
\end{definition}


\begin{abbreviation}\label{urysohnspace}
    $X$ is a urysohn space iff
    $X$ is a topological space and
    for all $A,B \in \closeds{X}$ such that $A \inter B = \emptyset$
    we have there exist $A',B' \in \opens[X]$
    such that  $A \subseteq A'$ and $B \subseteq B'$ and $A' \inter B' = \emptyset$.    
\end{abbreviation}


\begin{abbreviation}\label{at}
    $\at{f}{n} = f(n)$.
\end{abbreviation}


\begin{definition}\label{chain_of_subsets}
    $X$ is a chain of subsets in $Y$ iff $X$ is a sequence and for all $n \in \dom{X}$ we have $\at{X}{n} \subseteq \carrier[Y]$. 
\end{definition}


\begin{definition}\label{urysohnchain}%<-- zulässig
    $X$ is a urysohnchain of $Y$ iff $X$ is a chain of subsets in $Y$ and for all $n,m \in \dom{X}$ such that $n < m$ we have $\closure{\at{X}{n}}{Y} \subseteq \interior{\at{X}{m}}{Y}$.
\end{definition}


\begin{definition}\label{finer} %<-- verfeinerung 
    $X$ is finer then $Y$ in $U$ iff for all $n \in \dom{X}$ we have $\at{X}{n} \in \ran{Y}$ and for all $m \in \dom{X}$ such that $n < m$ we have there exist $k \in \dom{Y}$ such that $ \closure{\at{X}{n}}{U} \subseteq \interior{\at{Y}{k}}{U} \subseteq \closure{\at{Y}{k}}{U} \subseteq \interior{\at{X}{m}}{U}$.
\end{definition}


\begin{definition}\label{sequence_of_reals}
    $X$ is a sequence of reals iff $\ran{X} \subseteq \reals$.
\end{definition}


\begin{axiom}\label{abs_behavior1}
    If $x \geq \zero$ then $\abs{x} = x$.
\end{axiom}

\begin{axiom}\label{abs_behavior2}
    If $x < \zero$ then $\abs{x} = \neg{x}$.
\end{axiom}

\begin{definition}\label{realsminus}
    $\realsminus = \{r \in \reals \mid r < \zero\}$.
\end{definition}

\begin{definition}\label{realsplus}
    $\realsplus = \reals \setminus \realsminus$.
\end{definition}

\begin{definition}\label{epsilon_ball}
    $\epsBall{x}{\epsilon} = \intervalopen{x-\epsilon}{x+\epsilon}$.
\end{definition}

\begin{definition}\label{pointwise_convergence}
    $X$ converge to $x$ iff for all $\epsilon \in \realsplus$ there exist $N \in \dom{X}$ such that for all $n \in \dom{X}$ such that $n > N$ we have $\at{X}{n} \in \epsBall{x}{\epsilon}$.
\end{definition}


\begin{proposition}\label{iff_sequence}
    Suppose $X$ is a function.
    Suppose $\dom{X} \subseteq \naturals$.
    Then $X$ is a sequence.
\end{proposition}








\begin{theorem}\label{urysohnsetinbeetween}
    Let $X$ be a urysohn space.
    Suppose $A,B \in \closeds{X}$.
    Suppose $\closure{A}{X} \subseteq \interior{B}{X}$.
    Suppose $\carrier[X]$ is inhabited.
    There exist $U \subseteq \carrier[X]$ such that $U$ is closed in $X$ and $\closure{A}{X} \subseteq \interior{U}{X} \subseteq \closure{U}{X} \subseteq \interior{B}{X}$.
\end{theorem}
\begin{proof}
    Omitted.
\end{proof}


\begin{theorem}\label{urysohn}
    Let $X$ be a urysohn space.
    Suppose $A,B \in \closeds{X}$.
    Suppose $A \inter B$ is empty.
    Suppose $\carrier[X]$ is inhabited.
    There exist $f$ such that $f \in \funs{\carrier[X]}{\intervalclosed{\zero}{1}}$ 
    and $f(A) = \zero$ and $f(B)= 1$ and $f$ is continuous.
\end{theorem}
\begin{proof}
    Let $X' = \carrier[X]$.
    Let $N = \{\zero, 1\}$.
    $1 = \suc{\zero}$.
    $1 \in \naturals$ and $\zero \in \naturals$.
    $N \subseteq \naturals$.
    Let $A' = (X' \setminus B)$.
    $B \subseteq X'$ by \cref{powerset_elim,closeds}.
    $A \subseteq X'$.
    Therefore $A \subseteq A'$.
    Define $U_0: N \to \{A, A'\}$ such that $U_0(n) =$
    \begin{cases}
        &A  &\text{if} n = \zero \\
        &A' &\text{if} n = 1
    \end{cases}
    $U_0$ is a function.
    $\dom{U_0} = N$.
    $\dom{U_0} \subseteq \naturals$ by \cref{ran_converse}. 
    $U_0$ is a sequence.
    $U_0$ is a chain of subsets in $X'$.
    $U_0$ is a urysohnchain of $X$.





    
\end{proof}

\begin{theorem}\label{safe}
    Contradiction.     
\end{theorem}




%
%Ideen:
%Eine folge ist ein Funktion mit domain \subseteq Natürlichenzahlen. als predicat
%
%zulässig und verfeinerung von ketten als predicat definieren. 
%
%limits und punkt konvergenz als prädikat.
%
%
%Vor dem Beweis vor dem eigentlichen Beweis.
%die abgeleiteten Funktionen
%
%\derivedstiarcasefunction on A
%
%abbreviation: \at{f}{n} = f_{n}
%
%
%TODO:
%Reals ist ein topologischer Raum
%

