> *Definition 2*: a metric space $(X,d)$ is **complete** if every Cauchy sequence in $X$ is convergent.
Therefore, in a complete metric space every Cauchy sequence is a convergent sequence.
> *Proposition 1*: let $M \subset X$ be a nonempty subset of a metric space $(X,d)$ and let $\overline M$ be the closure of $M$, then
>
> 1. $x \in \overline M \iff \exists (x_n)_{n \in \mathbb{N}} \text{ in } M: x_n \to x$,
> 2. $M \text{ is closed } \iff M = \overline M$.
??? note "*Proof*:"
To prove statement 1, let $x \in \overline M$. If $x \notin M$ then $x$ is an accumulation point of $M$. Hence, for each $n \in \mathbb{N}$ the ball $B(x,\frac{1}{n})$ contains an $x_n \in M$ and $x_n \to x$ since $\frac{1}{n} \to 0$ as $n \to \infty$. Conversely, if $(x_n)_{n \in \mathbb{N}}$ is in $M$ and $x_n \to x$, then $x \in M$ or every neighbourhood of $x$ contains points $x_n \neq x$, so that $x$ is an accumulation point of $M$. Hence $x \in \overline M$.
Statement 2 follows from statement 1.
We have that the following statement is equivalent to statement 2: $x_n \in M: x_n \to x \implies x \in M$.
> *Proposition 2*: let $M \subset X$ be a subset of a complete metric space $(X,d)$, then
>
> $$
> M \text{ is complete} \iff M \text{ is a closed subset of } X
> $$
??? note "*Proof*:"
Let $M$ be complete, by proposition 1 statement 1 we have that
$$
\forall x \in \overline M \exists (x_n)_{n \in \mathbb{N}} \text{ in } M: x_n \to x.
$$
Since $(x_n)$ is Cauchy and $M$ is complete, $x_n$ converges in $M$ with the limit being unique by statement 1 in [lemma 1](). Hence, $x \in M$ which proves that $M$ is closed because $x \in \overline M$ has been chosen arbitrary.
Conversely, let $M$ be closed and $(x_n)$ Cauchy in $M$. Then $x_n \to x \in X$ which implies that $x \in \overline M$ by statement 1 in proposition 1, and $x \in M$ since $M = \overline M$ by assumption. Hence, the arbitrary Cauchy sequence $(x_n)$ converges in $M$.
> *Proposition 3*: let $T: X \to Y$ be a map from a metric space $(X,d)$ to a metric space $(Y,\tilde d)$, then
>
> $$
> T \text{ is continuous in } x_0 \in X \iff x_n \to x_0 \implies T(x_n) \to T(x_0),
> $$
>
> for any sequence $(x_n)_{n \in \mathbb{N}}$ in $X$ as $n \to \infty$.
??? note "*Proof*:"
Suppose $T$ is continuous at $x_0$, then for a given $\varepsilon > 0$ there is a $\delta > 0$ such that
Clearly $x_n \to x_0$ but $(Tx_n)$ does not converge to $Tx_0$ which contradicts $Tx_n \to Tx_0$.
## Completeness proofs
To show that a metric space $(X,d)$ is complete, one has to show that every Cauchy sequence in $(X,d)$ has a limit in $X$. This depends explicitly on the metric on $X$.
The steps in a completeness proof are as follows
1. take an arbitrary Cauchy sequence $(x_n)_{n \in \mathbb{N}}$ in $(X,d)$,
2. construct for this sequence a candidate limit $x$,
3. prove that $x \in X$,
4. prove that $x_n \to x$ with respect to metric $d$.
> *Proposition 4*: the Euclidean space $\mathbb{R}^n$ with $n \in \mathbb{N}$ and the metric $d$ defined by
Let $(x_m)_{m \in \mathbb{N}}$ be a Cauchy sequence in $(\mathbb{R}^n, d)$, then we have
$$
\forall \varepsilon > 0 \exists N \in \mathbb{N}: \forall m, k > N: d(x_m, x_k) = \sqrt{\sum_{j=1}^n \big(x_m(j) - x_k(j) \big)^2} < \varepsilon,
$$
obtains for all $j \in \mathbb{N}$: $|x_m(j) - x_k(j)| < \varepsilon$.
Which shows that $(x_m(j))_{m \in \mathbb{N}}$ is a Cauchy sequence in $\mathbb{R}$. Suppose that it converged by $x_m(j) \to x(j)$ as $(m \to \infty)$ then $x \in \mathbb{R}^n$ since $x = \big(x(1), \dots, x(n)\big)$.
A similar proof exists for the completeness of the Unitary space $\mathbb{C}^n$.
> *Proposition 5*: the space $C([a,b])$ of all **real-valued continuous functions** on a closed interval $[a,b]$ with $a<b \in \mathbb{R}$ with the metric $d$ defined by
Let $(x_n)_{n \in \mathbb{N}}$ be a Cauchy sequence in $(C,d)$, then we have
$$
\forall \varepsilon > 0 \exists N \in \mathbb{N}: \forall n, m > N: d(x_n, x_m) = \max_{t \in [a,b]} |x_n(t) - x_m(t)| < \varepsilon,
$$
obtains for all $t \in [a,b]$: $|x_n(t) - x_m(t)| < \varepsilon$.
Which shows that $(x_m(t))_{m \in \mathbb{N}}$ for fixed $t \in [a,b]$ is a Cauchy sequence in $\mathbb{R}$. Since $\mathbb{R}$ is complete the sequence converges; $x_m(t) \to x(t)$ as $m \to \infty$.
Let $(x_n)_{n \in \mathbb{N}}$ be a Cauchy sequence in $(l^p,d)$, then we have
$$
\forall \varepsilon > 0 \exists N \in \mathbb{N}: n, m > N: d(x_n, x_m) = \Big(\sum_{j \in \mathbb{N}} |x_n(j) - x_m(j)|^p\Big)^\frac{1}{p} < \varepsilon,
$$
obtains for all $j \in \mathbb{N}$: $|x_n(j) - x_m(j)| <\varepsilon$.
Which shows that $(x_m(j))_{m \in \mathbb{N}}$ for fixed $j \in \mathbb{N}$ is a Cauchy sequence in $\mathbb{C}$. Since $\mathbb{C}$ is complete the sequence converges; $x_m(j) \to x(j)$ as $m \to \infty$.
implies that $x_n - x \in l^p$ and $x = x_n - (x_n - x) \in l^p \implies x \in l^p$ and $x_n \to x$ as $n \to \infty$ which implies that $l^p$ is complete.
Let $(x_n)_{n \in \mathbb{N}}$ be a Cauchy sequence in $(l^\infty,d)$, then we have
$$
\forall \varepsilon > 0 \exists N \in \mathbb{N}: n, m > N: d(x_n, x_m) = \sup_{j \in \mathbb{N}} | x_n(j) - x_m(j) | < \varepsilon,
$$
obtains for all $j \in \mathbb{N}$: $|x_n(j) - x_m(j)| <\varepsilon$.
Which shows that $(x_m(j))_{m \in \mathbb{N}}$ for fixed $j \in \mathbb{N}$ is a Cauchy sequence in $\mathbb{C}$. Since $\mathbb{C}$ is complete the sequence converges; $x_m(j) \to x(j)$ as $m \to \infty$.