Is there a finitely presented sofic group which is not residually finite, but all of its finitely generated subgroups are Hopf groups?


It seems like the Baumslag Solitar groups $BS(m,n)$ don't work (i.e. for $|m|=1$ or $|n|=1$ or $|m|=|n|$ they are residually finite, and otherwise they contain a non-Hopf finitely generated subgroup).


**Note**: Thanks to YCor for pointing out that in the initial formulation I said "subgroups" instead of "finitely generated subgroups". The latter is my intention.



Non-residually-finite finitely-presented sofic group with all finitely generated subgroups Hopfian
Houghton's group $H\_3$ (see Section 5.3 [here](https://arxiv.org/abs/math/0511714) for a definition) is (locally finite)-by-$\mathbf{Z}^2$, ~~which easily implies that all its finitely generated subgroups are Hopfian~~. (Not all its subgroups are Hopfian: it admits an isomorphic copy of $F^{(\mathbf{N})}$ as a subgroup for every finite group $F$.) It is finitely presented (K. Brown 1987, reference at the above link). It is not residually finite because it has the finitary symmetric group $S\_\infty$ as a subgroup. It is amenable hence sofic.




---


**Edit** (Jan. 12 '20): the claim that finitely generated (locally finite)-by-$\mathbf{Z}^d$ groups are Hopfian is false, even for $d=1$ (one can construct a counterexample as central extension of a lamplighter group). Therefore I retract my claim that all finitely generated subgroups of $H\_3$ are Hopfian; I don't know if it's true. Yet $H\_3$ is Hopfian as well as its *finite index* subgroups, using that the locally finite kernel is virtually simple). 


(As long as this is not fixed the answer should probably be unaccepted.)


