TITLE: Compact connected Lie groups isomorphic as groups and manifolds
QUESTION [8 upvotes]: Let $G_1$ and $G_2$ be compact connected (not necessarily semi-simple) Lie groups. Assume that the underlying smooth manifolds of $G_1$ and $G_2$ are diffeomorphic and that the underlying abstract groups are isomorphic. Is it true that $G_1$ and $G_2$ are isomorphic as topological groups? I believe that by Scheerer's theorem we know that universal covers are isomorphic. 
P.S.: it is true that there has been a lot of variations of this question on this site but I believe this exact question has not been answered yet:

Compact connected Lie groups may have diffeomorphic underlying smooth manifolds, yet fail to be isomorphic as topological groups
There is a unique compact Lie group whose underlying smooth manifold is diffeomorphic to 3-dimensional real projective space
There exist many compact connected topological groups whose underlying abstract group is isomorphic to the torus but underlying space is not homeomorphic to the torus
There exist non-compact connected Lie groups whose underlying smooth manifolds are diffeomorphic and whose underlying abstract groups are isomorphic

EDIT: Let us assume that we have proved that if two connected compact Lie groups are abstractly isomorphic, they are isomorphic (this is achieved in YCor's answer). I think the following argument extends this to general compact Lie groups. 
Assume we have two compact Lie groups $G_1$, $G_2$ that are abstractly isomorphic. Note that in a compact Lie group, every subgroup of finite index is open (and open subgroups are closed), so every subgroup of finite index is a union of some connected components. Therefore, the identity component of a compact Lie group can be characterized as the subgroup of maximum finite index (which happens to be normal) and the group of connected components can be characterized as the maximum finite quotient. Therefore, from the abstract isomorphism class of $G_1$ and $G_2$ we recover extensions of Lie groups
$$
0\rightarrow (G_1)^0\rightarrow G_1\rightarrow \pi_0 G_1\rightarrow 0,
$$
$$
0\rightarrow (G_2)^0\rightarrow G_2\rightarrow \pi_0 G_2\rightarrow 0,
$$
which are equivalent when considered as extensions of abstract groups (strictly speaking, we only know that there is an abstract isomorphism $G_1\rightarrow G_2$ and this by itself does not mean that the extensions are equivalent; but the above algebraic characterization of the identity component implies that any isomorphism $G_1\rightarrow G_2$ must send $(G_1)^0$ to $(G_2)^0$). We want to prove that these extensions are equivalent as extensions of Lie groups. 
If we prove that for a connected compact Lie group $N$ and a finite Lie group $H$, the forgetful map from the set of equivalence classes of extensions of Lie groups to the set of equivalence classes of extensions of abstract groups $\mathrm{Ext}_{Lie}(H, N)\rightarrow \mathrm{Ext}_{Grp}(H, N)$ is an injection, we win. An extension of Lie groups 
$$
0\rightarrow N\rightarrow G\rightarrow H\rightarrow 0
$$
defines a morphism of abstract groups $s:H\rightarrow \mathrm{OutAut}(N)$ called characteristic homomorphism (here $\mathrm{OutAut}(N)$ is the quotient of the group of smooth automorphisms of $N$ by the group of inner automorphisms, considered as the subgroup of $\mathrm{AbOutAut}(N)$, the group of abstract outer automorphisms of $N$). If two extensions are equivalent as extensions of abstract groups, they define the same characteristic homomorphisms so we have partitions 
$$
\mathrm{Ext}_{Lie}(H, N)=\bigcup_{s\in \mathrm{Hom}(H, \mathrm{OutAut}(N))} \mathrm{Ext}_{Lie}(H, N)_s, \qquad \mathrm{Ext}_{Grp}(H, N)=\bigcup_{s\in \mathrm{Hom}(H, \mathrm{AbOutAut}(N))} \mathrm{Ext}_{Grp}(H, N)_s
$$
compatible with the forgetful map. 
Now let $Z(N)$ denote the center of $N$ considered as an $H$-module via characteristic homomorphism. Theorem 18.1.13 (c) of "Structure and geometry of Lie groups" says that if $\mathrm{Ext}_{Lie}(H, N)_s$ is non-empty, then there is a bijection $H^2(H, Z(N))\rightarrow \mathrm{Ext}_{Lie}(H, N)_s$. Theorem 8.8. of MacLane's "Homology" says that if $\mathrm{Ext}_{Grp}(H, N)_s$ is non-empty, then there is a bijection $H^2(H, Z(N))\rightarrow \mathrm{Ext}_{Grp}(H, N)_s$. An inspection of the two proofs shows that these bijections are in fact compatible with the map $\mathrm{Ext}_{Lie}(H, N)_s\rightarrow\mathrm{Ext}_{Grp}(H, N)_s$, i.e. the 3 maps form a commutative triangle. Hence the map $\mathrm{Ext}_{Lie}(H, N)_s\rightarrow\mathrm{Ext}_{Grp}(H, N)_s$, being a composition of two bijections, is a bijection. Therefore, the forgetful map $\mathrm{Ext}_{Lie}(H, N)\rightarrow\mathrm{Ext}_{Grp}(H, N)$ is an injection (and it fails to be a surjection precisely because $\mathrm{OutAut}(N)\subsetneq \mathrm{AbOutAut}(N)$ for general compact connected Lie group).

REPLY [5 votes]: Yes. It's even true under the weaker assumption that $G_1,G_2$ are isomorphic abstract groups.
First the semisimple case: if two compact semisimple Lie groups are abstractly isomorphic, then they are isomorphic topological groups; indeed every abstract isomorphism is continuous (E. Cartan and van der Waerden).
Next; the abelian case: an abelian compact Lie group is topologically isomorphic to $(\mathbf{R}/\mathbf{Z})^d$ for some $d$, and the subgroup of elements of order dividing $2$ is isomorphic to $(\mathbf{Z}/2\mathbf{Z})^d$, so the abstract isomorphism class retrieves $d$. Yet unlike in the semisimple case, there are plenty of discontinuous group automorphisms.
If $G$ is an arbitrary compact connected Lie group, then we have $G=SZ$, where $S=[G,G]$ is its derived subgroup, $Z$ is the center. In particular, the abstract isomorphism class of $G$ retrieves the topological group isomorphism class of both $S$ and $Z$, and also the isomorphism class of the finite group $S\cap Z$. 
Still this is not enough. We need to prove more precise results in the semisimple and abelian cases, involving a finite subgroup.
We consider pairs $(G,H)$, $G$ being topological group and $H$ a subgroup. A abstract isomorphism $(G,H)\to (G',H')$ is an group isomorphism $f:G\to G'$ mapping $H$ onto $H'$; it is called a topological isomorphism if $f$ is a homeomorphism.
If $G,G'$ are semisimple connected compact Lie groups, then any abstract isomorphism $(G,H)\to (G',H')$ is topological: this follows from automatic continuity mentioned above.
Now let $(G,H),(G',H')$ be abstractly isomorphic pairs, with $G,G'$ abelian compact connected Lie groups, and $H,H'$ finite subgroups; I claim that they're topologically isomorphic. By the above abelian case, we can suppose that $G=G'=(\mathbf{R}/\mathbf{Z})^d$. So $H,H'\subset(\mathbf{Q}/\mathbf{Z})^d$; hence there is an automorphism of $(\mathbf{Q}/\mathbf{Z})^d$ mapping $H$ onto $H'$. That is, an element $f$ of $\mathrm{GL}_d(\widehat{\mathbf{Z}})$ with $f(H)=H'$. It is not hard (for $d\ge 1$, which we can suppose) to check that the determinant map is surjective on the stabilizer of $H$. Hence, we can choose $f\in\mathrm{SL}_d(\widehat{\mathbf{Z}})$. Since $f\in\mathrm{SL}_d(\mathbf{Z})$ is dense in $\mathrm{SL}_d(\widehat{\mathbf{Z}})$, and since the set of $f$ with the above property is open, we can choose $f'\in\mathrm{SL}_d(\mathbf{Z})$ such that $f$ coincides with $f'$ on $H$. Hence, $f$ extends to a topological automorphism of $(\mathbf{R}/\mathbf{Z})^d$.
Let's now conclude. Let $f:G\to G'$ be an abstract isomorphism between connected compact Lie groups. Write $G=SZ$ and $G'=S'Z'$ as above, and $H=S\cap Z$, $H'=S'\cap Z$. Then $f(S)=S'$ and $f$ induces a topological isomorphism $S\to S'$. 
Also $f$ induces an abstract isomorphism $(Z,H)\to (Z',H')$. By the above, there exists a topological isomorphism $(Z,H)\to (Z',H)$ coinciding with $f$ on $H$. Then define a homomorphism $u:S\times Z\to G'$, $(s,z)\mapsto f(s)g(z)$; it is continuous. Then, since $g=f$ on $H$, $u$ factors through a continuous homomorphism $G\to G'$, mapping $sz$ to $f(s)g(z)$ for $s\in S$, $z\in Z$, which is readily seen to be a group isomorphism, and we are done.