Extending continuous functions to the completion (metric spaces). I'm am trying to fill in an omitted detail from my lecture notes on Functional Analysis.
Let $f:X\to Y$, where $X$ and $Y$ are metric spaces, with $Y$ complete. Suppose $f$ maps Cauchy sequences to Cauchy sequences (so is continuous in particular). Denote by $\mathrm{Comp}(X)$ the completion of $X$. Since $X$ densely embeds into $\mathrm{comp}(X)$ (and metric spaces are Hausdorff), there is at most one continuous extension of $f$ to $\mathrm{comp}(X)$, which we denote also by $f$. Existence is what's bothering me. Presumably for $[(a_n)]\in\mathrm{comp}(X)$, one defines $$f([a_n]):=\lim_{n\to \infty}f(a_n).$$ Is it obvious that (1) this extension is well-defined and (2) it's a continuous function? 
One defines the metric $d$ on the completion by $d([a_n], [b_n]):=\lim_n d(a_n, b_n)$.
Many thanks!
 A: If $(a_n)$ is a Cauchy sequence in $X$, then it is clear that $fa_\infty=\lim_{n\to\infty}f(a_n)$ exists in $Y$, because $\big(f(a_n)\big)$ is Cauchy in $Y$ and $Y$ is complete.

Now, suppose $(a_n)$ and $(\alpha_n)$ belong to the same equivalence class in the completion of $X$.

Claim (consistency): In the obvious notation, $fa_\infty=f\alpha_\infty$.

Proof: We will equivalently show that $d_Y(fa_\infty,f\alpha_\infty)=0$.
Consider $d_Y\big(f(a_n),f(\alpha_n)\big)$.
By continuity, of $d_Y$, we have that
$$\lim_{n\to\infty}d_Y\big(f(a_n),f(\alpha_n)\big)=d_Y(fa_\infty,f\alpha_\infty).$$
Hence, it suffices to show that the limit above is $0$, ie:
$$\forall\epsilon>0,\,\,\exists n\in\mathbb{N},\,\,\forall m\geq n,\,\,d_Y\big(f(a_m),f(\alpha_m)\big)\leq \epsilon\tag{$*$}.$$
To that end, consider the sequence defined as follows: for all $k\in\mathbb{N}$, $b_{2k+1}=a_k$ and $b_{2k}=\alpha_k$.
We will show that $(b_n)$ is Cauchy.
Since $f$ is Cauchy-preserving, this will imply $(*)$.
Indeed, since $(a_n)$ and $(\alpha_n)$ are Cauchy and in the same equivalence class, we have that
\begin{align}
&\forall\stackrel{\sim}{\epsilon}>0,&&\exists n_0\in\mathbb{N},&&\forall m,\stackrel{\sim}{m}\,\geq n_0,&&d_X\left(a_m,a_{\stackrel{\sim}{m}}\right)\leq \stackrel{\sim}{\epsilon}\tag{1}\\
&\forall\stackrel{\sim}{\epsilon}>0,\,&&\exists n_1\in\mathbb{N},&&\forall m,\stackrel{\sim}{m}\,\geq n_1,&&d_X\left(\alpha_m,\alpha_{\stackrel{\sim}{m}}\right)\leq \stackrel{\sim}{\epsilon}\tag{2}\\
&\forall\stackrel{\sim}{\epsilon}>0,&&\exists n_2\in\mathbb{N},&&\forall m\geq n_2,&&d_X\left(a_m,\alpha_{m}\right)\leq \stackrel{\sim}{\epsilon}\tag{3}\\
\end{align}
Fix $\epsilon>0$.
In each of $(1)$, $(2)$ and $(3)$, take $\stackrel{\sim}{\epsilon}=\epsilon/2$ in the statement, and let $n$ be the maximum of the corresponding $n_0$, $n_1$ and $n_2$.
Now, if $m,\stackrel{\sim}{m}\,\geq 2n+1$ there are three cases for $d_X(b_m,b_{\stackrel{\sim}{m}})$


*

*$m$ and $\stackrel{\sim}{m}$ are both odd.
In this case, $d_X(b_m,b_{\stackrel{\sim}{m}})$ has the form $d_X(a_k,a_{k+t})$ for some $t\geq0$ and some $k\geq n\geq n_0$.
Via $(1)$, this implies $d_X(b_m,b_{\stackrel{\sim}{m}})\leq \epsilon/2\leq \epsilon$.

*$m$ and $\stackrel{\sim}{m}$ are both even.
This is similar to the previous case.

*$m$ and $\stackrel{\sim}{m}$ are different parities.
For this case, let's assume that $m\leq \stackrel{\sim}{m}$ and that $m$ is even; the other situations can be dealt with in similar fashion.
Under these assumptions, $d_X(b_m,b_{\stackrel{\sim}{m}})$ has the form $d_X(a_k,\alpha_{k+t})$ for some $t\geq 0$ and $k\geq n$.
Then:
$$d_X(b_m,b_{\stackrel{\sim}{m}})\leq \underbrace{d_X(a_k,a_{k+t})}_{\text{I}}+\underbrace{d_X(a_{k+t},\alpha_{k+t})}_{\text{II}}$$
$\text{I}$ is $\leq \epsilon/2$ via $(1)$, while $\text{II}$ is $\leq \epsilon/2$ via $(3)$.
It follows that $d_X(b_m,b_{\stackrel{\sim}{m}})\leq \epsilon$, which completes the proof. $\square$

By the claim, the extension $\overline{f}$ of $f$ is well-defined.
I might show $\overline{f}$ is continuous later.
