Hausdorff topological group is topologically isomorphic to a subgroup closed of a Hausdorff topological group I am studying group topology and came across this exercise

Show that every Hausdorff topological group is topologically isomorphic to a subgroup
closed of a Hausdorff topological group arcwise connected and locally arcwise connected.

In this question Every Lindelöf topological group is isomorphic to a subgroup of the product of second countable topological groups. the following theorem is mentioned
Theorem: Every Hausdorff topological group G is topologically isomorphic to a subgroup of the group of isometries Is(M) of some metric space M, where Is(M) is taken with the topology of pointwise convergence.
is it possible to use this theorem to prove the exercise? otherwise, how could you prove this?
Any hints would be appreciated!
 A: Here is a solution. Although I can't imagine that it is what the instructor had in mind for the exercise, it does completely destroy the problem.
It's a standard fact that any space $X$ can be embedded as a closed subspace of a contractible space. The usual construction is to use the cone $CX=X\times[0,1]/X\times\{1\}$ and embed $X$ as $X\times\{0\}$. While this is satsifactory for many applications, it has many faults. For one thing it does not preserve subspaces. Another is that it does not preserve separation properties past $T_2$. More relevantly for us is that $CX$ need not be locally contractible, and that $CX$ carries no group structure.
Here is a construction which remedies some of these defects. In particular it will embed any (Hausdorff) topological group into a contractible, locally contractible (Hausdorff) topological group. Note that every contractible space is path-connected. In the Hausdorff case we can replace 'path' everywhere with 'arc' (this is really a consequence of the Hahn–Mazurkiewicz Theorem, although see here for some details).
Let $X$ be a space. A right-continuous step function in $X$ is a map $f:[0,1)\rightarrow X$ for which there is a finite partition $t_0=0<t_1<\dots<t_n<1=t_{n+1}$ of $[0,1)$ such that $f$ is constant on $[t_i,t_{i+1})$ for each $i=0,\dots,n$. Let $EX$ denote the set of all right-continuous step functions $[0,1)\rightarrow X$.
For $t_0<t_1\in [0,1]$, $U\subset X$ open and $\epsilon>0$ let $N_\epsilon(t_0<t_1,U)\subseteq EX$ be the set of all $f\in EX$ with the property that the set $\{t\in [t_0,t_1)\mid f(t)\not\in U\}$ has Lebesgue measure $<\epsilon$. Topologise $EX$ by giving it the subbase $\{N_\epsilon(t_0<t_1,U)\mid t_0<t_1\in[0,1),\;U\subseteq X\;\text{open},\;\epsilon>0\}$. Note that a function $f\in EX$ has a neighbourhood subbase consisting of those sets $N_\epsilon(t_0<t_1,U)$ where $f$ is constant on $[t_0,t_1)$ and $f(t_0)\in U$.
There is a function $i_X:X\rightarrow EX$ which sends a point $x\in X$ to the constant step function function at $x$.

Let $X$ be a nonempty space. Then $EX$ is contractible and locally contractible. The map $i_X:X\rightarrow EX$ is an embedding, which is closed if $X$ is Hausdorff. If $X$ is $T_i$ for some $i\in\{0,1,2,3\frac{1}{2}\}$, then $EX$ if $T_i$. If $X$ is completely regular, then $EX$ is completely regular. If $X$ is first-countable/second-countable/separable/metrisable, then $EX$ is first-countable/separable/metrisable.

It's worth recording that $EX$ does not have all good properties that $X$ may have. The space $EX$ need not be normal, paracompact, locally compact, completely metrisable, or finite-dimensional, even when $X$ is.
The construction is functorial. A map $\alpha:X\rightarrow Y$ induces $E\alpha:EX\rightarrow EY$, $f\mapsto \alpha\circ f$, which is continuous and satisfies $E\alpha \circ i_X=i_Y\circ\alpha$. It can be shown that if $\alpha$ is an embedding, then so is $E\alpha$.

For nonempty spaces $X,Y$, the natural map $E(X\times Y)\rightarrow EX\times EY$  is a homeomorphism.

Now let $G$ be a topological group. The multiplication $m:G\times G\rightarrow G$ induces a map
$$\mu:EG\times EG\cong E(G\times G)\xrightarrow{Em}EG$$
and similarly the inversion $G\rightarrow G$, $g\mapsto g^{-1}$ gives rise to $\iota:EG\rightarrow EG$. It is easy to use the functorality to see that $\mu$ furnishes $EG$ with a continuous multiplication for which $\iota$ is a continuous inverse. Moreover, with these definitions the map $i_G:G\rightarrow EG$ is a homomorphism.
In summary;

Let $G$ be a topological group. Then $G$ embeds into a contractible, locally contractible topological group $EG$. If $G$ is Hausdorff, then so is $EG$, and moreover $G$ is closed in $EG$ in this case. If $G$ is abelian/divisible/torsion/torsion-free, then so is $EG$.

So, as promised, the exercise has been completely demolished. To keep the length somewhat sane I haven't included too many details. If you would like to follow them up, the construction is due to R. Brown and S. Morris in the joint paper 
Embeddings in contractible or compact objects*, Coll. Math. 38 (1978), 213-222. Some further details are found in a follow up paper of the second author. (Edit: The topology I give above differs from that given in the reference. While I checked many of the details with my description, I have quoted many unchecked. You should believe the Brown-Morris paper before me.)
The construction has applications in topology, but was actually inspired by the group-theoretic problem. I believe it was in fact S. Hartman and J. Mycielski's paper On the imbedding of topological groups into connected topological groups Coll. Math. 5 (1958) 167-169, which inspired the construction.
In fact, given the name of the paper, I'd recommend you might like to start with this earlier paper :P.
