Related to this question, I'm having trouble understanding the construction of the completion of a topological group with metric structure. In particular, under what conditions is the completion also a topological group?
Let $(X,+)$ be an abelian group and $d$ a metric on $X$. Denote by $\hat{X}$ the completion of $X$ with respect to the metric $d$. Suppose $a,b \in \hat{X}$, then these elements are equivalence classes of Cauchy sequences in $X$. Notation wise, $a=[a_n]$ and $b=[b_n]$ for Cauchy sequences $\{a_n\}$ and $\{b_n\}$ in $X$. This is where my understanding gets fuzzy...
Now we define a group operation in $\hat{X}$, let $a+b$ be the equivalence class $[a_n+b_n]$, where $\{a_n+b_n\}$ is the term-wise sum of the two sequences $\{a_n\}$ and $\{b_n\}$. The first thing you'd want to check is that this new sequence is indeed Cauchy, but this isn't guaranteed by the assumption that $+$ is continuous with respect to $d$. If you can show this, then the proof that the new operation is well-defined is basically the same. If $d$ is induced by a norm (or has any of the other conditions from my other question), I think things go through. But I can't find a statement of such a theorem.
This PlanetMath page defines the group operation in $\hat{X}$ in a similar manner, claiming that this definition makes $\hat{X}$ into a topological group. But the conditions are not "stated precisely". So what assumption must be made about the relation of $d$ and $+$ to ensure that the $\hat{X}$ is a topological group? I feel like I'm not understanding something. Any references would be helpful, too. I looked in Bourbaki, but the proof is too general; I feel it would be helpful to understand things in the case that $X$ is a metric space.