Completion of Topological Group with Metric 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.
 A: Extension is possible with uniform continuity
If $(X,+)$ is a topological group and $+:X\times X\to X$ is uniformly continuous, then a topological group structure is induced on the completion.  To see this we must first show that uniform continuity guarantees that if $a_n$ and $b_n$ are Cauchy then so is $a_n + b_n$.
Choose any $\epsilon>0$.  By uniform continuity, there is a $\delta>0$ so if $d(x,x')<\delta$ and $d(y,y')<\delta$ then $d(x+y,x'+y')<\epsilon$.  Since $a_n$ and $b_n$ are Cauchy we can take $N$ large enough that $d(a_m,a_n)<\delta$ and $d(b_m,b_n)<\delta$ for all $m,n>N$.  Then $d(a_m+b_m,a_n+b_n)<\epsilon$ for all $m,n>N$.  Since $\epsilon>0$ was arbitrary, $a_n+b_n$ is Cauchy.
This means $+:X\times X\to X$ extends to a  well-defined map from pairs of Cauchy sequences on $X$ to Cauchy sequences on $X$.  Similar arguments show that equivalent Cauchy sequences are mapped to equivalent Cauchy sequences, so $+$ extends to a map $\hat{+}:\hat{X}\times\hat{X}\to\hat{X}$ on the completion, and that this map is continuous.  The algebraic identities satisfied by $+$ extend to $\hat{+}$ by applying these identities to the definition of $\hat{+}$.  In particular $(\hat{X},\hat{+})$ is a topological group, abelian if $(X,+)$ was.
Extension is not possible in general
Some additional condition on $+$ beyond continuity is indeed needed.  To see this, pick any topological group structure $(I,\oplus)$ on $I = (-1,1)$ with the standard metric.  For example, let $f: I\to\mathbb{R}$ be a homeomorphism, such as $f(x) = \tan(\frac{\pi}{2}x)$, and define a $\oplus$ by pulling back the standard additive structure $(\mathbb{R},+)$ along $f$:
\[
a\oplus b = f^{-1}(f(a)+f(b)).
\]
Note that we have defined the metric on $I$ to be the standard one inherited as a subspace of $\mathbb{R}$, not the one induced by pulling back along $f$.
A topological group structure $(I,\oplus)$ does not extend to the completion $\hat{I} = [-1,1]$.  If it did, $I$ would be a subgroup of $\hat{I}$ by definition of "extend".  Then $\hat{I}$ would be partitioned into cosets of $I$, hence so would $\hat{I}\setminus I$, but $\hat{I}\setminus I = \{-1,1\}$ has a finite nonzero number of points and so cannot be partitioned into subsets of size continuum.
