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.

-
Do you assume that the metric is invariant under the group operation? –  Mark Nov 29 '11 at 15:37
That was basically what I was ruling out when I said I understand how this all works if $d$ comes from a norm. In this case, we really only need the fact that this implies $d$ is translation invariant. (Like in my other question.) –  dls Nov 29 '11 at 16:52
Also, you actually asked for the case when $(X,+)$ is an abelian topological group, in which case no assumptions are needed and $\hat{X}$ is again an abelian topological group for free! –  Bogdan Aug 8 '13 at 22:09

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.

-
I think this may be a dumb question, but here goes. If $+ : X \times X \rightarrow X$ is uniformly continuous, that means for every $\epsilon$-ball in $X$ we can find a $\delta$-ball in $X \times X$. You're then saying this gives you $\delta$-balls in $X$. How does this work? Aren't you assuming something about the metric on the product? Like that it comes from a norm? Couldn't you come up with a metric on $X \times X$ which isn't compatible in this manner with the original metric on $X$? –  dls Nov 29 '11 at 16:49
You are correct that there could be many metrics on $X\times X$. I was assuming a "reasonable" metric on the product, such as those described in the wikipedia product metric page. –  Noah Stein Nov 29 '11 at 17:03
I think this point was a big sticking point in my thinking about this problem over the last few days. So in this example: $X=\mathbb{Q}$ under addition and $d=|\arctan(x)-\arctan(y)|$, I don't think the addition is uniformly continuous with respect to $d$. Have to think about it a little more. Thanks! –  dls Nov 29 '11 at 19:59
@Noah: If you take on $I$ the metric inherited from $\mathbb{R}$ (via $f$) then you get a complete metric space structure on $I$, so the completion will simply be $I$. –  Mark Nov 29 '11 at 21:20
@MarkSchwarzmann: Sorry for the confusion. My intent was that the group structure be pulled back, but the metric be the standard metric, not the one obtained by pullback. –  Noah Stein Nov 29 '11 at 23:28