Papapetros Vaggelis wrote:

Let \(\displaystyle{\left(X,d\right)}\) be a metric space and \(\displaystyle{D}\) a dense subset of \(\displaystyle{X}\) having the

property : Each \(\displaystyle{\rm{Cauchy}}\) sequence of elements of \(\displaystyle{D}\) converges to \(\displaystyle{X}\) .

Prove that the metric space \(\displaystyle{\left(X,d\right)}\) is complete.

**Comment** : The metric space \(\displaystyle{\left(\mathbb{R},|\cdot|\right)}\) with \(\displaystyle{D=\mathbb{Q}}\) is an example of such space.

Pick a Cauchy sequence say \( x_n \). Since the set \(\displaystyle{D}\) is dense there exist for every \( n \) an element \( y_n \in D \) such that \( d(x_n, y_n)<\frac{1}{n} \). Using the relation:

$$d(y_m, y_n)\leq d(y_m, x_m) + d(x_m, x_n) + d(x_n, y_n)$$

we can easily see that \( y_n \) is Cauchy. Hence converges. Let \( x \in X\) be its limit. Since:

$$0\leq d(x_n, y) \leq d(x_n, y_n) +d(y_n, y)$$

we easily see that \( x_n \) converges to \( y \), completing the proof.