Does the short exact sequence $0\mapsto \mathbb{Z}^k\mapsto \Gamma\mapsto \mathbb{Z}^\ell\mapsto 0$ split? I've seen in Nonsplit extension of $\mathbb{Z}$ by itself that every short exact sequence of the form $0\mapsto \mathbb{Z}\mapsto G\mapsto \mathbb{Z}\mapsto 0$ splits.
I wonder if this is still valid if we change the exact sequence by $$0\mapsto \mathbb{Z}^k\mapsto \Gamma\mapsto \mathbb{Z}^\ell\mapsto0$$ where $\Gamma$ is a discrete group.
Thanks in advance
 A: A counterexample is the following short exact sequence:
$0 \rightarrow \mathbb{Z} \rightarrow T \rightarrow \mathbb{Z}^2 \rightarrow 0$. Where $T$ is the group of upper triangular matrices in $\text{GL}_3(\mathbb{R})$ with unit diagonals.
The injection is defined by the formula $z\mapsto \begin{pmatrix} 1 &0&z\\  0 &1 &0 \\ 0 &0&1\end{pmatrix}$.
The surjective morphism is defined by the formula $\begin{pmatrix} 1 &a&c\\0&1&b\\0&0&1\end{pmatrix} \mapsto (a, b)$.
The image of the injection and the kernel of the surjection is the subgroup generated by $\begin{pmatrix} 1 & 0 & 1\\ 0 & 1 & 0 \\ 0 & 0 & 1\end{pmatrix}$. This shows that this is a short exact sequence.
However the sequence is clearly not split because $T$ is not isomorphic to the product of $\mathbb{Z}$ and $\mathbb{Z}^2$ because $T$ is not abelian.
A: For abelian groups, The proof is the same than for vector spaces.
Choose a $\bf Z$ base of the kernel $e_1,..,e_k$ and a family of vectors $f_1,...,f_l$ which projects onto a base $f'_1,...,f'_l$of $\bf Z ^l$. We wil prove that $(e_1,..e_k, f_1,...f_l)$ is a $\bf Z$ base of $\Gamma$, ie the obvious map $\bf Z^{k+l}$ $\to \Gamma$ is an isomorphism.
Let $x\in \Gamma$; then we write $\pi (x)= \sum y_i f'_i$, so that $x-\sum y_i f_i$ is in the kernel, and there exists $x_1,..x_k$ so that $x= \sum x_i e_i +\sum y_i f_i$.
To check that we have a $\bf Z$ base, assume $x=0$. By projecting and using that $f'_i$, we see that $y_i=0$, and using that $e_i$ is a base of the kernel, we see that $x_i=0$.
But for the Heisenberg group,(see https://en.wikipedia.org/wiki/Heisenberg_group), the sequence do not split. This groupe is the group of upper triangular $(3,3)$ matrices with 1 on the diagonal and coefficients in $\bf Z$.
