\documentclass[12pt]{article}
\usepackage[width=16cm,height=22cm]{geometry}
\usepackage[intlimits]{amsmath}
\usepackage{amsfonts,amssymb,amsthm,mathtools}
\usepackage{ifthen}

\theoremstyle{definition}
\newtheorem{exercise}{Exercise}
\newtheorem{defn}{Definition}
\newtheorem{note}{Note}
\newtheorem*{requirements}{Requirements}
\newtheorem*{objectives}{Objectives}

\newcommand{\eqdef}{\coloneqq}
\newcommand{\iffdef}{\xLeftrightarrow{\mbox{}\ \text{def}\ \mbox{}}}
\newcommand{\NaturalNumbers}{\mathbb{N}}
\newcommand{\IntegerNumbers}{\mathbb{Z}}
\newcommand{\RationalNumbers}{\mathbb{Q}}
\newcommand{\RealNumbers}{\mathbb{R}}
\newcommand{\PositiveRealNumbers}{\mathbb{R}_+}
\newcommand{\ComplexNumbers}{\mathbb{C}}
\newcommand{\eps}{\varepsilon}
\newcommand{\closure}[1]{\overline{#1}}
\newcommand{\hsp}[1]{\mbox{}\vphantom{0_0^0}\hspace{#1}\mbox{}}
\newcommand{\ubrace}[1]{\underbrace{\mbox{}\vphantom{0_0^0}\hspace{#1}\mbox{}}_?}
\DeclareMathOperator{\BUC}{UC_b}

\makeatletter
\newcommand{\mytitle}[2][empty]{
\newcommand{\titlename}{#2}
\newcommand{\shorttitlename}{\ifthenelse{\equal{#1}{empty}}{#2}{#1}}
\renewcommand{\@oddfoot}{\hfill{}\shorttitlename{},\quad{}page~{\thepage}~of~\pageref{endlabel}\hfill}
\begin{center}\bfseries\LARGE\titlename\end{center}\par\medskip}
\makeatother

\begin{document}

\mytitle[Continuous prolongation of a uniformly continuous function]
{Continuous prolongation\\of a uniformly continuous function\\
defined on a dense subset of a metric space}

\medskip

\begin{objectives}
Prove that a uniformly continuous function
defined on a dense subset of a metric space
has a unique continuous prolongation to the whole metric space.
\end{objectives}

\begin{requirements}
Metric space, convergence of sequences,
subsequences, convergence of subsequences,
Cauchy sequence, dense subset,
modulus of continuity, uniformly continuous function.
\end{requirements}

\bigskip\noindent
In all exercises we suppose that $(X,\rho)$ is a metric space.\\
Denote by $\NaturalNumbers$ the set $\{0,1,2,\ldots\}$.

\bigskip

\section*{Convergent sequences (review)}

\medskip

\begin{exercise}[definition of convergent sequence]
Let $x\in X$ and $(y_n)_{n\in\NaturalNumbers}$ be a sequence.
Complete the definition:
\par\smallskip
\[
\lim_{n\to\infty}y_n=x\qquad\iffdef\qquad\forall\eps>0\qquad\hsp{20em}
\]
\end{exercise}

\bigskip

\begin{exercise}[convergence of a sequence implies convergence of the subsequences]
Let $(x_n)_{n\in\NaturalNumbers}$ be a sequence in $X$
and $(\nu(k))_{k\in\NaturalNumbers}$ be a strictly increasing sequence in $\NaturalNumbers$.
Define $(y_k)_{k\in\NaturalNumbers}$ by $y_k\eqdef x_{\nu(k)}$.
Suppose that $(x_n)_{n\in\NaturalNumbers}$ converges to a point $z\in X$.
Prove that $(y_k)_{k\in\NaturalNumbers}$ also converges to $z$.
\end{exercise}


\clearpage
\begin{exercise}[merge two sequences converging to the same point]
Let $(y_n)_{n\in\NaturalNumbers}$ and $(z_n)_{n\in\NaturalNumbers}$
be two sequences in $X$ converging to the same point $x\in X$:
\[
\lim_{n\to\infty}y_n=x,\qquad \lim_{n\to\infty}z_n=x.
\]
Prove that the sequence $(t_n)_{n\in\NaturalNumbers}$ defined in the following manner also converges to $x$:
\par\smallskip
\[
t_n\eqdef
\begin{cases}
y_k, & \text{if}\ n=2k,\quad k\in\NaturalNumbers;\\
z_k, & \text{if}\ n=2k+1,\quad k\in\NaturalNumbers.
\end{cases}
\]
\end{exercise}

\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip

\clearpage
\section*{Convergent sequences and dense subsets (review)}

\medskip

\begin{exercise}[definition of the closure in terms of sequences]
Let $Y$ be a subset of $X$.
\par\medskip
\[
x\in\closure{Y}\quad\Longleftrightarrow\quad\hsp{20em}
\]
\end{exercise}

\bigskip

\begin{exercise}[definition of dense subset in terms of sequences]
A subset $Y$ of $X$ is called \emph{dense} if
\par\medskip
\[
\forall x\in\hsp{2em}\qquad \hsp{20em}
\]
\end{exercise}

\bigskip

\section*{Cauchy sequences and complete spaces (review)}

\bigskip

\begin{exercise}
Recall the definition:
a sequence $(x_n)_{n\in\NaturalNumbers}$ is called a \emph{Cauchy sequence} if
\par\smallskip
\[
\forall\eps>0\qquad\hsp{20em}
\]
\end{exercise}

\bigskip

\begin{exercise}
Let $(X,\rho)$ be a metric space
and $(x_n)_{n\in\NaturalNumbers}$ be a sequence.
Consider the following conditions:
\begin{itemize}
\item[(a)] $(x_n)_{n\in\NaturalNumbers}$ is a Cauchy sequence.
\item[(b)] $(x_n)_{n\in\NaturalNumbers}$ converges, that is,
there exists a point $p\in X$ such that $\displaystyle\lim_{n\to\infty}x_n=p$.
\end{itemize}
What logical relation between (a) and (b) is always true? $\Rightarrow$ or $\Leftarrow$?
\par\smallskip
\[
\text{(a)}\quad\ubrace{3em}\quad\text{(b)}.
\]
\end{exercise}

\bigskip

\begin{exercise}
Recall the definition:
a metric space $(X,\rho)$ is called \emph{complete} if \ldots
\end{exercise}

\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip

\begin{exercise}
Recall which of the following metric spaces are complete:
\par\smallskip
\[
\RealNumbers,\qquad
\RationalNumbers,\qquad
\ComplexNumbers.
\]
\end{exercise}

\clearpage
\section*{Uniformly continuous functions (review)}

\medskip\noindent
In the following exercises we suppose
that $(X,\rho)$ is a metric space.

\bigskip

\begin{exercise}[definition of the modulus of continuity of a function]
Let $f\colon X\to\ComplexNumbers$ and $\delta>0$.
Recall the definition:
\par\smallskip
\[
\omega_{\rho,f}(\delta)\eqdef\hsp{20em}
\]
\end{exercise}

\bigskip

\begin{exercise}[definition of uniformly continuous function
in terms of its modulus of continuity]
A function $f\colon X\to\ComplexNumbers$ is called \emph{uniformly continuous} if
\par\smallskip
\[
\omega_{\rho,f}(\delta)
\]
\end{exercise}

\bigskip

\begin{exercise}[definition of uniformly continuous function
in terms of $\eps$ and $\delta$]
A function $f\colon X\to\ComplexNumbers$ is called \emph{uniformly continuous} if
\par\smallskip
\[
\forall\eps>0\hsp{30em}
\]
\end{exercise}

\bigskip

\begin{exercise}[values of a uniformly continuous function on a Cauchy sequence]
Let $(x_n)_{n\in\NaturalNumbers}$ be a Cauchy sequence in $X$
and $f\colon X\to\ComplexNumbers$ be a uniformly continuous function.
Prove that $\bigl(f(x_n)\bigr)_{n\in\NaturalNumbers}$ is a Cauchy sequence.
Does it converges?
\end{exercise}

\bigskip

\clearpage
\section*{Construction of a continous prolongation\\
of a uniformly continuous function\\
defined on a dense subset of a metric space}

\medskip\noindent
In the exercises of this section we suppose that
$Y$ is a dense subset of $X$
and $f\colon Y\to\ComplexNumbers$
is uniformly continuous on $Y$ with respect to the distance $\rho$:
\par\smallskip
\[
\lim_{\delta\to0}\,\sup\,\bigl\{|f(y')-f(y'')|\colon\quad y',y''\in Y,\quad\rho(y',y'')\le\delta\bigr\}=0.
\] 

\bigskip

\begin{exercise}[the sequence of the values of $f$ on a Cauchy sequence is a Cauchy sequence]
Let $(y_n)_{n\in\NaturalNumbers}$ be a Cauchy sequence in $Y$.
Prove that $\bigl(f(y_n)\bigr)_{n\in\NaturalNumbers}$ is a Cauchy sequence.
\end{exercise}

\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip

\begin{exercise}[the sequence of the values of $f$ on a converging sequence has a limit]
Let $x\in X$ and $(y_n)_{n\in\NaturalNumbers}$ be a sequence in $Y$ converging to $x$:
\par\smallskip
\[
\Bigl(\ \forall n\in\NaturalNumbers\quad y_n\in Y\ \Bigr)\qquad\wedge\qquad
\Bigl(\ \lim_{n\to\infty}y_n = x\ \Bigr).
\]
Prove that the sequence $\bigl(f(y_n)\bigr)_{n\in\NaturalNumbers}$ has a limit.
\end{exercise}

\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip

\begin{exercise}[the sequences of the values of $f$ on two sequences
converging to the same point have the same limit]
Let $x\in X$.
Let $(y_n)_{n\in\NaturalNumbers}$ and $(z_n)_{n\in\NaturalNumbers}$
be two sequences in $Y$ converging to $x$.
Prove that
\[
\lim_{n\to\infty}f(y_n)=\lim_{n\to\infty}f(z_n).
\]
\end{exercise}

\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip


\clearpage
\noindent
Now we are ready to construct a continuous prolongation of $f$.

\bigskip

\begin{exercise} \label{exer:g_construction}
Define $g\colon X\to\ComplexNumbers$ by the following rule:
given a point $x\in X$, put
\[
g(x)\eqdef\lim_{n\to\infty}f(y_n),
\]
where $(y_n)_{n\in\NaturalNumbers}$ is a sequence converging to $x$.
\begin{enumerate}
\item Explain why such a sequence $(y_n)_{n\in\NaturalNumbers}$ exists.
\item Explain why the limit does not depend on the choice of $(y_n)_{n\in\NaturalNumbers}$.
\end{enumerate}
\end{exercise}

\vspace{10ex}

\begin{exercise}[$g$ is a prolongation of $f$]
Prove that $g(y)=f(y)$ for all $y\in Y$.
\end{exercise}

\clearpage
\noindent
Here we suppose that $g$ is a prolongation of $f$
constructed in the Exercise \ref{exer:g_construction}.

\begin{exercise}
Prove that
\begin{align*}
\sup\,\bigl\{|f(y_1)-f(y_2)|\colon\quad y_1,y_2\in Y,\quad\rho(y_1,y_2)\le\delta\bigr\}\le
\\[0.5ex]
\le \sup\,\bigl\{|g(x_1)-g(x_2)|\colon\quad x_1,x_2\in X,\quad\rho(x_1,x_2)\le\delta\bigr\}.
\end{align*}
\end{exercise}

\vspace{10ex}

\begin{exercise}[hard]
Prove that for all $\delta>0$
\begin{align*}
\sup\,\bigl\{|g(x_1)-g(x_2)|\colon\quad x_1,x_2\in X,\quad\rho(x_1,x_2)\le\delta\bigr\}\le
\\[0.5ex]
\le\sup\,\bigl\{|f(y_1)-f(y_2)|\colon\quad y_1,y_2\in Y,\quad\rho(y_1,y_2)\le 3\delta\bigr\}.
\end{align*}
\end{exercise}

\par\vspace{50ex}

\clearpage
\begin{exercise}
Prove that $g$ is uniformly continuous.
\end{exercise}

\par\vspace{15ex}

\begin{exercise}[uniqueness of the continuous prolongation]
Let $Y$ be a dense subset of a metric space
and $g,h\in C(X,\ComplexNumbers)$
be some continuous functions such that
\[
\forall y\in Y\qquad g(y)=h(y).
\]
Prove that $g(x)=h(x)$ for all $x\in X$.
\end{exercise}

\label{endlabel}
\end{document}
