$G_n$ 's mutually non-isomorphic

Yes. For a group $G$, define $a(G)$ as the greatest $k$ such that $\mathbf{Z}^k$ embeds as a subgroup of $G$.

Then $a(G_n)=n+1$ for all $n\ge 0$. Thus the $G_n$, for $n\ge 0$, are pairwise non-isomorphic.

We have $a(G_n)\ge n+1$ since $s_k=a^{-k}ba^k$, $0\le k\le n$ generate a free abelian subgroup on $n+1$ generators. Let us show the other inequality.

We can add the $s_k$ among the generators, so a presentation is given by $$\langle a,s_0,\dots,s_n\mid a^{-1}s_ia=s_{i+1}:0\le i\le n-1,\;[s_i,s_j]=1,0\le i,j\le n\rangle.$$ This is an HNN presentation, namely the HNN extension of $\mathbf{Z}^{n+1}=\langle s_0,\dots,s_n\rangle$ for the isomorphism between two copies of $\mathbf{Z}^n$ given by $s_i\mapsto s_{i+1}$.

Let $A$ be an abelian subgroup in $G_n$ isomorphic to $\mathbf{Z}^d$. If $A$ has a loxodromic element (for the action on the Bass-Serre tree), then its axis is $A$-invariant and hence a copy of $\mathbf{Z}^{d-1}$ fixes this axis pointwise. In particular, this $\mathbf{Z}^{d-1}$ fixes an edge and hence is conjugate into the edge group, namely $\mathbf{Z}^n$. Hence $d-1\le n$, that is, $d\le n+1$. Otherwise, every element of $A$ fixes a vertex, and since $A$ is finitely generated, this implies that $A$ fixes a vertex. Hence $A$ is conjugate into a vertex group which is isomorphic to $\mathbf{Z}^{n+1}$, hence $d\le n+1$ again.

PS $G_\infty$ is the wreath product $\mathbf{Z}\wr\mathbf{Z}$: this is a motivation for studying these "approximating" groups. In the original MathSE question (linked by the OP), it is checked that the canonical quotient map (the homomorphism given by $a\mapsto a$, $b\mapsto b$) from $G_m\to G_n$ when $m<n$ is not an isomorphism.


As a complement to YCor's elegant answer, I would like to present three additional ways to prove

YCor's Statement 1. The groups $G_m$ and $G_n$ are isomorphic if and only if $m = n$.

The first method mimics YCor's but uses the theory of right-angled Artin groups (aka partially commutative groups, or graph groups) instead of Bass-Serre theory. The second is prompted by YCor's proof and consists in the computation of the cohomological dimension of $G_n$ which turns out to be $n + 1$. These two methods enable us to retrieve YCor's stronger statement

YCor's Statement 2. The maximal rank $a(G_n)$ of a free Abelian subgroup of $G_n$ is $n + 1$.

The last method is the computation of the second integral homology group of $G_n$, also called Schur multiplier. We will establish $\text{H}_2(G_n, \mathbb{Z}) \simeq \mathbb{Z}^n$, which yields, as we will see, some other benefit.

Claim 1. Let $\Gamma_n$ be the simplicial graph with vertex group $\mathbb{Z}$ and where an edge binds $i$ to $j$ if and only if $\vert i - j \vert \le n$. Then $G_n \simeq S(\Gamma_n) \rtimes \mathbb{Z}$ where $$S(\Gamma_n) \Doteq \langle s_i, \, i \in \mathbb{Z} \,\vert\, [s_i, s_j] = 1 \text{ for every } i, j \in \mathbb{Z} \text{ such that } \vert i - j \vert \le n \rangle$$ is the right-angled Artin group associated to $\Gamma_n$ and the canonical generator $a$ of $\mathbb{Z}$ acts on $S(\Gamma_n)$ as the right shift operator, i.e., $a^{-1}s_ia = s_{i + 1}$. In addition, any Abelian free subgroup of rank $ > 1$ of $G_n$ is a subgroup of $S(\Gamma_n)$. In particular, $$a(G_n) = a(S(\Gamma_n)) = n + 1.$$

Note that the group $S(\Gamma_n)$ is just the kernel $K_n$ of Jim Beck's answer to the initial MSE question.

Proof of Claim 1. Setting as YCor, $s_k \Doteq a^{-k}ba^{k}$ for all $k \in \mathbb{Z}$, we obtain in a similar way $$G_n = \langle a, s_i, \, i \in \mathbb{Z} \,\vert\, a^{-1}s_ka = s_{k + 1},\,[s_i, s_j] = 1 \text{ for all } k, i, j \in \mathbb{Z} \text{ with } \vert i - j \vert \le n \rangle.$$ Hence $G_n \simeq S(\Gamma_n) \rtimes \mathbb{Z}$. To prove the second part of the claim, we consider the basis $t_1 = \sigma_1a^{i_1}, \dots, t_k = \sigma_k a^{i_k}$, with $\sigma_i \in S(\Gamma_n) $, of a free Abelian subgroup of $G_n$ of rank $k > 1$. Replacing, if needed, $(t_1, \dots, t_k)$ by a Nielsen-equivalent $k$-tuple, we can assume that $i_j = 0$ for every $j > 1$ (use the projection $G_n \twoheadrightarrow \mathbb{Z}$ and the Euclidean algorithm in $\mathbb{Z}$). It follows from the Normal Form Theorem of right-angled Artin group [2] that $t_1$ commutes with $t_2$ only if $i_1 = 0$. Thus $\langle t_1, \dots, t_k \rangle \subset S(\Gamma_n)$. It is well-known that for $S(\Gamma)$, the right-angled Artin group associated to a graph $\Gamma$, the number $a(S(\Gamma))$ is the clique number of $\Gamma$, that is the number of vertices in a maximal complete subgraph of $\Gamma$. Obviously, this number is $n + 1$ for $\Gamma_n$.

The cohomological dimension of a group $G$ is $\text{cd}(G) = \sup \left\{ q \, \vert \, \text{H}^q(G, \mathbb{Z}) \neq 0 \right\}$ [Section VIII.2, 3] Here is our second proof of YCor's statements.

Claim 2. $\text{cd}(G_n) = n + 1$.

Proof. Given a group $G$, a subgroup $S \subset G$ and an injective homomorphism $\tau: S \rightarrow G$, let $T = \tau(S)$ and let $\tilde{G}$ denote the corresponding HNN extension, i.e., $\tilde{G} = \langle G, a \, \vert \, a^{-1}sa = \tau(s), \text{ for all } s \in S \rangle$. By [Theorem 2.12, 1], there is a Mayer-Vietoris sequence $$ \cdots \rightarrow \text{H}^{q - 1}(S, \mathbb{Z}) \mathop{\rightarrow}^{\delta} \text{H}^q(\tilde{G}, \mathbb{Z}) \mathop{\rightarrow}^{\text{res}} \text{H}^q(G,\mathbb{Z}) \mathop{\rightarrow}^{\text{res}_S - \tau^{\ast} \circ \text{res}_T} \text{H}^q(S, \mathbb{Z}) \rightarrow \cdots $$ Set $G = \langle s_0, \dots, s_n \rangle$, the free Abelian group generated by the $s_i$ for $0 \le i \le n$. Let $S = \langle s_0, \dots, s_{n - 1} \rangle$ and let $\tau: S \rightarrow G$ is the homomorphism induced by the right shift of indices. As shown by YCor, we have then $\tilde{G} = G_n$. Since $\text{cd}(\mathbb{Z}^q) = q$, inspecting the above exact sequence in dimensions $q \ge n$ yields the result.

Since $\text{cd}(H) \le \text{cd}(G)$ whenever $H$ is a subgroup of $G$ [Proposition VIII.2.4, 3], it follows from Claim 2 that $a(G_n) = n + 1$.

Let $F(a, b)$ the free group over the alphabet $\{a,b\}$ and let $r_i = [a^{-i}ba^i, b] \in F(a,b)$. We denote by $R_n$ the normal subgroup of $F(a, b)$ generated by $r_1, \dots, r_n$. By Hopf's theorem [Theorem II.5.3, 3], we have $$\text{H}_2(G_n, \mathbb{Z}) \simeq \frac{ R_n}{[F(a,b), R_n]}$$

Claim 3. The Abelian group $\text{H}_2(G_n, \mathbb{Z})$ is freely generated by the images of $r_1, \dots, r_n$. In particular, $\text{H}_2(G_n, \mathbb{Z}) \simeq \mathbb{Z}^n$.

Proof. We reuse the notation of the proof of Claim 2, in particular $\tilde{G} = G_n$. By [Theorem 2.12, 1], there is a Mayer-Vietoris sequence $$ \cdots \rightarrow \text{H}_{q}(S, \mathbb{Z}) \mathop{\rightarrow}^{\text{cores}_S - \text{cores}_T \circ \tau_{\ast}} \text{H}_q(G, \mathbb{Z}) \mathop{\rightarrow}^{\text{cores}} \text{H}_q(\tilde{G},\mathbb{Z}) \mathop{\rightarrow}^{\partial} \text{H}_{q - 1}(S, \mathbb{Z}) \rightarrow \cdots $$ Since $$S \simeq \text{H}_{1}(S, \mathbb{Z}) \mathop{\rightarrow}^{\text{cores}_S - \text{cores}_T \circ \tau_{\ast}} \text{H}_1(G, \mathbb{Z}) \simeq G$$ is given by $s_i \mapsto s_i - s_{i + 1}$ for $0 \le i \le n - 1$, this homomorphism is injective. Therefore $\text{H}_2(\tilde{G}, \mathbb{Z})$ is isomorphic to the quotient of $\text{H}_2(G, \mathbb{Z})$ by the image of $\text{H}_2(S, \mathbb{Z})$ via $\text{cores}_S - \text{cores}_T \circ \tau_{\ast}$. By [Theorem V.6.4, 3], the homomorphism $$\Lambda^2(S, \mathbb{Z}) \simeq \text{H}_{2}(S, \mathbb{Z}) \mathop{\rightarrow}^{\text{cores}_S - \text{cores}_T \circ \tau_{\ast}} \text{H}_2(G, \mathbb{Z}) \simeq \Lambda^2(G, \mathbb{Z})$$ is given by $s_i \wedge s_j \mapsto s_i \wedge s_j - s_{i + 1} \wedge s_{j + 1}$ for $0 \le i, j \le n - 1$. Thus $\text{H}_2(\tilde{G}, \mathbb{Z}) \simeq \mathbb{Z}^n$. As the images of $r_1, \dots, r_n$ generates $\text{H}_2(\tilde{G}, \mathbb{Z})$ by Hopf's formula, these elements are necessarily independent over $\mathbb{Z}$.

It follows from Claim 3 that the presentation $\langle a,b \, \vert r_i = 1,\, i = 1,\dots, n \rangle$ is minimal in the sense that removing any defining relations yields a non-isomorphic extension. Moreover, any presentation of $G_n$ must involve at least $n$ relators.

Claim 4. The cohomological dimension of $\mathbb{Z} \wr \mathbb{Z} = \langle a,b \, \vert r_i = 1,\, i \ge 1 \rangle$ is infinite and $\text{H}_2(\mathbb{Z} \wr \mathbb{Z}, \mathbb{Z})$ is a free Abelian group of infinite countable rank.

Proof. The subgroup $S$ of $\mathbb{Z} \wr \mathbb{Z}$ generated by $s_0, s_1, \dots$ is a free Abelian group of infinite countable rank, therefore $\text{cd}(\mathbb{Z} \wr \mathbb{Z}) = \infty$. The last part of the claim is obtained as in the proof of Claim 3, observing that $\mathbb{Z} \wr \mathbb{Z} \simeq S \rtimes \mathbb{Z}$ where the canonical generator of $\mathbb{Z}$ acts on $S$ by shifting indices on the right.

Eventually, we note that the answer to OP's question cannot be too simple as we have $$G_n/G_n' \simeq \mathbb{Z}^2,\quad G_n/G_n'' \simeq \mathbb{Z} \wr \mathbb{Z}$$ for every $n$. To get the second isomorphism, observe that $r_n \equiv r_1 \cdot r_1^a \cdots r_1^{a^{n - 1}} \text{mod } (F(a, b))''$.


[1] R. Bieri. "Homological dimension of discrete groups", 1981.
[2] A. Baudisch. "Subgroups of semifree groups", 1981.
[3] K. Brown. "Cohomology of groups", 1982.