Proving a group decomposes into a free product with amalgamation Let $F=\left \langle a,b \right \rangle$ be the rank 2 free group. Then, a map $f:\left \langle a \right \rangle \rightarrow \left \langle b \right \rangle$ with $f(a):=b$ is an isomorphism with $\left \langle x,f(x) \right \rangle$ is a rank 2 free group for any $x\in\left\langle a\right\rangle - \{ 1\}.$
Can I generalize the situation above? More concretely, let $H\le G$ and $f:H\rightarrow G$ be an injective homomorphism with $H$ isomorphic to $f(H)$. Suppose $\left \langle h,f(h) \right \rangle$ is a rank 2 free group for any $h\in H-H\cap f(H)$ and $f(h)=h$ for $h\in H\cap f(H)$. Then, can we conclude $\left \langle H, f(H)\right\rangle$ is isomorphic to $H *_{H\cap f(H)} f(H)$?
I guess the conjecture above is not generally true when $H$ is non-cyclic. Can I find a nice counterexample?
 A: I think the following construction provides a counterexample, but I did not verify all the details. Consider the free product
$$\mathbb{Z}^2 \ast \mathbb{Z}^2 = \langle a,b \rangle \ast \langle c,d \rangle$$
and the isomorphism $f : \langle a,c \rangle \to \langle b,d \rangle$ induced by $a \mapsto d$, $c \mapsto b$. Then, for every $g \in \langle a,c \rangle$, the subgroup $\langle g, f(g) \rangle$ is isomorphic to the free product $\langle g \rangle \ast \langle f(g) \rangle$. On the other hand, the subgroup generated by $\langle a,c \rangle$ and $f(\langle a,c \rangle)= \langle b,d \rangle$ is the whole group $\mathbb{Z}^2 \ast \mathbb{Z}^2$, and is not isomorphic to $\langle a,c \rangle \ast \langle b,d \rangle \simeq \mathbb{F}_2 \ast \mathbb{F}_2 \simeq \mathbb{F}_4$.
A: This does not hold in general. For example, take $G=\langle a, b, c, d; ([a, b][c, d])^2\rangle$. By Magnus' Freiheitssatz for one-relator groups*, $F_A=\langle a, c\rangle$ and $F_B=\langle b, d\rangle$ are free of rank two, and $F_A\cap F_B=1$. This means that $H\ast_{H\cap f(H)}f(H)=H\ast f(H)$ is torsion-free (a free product with amalgamation of torsion-free groups is torsion-free). However, $G$ contains torsion (although it looks it, this is not actually obvious but was proven by Magnus in his thesis*). Therefore, the isomorphism you are after cannot hold.
Hence, we just need to prove that the conditions you require do hold: (1) that there exists an isomorphism $f: F_A\rightarrow F_B$, and that (2) $\langle h, f(h)\rangle$ is free of rank two for $h\in F_A$.


*

*The map $f: a\mapsto b, c\mapsto d$ is an isomorphism, again by Magnus' Freiheitssatz.

*That $K=\langle h, f(h)\rangle$ is free of rank two follows from B.B.Newman's spelling theorem*. This theorem implies that if no word over $h, f(h)$ contains a cyclic shift of $([a, b][c, d])^{\pm1}$ then $K$ is free. Essentially, the idea is to notice that somehow "separate" elements of $F_A$ and $F_B$ are needed to form $[a, b][c, d]$**. So, suppose some word $W$ over $h, f(h)$ contains a cyclic shift of $([a, b][c, d])^{\pm1}$. Then $W$ or $W^{-1}$ contains three of the subwords $b^{-1}ab$, $bc^{-1}d^{-1}$, $d^{-1}cd$ and $da^{-1}b^{-1}$, and three of the subwords $a^{-1}b^{-1}a$, $abc^{-1}$, $c^{-1}d^{-1}c$ and $cda^{-1}$. As no free cancellation occurs when $h$ and $f(h)$ are multiplied, having all of these subwords is impossible, as we have $U_1aV_1$ and $U_2c^{\epsilon}V_2$ (where $\epsilon=\pm1$) where $U_i, V_i\in F_B$.


This idea extends to one-relator group with torsion in general. (Condition (2) may be difficult to get to work in general, but Steve Pride proved in the 70s that two-generated subgroups of one-relator groups with torsion are either themselves one-relator groups with torsion, or are the free product of two cyclic groups.)
*see Combinatorial group theory by Magnus, Karrass and Solitar, or Combinatorial group theory by Lyndon and Schupp.
** To illustrate this better, suppose we had taken $X=\langle a, b\rangle$ and $Y=\langle c, d\rangle$. Then $\langle [a, b], [c, d]\rangle$ is not free of rank two as it contains a torsion element.
