In a recent post on residually finite groups, I talked a bit about Hopfian groups. A group $G$ is Hopfian if every surjective group homomorphism $G\to G$ is an isomorphism. This concept connected back to residually finite groups because if a group $G$ is residually finite and finitely generated, then it is Hopfian. A free group on infinitely many generators is an example of a residually finite group that is not Hopfian.

Are there examples of finitely generated groups that are not Hopfian? Such an example would then of course give us an example of a group that is not residually finite.

In this post, we'll see an example of a group that is finitely presented and not Hopfian. Not only that, but I promise the construction is actually not even scary, unlike those finitely presented groups with unsolvable word problem.
This particular example was given in the following paper:

This paper is motivated by automatic groups, which have a peculiar so-called automatic structure that is designed to to solve the word problem. The example given in this paper is also automatic so it gives an example of an automatic group that is not hopfian and not residually finite.

To understand the example, it helps to understand HNN extensions. The HNN extension is an awesome construction that allows you to come up with all sorts of crazy groups. To motivate them, let's consider the abelian group $\Z\times \Z$. Both the first and second factor in this product are isomorphic to $\Z$, the free group on one generator. Because $\Z\times \Z$ is abelian, we see that these factors cannot be conjugate. But what if we want them to be conjugate? Then we can introduce a new generator that conjugates one to the other. Specifically, we start with the presentation
$$\Z\times \Z \cong \langle a,b ~|~ ab = ba \rangle.$$ We add a new generator and a relation as so:
$$G^* \cong \langle a,b,t ~|~ ab = ba, t^{-1}at = b\rangle.$$ This is the HNN extension of $\Z\times \Z$ making the first factor conjugate to the second. In general, given a group $G$ and an isomorphism $\varphi:A\to B$ between two subgroups of $G$, we can define the HNN extension
$$G^* = \langle G,t ~|~ t^{-1}a_it = \varphi(a_i) \rangle.$$ This notation means that we take all the generators and relations in $G$, add the generator $t$ and the relation $t^{-1}a_i t = \varphi(a_i)$ where $\{a_i\}$ is the family of all elements in the subgroup $A$. In fact, it actually just suffices to add additional relations for each generator of $A$, like we did in the specific example of $\Z\times \Z$.

Britton's Lemma

I'd like to go back to our specific example:
$$G^* \cong \langle a,b,t ~|~ ab = ba, t^{-1}at = b\rangle.$$ This group is an HNN extension of $\Z\times \Z$ via the isomorphism of the first factor with the second factor. Question: is this group noncommutative? Well, on the surface it does seem to be so because there is nothing connecting $t$ with the rest of the elements of the group except that $t^{-1}at = b$, so this suggests that $ta$ is different than $at$. But what if adding that relation accidentally made $b$ trivial? Even the nearly-evident $ta\not= at$ still requires a proof of some kind.

Part of the problem with presented groups is that there is the pesky equivalence relation on words that makes it hard to determine whether a word really represents the identity. For HNN extensions, there is a handy result that formalizes our intuition that surely $ta\not= at$ and covers even more complicated scenarios, and it's called Britton's lemma. Britton's lemma is used so frequently in combinatorial group theory that it's a good idea to get to know it.

To state Britton's lemma, I'd like to first go back to the general idea of an HNN extension. I'd like to start with a group $G$ and an arbitrary family $\varphi_i:A_i\to B_i$ of isomorphisms between pairs $(A_i,B_i)$ of subgroups of $G$. Then the HNN extension of $G$ with regard to this family of isomorphisms is the group given by the presentation
$$G^* \cong \langle G, \{t_i\} ~|~ \{ t_i^{-1}a_it_i = \varphi_i(a_i)\}_{i,a_i\in A_i} \rangle.$$ So, we start out with all the generators and relations of $G$ and add a bunch of new ones of the form $t_i^{-1}a_it_i = \varphi(a_i)$ for each $i$ and each $a_i\in A_i$. Most group theory texts prefer to avoid notation and just talk about one isomorphism, but in application it's much better to have the statement for arbitrarily many isomorphisms. Now we can state Britton's lemma:

Theorem. (Britton's Lemma) Suppose the sequence of elements
$$g_0,t_{n_1}^{\epsilon_1}, g_1, \dots t_{n_k}^{\epsilon_k}, g_k$$ with $k \geq 1$ and $\epsilon_i\in \{\pm 1\}$ has no consecutive subsequence of the form $t_i^{-1}at_i$ with $a\in A_i$ or $t_ibt_i^{-1}$ with $b\in B_i$. Then the element
$$g_0t_{n_1}^{\epsilon_1}g_1\cdots t_{n_k}^{\epsilon_k}g_k$$ does not represent the identity element in the HNN extension $G^*$.

That's a mouthful! Let's break it down. Any element in $G^*$ can be written as a product of the form appearing in Britton's lemma. If we assume that there are no obvious reductions that can be done via the relations that we added to make the HNN extension, then you can't reduce the element to the identity. Pretty intuitive right? Still, the proof of Britton's lemma involves proving that you can actually write every element in a certain "normal form" like above and with coset representatives. That's how a lot of theorems work in combinatorial group theory, actually.

Britton's lemma is a reassurance that our intuition with an HNN presentation was correct. Moreover, there is an immediate consequence:

Corollary. Let $G$ be a group and $G^*$ any HNN extension. Then the obvious map $G\to G^*$ is an injection.

Why is that? If $a\in G$ then the element $a$ certainly can be written in a way satisfying the hypotheses of Britton's lemma, so it can't be trivial in $G^*$. So in particular, the group given by
$$G^* \cong \langle a,b,t ~|~ ab = ba, t^{-1}at = b\rangle$$ is a nonabelian group containing $\Z\times \Z$ as a subgroup and such that the first factor of $\Z\times \Z$ is conjugate to the second via an element of $G^*$. In fact, in general, an HNN extension is initial with regard to this property.

Wise's Example

Wise's example is very similar to the extension of $\Z\times \Z$ we already constructed, but instead it is given by the following presentation:
$$G^* = \langle a,b,s,t ~|~ ab = ba, s^{-1}as = (ab)^2, t^{-1}bt = (ab)^2\rangle.$$ This group $G^*$ is an HNN extension of $\Z\times \Z$ along two isomorphisms: the first factor and the second factor with $2\Z\times 2\Z$. This example is a clever use of Britton's lemma. Let's see how. As we mentioned, I promised that I'd give you an example of a finitely-presented group that is not Hopfian. This $G^*$ is just such an example!

Proof. By definition, we must construct an endomorphism $f:G\to G$ that is surjective but not injective. Define $f$ on generators by

$f(s) = s$

$f(t) = t$

$f(a) = a^2$

$f(b) = b^2$

Direct computation shows that $f(sabs^{-1}) = a$ and $f(tabt^{-1}) = b$ and so $f$ is indeed surjective. By these computations however, the commutator $[sabs^{-1},tabt^{-1}]$ is sent to $[a,b]$, which is the identity because $a$ and $b$ commute. However, since $ab$ is neither in the subgroup generated by $a$ nor the subgroup generated by $b$, the commutator $[sabs^{-1},tabt^{-1}]$ itself is not the identity by Britton's lemma. Thus, $f$ is not injective. QED

It's clear that using this example, one could construct all sorts of non-Hopfian finitely presented groups. And, as we have mentioned, this also gives examples of a bunch of different finitely presented groups that are not residually finite.