Completion of Metric Spaces

Definition: Let $(X,d)$ be a metric space. The metric space $(\mathcal{X},\rho)$ is called a completion of $(X,d)$ if there exists an isometry $\iota:X\rightarrow\mathcal{X}$ such that $\iota(X)$ is dense in $\mathcal{X}.$

In this post, we will prove the following theorem:

Theorem: Every metric space has a completion.

Motivation: Baby Rudin only has a procedure for constructing $\mathbb{R}$ from $\mathbb{Q}.$ That is, $\mathbb{R}$ is defined as the completion of $\mathbb{Q}$ under the absolute-value metric. I wish to generalize the concept of completion to arbitrary metric spaces (using a different, more general technique than Rudin’s) for just one simple reason:

  1. It’s very useful. Look at the construction of Reproducing Kernel Hilbert Spaces from a given positive-definite kernel. Look at the construction of p-adic numbers. There’s many more. The absolute-value metric is … well … just one among the mannnnnny different metrics that we use in real analysis, functional analysis, machine learning theory, etc. and the set of real numbers is, again, one among the many different spaces we work with. So I believe this would be a very good addition to the contents of Baby Rudin’s chapter on metric spaces.

Before proving this theorem, we need some lemmas about the properties of Cauchy sequences.

Lemma 1: For any two Cauchy sequences $(a_n)_{n=1}^\infty$ and $(b_n)_{n=1}^\infty$ in metric space $(X,d),$ $\hat{\rho}\left((a_n)_{n=1}^\infty,(b_n)_{n=1}^\infty\right)=\lim_{n\to\infty}d(a_n,b_n)$ exists.

Proof: Note that for any $n,m\in\mathbb{N},$ two applications of triangle inequality implies $$d(a_n,b_n)\le d(a_n,b_m)+d(b_m,b_n)\le d(a_n,a_m)+d(a_m,b_m)+d(b_m,b_n)$$

Hence, $d(a_n,b_n)-d(a_m,b_m)\le d(a_n,a_m)+d(b_n,b_m)$ using symmetry of metrics. Similarly, we get $d(a_m,b_m)-d(a_n,b_n)\le d(a_n,a_m)+d(b_n,b_m).$ Now, for any $\epsilon>0,$ there exists some $N_a,N_b\in\mathbb{N}$ such that $d(a_n,a_m)<\epsilon/2$ for all $n,m\ge N_a$ and $d(b_n,b_m)<\epsilon/2$ for all $n,m\ge N_b.$ The above inequalities now imply that $$|d(a_n,b_n)-d(a_m,b_m)|\le d(a_n,a_m)+d(b_n,b_m)<\epsilon\text{ for all }n,m\ge\max\{N_a,N_b\}$$

Since $\big(d(a_n,b_n)\big)_{n=1}^\infty$ is Cauchy and $\mathbb{R}$ is complete, the limit must exist.

Lemma 2: Let $(X,d)$ be a metric space and $\mathcal{C}_X$ the space of all Cauchy sequences in $X.$ Let $\sim$ be a relation on $\mathcal{C}_X$ defined as $\mathbf{a}\sim \mathbf{b}$ if $\hat{\rho}(\mathbf{a},\mathbf{b})=0$. Then, $\sim$ in an equivalence relation on $\mathcal{C}_X.$

Proof: Reflexivity and symmetry is obvious. To show transitivity, consider any $(a_n)_{n=1}^\infty,(b_n)_{n=1}^\infty,(c_n)_{n=1}^\infty\in \mathcal{C}_X$ such that $\lim_{n\to\infty}d(a_n,b_n)=\lim_{n\to\infty}d(b_n,c_n)=0.$ Then, for any $n\in\mathbb{N},$ we have $0\le d(a_n,c_n)\le d(a_n,b_n)+d(b_n,c_n)$ using properties of metric $d.$ An application of the Squeeze theorem proves our claim.

Lemma 3: For any Cauchy sequences $\mathbf{a}=(a_n)_{n=1}^\infty,\mathbf{a’}=(a’_n)_{n=1}^\infty$ and $\mathbf{b}=(b_n)_{n=1}^\infty,\mathbf{b’}=(b’_n)_{n=1}^\infty$ in metric space $(X,d),$ such that $\hat{\rho}(\mathbf{a},\mathbf{a’})=\hat{\rho}(\mathbf{b},\mathbf{b’})=0$ then $\hat{\rho}(\mathbf{a},\mathbf{b})=\hat{\rho}(\mathbf{a’},\mathbf{b’}).$

Proof: For any $n\in\mathbb{N},$ with two applications of the triangle inequality, we get $$d(a’_n,b’_n)\le d(a’_n,a_n)+d(a_n,b’_n)\le d(a’_n,a_n)+d(a_n,b_n)+d(b_n,b’_n)$$ Hence, $d(a’_n,b’_n)-d(a_n,b_n)\le d(a_n,a’_n)+d(b_n,b’_n)$ using symmetry of metrics. Similarly, we get $d(a_n,b_n)-d(a’_n,b’_n)\le d(a_n,a’_n)+d(b_n,b’_n).$ This means $0\le |d(a_n,b_n)-d(a’_n,b’_n)|\le d(a_n,a’_n)+d(b_n,b’_n)$ and an application of the Squeeze theorem and Lemma-1 proves our claim.

At this point, we have all the lemmas need to prove the theorem. Note that need to do fivethings: (1) construct $\mathcal{X}$ from $X,$ define a metric $\rho$ on $\mathcal{X},$ (3) find an isometry $\iota,$ (4) show that $\iota(X)$ is dense in $\mathcal{X},$ and finally (5) show that $(\mathcal{X},\rho)$ is complete. I will proceed in this exact order and label the parts using these numbers.

Proof of Theorem: Let $(X,d)$ be any metric space.

Part I: Using Lemma-2, we define $\mathcal{X}=\mathcal{C}_X/_\sim,$ the set of all equivalence classes of the set of Cauchy sequences in $X$ under relation $\sim.$ We will use the notation $[\mathbf{x}]$ to denote the equivalence class of $\mathbf{x}\in \mathcal{C}_X.$

Part II: We define $\rho:\mathcal{X}\rightarrow\mathbb{R}$ as $$\rho\big([\mathbf{a}],[\mathbf{b}]\big)=\hat{\rho}(\mathbf{a},\mathbf{b})\text{ for all }[\mathbf{a}],[\mathbf{b}]\in\mathcal{X}$$

Note that $\rho$ is well-defined. Indeed, Lemma-1 guarantees existence and if $[\mathbf{a}]=[\mathbf{a’}]$ and $[\mathbf{b}]=[\mathbf{b’}],$ meaning $\mathbf{a}\sim \mathbf{a’}$ and $\mathbf{b}\sim \mathbf{b’}$, then Lemma-3 guarantees that $\hat{\rho}(\mathbf{a},\mathbf{b})=\hat{\rho}(\mathbf{a’},\mathbf{b’}).$ Now, the fact that $\rho$ is a valid metric on $\mathcal{X}$ follows trivially from definition and basis properties of limits. Note the reason we chose the equivalence class of Cauchy sequences instead of simply choosing the set of all Cauchy sequences: it is to satisfy the property of metrics that “unequal points have positive distance.”

Part III: We define $\iota:X\rightarrow\mathcal{X}$ as $\iota(x)=[(a_n)_{n=1}^\infty]$ where $a_n=x$ for all $n\in\mathbb{N}.$ Obviously, this $[a_n)_{n=1}^\infty]\in \mathcal{X}$ since a sequence is same terms is automatically Cauchy. Further, for any $x_1,x_2\in X,$ we have $\rho\big(\iota(x_1),\iota(x_2)\big)=\lim_{n\to\infty}d(x_1,x_2)=d(x_1,x_2).$ So $\iota$ is, indeed, an isometry.

Part IV: Consider any $[\mathbf{x}]=[(a_n)_{n=1}^\infty]\in \mathcal{X}$ and any $\epsilon>0.$ By definition of Cauchy sequences, there exists an $N\in\mathbb{N}$ such that $d(a_N,a_n)<\epsilon/2$ for all $n\ge N.$ Hence, $$\rho\big(\iota(a_N),[\mathbf{x}]\big)=\lim_{n\to\infty}d(a_N,a_n)\le \epsilon/2<\epsilon$$

Thus, $\iota(X)$ is dense in $\mathcal{X}.$

Part V: Let $([\mathbf{x}_n])_{n=1}^\infty\subset\mathcal{X}$ be a Cauchy sequence. Using the above property of $\iota,$ for every $n\in\mathbb{N},$ there exists some $a_n\in X$ such that $\rho\big(\iota(a_n),[\mathbf{x}_n]\big)<1/n.$ We claim that $\mathbf{a}=(a_n)_{n=1}^\infty$ is Cauchy in $X.$

Consider any $\epsilon>0.$ There exists an $N\in\mathbb{N}$ such that $\rho\big([\mathbf{x}_n],[\mathbf{x}_m]\big)<\epsilon/3$ for all $n,m\ge N.$ Hence, for any $n,m\ge\max\{N,3/\epsilon\},$ we have, using the above property of $\iota$ and two applications of the triangle inequality, $$d(a_n,a_m)=\rho\big(\iota(a_n),\iota(a_m)\big)\le \rho\big(\iota(a_n),[\mathbf{x}_n]\big)+\rho\big([\mathbf{x}_n],[\mathbf{x}_m]\big)+\rho\big([\mathbf{x}_m],\iota(a_m)\big)<1/n+\epsilon/3+1/m\le \epsilon$$

Hence, $\mathbf{a}=(a_n)_{n=1}^\infty$ is, indeed, Cauchy in $X.$ Now, we will show that $(\iota(a_n))_{n=1}^\infty$ converges to $[\mathbf{a}]$ in $\mathcal{X}.$ For any $\epsilon>0,$ there exists an $N\in\mathbb{N}$ such that $d(a_n,a_m)<\epsilon/2$ for all $n,m\ge N.$ Hence, for all $n\ge N,$ we have $$\rho\big(\iota(a_n),[\mathbf{a}]\big)=\lim_{m\to\infty}d(a_n,a_m)\le\epsilon/2<\epsilon$$

This shows convergence of $(\iota(a_n))_{n=1}^\infty$. Finally, we will show that $([\mathbf{x}_n])_{n=1}^\infty$ also converges to $[\mathbf{a}].$ Indeed, for any $\epsilon>0,$ there exists an $N\in\mathbb{N}$ such that $\rho\big(\iota(a_n),[\mathbf{a}]\big)<\epsilon/2$ for all $n\ge N.$ Hence, for any $n\ge\max\{N,2/\epsilon\},$ we have $$\rho\big([\mathbf{x}_n],[\mathbf{a}]\big)\le \rho\big([\mathbf{x}_n],\iota(a_n)\big)+\rho\big(\iota(a_n),[\mathbf{a}]\big)<1/n+\epsilon/2\le\epsilon$$

This shows convergence of $([\mathbf{x}_n])_{n=1}^\infty.$ Since, $([\mathbf{x}_n])_{n=1}^\infty$ is arbitrary, we have essentially shown that all Cauchy sequences in $\mathcal X$ are convergent. So $(\mathcal X,\rho)$ is a complete metric space.

These five parts together show the existence of a completion.

Previous
Previous

Lemma for Fubini’s Theorem

Next
Next

Simple Proof of Intermediate Value Theorem