1 Introduction

A fundamental idea in the study of infinite groups consists of understanding how much algebraic structure of a group G can be detected in its collection of finite quotients. We address the following question: Suppose that S is either a free group or the fundamental group of a closed hyperbolic surface. Given a finitely generated residually finite group G with the same profinite completion \({\hat{G}}\cong {\hat{S}}\), what can be said about G? Our main result is Theorem A and provides a partial answer which concerns the subgroup structure of G. Before stating it, we remark that a recent breakthrough of Jaikin-Zapirain [35, Theorem 1.1] implies that such G is residually-p, so a group G as above will lie under the assumptions of the following theorem.

Theorem A

Let p be a prime and let S be either a free or hyperbolic surface group. Suppose that G is a finitely generated residually-p group with the same pro-p completion as S. Then two-generated subgroups of G are free.

This is proven in Theorem 4.1. Theorem A generalises (and gives a new proof of) the analogous result of Baumslag [8, Theorem 4.2] for parafree groups G. Recall that a finitely generated group G is termed parafree (resp. parasurface) if it is residually nilpotent and its quotients by the terms of its lower central series are the same as those of some free group (resp. surface group). Parafree groups were introduced by Baumslag [7] and these seem to resemble free groups in many of their structural properties. The proof of Baumslag relies on the fact that a parafree group can be embedded into the unit group of a ring of power series \(\mathbb {Z}\llbracket X\rrbracket \), an approach which does not seem to carry over to parasurfaces. Our proof of Theorem A relies on different cohomological and separability arguments, including our next theorem.

Theorem B

Let G be a finitely generated residually-(torsion-free nilpotent) group and let \(H\le G\) be a virtually polycyclic subgroup. Then H is nilpotent and, for all primes p, the pro-p topology of G induces on H its full pro-p topology.

This is proven in Theorem 3.12. Theorem B provides a fairly general setting in which nilpotent subgroups are witnessed by the pro-p completion. This is also crucial ingredient of [22, Theorem E], where Fruchter and the author show that direct products of free and surface groups are profinitely rigid amongst finitely presented residually free groups. We survey during Sect. 3.4 more applications that motivate the study of pro-p topologies of infinite groups. The proof of Theorem B relies on separability properties of nilpotent groups that are particular to this class (at least amongst the class of virtually polycyclic groups), as our next result exhibits.

Theorem C

Let G be a virtually polycyclic group. Then the following two statements are equivalent:

  • The group G is nilpotent.

  • For all subgroups \(H\le G\) and all primes p, the pro-p topology of G induces on H its full pro-p topology.

One implication is proven in Theorem 3.2 and the other in Theorem 3.7. Virtually polycyclic groups have been known to be subgroup separable for long (after the work of Hirsch and Malcev [64, Chapter 1]). However, the situation about their pro-p topology does not seem to be as clear and, to the best of the author’s knowledge, this result has not appeared explicitly in the literature before.

We now put Theorem A in more context regarding previous research on relating subgroup structure and profinite completions, which so far has been done specially for three-manifolds. For example, a remarkable result is the profinite recognition of the topology of geometric three-manifolds by Wilton–Zalesskii [87], where they show that a compact orientable aspherical three-manifold M is hyperbolic if and only if \(\hat{\pi _1 M}\) contains no \(\mathbb {Z}_p^2\). This was generalised by Zalesskii [90, Theorem 1.1], showing that a relatively hyperbolic virtually compact special group G is hyperbolic if and only if its profinite completion \({\hat{G}}\) contains no \(\mathbb {Z}_p^2\). In this sense, one of the difficulties of Theorem A is relating subgroup obstructions of an abstract group to subgroup obstructions of its pro-p completion in the flavour of the previous results but in the generality of finitely generated residually-p groups, where there is a priori no hierarchy at our disposal.

Note that Theorem A is not immediate even for residually free groups. An elementary property of residually free groups is that non-abelian two-generated subgroups are free (see [5, Section 4]). However, these can clearly contain the group \(\mathbb {Z}^2\) and, even in this context, one needs an additional argument to rule it out. One may expect the analogous result of Theorem A to hold for limit groups. As observed in Remark 4.4, our methods establish Theorem A for the p-genus of more hyperbolic limit groups, other than free and surface groups. However, we cannot solve the general case.

Question 1.1

Let p be a prime and let G be a group in the p-genus of a hyperbolic limit group L. Are two-generated subgroups of G free?

An important property of our argument is that, when S is a free or surface group, \(S_{\hat{p}}\) is residually-(torsion-free nilpotent), proven in Propositions 2.14 and 2.15. For a general limit group L, this feature about \(L_{\hat{p}}\) is not known. Kochloukova–Zalesskii study in [42, Theorem 4.2] the residual properties of a class of pro-p analogues of limit groups (which includes, for example, pro-p completions of ICE groups). However, it is an open problem to determine whether their class contains the pro-p completions of all limit groups (we refer to [42, Section 9] for more open questions).

1.1 Applications to profinite rigidity

It is a well-known conjecture of Remeslennikov that free groups are profinitely rigid (see, for example, [40], Question 5.48 and [57], Question 12). This can be naturally restated to include surface groups as follows.

Conjecture 1.2

Let S be either a free or a surface group and let G be a finitely generated residually finite group with \({\hat{G}}\cong {\hat{S}}\). Then \(G\cong S\).

Wilton [81, 82] solved Conjecture 1.2 for limit groups G. There is a second proof of Conjecture 1.2 when S is a surface group and G is a finitely generated residually free group by Fruchter and the author [22, Corollary D]. In Corollary 1, we establish Conjecture 1.2 when G belongs to the following abelian hierarchy, which naturally includes limit groups (since these admit an abelian hierarchy terminating in free groups [65], Theorem 4.1).

Definition 1.3

Let \({\mathcal {H}_\textbf{ab}}\) denote the smallest class of groups such that

  1. (1)

    \({\mathcal {H}_\textbf{ab}}\) contains all finitely generated residually free groups.

  2. (2)

    If AB are in \({\mathcal {H}_\textbf{ab}}\) and C is a virtually abelian subgroup of A and B, then the amalgamated product \(A *_C B\) belongs to \({\mathcal {H}_\textbf{ab}}\).

  3. (3)

    If A is in \({\mathcal {H}_\textbf{ab}}\) and \(\theta :C\longrightarrow C'\) is an isomorphism between virtually abelian subgroups of A, then the HNN extension \(A\, *_{C, \theta }\) belongs to \({\mathcal {H}_\textbf{ab}}\).

  4. (4)

    If A is in \({\mathcal {H}_\textbf{ab}}\) and A embeds as a finite-index subgroup in B, then B belongs to \({\mathcal {H}_\textbf{ab}}\).

Once we know that a group G as in Conjecture 1.2 does not have Baumslag–Solitar subgroups by Theorem A and [35, Theorem 1.1], G will be hyperbolic by the Bestvina–Feighn combination theorem [10]. From this, we follow the outline of the proof of Wilton (while also incorporating Wise–Haglund’s separability and structural properties of hyperbolic groups with a malnormal quasi-convex hierarchy [30, 85]) to prove the following generalisation.

Corollary 1

Conjecture 1.2 holds for groups G belonging to the class \({\mathcal {H}_\textbf{ab}}\).

This is proven in Theorems 11.1 and 11.2. There are several reasons why it is natural to study \({\mathcal {H}_\textbf{ab}}\), other than being a family that naturally incorporates other groups for which Conjecture 1.2 was solved. The consideration of hierarchies with abelian edges has provided a fruitful setting in which combination theorems for relevant classes of groups have been established: for coherent groups [84, Corollary 5.4], for hyperbolic groups [10], for free groups [68, 70, 74] and for parafree groups [37]. We pose a question that already seems to contain most of the difficulties that Conjecture 1.2 presents for more complicated group hierarchies.

Question 1.4

Let F be a finitely generated free group and let H be a finitely generated malnormal subgroup. Consider the double \(\Gamma =F*_{H=\overline{H}} \overline{F}\) of the group F along its subgroup H. In particular, \(\Gamma \) is hyperbolic and virtually compact special by [23, Corollary 5.3] and [31, Corollary B]. Is Conjecture 1.2 true for \(\Gamma \)?

As an update, Jaikin-Zapirain and the author [38] have proven that a group \(\Gamma \) as in Question 1.4 with \(\hat{\Gamma }\cong \hat{S}\), where S is a surface group, must be \(\Gamma \cong S\). The other case of Question 1.4 (that is, when S is free) still remains open.

Another class of groups where the conclusion of Theorem A ensures hyperbolicity is one-relator groups (by the advances of Louder–Wilton [53, 54] and Linton [46]). Corollary 1 covers some one-relator groups such as amalgamated products or HNN extensions of free groups along cyclic subgroups, which have the form \(\langle F_1, F_2\, |\, u_1=u_2\rangle \) and \(\langle F, t \, |\,tut^{-1}=v\rangle \). Nevertheless, we do not know whether residually finite one-relator groups G with the same profinite completion as a free group S necessarily satisfy \(G\cong S\) (the case when S is a surface group is resolved in [38]). Opportunely, Corollary 2 at least ensures that such \(\Gamma \) are hyperbolic and virtually compact special.

Corollary 2

Let p be a prime and let G be a one-relator group in p-genus of a free or hyperbolic surface group. Then G is hyperbolic and virtually compact special.

Again we stress that Corollary 2 extends to other genera by [35, Theorem 1.1]. Our last result is Theorem D, which provides infinitely many examples of groups that are determined within the class of residually free groups by their finite quotients. We extend this class of groups using similar methods in [55] by looking at examples coming from three-manifold topology.

Theorem D

Let G be a finitely generated residually free group and let S be a free or surface group. Suppose that \({\hat{G}}\cong {\hat{S}}\times \hat{\mathbb {Z}}^n\). Then \(G\cong S\times \mathbb {Z}^n\).

We prove this theorem in Sect. 7. The first step consists on showing that G and \(S\times \mathbb {Z}^n\) have isomorphic centre, for which we use the theory of \(L^2\)-Betti numbers. This does not occur in general because Lubotzky proved in [50, Proposition 1.5] that having a non-trivial centre is not a profinite property. As we mentioned above, our methods give an extension of Theorem D to direct products of free and surface groups, under the extra assumption of G being finitely presented, in a joint work with Fruchter [22, Theorem E].

1.2 Organisation of the paper

In Sect. 2 we revise some properties of profinite (and pro-p) groups and in Sect. 3 we study the induced pro-p topology on subgroups of nilpotent groups, proving Theorems B and C. We show Theorem A in Sect. 4. Next, we review \(L^2\)-Betti numbers in Sect. 5 and the structure of residually free groups in Sect. 6 to prove Theorem D in Sect. 7. In subsequent sections 8, 9, 10 and 11 we introduce the tools that are needed to establish Corollary 1 (Theorems 11.1 and 11.2) and Corollary 2 (Corollary 10.4).

2 Pro-\(\mathcal {C}\) groups, topologies and completions

A non-empty class of finite groups \(\mathcal {C}\) is a formation if it is closed under taking homomorphic images and subdirect products. Given a finitely generated group \( \Lambda \), we say that it is residually-\(\mathcal {C}\) if, for all \(1\ne \lambda \in \Lambda \), there exists \(N\unlhd \Lambda \) such that \(\lambda \notin N\) and \(\Lambda /N \in \mathcal {C}\). In this case, following the terminology of [26], we define the \(\mathcal {C}\)-genus of \(\Lambda \) as the collection of finitely generated residually-\(\mathcal {C}\) groups \(\Gamma \) with isomorphic pro-\(\mathcal {C}\) completion \(\Gamma _{{\hat{\mathcal {C}}}}\cong \Lambda _{{\hat{\mathcal {C}}}}\). Equivalently, the latter happens if \(\Gamma \) and \(\Lambda \) have the same collection of isomorphism types of finite quotients belonging to \(\mathcal {C}\) (Theorem 2.4). We will mostly think of \(\mathcal {C}\) as being the formations of all finite groups, all finite soluble groups, all finite nilpotent groups or all finite p-groups (for some prime p). In these cases, we refer to the \(\mathcal {C}\)-genus as the finite, soluble, nilpotent and p-genus, respectively. Lastly, we say that a finitely generated residually finite \(\Lambda \) is profinitely rigid if the only \(\Gamma \) in its finite genus is \(\Gamma \cong \Lambda \).

Notation 2.1

Given an abstract group \(\Gamma \), we denote its profinite completion (resp. pro-p completion) by \({\hat{\Gamma }}\) (resp. \(\Gamma _{\hat{p}}\)). Bold letters \(\textbf{G}, \textbf{H}, \textbf{K}, \textbf{U}\) will denote profinite groups. In addition, we write \(\textbf{H}\le _{c}\textbf{G}\) or \(\textbf{H}\le _{o}\textbf{G}\) (resp. \(\textbf{H}\unlhd _{c}\textbf{G}\) or \(\textbf{H}\unlhd _{o}\textbf{G}\)) to indicate that the subgroup \(\textbf{H}\le \textbf{G}\) (resp. normal subgroup \(\textbf{H}\unlhd \textbf{G}\)) is closed or open.

It will be important to keep in mind during the rest of the exposition the following theorem, which has already been discussed during the introduction.

Theorem 2.2

(Theorem 1.1,[35]) Let S be a finitely generated free or surface group. Suppose that G belongs to the finite, soluble or nilpotent genus of S. Then G belongs to the p-genus of S for all primes p.

These inclusions between genera are not true in general, since Lubotzky [50] showed that the properties of being residually soluble or residually-p are not profinite invariants.

2.1 Pro-\(\mathcal {C}\) completions

We now fix a formation \(\mathcal {C}\) of finite groups. A pro-\(\mathcal {C}\) group can be defined as a profinite group \(\textbf{G}\) such that for all its open normal subgroups \(\textbf{U}\unlhd _{o}\textbf{G}\), one has that \(\textbf{G}/\textbf{U}\in \mathcal {C}\). Alternatively, a pro-\(\mathcal {C}\) group is just an inverse limit of groups belonging to \(\mathcal {C}\) that is endowed with the profinite topology.

In order to relate residual properties of abstract groups and profinite invariants, we recall the pro-\(\mathcal {C}\) completion functor. Given an abstract group G, its collection of quotients belonging to \(\mathcal {C}\) is encoded in its pro-\(\mathcal {C}\) completion \(G_{{\hat{\mathcal {C}}}}\). As an abstract group, it is defined to be the inverse limit of finite groups

$$\begin{aligned} G_{{\hat{\mathcal {C}}}}=\varprojlim _U G/U \end{aligned}$$

where U ranges over finite-index normal subgroups of G such that \(G/U\in \mathcal {C}\). We always consider \(G_{{\hat{\mathcal {C}}}}\) endowed with the profinite topology, which turns it into a pro-\(\mathcal {C}\) group. There is a natural and canonical group homomorphism \(\iota _{{\hat{\mathcal {C}}}}:G\longrightarrow G_{{\hat{\mathcal {C}}}}\) and, in these terms, a group G is residually-\(\mathcal {C}\) if and only if \(\iota _{{\hat{\mathcal {C}}}}\) is injective. This map \(\iota _{\mathcal {C}}\) enjoys the following universal property (which, in fact, provides a more functorial definition of \(G_{\hat{\mathcal {C}}}\)).

Proposition 2.3

Let \(\Gamma \) be an abstract group. Let \(\iota _{\hat{\mathcal {C}}}:\Gamma \longrightarrow \Gamma _{\hat{\mathcal {C}}}\) be the canonical map. The data \((\Gamma _{{\hat{\mathcal {C}}}}, \iota _{{\hat{\mathcal {C}}}})\) is characterised by the following properties.

  1. (1)

    \(\Gamma _{\hat{\mathcal {C}}}\) is a pro-\(\mathcal {C}\) group.

  2. (2)

    The map \(\iota _{\hat{\mathcal {C}}}\) has dense image.

  3. (3)

    For any pro-\(\mathcal {C}\) group \(\textbf{K}\) and every group homomorphism \(f:\Gamma \longrightarrow \textbf{K}\) with dense image, there exists a continuous homomorphism \(f_{\hat{\mathcal {C}}}:\Gamma _{\hat{\mathcal {C}}}\longrightarrow \textbf{K}\) such that the diagram

    figure a

    is commutative.

When we say that the pair \((\Gamma _{{\hat{\mathcal {C}}}}, \iota _{{\hat{\mathcal {C}}}})\) is unique, we mean the following: if \(\textbf{H}\) is a pro-\(\mathcal {C}\) group and \(\iota :\Gamma \longrightarrow \textbf{H}\) is a group homomorphism such that the pair \((\textbf{H}, \iota )\) verifies the three properties above, then there exists an isomorphism of pro-\(\mathcal {C}\) groups \(\alpha :\Gamma _{{\hat{\mathcal {C}}}}\longrightarrow \textbf{H}\) such that \(\alpha \circ \iota _{{\hat{\mathcal {C}}}}=\iota \).

We stress the fact that the previous discussion does not rely on whether \(\iota _{{\hat{\mathcal {C}}}}\) is injective (equivalently G is residually-\(\mathcal {C}\)) or not. A priori the pro-\(\mathcal {C}\) completion only captures information about finite quotients of G in \(\mathcal {C}\) and not about how we can distinguish elements of G in these quotients. There are, for example, finitely generated residually finite groups with free pro-p completion for all primes p that are not residually-p for any prime p, such as the trefoil knot group \(\langle a, b\, | a^2b^3\rangle \). The philosophy that finite quotients of a group are encoded in their profinite completion is precised in the following folkloric theorem.

Theorem 2.4

(Dixon–Formanek–Poland–Ribes [17]) Let \(\mathcal {C}\) be a formation of finite groups. The finitely generated abstract groups \(\Gamma \) and \(\Lambda \) have the same class of isomorphism types of quotients belonging to \(\mathcal {C}\) if and only if \(\Gamma _{\hat{\mathcal {C}}}\cong \Lambda _{\hat{\mathcal {C}}}\).

So we can completely reformulate in terms of the pro-\(\mathcal {C}\) completions what it means for a group to be in the \(\mathcal {C}\)-genus of another one. This is important because now we have turned a bare collection of finite groups into a group and now we can do, say, group cohomology with this information. Crucially, this functor “pro-\(\mathcal {C}\) completion” is right-exact.

Proposition 2.5

([61], Proposition 3.2.5) Let \(\mathcal {C}\) be a formation that is closed under taking normal subgroups. Given a exact sequence of abstract groups of the form \(N\longrightarrow G\longrightarrow Q\longrightarrow 1\), the induced sequence of maps \(N_{\hat{\mathcal {C}}}\longrightarrow G_{{\hat{\mathcal {C}}}}\longrightarrow Q_{{\hat{\mathcal {C}}}}\longrightarrow 1\) is exact.

Given an injective map \(N\longrightarrow G\), the question of whether the induced map \(N_{{\hat{\mathcal {C}}}}\longrightarrow G_{{\hat{\mathcal {C}}}}\) is also injective will be a crucial topic of discussion later in this section and during Sect. 3, especially with the aim of proving Theorem A. On the other hand, Proposition 2.5 also tells us that pro-\(\mathcal {C}\) completions are better understood when studying quotients than when studying subgroups, as the following direct consequence exhibits.

Proposition 2.6

(Pro-\(\mathcal {C}\) completion of a quotient) Let G be an abstract group and let \(N\unlhd G\) be a normal subgroup. Suppose that \(\mathcal {C}\) is a formation as in Proposition 2.5. Denote by \(\iota :N\longrightarrow G\) the inclusion. Then the canonical and natural map

$$\begin{aligned} \left( G/N\right) _{{\hat{\mathcal {C}}}} \longrightarrow G_{{\hat{\mathcal {C}}}}\Big / \overline{\iota _{{\hat{\mathcal {C}}}}(N)} \end{aligned}$$

is an isomorphism.

2.2 The notion of index in profinite groups

Given a profinite group \(\textbf{G}\) and a subgroup \(\textbf{H}\), we will not need for our purposes to define the formal meaning of \(|\textbf{G}: \textbf{H}|\) as a supernatural number (as in, for example, [61, Section2.3]).

However, recall we say that \(p^{\infty }\) divides the index \(|\textbf{G}: \textbf{H}|\) if and only if for all n there exists a normal open \(\textbf{U}\unlhd _{o}\textbf{G}\) such that \(p^n\) divides the index of \(\textbf{H}\textbf{U}/\textbf{U}\) in the finite group \(\textbf{G}/\textbf{U}\). Observe that, if \(\textbf{G}\) is a pro-p group, then \( \textbf{H}\le _{c}\textbf{G}\) has infinite index if and only if \(p^{\infty }\) divides the index \(|\textbf{G}: \textbf{H}|\). However, for general profinite groups, the latter is much stronger, as the following example shows.

2.3 Nilpotent groups and lower central series

The terms of the lower central series of a group G are defined recursively as \(\gamma _1 G=G\) and \(\gamma _{n+1} G=[\gamma _n G, G]\) if \(n\ge 1\). Similarly, the terms of the p-lower central series of G are defined as \(\gamma _{1,p}G=G\) and \(\gamma _{n+1,p}G=[ \gamma _{n,p}G, G]\gamma _{n,p} G^p\) if \(n\ge 1\). The expression \(\gamma _n \Gamma _{\hat{p}}\) may be ambiguous. We clarify that it means \(\gamma _n G\) with \(G=\Gamma _{\hat{p}}\), defined as a subgroup of \(\Gamma _{\hat{p}}\) (so we do not mean to denote the pro-p completion of \( \gamma _n \Gamma \)).

A group G is nilpotent if there exists an integer \(c\ge 0\) such that \(\gamma _{c+1}G=1\). For example, abelian groups are nilpotent groups of nilpotency class 1. We will study the profinite and pro-p topology of nilpotent groups in Sects. 2.4 and 3.

Proposition 2.7

([18], Proposition 1.19 and Exercise 17) Let \(\textbf{G}\) be a finitely generated pro-p group. Then \(\gamma _k \textbf{G}\) is a closed subgroup of \(\textbf{G}\).

In fact, the previous is true for finitely generated profinite groups, although this is a much deeper result due to Nikolov and Segal [58, Theorem 1.4].

Lemma 2.8

Let \(\Gamma \) be a finitely generated group and let \(k\ge 0\) be an integer. Then the canonical map \(\Gamma /\gamma _k \Gamma \longrightarrow \Gamma _{\hat{p}}/\gamma _k\Gamma _{\hat{p}}\) is a pro-p completion map.

Proof

The group \(\gamma _k\Gamma _{\hat{p}}\) are closed subgroups of \(\Gamma _{\hat{p}}\) by Proposition 2.7 and contain \(\gamma _k\Gamma \) as a dense subgroup, so \(\gamma _k\Gamma _{\hat{p}}\) is the closure of \(\gamma _k\Gamma \). By Proposition 2.6, the conclusion follows. \(\square \)

2.4 Induced profinite topologies

Given a formation \(\mathcal {C}\) and a group G the full pro-\(\mathcal {C}\) topology of G is defined to be the initial topology of the map \(G\longrightarrow G_{{\hat{\mathcal {C}}}}\). In other words, it is the smallest topology that contains among its open subsets all the cosets of \(U\unlhd G\) such that \(G/U\in \mathcal {C}\). When \(\mathcal {C}\) is the formation of all finite groups (resp. finite p-groups), we call it the profinite (resp. pro-p) topology.

Notation 2.9

When the formation \(\mathcal {C}\) is understood from the context, we write \(H\le _{c}G\) or \(H\le _{o}G\) (resp. \(H\unlhd _{c}G\) or \(H\unlhd _{o}G\)) to denote that the subgroup \(H\le G\) (resp. normal subgroup \(H\unlhd G\)) is closed or open in the pro-\(\mathcal {C}\) topology.

A useful result that relates the open subgroups of a group G with the open subgroups of \({\hat{G}}\) in a explicit way is the following correspondence.

Proposition 2.10

[ [61], Proposition 3.2.2] Let G be a residually-\(\mathcal {C}\) group and identify G with its image in \(G_{{\hat{\mathcal {C}}}}\).

  1. (a)

    Let

    $$\begin{aligned}\Theta : \{H \, |\, H\le _{o}G\}\longrightarrow \{\textbf{H}\, |\, \textbf{H}\le _{o}G_{{\hat{\mathcal {C}}}}\}\end{aligned}$$

    be the map that assigns to each open subgroup \(H\le _{o}G\) its closure \(\overline{H}\) in \( G_{{\hat{\mathcal {C}}}} \). Then \(\Theta \) is a bijective correspondence with inverse given by \(\Theta ^{-1}(\textbf{H})=\textbf{H}\cap G\).

  2. (b)

    Given \(H\le _{o}G\), it is true that \(H\unlhd _{o}G\) if and only if \(\Theta (H)\unlhd _{o}G_{{\hat{\mathcal {C}}}}\).

  3. (c)

    Given \(H\le _{o}G\), the index |G : H| is equal to the index \(|G_{{\hat{\mathcal {C}}}}: \Theta (H)|\).

  4. (d)

    The canonical map \(H\longrightarrow \Theta (H)\) is a pro-\(\mathcal {C}\) completion map.

Definition 2.11

Let \(\mathcal {C}\) be a formation of finite groups. Assume that \(H\le G\). Denote by \(\iota :H\longrightarrow G\) the injection. We say that H is pro-\(\mathcal {C}\) embeddable into G if the induced map

$$\begin{aligned} \iota _{{\hat{\mathcal {C}}}}:H_{{\hat{\mathcal {C}}}}\longrightarrow G_{{\hat{\mathcal {C}}}} \end{aligned}$$

is an injection.

Observe that this is a transitive relation in the sense that whenever \(A\le B\le C\), with A being pro-\(\mathcal {C}\) embeddable into B and B being pro-\(\mathcal {C}\) embeddable into C, then A is pro-\(\mathcal {C}\) embeddable into C. Other than stating Proposition 2.10, we introduced the pro-\(\mathcal {C}\) topology on abstract groups because it allows us to reformulate pro-\(\mathcal {C}\) embeddability intrinsically in G as follows.

Lemma 2.12

(See [61], Lemma 3.2.6) Let \(H\le G\) be two groups. Then H is pro-\(\mathcal {C}\) embeddable into G if and only if the pro-\(\mathcal {C}\) topology of G induces on H its full pro-\(\mathcal {C}\) topology.

Observation 2.13

If H is finitely generated, in order to prove that the pro-\(\mathcal {C}\)-topology of G induces the full pro-\(\mathcal {C}\) topology of H, it suffices to check the following: For any characteristic subgroup \(\Lambda \unlhd H\) with \(H/\Lambda \in \mathcal {C}\), there exists \(\Gamma \unlhd G\) with \(G/\Gamma \in \mathcal {C}\) such that \(\Gamma \cap H\subseteq \Lambda \).

We will show in Theorem 3.2 that subgroups of finitely generated nilpotent groups are pro-p embeddable. We finish this section by analysing some of its consequences (for instance, the fact that Hirsch lengths will be pro-p invariants of finitely generated torsion-free nilpotent groups).

Proposition 2.14

Let G be a finitely generated group such that the quotient \(G/\gamma _k G\) is torsion-free for every positive integer k. Then, for all primes p, \(G_{\hat{p}}\) is residually-(torsion-free nilpotent). In fact, the quotients \(G_{\hat{p}}/\gamma _n G_{\hat{p}}\) are torsion-free for all n.

Proof

Since \(G_{\hat{p}}\) is residually-p, \(\bigcap _k \gamma _{k, p} G_{\hat{p}}=\{1\}\) and, in particular, \(\bigcap _k \gamma _{k}G_{\hat{p}} =1\). It remains to prove that \(G_{\hat{p}}/\gamma _k G_{\hat{p}}\) is torsion-free. We know that \(\Gamma =G/\gamma _{c+1} G\) is a finitely generated torsion-free nilpotent group. We are going to prove that this is enough to conclude that its pro-p completion \(\Gamma _{\hat{p}}\) is torsion-free. The proof of the proposition would then be complete because the canonical map \(\Gamma _{\hat{p}}\longrightarrow G_{\hat{p}}/\gamma _k G_{\hat{p}}\) is an isomorphism by Proposition 2.6.

Now let \(\Gamma \) be a finitely generated torsion-free nilpotent group. Then \(\Gamma /Z(\Gamma )\) is also torsion-free (see [14, Corollary 2.22]). Henceforth, iterating the previous observation, we deduce that the upper central series

$$\begin{aligned} 1=Z_{0}( \Gamma )\unlhd Z_{1}(\Gamma ) \unlhd \cdots \unlhd Z_{c-1}(\Gamma )\unlhd Z_c(\Gamma )=\Gamma \end{aligned}$$
(1)

of \(\Gamma \) satisfies that \(Z_{k}(\Gamma )/Z_{k-1}(\Gamma )\cong \mathbb {Z}^{n_k}\) for all \(1\le k\le c\) and some non-negative integers \(n_1, \dots , n_c\). After taking the closure (inside \(\Gamma _{\hat{p}}\)) of each element of the central series of (1), we get

$$\begin{aligned} 1=\overline{Z_{0}( \Gamma )}\unlhd \overline{Z_{1}(\Gamma )} \unlhd \cdots \unlhd \overline{Z_{c-1}(\Gamma )}\unlhd \overline{Z_c(\Gamma )}=\Gamma _{\hat{p}}. \end{aligned}$$
(2)

The group \(\Gamma \) induces the full pro-p topology on each \(Z_k(\Gamma )\) by Theorem 3.2, so, again by Proposition 2.6, we have for all \(1\le k\le c\) that

$$\begin{aligned} \overline{Z_k(\Gamma )}/\overline{Z_{k-1}(\Gamma )}\cong \left( Z_{k}(\Gamma )/Z_{k-1}(\Gamma )\right) _{\hat{p}}\cong \mathbb {Z}_p^{n_k}. \end{aligned}$$

So each factor of (2) is torsion-free and hence \(\Gamma _{\hat{p}}\) is torsion-free. \(\square \)

It is not hard to see that the class of groups satisfying the assumptions of Proposition 2.14 is closed under taking free products. However, the following proposition ensures many one-ended examples as well.

Proposition 2.15

Let G be isomorphic to a RAAG or to a one-relator group \(F/\langle \!\langle r\rangle \!\rangle \) such that if k is the biggest non-negative integer such that \(r\in \gamma _k F\), then \(r\cdot \gamma _{k+1}F\) is not a proper power in \(\gamma _{k}F/\gamma _{k+1}F\). In these cases, G satisfies the assumptions of Proposition 2.14. In particular, this is true if G is a surface group.

Proof

When G is a RAAG, this is [75, Theorem 6.4]. When \(G=F/\langle \langle r\rangle \rangle \), this proposition is a direct consequence of [44, Section 1]. The reason is the following. The main theorem of [44] states that, under our assumptions on the relator r, the graded algebra \(\bigoplus _n \gamma _n G/\gamma _{n+1} G\) is a free \(\mathbb {Z}\)-Lie algebra. In particular, the subsequent quotients \(\gamma _n G/\gamma _{n+1} G\) are free abelian (the author also computes their rank). Since surface groups are defined by a single relator that satisfies the assumptions of r in Proposition 2.15, the last conclusion follows. \(\square \)

We observe that the class of one-relator groups of Proposition 2.15 includes many limit groups. For example, those arising as doubles \(F*_{u=\bar{u}} \bar{F}\) of a free group F along a relator \({u}\in F\) that satisfies the assumptions of r in Proposition 2.15. We remark in Remark4.4 how this can be used to establish Theorem A for the p-genus of many hyperbolic limit groups, other than free and non-abelian surface groups.

3 Profinite and pro-p topologies on polycyclic groups

We return to analysing the structure and pro-p topology of nilpotent groups, as we initiated in Sect. 2.3. We prove Theorem 3.2 and Theorem 3.7 (which constitute Theorem C from the introduction) and then show Theorem 3.12 (Theorem B), which allows to witness polycyclic subgroups from the pro-p completion and plays a crucial role in the proof of Theorem A during Sect. 4.

It was proven by Hirsch [29, Theorem 3.25] that polycyclic groups are residually finite, and Malcev later in 1948 proved that they are, in fact, LERF [64, Exercise 11, Chapter 1]. The former result of Hirsch has a pro-p variant for nilpotent groups, given by Gruenberg (Theorem 3.1), while Malcev’s result does not. Still, it follows from Malcev’s theorem the weaker property that the induced topology on subgroups of polycyclic groups is the full profinite topology. We study in Theorem 3.2 a pro-p version of this statement. Before stating it, we first review Gruenberg’s result and some definitions.

Given a set of primes P and a non-negative integer n, we say that n is a P-number if all the primes dividing n are contained in P. We say that a group G is residually-P if, for all \(1\ne g\in G\), there exists a prime \(p\in P\) and a finite-index normal subgroup \(U\unlhd G\), where |G : U| is a power of p, such that \(g\notin U\). Notice that, by Cauchy’s theorem, the set of primes P appearing as the orders of elements of a group G is exactly the smallest set of primes P such that every element with finite order in G has a P-number order.

Theorem 3.1

([24], Theorem 2.1) Let G be a finitely generated nilpotent group.

  1. (a)

    If G is torsion-free, then G is residually-p for all primes p.

  2. (b)

    Otherwise, let P be the (non-empty) collection of primes p that appear as orders of elements in G. Then G is residually-P.

3.1 Induced pro-p topology on nilpotent groups

Continuing the discussion at the beginning of the section, one may also try to extend the result of Malcev to the pro-p setting by, in the first place, figuring out a definition of p-LERF groups. A tentative definition is to say that a group G is p-LERF if all its finitely generated subgroups are closed in the pro-p topology. However, this may not be an interesting notion for infinite groups, since a virtually polycyclic group is p-LERF if and only if it is a finite p-group (see Remark 3.14). In any case, many infinite groups have the weaker property that the induced pro-p topology on subgroups is their full pro-p topology. We confirm this in the next theorem.

Theorem 3.2

Let G be a finitely generated nilpotent group and let H be any subgroup. Then the pro-p topology of G induces on H its full pro-p topology.

By Lemma 2.12, the previous condition on each \(H\le G\) is equivalent to the injectivity of the induced map \(H_{\hat{p}}\longrightarrow G_{\hat{p}}\). Recall in this case we say that H is pro-p embeddable into G (Definition 2.11). Theorem 3.2 says that the functor “pro-p completion” is exact in the category of finitely generated nilpotent groups (since it is always right-exact by Proposition 2.5). Before the proof of Theorem 3.2, we will review how one can extract roots of subgroups in nilpotent groups in Proposition 3.4.

Definition 3.3

Let G be a group, let P be a collection of primes and assume \(H\le G\). We define the P-radical of H in G as the set

$$\begin{aligned} R_P(H)=\{g\in G\, \, | \hbox { there exists a}~P-\hbox {number}~n~ \hbox {with}~g^n\in H\}. \end{aligned}$$

Proposition 3.4

Let G be a finitely generated nilpotent group and let \(H\le G\). Then \(R_P(H)\) is a subgroup of G and the finite index \(|R_P(H): H|\) is a P-number.

Proof

Let K be the subgroup generated by \(R_P(H)\). Since G is noetherian, then K is finitely generated. So K is generated by a finite subset of \(R_P(H)\). Then, by [14, Theorem 2.24], it follows that \(K=R_P(H)\) and that H has a finite index in \(R_P(H)\) which is a P-number. \(\square \)

Proof of Theorem 3.2

We divide the proof in two steps. First, we prove in Claim 3.5 that the conclusion follows if we additionally suppose that H is normal, and then we prove the general case when H is any subgroup.

Claim 3.5

The conclusion follows if H is normal in G.

Proof of Claim 3.5

We follow the strategy depicted in Observation 2.13. Let \(\Lambda \unlhd H\) be a characteristic subgroup of H whose index \(|H: \Lambda |\) is finite and a p-power. In particular, \(\Lambda \) is normal in G. Let P be the collection of primes different from p. The subgroup \(N=R_P(\Lambda )\) is normal in G and it contains \(\Lambda \) with finite-index. It is immediate to see that \(N\cap H=\Lambda \) and that the finite group G/N does not contain elements of order coprime with p. The latter implies, by Theorem 3.1, that the nilpotent group G/N is residually-p. We have an injection , where HN/N is a finite subgroup. There exists a finite p-power index normal subgroup \(K\unlhd G\) containing N such that K/N intersects HN/N trivially (or, equivalently, \(K\cap HN=N\)). Lastly, we check that \(K\cap H=\Lambda \), which would complete the proof of the claim. For this, observe that \(K\cap H= (K\cap HN)\cap H=N\cap H=\Lambda . \) \(\square \)

We now finish the proof of the theorem. Consider any subgroup \(H\le G\). Let c denote the nilpotency class of G. By [28, Theorem 10.3.3], there is an ascending chain \(H=H_0\unlhd H_1\unlhd \cdots \unlhd H_c=G\). By Claim 3.5, each \(H_i\) is pro-p embeddable into \(H_{i+1}\). Finally, by transitivity, H is pro-p embeddable into G. \(\square \)

Remark 3.6

Gareth Wilkes pointed out to the author another proof of Theorem 3.2. The argument can be sketched as follows. Let H be a subgroup of a finitely generated nilpotent group G. Since pro-nilpotent groups are direct products of their p-Sylows (see [61, Proposition 2.3.8]), then there is a commutative diagram

figure b

where we denoted by \(\iota :H\longrightarrow G\) the injection map and by \(\iota _{\hat{p}}\) and \({\hat{\iota }}\) the natural induced maps between profinite and pro-p completions, respectively. Since G is LERF, the map \({\hat{\iota }}\) is injective and, consequently, \(\iota _{\hat{p}}\) is also injective, as we wanted to prove.

3.2 Induced pro-p topology on polycyclic groups

As we anticipated, although the profinite version of Theorem 3.2 holds for virtually polycyclic groups, we state the following converse to the pro-p version that shows the limitations of this phenomenon outside of the world of nilpotent groups.

Theorem 3.7

Let G be a virtually polycyclic group. Suppose that for every prime p and every subgroup \(H\le G\), the pro-p topology of G induces on H its full pro-p topology. Then G is nilpotent.

Theorem 3.7 in conjunction with Theorem 3.2 constitute Theorem C from the introduction. Before the proof of Theorem 3.7, we start with a chain of preliminary lemmas.

Lemma 3.8

Let P be a finite p-group and let Q be a finite q-group, with p and q being different primes. Let \(\theta :Q\longrightarrow {{\,\textrm{Aut}\,}}(P)\) be a group homomorphism and let \(G=P\rtimes Q\) be the corresponding semi-direct product. Then the following are equivalent:

  1. (1)

    The map \(\theta \) is trivial.

  2. (2)

    G is isomorphic to \(P\times Q\).

  3. (3)

    G is nilpotent.

  4. (4)

    The subgroup P is pro-p embeddable into G.

Proof

The equivalence between (1) and (2) is well-known and follows from the definition of semi-direct product (since Q is normal if and only if it is central). By [28, Theorem 10.3.4], a finite group is nilpotent if and only it is a direct product of finite t-groups with t ranging over prime numbers. So the equivalence between (2) and (3) is also clear. We notice that if (1) is given, then (4) is obviously ensured. So it suffices to prove that (4) implies (1). We consider the trivial subgroup \(\{1\}\), which has p-power index in P and it is normal. By assumption, there must exist a normal subgroup \(N\unlhd G\) of p-power index such that \(N\cap P\subseteq \{1\}\), so \(N\cap P=\{1\}\). Since the index is coprime to q, then N is a q-Sylow subgroup of G, as well as Q. So N and Q are conjugated to each other by the second Sylow’s theorem, which shows that Q is also normal and (1) follows. \(\square \)

Lemma 3.9

Let p be a prime. Suppose that \(N \unlhd G\) and \(N\le H\le G\) have the property that the induced maps \(N_{\hat{p}}\longrightarrow H_{\hat{p}}\) and \(N_{\hat{p}}\longrightarrow G_{\hat{p}}\) are injective. Then, the induced map \(H_{\hat{p}}\longrightarrow G_{\hat{p}}\) is injective if and only if the induced map \(\left( H/N\right) _{\hat{p}}\longrightarrow \left( G/N\right) _{\hat{p}}\) is injective.

Proof

If the induced maps \(N_{\hat{p}}\longrightarrow H_{\hat{p}}\) and \(N_{\hat{p}}\longrightarrow G_{\hat{p}}\) are injective, we have, by Proposition 2.5, a commutative diagram of the form

figure c

where all the arrows are the natural ones and the rows are exact. A simple diagram chase gives the desired conclusion. \(\square \)

Lemma 3.10

Let P be a direct product \(P_1\times \cdots \times P_m\), where each \(P_i\) is a finite \(p_i\)-group and \(p_i\ne p_j\) if \(i\ne j\). Suppose that q is a prime not belonging to the set \(\{p_1, \dots , p_n\}\) and let Q be a finite q-group. Let \(\theta :Q\longrightarrow {{\,\textrm{Aut}\,}}(P)\) be a group homomorphism and let \(G=P\rtimes Q\) be the corresponding semi-direct product. Then the following are equivalent:

  1. (1)

    The map \(\theta \) is trivial.

  2. (2)

    G is isomorphic to \(P\times Q\).

  3. (3)

    G is nilpotent.

  4. (4)

    The subgroup P is pro-\(p_i\) embeddable into G for all i.

Proof

The equivalence between the first three items is established in the exact same way as in Lemma 3.8. Again, it is clear that (2) implies (4). We suppose now that (4) holds. For every \(1\le i\le n\), we consider \(N_i=\prod _{j\ne i} P_j\), which is a characteristic subgroup of G that is pro-t embeddable into P for all primes t. So \(N_i\) is normal in G and, by Lemma 3.9, \(P/N_i\cong P_i\) is pro-\(p_i\) embeddable into \(G/N_i\cong P_i\rtimes Q\). By Lemma 3.8, the action of Q on \(P_i\) is trivial. We have proven this for all i, so the action of Q on P is trivial and hence we have (2). \(\square \)

Lemma 3.11

Let G be a finite group such that for every subgroup \(H \le G\) and all primes p, the induced map \(H_{\hat{p}}\longrightarrow G_{\hat{p}}\) is injective. Then G is nilpotent.

Proof

We can prove this by induction on the order of G. When \(|G|=1\) or, in fact, when it is a finite p-group for some p, the statement is trivial. Suppose then that |G| is divisible by at least two primes p and q. We consider a p-Sylow \(P\le G\) (which exists by the first Sylow theorem). Since \(\{1\}\) is open in P, there must exist a normal subgroup \(N\unlhd G\) of p-power index such that \(N\cap P=\{1\}\). Since p-subgroups of G can be conjugated into P (by the second Sylow theorem), then the order of N is coprime with p. Consequently, \(|P|=|G: N|\) and then \(G=\langle N, P\rangle \) is isomorphic to a semi-direct product \(N\rtimes P\). We know that \(|N|<|G|\) and then by the induction hypothesis, N is nilpotent and so a direct product of its Sylow subgroups. By Lemma 3.10, we conclude that G is nilpotent. \(\square \)

We have gathered all the ingredients required to show Theorem 3.7.

Proof of Theorem 3.7

By Lemma 3.9, any finite quotient Q of G will still have the property that for every subgroup \(H \le Q\), the induced map \(H_{\hat{p}}\longrightarrow Q_{\hat{p}}\) is injective. So, by Lemma 3.11, every finite quotient of G is nilpotent. Finally, by a result of Hirsch (see [64, Theorem 2, Chapter 1]), a virtually polycyclic group has the property that all its finite quotients are nilpotent if and only if it is nilpotent itself. So G is nilpotent. \(\square \)

3.3 Pro-p embeddability of polycyclic subgroups

We are ready to show that in residually-(torsion-free nilpotent) groups, polycyclic groups are pro-p embeddable (see Theorem 3.12 below). Before doing so, we remind the reader of several classical properties of the class of virtually polycyclic groups (we refer the reader to the book of Segal [64] for a more thorough account). This class is closed under taking subgroups, quotients and extensions; they are noetherian (i.e. all their subgroups are finitely generated); and, crucially, that they are endowed with the useful notion of Hirsch length, which can be defined as follows.

Given a virtually polycyclic group G and a subnormal series \(1=G_0\unlhd G_1\unlhd \cdots \unlhd G_n=G\) such that the successive quotients \(G_{i+1}/G_i\) are cyclic, the number of subscripts \(0\le i\le n-1\) such that \(G_{i+1}/G_i\) is infinite is an invariant of such a series (by the Jordan–Hölder theorem). We call this number the Hirsch length of G, denoted by h(G). Recall that \(h(G)=0\) if and only if G is finite and that \(h(G)=h(N)+h(G/N)\) for all normal subgroups \(N\unlhd G\). In particular, a surjective map between torsion-free virtually polycyclic groups \(G_1\longrightarrow G_2\) with \(h(G_1)=h(G_2)\) must be an isomorphism. This will be important during the proof of the following.

Theorem 3.12

(Theorem B) Let G be a finitely generated residually-(torsion-free nilpotent) group and let \(H\le G\) be a virtually polycyclic subgroup. Then H is nilpotent and, for all primes p, the induced map \(H_{\hat{p}}\longrightarrow G_{\hat{p}}\) is injective.

Proof

Let \(\iota :H\longrightarrow G\) denote the injection and let \(\pi ^n\), for any positive integer n, denote the canonical projection \(\pi ^n:G\longrightarrow G/\gamma _n G\).

Claim 3.13

There exists a positive integer n such that the composition \(f^n=\pi ^n\circ \iota :H\longrightarrow G/\gamma _n G\) is injective.

We will show by induction on the Hirsch length of H the stronger statement that there exists a torsion-free nilpotent quotient G/N such that the projection \(\pi _N:G\longrightarrow G/N\) is injective on H. This is trivial if \(h(H)=0\). If \(h(H)>0\), there exists a subgroup \(H_1\le H\) with \(h(H_1)=h(H)-1\). By the induction hypothesis, there exists a normal subgroup \(N\unlhd G\) such that G/N is torsion-free nilpotent and the surjection \(\pi _N:G\longrightarrow G/N\) is injective on \(H_1\). In particular, \(h(\pi _N(H))\ge h(H_1)\). If \(\pi _N\) is already injective on H then we are done. Otherwise, there exists \(1\ne x\in H\cap \ker \pi _N\). Since G is residually-(torsion-free nilpotent), there exists a normal subgroup \(K\unlhd G\) such that G/K is torsion-free nilpotent and \(\pi _K:G\longrightarrow G/K\) is injective on the subgroup \(\langle x\rangle \cong \mathbb {Z}\). Now look at the induced surjection of torsion-free nilpotent groups \(\pi _{N\cap K}(H)\longrightarrow \pi _{N}(H)\). It is not injective because \(\pi _{N\cap K}(x)\ne 1\) belongs to the kernel, so \(h(\pi _{N\cap K}(H))\ge h(\pi _{N}(H))+1\ge h(H_1)+1=h(H)\). This implies that the surjection \(\pi _{N\cap K}:H\longrightarrow \pi _{N\cap K}(H)\) of torsion-free virtually polycyclic groups is injective, completing the proof of Claim 3.13. In particular, H is nilpotent.

Now we are ready to show that the induced map \(H_{\hat{p}}\longrightarrow G_{\hat{p}}\) is injective. Let \(n\ge 1\) be an integer and consider the following natural commutative diagram.

figure d

The horizontal arrows are the canonical pro-p completion maps (the fact that the lowest arrow represents a pro-p completion map follows from Lemma 2.8). We can choose an n such that the map \(f^n:H\longrightarrow G/\gamma _n G\) is injective by Claim 3.13. Since \(G/\gamma _n G\) is finitely generated and nilpotent, it follows from Theorem 3.2 that the induced map \(f_{\hat{p}}^{(n)}\) is injective, too. In particular, \(\iota _{\hat{p}}\) must be injective, as we wanted. \(\square \)

3.4 Induced pro-p topology on other infinite groups

The pro-p embeddability result of Theorem 3.12 is a key component of the proof of Theorem 4.1 on the 2-freeness of groups in the p-genus of a free or hyperbolic surface group. Here we introduce more context and motivation for the study of pro-p separability properties and their applications, building on the setting of profinite topologies, which so far has been investigated more deeply. There are geometric ways to produce families of LERF groups. Three big classes are limit groups [76], locally quasi-convex hyperbolic virtually compact special groups (which includes hyperbolic fundamental groups of graphs of free groups with cyclic edge subgroups [83]), Seifert fibered spaces (either with boundary [27, Theorem 5.1] or closed [62, Theorem 4.1] [63]) and hyperbolic three manifolds (see [2, Chapters 4–5] for complete referencing).

Nevertheless, it seems very hard to use geometric methods to construct groups with good pro-p embeddability or separability properties on its subgroups (as, for example, finitely generated nilpotent groups enjoy by Theorem 3.2). These difficulties appear when constructing parafree groups (for which, so far, we only have cyclic hierarchies [37]), when classifying residually nilpotent 3-manifolds (see [77, Question 2.12]) or when it comes to find the right pro-p analogue of limit groups [42]. On the other hand, there is research made on related principles, such as the virtual p-efficiency of JSJ-decompositions of graph manifolds [1] and also of fibred 3-manifolds [79, Theorem A].

Apart from their own intrinsic interest, the motivation for studying these pro-p separability principles is that they have a number of applications, for instance, on the residual properties and subgroup structure theory of pro-p completions of ICE groups [42]; on the conjugacy p-separability of certain classes of three-manifold groups [79, Theorems B and C]; on the profinite detection of JSJ decompositions of graph manifolds [80, Theorem A]; and on the profinite rigidity of direct products of free and surface groups [22, Theorem E]. However, the p-separability of non-cyclic subgroups seems to present many additional difficulties. For example, Bardakov [4] showed that there are \(p'\)-isolated subgroups in every free group that are not p-separable (answering in the negative a question of Moldavanskii [40, Problem 15.60]). So even for free groups it is unclear what can be a description of their p-separable subgroups.

Remark 3.14

There are exotic examples of groups all of whose subgroups are separable in the pro-p topology, such as the first Grigorchuk group [25] (they show that this group is separable and that its profinite completion is a pro-p group). Similar examples of groups with pro-p profinite completion were found by Fernández-Alcober–Garrido–Uria-Albizuri [20] among GGS groups (standing for Grigorchuk–Gupta–Sidki groups) and by Francoeur–Garrido [21] among Sunic groups. However, some of these are not separable.

The author is grateful to Alejandra Garrido and an anonimous referee for their suggestions on the previous discussion.

4 The p-genus of free or surface groups

In this section we prove Theorem A from the introduction, although here we state it and prove it as part of a more general dichotomy on subgroups.

Theorem 4.1

Let p be a prime and let S be a free or hyperbolic surface group. Suppose that G is a finitely generated residually-p group with \(G_{\hat{p}}\cong S_{\hat{p}}\). Assume that \(H\le G\). The following holds.

  1. (i)

    If H is amenable, then it is cyclic.

  2. (ii)

    If H is two-generated, then it is free.

  3. (iii)

    If H is finitely presented and non-cyclic, then it is large.

The property (i) of this theorem will follow from (ii) by the following lemma.

Lemma 4.2

Let G be a finitely generated residually-(torsion-free polycyclic) group and let \(H\le G\) be locally-cyclic. Then H is either trivial or infinite cyclic.

Proof

If H is finitely generated, then the conclusion follows immediately. We proceed by contradiction. Suppose, otherwise, that H is not finitely generated. Take \(1\ne h_1\in H\). Since H is locally cyclic but not cyclic, there exists \(a_2\notin \langle h_1\rangle \) and also \(h_2\in H\) such that \(\langle h_2\rangle =\langle h_1, a_2\rangle \). So there exists \(n_1\in \mathbb {Z}\) with \(h_2^{n_1}=h_1\) and, due to the fact that \(a_2\notin \langle h_1\rangle \), we derive that \(|n_1|>1\). Iterating this process, we show that then there must exist a sequence \((h_i)_{i\ge 1}\) in H of non-trivial elements and a sequence of integers \((n_i)_{i\ge 1}\) with \(|n_i|>1\) such that \(h_{i+1}^{n_i}=h_i\) for all \(i\ge 1\). Let \(\phi :G\longrightarrow Q\) be a surjective map to a torsion-free polycyclic group Q such that \(\phi (h_1)\ne 1\) (and hence \(\phi (h_i)\ne 1\) for all i). Now consider the ascending chain of subgroups

$$\begin{aligned} \langle \phi (h_1)\rangle \subseteq \langle \phi (h_2)\rangle \subseteq \cdots \subseteq \langle \phi (h_n)\rangle \subseteq \cdots \end{aligned}$$

of Q. Since Q is noetherian, this sequence must stabilise. So there exists \(k\ge 1\) such that \(\phi (h_{k+1})\in \langle \phi (h_{k})\rangle = \langle \phi (h_{k+1})^{n_k}\rangle .\) Since \(|n_k|>1\), this implies that \(\phi (h_{k+1})\) has finite order in Q, and so \(\phi (h_{k+1})=1\), which is a contradiction. \(\square \)

Before proving Theorem 4.1, we state the following well-known principle.

Lemma 4.3

Let S be a non-abelian free or surface group. Suppose that \(\textbf{H}\) is a topologically two-generated closed subgroup of \(S_{\hat{p}}\). Then \(\textbf{H}\) is a free pro-p group.

Proof

If S is free, this follows from Theorem 8.5. If S is a hyperbolic surface group of genus g, then the abelianisation of S has rank \(2g\ge 4\). This implies that the image of \( \textbf{H}\) in the abelianisation of \(S_{\hat{p}}\) has infinite index and, in particular, \(\textbf{H}\) already had infinite index in \(S_{\hat{p}}\). By Lemma 8.7, \(\textrm{cd}_p (\textbf{H})\le 1\). Lastly, again by Theorem 8.5, \(\textbf{H}\) is a free pro-p group. \(\square \)

Proof of Theorem 4.1

We first explain how the property (i) follows from (ii). Remark that amenable groups cannot contain non-abelian free subgroups. So, if H is amenable, then, by property (ii), H is locally cyclic. In addition, G is a subgroup of \(G_{\hat{p}}\), which is residually-(torsion-free nilpotent) by Proposition 2.15. Finally, by Lemma 4.2, H is cyclic.

Now we move on to prove (ii). Let S be a free or surface group and suppose that G belongs to the p-genus of S. The statement is clear when \(S\cong \mathbb {Z}\) because, in this case, \(G\cong \mathbb {Z}\). Let us suppose that S is a non-abelian free group or a hyperbolic surface group. Let \(H\le G\) be a two-generated subgroup. We separately analyse two cases, depending on whether H is abelian or not.

  1. (a)

    Firstly, consider the case when H is non-abelian. We consider \(\overline{H}\subseteq G_{\hat{p}}\). By Lemma 4.3, \(\overline{H}\) is a two-generated free pro-p group. Notice that \(H\le \overline{H}\) is not abelian, so the rank of \(\overline{H}\) has to be exactly equal to two and then \(\overline{H}\) is the free pro-p group of rank 2. Let x and y be two elements that generate H, then x and y are topological generators of \(\overline{H}\) and hence, by the Hopfian property, they are also free topological generators of \(\overline{H}\). In particular, the group H generated by x and y is free of rank two, as we wanted.

  2. (b)

    Lastly, suppose that H is abelian. By Theorem 3.12, the induced map \(H_{\hat{p}}\longrightarrow G_{\hat{p}}\) is injective. Moreover, by Lemma 4.3, \(H_{\hat{p}}\) is free. Hence \(H_{\hat{p}}\) is a cyclic pro-p group and H is cyclic.

The previous shows (ii). Finally, we explain how (iii) follows. Let H be a non-cyclic finitely presented subgroup. By (i), H is not abelian, so \(\overline{H}\le S_{\hat{p}}\) is not abelian either. The pro-p group \(\overline{H}\) must either be a non-abelian free pro-p group or an open subgroup of \(S_{\hat{p}}\). In any case, \(\overline{H}\) is isomorphic to the pro-p completion of a non-abelian free or surface group \(S'\). By Corollary 5.7, \(b_1^{(2)}(H)\ge b_1^{(2)}(S')>0\). Thus H is a finitely presented residually-p group with \(b_1^{(2)}(H)>0\) and, by [45, Theorem 1.6], it is large. \(\square \)

Remark 4.4

We should note that our methods can also establish parts (i) and (ii) of Theorem 4.1 for other hyperbolic limit groups S. For example, one can take S to be the free product \(S=S_1*\cdots *S_n\), with each \(S_i\cong F_i*_{u_i=\bar{u_i}} \bar{F_i}\) is the double of a free group \(F_i\) along a relator \({u_i}\in F_i\) that satisfies the same assumptions as r in Proposition 2.15. The pro-p completion \(S_{\hat{p}}\) will be residually-(torsion-free nilpotent) by Proposition 2.14 and, by the proof of [42, Theorem 7.3], the 2-generated subgroups of \(S_{\hat{p}}\) are cyclic or free pro-p. So our proof of Theorem 4.1 applies to such S to show parts (i) and (ii).

5 The first \(L^2\)-Betti number as a pro-\(\mathcal {C}\) invariant

We will describe some scenarios in which the first \(L^2\)-Betti number of a group G, denoted by \(b_1^{(2)}(G)\), is a profinite invariant. This plays an important role in the proof of Theorem D. A standard reference about \(L^2\)-invariants is the book of Lück [51] and, in alignment with the approach taken in this section, the survey paper of Jaikin-Zapirain [33].

For torsion-free groups G satisfying the Strong Atiyah conjecture, Linnell [47] shows that one can define \(b_1^{(2)}(G)\) as follows. Suppose that the group ring \(\mathbb {Q}G\) of G with rational coefficients has a universal division ring of fractions . This provides a notion of dimension for all \(\mathbb {Q}G\)-modules as follows: given a left \(\mathbb {Q}G\)-module M, we extend scalars \(\mathcal {D}_{\mathbb {Q}G} \otimes _{\mathbb {Q}G} M\) and take its linear-algebraic dimension as a left \( \mathcal {D}_{\mathbb {Q}G}\)-module. We can define the first \(L^2\)-Betti number for these groups G as

$$\begin{aligned} b_1^{(2)}(G)=\dim _{\mathcal {D}_{\mathbb {Q}G}} H_1(G; \mathcal {D}_{\mathbb {Q}G}). \end{aligned}$$

Since locally indicable groups satisfy the Strong Atiyah conjecture by a result of Jaikin-Zapirain and López-Álvarez [36], the previous is a definition of \(b_1^{(2)}\) for these groups. A general philosophy that explains why we work with first \(L^2\)-Betti numbers instead of usual Betti numbers is that the former behave in a better way while containing similar information. For example, they are multiplicative in the following sense.

Proposition 5.1

(Theorem 1.35(9), [51]) Let G be a finitely generated group and let H be a finite-index subgroup. Then \( b_1^{(2)}(H)=b_1^{(2)}(G)\, |G: H|.\)

5.1 Estimations using Lück approximation

When it comes to relate the first \(L^2\)-Betti number \(b_1^{(2)}(G)\) of a group G to its profinite completion \({\hat{G}}\), it is particularly helpful the characterisation of \(b_1^{(2)}(G)\) as a limit of (normalised) usual Betti numbers over a filtration of G by normal finite-index subgroups. A pioneering result in this direction is due to Lück [52].

Theorem 5.2

(Lück’s approximation theorem) Let G be a group of type \(\texttt{FP}_2\) and let \(G=N_1>N_2>\dots>N_m>\dots \) be a sequence of finite-index normal subgroups with \(\bigcap _m N_m=1\). Then

$$\begin{aligned} \mathop \mathrm{lim~sup}_{m\rightarrow \infty } \frac{b_1(N_m)}{|G:N_m|}= b_1^{(2)}(G). \end{aligned}$$

Importantly, for residually-finite groups that are not \(\texttt{FP}_2\), we still have a one-sided estimate of the same type.

Theorem 5.3

([48]) Let G be finitely generated and let \(G=N_1>N_2>\dots>N_m>\dots \) be a sequence of finite-index normal subgroups with \(\bigcap _m N_m=1\). Then

$$\begin{aligned} \mathop \mathrm{lim~sup}\limits _{m\rightarrow \infty } \frac{b_1(N_m)}{|G:N_m|}\le b_1^{(2)}(G). \end{aligned}$$

We move on to the observation that groups G satisfying the following inequality also have a Lück approximation theorem:

$$\begin{aligned} b_1(G_0)\ge b_1^{(2)}(G_0)+1\, \text{ for } \text{ every } \text{ finite-index }~G_0\le G. \end{aligned}$$
(6)

Examples of groups G with this property are limits of left-orderable amenable groups in the space of marked group presentations (by a result of Osin [60, Theorem 1.4]). Interestingly, the property of (6) can be proven in greater generality.

Proposition 5.4

(Jaikin-Zapirain [34]) Let G be a finitely generated residually-(locally indicable and amenable) group. Then \(b_1^{(2)}(G)\le b_1(G)-1\).

For our purposes, the interest behind Proposition 5.4 is that it allows to extend the Lück approximation Theorem 5.2 of \(b_1^{(2)}\) to other classes of groups.

Corollary 5.5

Let G be a finitely generated residually-(amenable and locally indicable) group. Let \(G=N_1>N_2>\dots>N_m>\dots \) be a sequence of finite-index normal subgroups with \(\bigcap _m N_m=1\). Then

$$\begin{aligned} \lim _{m\rightarrow \infty } \frac{b_1(N_m)}{|G:N_m|}= b_1^{(2)}(G). \end{aligned}$$
(7)

Proof

We know from Theorem 5.3 that

$$\begin{aligned} \limsup _{m\rightarrow \infty } \frac{b_1(N_m)}{|G:N_m|}\le b_1^{(2)}(G). \end{aligned}$$

On the other hand, \(b_1(N_m)\ge b_1^{(2)}(N_m)+1=b_1^{(2)}(G)|G: N_m|+1\) for all m by Proposition 5.4 and the multiplicativity of \(b_1^{(2)}\) (Proposition 5.1). So

$$\begin{aligned} \liminf _{m\rightarrow \infty } \frac{b_1(N_m)}{|G:N_m|}\ge b_1^{(2)}(G). \end{aligned}$$

Hence the limit of (7) exists and equals \(b_1^{(2)}(G)\). \(\square \)

Definition 5.6

We say that a finitely generated residually finite group G is Lücky if for every descending sequence \(G=N_1>N_2>\dots>N_m>\dots \) of finite-index normal subgroups \(N_m\) with \(\bigcap _m N_m=1\), it satisfies that

$$\begin{aligned} \lim _{m\rightarrow \infty } \frac{b_1(N_m)}{|G:N_m|}= b_1^{(2)}(G). \end{aligned}$$

We summarise this subsection by saying that both \(\texttt{FP}_2\) groups and finitely generated residually-(amenable and locally indicable) groups are Lücky by Theorem 5.2 and Corollary 5.5.

5.2 An invariant of the genus

We are going to denote by \(\mathcal {C}\) a formation of finite groups containing the formation of finite p-groups, denoted by \(\mathcal {C}_p\). If G and H are finitely generated groups with the same pro-\(\mathcal {C}\) completion then it is clear that \(b_1(G)=b_1(H)\). This leads to the following corollary (which is a re-statement of [12, Proposition 7.5]).

Corollary 5.7

Let \(\mathcal {C}\) be a formation of finite groups that includes \(\mathcal {C}_p\) for some p. Let H be a Lücky and residually-\(\mathcal {C}\) group. If G admits a dense embedding into \(H_{{\hat{\mathcal {C}}}}\) then \(b_1^{(2)}(G)\ge b_1^{(2)}(H)\). In particular, if G is also Lück and \(G_{{\hat{\mathcal {C}}}}\cong H_{{\hat{\mathcal {C}}}}\), then \(b_1^{(2)}(G)=b_1^{(2)}(H)\).

6 Residually free and limit groups

The purpose of this section is reviewing separability and structural properties of residually free groups and a criteria to detect hyperbolic and limit groups among them. In Sect. 9, we will see to what extend some of these strong features are still true in some of the groups of the class \({\mathcal {H}_\textbf{ab}}\). Proposition 6.1 relates the structure of finitely generated residually free groups to the structure of limit groups.

Proposition 6.1

([11], Corollary 19; and [65], Claim 7.5) Let G be a finitely generated residually free group. Then G is a subdirect product of finitely many limit groups.

A classical question attributed to Gromov asks whether one-ended hyperbolic groups must contain surface subgroups, and Wilton answers this question positively for many cyclic splittings in the following way.

Theorem 6.2

([81], Theorem 6.1) Let G be the fundamental group of a graph of virtually free groups and virtually cyclic edge subgroups. Suppose that G is hyperbolic and one-ended. Then G contains a surface subgroup.

As proven in [81, Corollary C], the theorem above can be applied, in combination with Sela’s hierarchy on limit groups [65], to find surface subgroups in non-free limit groups. Theorem 6.2 is slightly improved by Fruchter and the author [22, Theorem A].

6.1 Criterion for the hyperbolicity of residually free groups

We state a criterion that helps to recognise a hyperbolic group given a cyclic splitting. It is a consequence of the combination theorem for negatively curved groups of Bestvina–Feighn [10].

Theorem 6.3

Let \((\mathcal {G}, Y)\) be a finite graph of groups with hyperbolic vertex groups and virtually cyclic edge subgroups. Then its fundamental group \(\pi \) is hyperbolic if and only if it contains no Baumslag–Solitar subgroups.

This combination theorem was used by Sela [65, Corollary 4.4. (iii)] to show that a limit group is hyperbolic if and only if it contains no \(\mathbb {Z}^2\). This criterion can be extended to residually free groups as in the following result.

Proposition 6.4

([9], Lemma 4.15) Let G be a finitely generated residually free group. Then G is a hyperbolic limit group if and only if it contains no \(\mathbb {Z}^2\).

6.2 Separability properties

Wilton [76] proved that finitely generated subgroups of limit groups are quasiconvex and separable by establishing the following stronger property.

Definition 6.5

Let A be a subgroup of B. We say that A is a virtual retract of B if there exists a finite-index subgroup \(B_1\) of B containing A and a group homomorphism \(r: B_1\longrightarrow A\) such that r restricts to the identity function on A.

Theorem 6.6

([76]) Let G be a limit group and let H be a finitely generated subgroup. Then H is a virtual retract of G.

This principle was later extended to subgroups of type \(\texttt{FP}\) of finitely generated residually free groups by Bridson–Wilton [13, Theorem B]. In the following section we treat other classes of groups with similar retraction properties (see Theorem 9.3).

7 Proof of Theorem D

In this final section we prove Theorem D, which states the following.

Theorem 7.1

(Theorem D) Let G be a finitely generated residually free group and let S be a free or surface group. Suppose that \({\hat{G}}\cong {\hat{S}}\times {\hat{\mathbb {Z}}}^n\). Then \(G\cong S\times \mathbb {Z}^n\).

We will state two lemmas that we will use during the proof of Theorem D. The first allows us to prove that the centre of a residually free group is a profinite invariant.

Lemma 7.2

([6], Lemma 4) Let G be a residually free group. Then G/Z(G) is a residually free group with trivial centre.

The second lemma is a profinite criterion that detects when short exact sequences split. It was used by Wilton–Zalesskii [87] to distinguish circle bundles over the surface by looking at finite quotients of their fundamental group (later on used in dimension 4 by Jiming–Zixi [56, Proposition 25]).

Lemma 7.3

([87], Lemma 8.3) Let \(n\ge 0\) be an integer and let S be a surface group. Let

figure e

be a central extension of S by the group \(\mathbb {Z}^n\). Suppose that the induced short sequence in profinite completions

figure f

is also exact and that it splits. Then the sequence (8) splits, too.

We remark that the exactness of (9) is always ensured if (8) is exact, by the goodness of S (as observed by Serre [67, Chapter 1, Section 2, Exercise 2(b)]). However, we stated this as an assumption for clearness, as it is also enough for our application. Regarding this lemma of Serre, we also refer the reader to [49, Proposition 2.4] for a precise proof and a converse.

Proof of Theorem D

Let S be a free or surface group and let G be a finitely generated residually free group in the finite genus of \(S\times \mathbb {Z}^n\). If S is abelian, then it is clear that \(G\cong S\times \mathbb {Z}^n\). So we can suppose that S is hyperbolic and non-abelian. In particular, \(b_1^{(2)}(S)>0\) and \({\hat{S}}\) is centreless, as we shall now prove.

Claim 7.4

The centre of \({\hat{S}}\) is trivial.

Proof

This is well-known (see, for example, [89]). A more direct proof can be given with results stated in this paper. If we had \(Z({\hat{S}})\ne 1\), then \(\mathbb {Z}_p^2\) would be a closed subgroup of \({\hat{S}}\) for some prime p with an index divisible by \(p^{\infty }\). If S was free, this would contradict that \({\hat{S}}\) is projective; and, if S was a surface group, this would contradict Lemma 8.7. \(\square \)

So \(Z({\hat{S}}\times \hat{\mathbb {Z}}^n)=\hat{\mathbb {Z}}^n\). We denote by the canonical injection.

Claim 7.5

The centre Z(G) is a finitely generated subgroup of G and the induced map \({\hat{\iota }}:\hat{Z(G)}\longrightarrow {\hat{G}}\) is injective.

To prove the claim, first recall that \(Z({\hat{G}})= {\hat{\mathbb {Z}}}^n\) is a retract of \({\hat{G}}\). Denoting this retraction by \(r:{\hat{G}}\longrightarrow Z({\hat{G}})\), we have the following natural commutative diagram:

figure g

for some naturally defined f and g from the canonical maps \(\iota , p\) and r. We can read off from the diagram that \(g\circ f\) is injective, so f is injective, too. This implies that Z(G) is a subgroup of the finitely generated abelian group G/[GG], so it is finitely generated, too. Now we consider a second natural commutative diagram:

figure h

We know that f is injective, so \({\hat{f}}\) is also injective (since finitely generated abelian groups are LERF). Thus \({\hat{\iota }} \) is injective and Claim 7.5 is proven.

Claim 7.6

The profinite group \( Z({\hat{G}})/\overline{Z(G)}\) is the profinite completion of a finitely generated abelian group A.

The image of \({\hat{\iota }} \) can be alternatively described as the closure of and it is easy to see that it is a normal subgroup of \({\hat{G}}\) that is contained in \(Z({\hat{G}})={\hat{\mathbb {Z}^n}}\). We consider the group \(H=G/Z(G)\), which is a finitely generated residually free group with trivial centre by Lemma 7.2. By Proposition 2.6, \({\hat{H}}\) is naturally isomorphic to \({\hat{G}}/\overline{Z(G)}\cong {\hat{S}}\times \left( Z({\hat{G}})/\overline{Z(G)}\right) \). So \(Z({\hat{G}})/\overline{Z(G)}\) appears as a direct factor of \({\hat{H}}/[{\hat{H}}, {\hat{H}}]\cong \left( {\hat{S}}/[{\hat{S}}, {\hat{S}}]\right) \times \left( Z({\hat{G}})/\overline{Z(G)}\right) \), where \({\hat{H}}/[{\hat{H}}, {\hat{H}}] \) and \({\hat{S}}/[{\hat{S}}, {\hat{S}}]\) are the profinite completions of H/[HH] and S/[SS], respectively. This shows Claim 7.6.

Claim 7.7

The image of the map \({\hat{\iota }}:\hat{Z(G)}\longrightarrow {\hat{G}}\) is \(Z({\hat{G}})\).

We denote by \(p_1\) and \(p_2\) the projections of \({\hat{H}}\) onto its first and second direct factor according to the decomposition \( {\hat{H}}\cong {\hat{S}} \times Z({\hat{G}})/\overline{Z(G)}\). Claim 7.7 follows if the second factor is trivial. Let us suppose that it is not trivial to reach a contradiction. We study two separate cases.

  1. (i)

    Suppose that \(Z({\hat{G}})/\overline{Z(G)}\) is infinite. By Claim 7.6, there exists an infinite finitely generated abelian group A such that \(Z({\hat{G}})/\overline{Z(G)}\cong {\hat{A}}\). Hence H and \(K=S\times A\) have the same profinite completion. Observe that K is Lücky and that \(b_1^{(2)}(K)=0\). Since H is residually free, it is also Lücky by Corollary 5.5, so it follows from Corollary 5.7 that \(b_1^{(2)}(H)= b_1^{(2)}(K)=0\). This implies that the restriction of \(p_1\) to H cannot be injective (otherwise, we would see H as a dense subgroup of \({\hat{S}}\) and it would follow from Corollary 5.7 that \(b_1^{(2)}(H)\ge b_1^{(2)}(S)>0\), contradicting the fact that \(b_1^{(2)}(H)=0\)). So H intersects \(\ker p_1=Z({\hat{G}})/\overline{Z(G)}=Z({\hat{H}})\) non-trivially and then \(Z(H)\ne 1\), which contradicts Lemma 7.2.

  2. (ii)

    Suppose that \(Z({\hat{G}})/\overline{Z(G)}\) is finite. Then we can still prove that H intersects non-trivially the direct factor \(Z({\hat{G}})/\overline{Z(G)}\), leading to the same contradiction as before. To verify this, let us denote \(H_1=H\cap {\hat{S}}\). This is a finite-index subgroup of H with \({\hat{H}}_1\cong {\hat{S}}\) by Proposition 2.10. So \(H_1\) is also Lücky and \(b_1^{(2)}(H_1)=b_1^{(2)}(S)\) by Corollary 5.7. Observe that \(p_1(H_1)\) is isomorphic to \(H_1\), that this is finite-index in \(p_1(H)\), and that both \(p_1(H_1)\) and \(p_1(H)\) are dense in \({\hat{S}}\). Let us denote the index \(k=|p_1(H): p_1(H_1)|\). Using the multiplicativity of \(b_1^{(2)}\) (Proposition 5.1) and the estimation of Corollary 5.7, it follows that

    $$\begin{aligned}b_1^{(2)}(p_1(H))\ge b_1^{(2)}(S)=b_1^{(2)}(H_1)=b_1^{(2)}(p_1(H_1))=k\cdot b_1^{(2)}(p_1(H)).\end{aligned}$$

    Since \(b_1^{(2)}(S)\) is positive, we derive from the previous inequalities that \(k=1\) and hence \(p_1(H)=p_1(H_1)\). From this, it is immediate to see that \(Z({\hat{G}})/\overline{Z(G)}=p_2(H)=p_2(H\cap Z({\hat{G}})/\overline{Z(G)})\), and then \(H\cap Z({\hat{G}})/\overline{Z(G)}\ne 1\), as we wanted.

This proves Claim 7.7. Since \(H=G/Z(G)\) is a finitely generated residually free group and \({\hat{H}}\cong {\hat{S}}\) by Claim 7.7, it follows from the work of Wilton [81, 82] that \(H\cong S\).

Claim 7.8

The short exact sequence

figure i

splits. In particular, \(G\cong Z(G)\times G/Z(G)\cong \mathbb {Z}^n\times S\).

The proof of the claim would complete the proof of Theorem D. This claim is obvious when S is free and, when S is a surface group, it is a direct consequence of Lemma 7.3. \(\square \)

8 Cohomological dimension and Poincaré duality

Here we recall the finiteness properties of groups that we shall use. We denote by R a unital and associative ring (not necessarily commutative).

Definition 8.1

We say that an R-module M is of type \(\texttt{FP}_n(R)\) if there exists a projective resolution

$$\begin{aligned} \longrightarrow P_{n+1}\longrightarrow P_n\longrightarrow \cdots \longrightarrow P_1\longrightarrow P_0\longrightarrow M\longrightarrow 0 \end{aligned}$$

with \(P_i\) finitely generated for \(0\le i\le n\). Moreover, we say that an R-module M is of type \(\texttt{FP}_{\infty }(R)\) if it is of type \(\texttt{FP}_n(R)\) for all n. Analogously, we say that a group G is of type \(\texttt{FP}_n(R)\) (resp. of type \(\texttt{FP}_{\infty }(R)\)) if the trivial RG-module R is of type \(\texttt{FP}_n(R)\) (resp. of type \(\texttt{FP}_{n}(R)\) for all n).

8.1 Profinite groups

We refer the reader to [59, Chapter 2, Section 7] for details about the cohomology theory of profinite groups with profinite coefficient modules. Computations on profinite group cohomology can be reduced to analogous computations on abstract group cohomology via Serre’s fundamental notion of goodness [67, Section I. 2. 6]. A group is said to be cohomologically good (or simply good) if for every finite discrete \({\hat{G}}\)-module A, the natural homomorphism

$$\begin{aligned} H^k(\hat{G}; A)\longrightarrow H^k(G; A), \end{aligned}$$

induced by \(G\longrightarrow \hat{G}\), is an isomorphism. A group G is said to be subgroup separable or LERF (standing for locally extended residually finite) if every finitely generated subgroup \(H\le G\) is closed in the profinite topology. This implies that the topology induced on H from the profinite topology of G is the full profinite topology of H. Hence, by Lemma 2.12, if G is LERF, then the natural map \(\hat{H}\longrightarrow \bar{H}\subseteq \hat{G}\) is an isomorphism of profinite groups for all finitely generated \(H\le G\).

Given a profinite group \(\textbf{G}\), the completed group algebra of \(\textbf{G}\) over \(\mathbb {Z}_p\) is a profinite ring defined as the inverse limit of the usual group rings \(\left( \mathbb {Z}/p^i\mathbb {Z}\right) [\textbf{G}/\textbf{U}]\), where \(i\ge 0\) and \(\textbf{U}\) ranges over open normal subgroup of \(\textbf{G}\). We say that \(\textbf{G}\) is of type p-\(\texttt{FP}_n\) if the \(\mathbb {Z}_p \llbracket \textbf{G}\rrbracket \)-module \(\mathbb {Z}_p\) is of type \(\texttt{FP}_n\).

Proposition 8.2

([32], Proposition 3.1) If \(\Gamma \) is an abstract \(\texttt{FP}_{\infty }\) and good group then its profinite completion \(\hat{\Gamma }\) is of type p-\(\texttt{FP}_{\infty }\) for every prime p.

Recall we say a module M is simple if and only if it has exactly two submodules.

Definition 8.3

We say that a profinite group \(\textbf{G}\) has p-cohomological dimension \(n=\textrm{cd}_p(\textbf{G})\) if n is the largest non-negative integer m such that \(H^{m+1}(\textbf{G}, A)=0\) for all simple discrete \(\mathbb {Z}_p\llbracket \textbf{G}\rrbracket \)-modules that are annihilated by p.

Recall from [67, Corollary 1 of Chapter 3, and Proposition 21] that if \(\textbf{G}_p\) is the p-Sylow of a profinite group \(\textbf{G}\), then \(\textrm{cd}_p(\textbf{G})=\textrm{cd}_p(\textbf{G}_p)\). Good groups G enjoy the convenient property that

$$\begin{aligned} \textrm{cd}_p(\hat{G})=\textrm{cd}_p (G)\, \, \,\text{ for } \text{ all } \text{ primes } p. \end{aligned}$$

In particular, a free profinite group has \(\textrm{cd}_p= 1\) and profinite surfaces have \(\textrm{cd}_p= 2\). We should remark that focusing on p-primary modules in the Definition 8.3 of the “cohomological dimension function” \(\textrm{cd}_p\) allows to avoid the pathology of \(H^2({\hat{\mathbb {Z}}}; \mathbb {Z})\) being non-zero (as this is isomorphic to \(H^1({\hat{\mathbb {Z}}}, \mathbb {Q}/\mathbb {Z})\cong \mathbb {Q}/\mathbb {Z}\) [67, Chapter 1, Section 3.2]). The dimension function \(\textrm{cd}_p\) enjoys nice “geometric” properties. For example, by Shapiro’s lemma given a closed subgroup \(\textbf{H}\) of a profinite group \(\textbf{G}\), we have \(\textrm{cd}_p(\textbf{H})\le \textrm{cd}_p(\textbf{G})\) (see [61, Theorem 7.3.1]). Furthermore, \(\textrm{cd}_p\) is sometimes additive with respect to short exact sequences (as reflected by [86, Theorem 1.1]).

A classical characteristic feature of groups of finite cohomological dimension is the following well-known lemma.

Lemma 8.4

Let \(\textbf{G}\) be a profinite group with \(\textrm{cd}_p (\textbf{G})<\infty \) for all primes p. Then \(\textbf{G}\) is torsion-free.

This is essentially the only tool we have to recognise torsion-freeness of an abstract group from the profinite completion. Interestingly, Lubotzky shows that being torsion-free is not a profinite property ([50, Proposition 1.5]). The following is the analogous theorem of Stallings’ [69] and Swan’s [73] for the category of pro-p groups.

Theorem 8.5

(Theorem 7.7.4, [61]) Let \(\textbf{G}\) be a pro-p group with \(\textrm{cd}_p(\textbf{G})\le 1\). Then \(\textbf{G}\) is a free pro-p group.

8.2 Poincaré duality and the recognition of surfaces

Eckman and Müller [19] proved that surface groups are the only Poincaré duality groups of dimension two. Before discussing the analogous principles for profinite groups, we recall the following definition from [72, Section 4.4].

Definition 8.6

Let \(\textbf{G}\) be a profinite group of type p-\(\texttt{FP}_{\infty }\). We say that \(\textbf{G}\) is a Poincaré duality group at p of dimension n (written as \(\texttt{PD}^n\) at p) if \(\textrm{cd}_p(\textbf{G})=n\) and

$$\begin{aligned}&H^i(\textbf{G}, \mathbb {Z}_p \llbracket \textbf{G}\rrbracket )=0 \, \,\, \, \text{ for } i\ne n, \\&H^i(\textbf{G}, \mathbb {Z}_p\llbracket \textbf{G}\rrbracket )\cong \mathbb {Z}_p \, \,\, \, \text{(as } \text{ abelian } \text{ groups). } \end{aligned}$$

These denote the continuous cochain cohomology groups in the sense of [59, Definition 2.7.1].

A pro-p group \(\textbf{G}\) is \(\texttt{PD}_1\) if and only if \(\textbf{G}\cong \mathbb {Z}_p\) (see [72, Example 4.4.4]) and Poincaré duality pro-p groups of dimension 2 are known to coincide with the class of Demushkin groups (see [67, Section I.4.5, Example 2]), which is a class of one-relator pro-p groups that was classified by Demushkin, Serre and Labute [15, 16, 43, 66]. However, this question is poorly understood for general profinite groups. Similarly, it is not known whether a finitely generated residually finite group whose profinite completion is \(\texttt{PD}_2\) at a prime p is itself \(\texttt{PD}_2\). Wilton [82] showed that if such group is additionally residually free then it is a surface group, which we restate in Proposition 8.10. This has been recently generalised in [38] with a different argument. In order to restate Wilton’s criterion, we require the following profinite variant of Strebel’s theorem [71] on infinite-index subgroups of \(\texttt{PD}_n\) abstract groups (which can be found in [67, Page 44, exercise 5(b)] and [59, Chapter 3, Section 7, Exercise 3]).

Lemma 8.7

[Serre] Let \(\textbf{G}\) be a profinite \(\texttt{PD}_n\) group at a prime p and let \(\textbf{H}\) be a closed subgroup such that \(p^{\infty }\) divides the index \(|\textbf{G}: \textbf{H}|\). Then \(\textrm{cd}_p(\textbf{H})<n\).

The previous lemma was of fundamental importance in the work of Wilton–Zalesskii [88] on the profinite detection of prime and JSJ decompositions of three-manifolds.

Remark 8.8

When \(\textbf{G}\) is a pro-p group, Lemma 8.7 only requires \(\textbf{H}\) to have infinite index. Nevertheless, for general profinite groups \(\textbf{G}\), the conclusion of the theorem would not be true by only requiring infinite index. In fact, \({\hat{\mathbb {Z}}}\) is \(\texttt{PD}_1\) at p, yet it contains closed subgroups isomorphic to \({\hat{\mathbb {Z}}}\) of index equal to the supernatural number \(\prod _p p\).

The most natural source of examples of profinite Poincaré duality groups consists of profinite completions of abstract Poincaré duality groups, as the following result from [41, Theorem 4.1] ensures.

Theorem 8.9

Let \(\Gamma \) be an abstract cohomologically good \(\texttt{PD}_n\) group. Then \(\hat{\Gamma }\) is a profinite \(\texttt{PD}_n\) group at every prime and \(\Gamma _{\hat{p}}\) is \(\texttt{PD}_n\) at p.

Finally, we are ready to give a more refined criterion to detect surfaces. This criterion, stated in Proposition 8.10, was used by Wilton [82] to establish Conjecture 1.2 when S is a surface group and G is a limit group.

Proposition 8.10

(Wilton, [82]) Let p be a prime and let G be a torsion-free residually finite group with separable cyclic subgroups such that its profinite completion \({\hat{G}}\) is \(\texttt{PD}_2\) at p. Suppose that G contains a surface subgroup as a virtual retract. Then G is a surface group.

Proof

By assumption, there exists a finite-index subgroup L of G containing a surface group \(\pi _1\Sigma \) as a retract. Let K be the kernel of the retraction \(L\longrightarrow \pi _1\Sigma \). Our aim is to prove that \(K=1\). This way, we would have that \(L\cong \pi _1\Sigma \) and that the torsion-free group G would be virtually a surface group. So the conclusion would follow from Kerckhoff’s solution to the Nielsen realisation problem for surfaces.

Hence, it remains to show that \(K=1\). We proceed by contradiction. Suppose that \(K\ne 1\). The retraction induces a retraction at the level of the profinite completions. Take \(1\ne k\in K\). Since G is torsion-free and cyclic subgroups are separable, then \(\langle k\rangle \cong \mathbb {Z}\) and the supernatural number \(p^{\infty }\) divides the order of \(\overline{\langle k\rangle } \cong {\hat{\mathbb {Z}}}\). Since k is contained in the kernel \(\textbf{K}\) of the retraction \(\hat{L}\longrightarrow \hat{\pi _1 \Sigma }\), then \(|\textbf{K}|=|\overline{\langle k\rangle } ||\textbf{K}: \overline{\langle k\rangle } |\) is also divisible by \(p^{\infty }\). We now claim that \(p^{\infty }\) also divides the index \(|\hat{L}:\hat{\pi _1\Sigma }|\). This way, it would also divide the index \(|\hat{G}:\hat{\pi _1\Sigma }|\) and, by Lemma 8.7, the p-cohomological dimension of \(\hat{\pi _1\Sigma }\) should be at most \(\textrm{cd}_p(\hat{G})-1=1\), which is a contradiction.

Thus, it simply remains to prove that \(p^{\infty }\) divides \(|\hat{L}\!:\!\hat{\pi _1\Sigma }|\). From the comments above, we know that, for every \(n\ge 1\), there exists a characteristic open subgroup \(\textbf{U}\unlhd _{o}\textbf{K}\) such that \(p^n\) divides \(|\textbf{K}\!:\!\textbf{U}|\). We observe that \(\textbf{H}=\textbf{U}\cdot \hat{\pi _1\Sigma }\) is an open subgroup of \({\hat{L}}\). After taking a normal open subgroup \(\textbf{H}_0\unlhd _{o}{\hat{L}}\) contained in \(\textbf{H}\) (for example, its core), we are going to check that \(p^n\) divides \(|{\hat{L}}: \textbf{H}_0\cdot \hat{\pi _1\Sigma }|\). For this, is suffices to notice that the previous index is divisible by

$$\begin{aligned} |{\hat{L}}: \textbf{H}\cdot \hat{\pi _1\Sigma }|=|\textbf{K}\cdot \hat{\pi _1\Sigma }: \textbf{U}\cdot \hat{\pi _1\Sigma }|=|\textbf{K}: \textbf{U}|, \end{aligned}$$

since \(\textbf{U}\unlhd _{o}\textbf{K}\) and \(\textbf{K}\cap \hat{\pi _1\Sigma }=\{1\}\). We chose \(\textbf{U}\) so \(p^n\) divides \(|\textbf{K}: \textbf{U}|\) and n was an arbitrary positive integer. So this proves that \(p^{\infty }\) divides \(|\hat{L}: \hat{\pi _1\Sigma }|\). \(\square \)

For the purpose of proving Corollary 1 using Proposition 8.10, we remark that the profinite completion of a surface \(\hat{\pi _1\Sigma }\) is \(\texttt{PD}_2\) at p for all primes p.

9 Hyperbolic and special groups

The study of special cube complexes was initiated by Haglund–Wise in their seminal paper [30] and plays a fundamental role in the solution of many results about three-manifolds, such as Agol’s proof of the virtual Haken conjecture [3]. We refer the reader to the book of Aschenbrenner–Friedl–Wilton [2] for more examples and discussion. A group is said to be special (resp. compact special) if it is the fundamental group of a non-positively curved (resp. compact) cube complex that satisfies Haglund–Wise’s special condition on its hyperplanes. We will not delve into this definition because we are only interested in the retraction properties of these groups (as reflected by Theorem 9.3) and their consequences in the proof of Corollary 1. Nevertheless, in order to offer a more precise idea of what these groups look like, we recall the following alternative description.

Theorem 9.1

([30], Theorem 4.2) A group G is special (resp. compact special) if and only if it is a subgroup (resp. a quasiconvex subgroup) of a right-angled Artin group.

As anticipated in the introduction, many groups from \({\mathcal {H}_\textbf{ab}}\) will be hyperbolic and virtually compact special.

Proposition 9.2

Let G be a group belonging to \({\mathcal {H}_\textbf{ab}}\) with the following properties:

  1. (1)

    It is torsion-free.

  2. (2)

    It contains no Baumslag–Solitar subgroups.

  3. (3)

    Its abelian subgroups are cyclic.

Then G is hyperbolic and virtually compact special.

Proof

Recall that a finitely generated residually free group that contains no \(\mathbb {Z}^2\) is hyperbolic by Proposition 6.4. Hence the group G is hyperbolic by Theorem 6.3. Now the conclusion that G is virtually compact special follows directly from Wise’s classification of hyperbolic groups with a malnormal quasi-convex hierarchy [85, Theorem 11.2]. \(\square \)

From the proof of [30, Theorem 7.3], we know that quasi-convex subgroups of hyperbolic compact special groups are virtual retracts (recall Definition 6.5).

Theorem 9.3

Let G be a hyperbolic virtually compact special group and let \(H\le G\) be a quasi-convex subgroup. Then there exists a finite-index subgroup \(H' \) of H such that \(H'\) is a virtual retract of G.

We can use Wilton’s partial solution to Gromov’s surface conjecture (Theorem 6.2) to find surface subgroups in certain groups of \({\mathcal {H}_\textbf{ab}}\) that will be relevant for the proof of Corollary 1.

Proposition 9.4

Let G be as in Proposition 9.2. Suppose that G is not free. Then G contains a surface subgroup as a virtual retract.

Proof

By Proposition 9.2, G is hyperbolic and virtually compact special. So, by Theorem 9.3, in order to conclude that G contains a hyperbolic surface subgroup as a virtual retract, it is enough to ensure that G contains a quasi-convex surface subgroup. Furthermore, we know that for finitely generated subgroups of a hyperbolic group, being quasi-convex and quasi-isometrically embedded is equivalent. Hence, it suffices to ensure that there exists a quasi-isometrically embedded surface subgroup in G to prove Proposition 9.4, which we prove by induction on the level of the hierarchy.

Let us start with the level 0, that is, when G is a finitely generated residually free group. Since G contains no \(\mathbb {Z}^2\), then G is limit by Proposition 6.4 and the statement follows directly from Theorem 6.2. Now we establish the inductive step by distinguishing two cases.

  • Suppose that \(G=A *_C B\) (resp. \(G=A _{C, \theta }\) for some injection \(\theta : C\longrightarrow A\)), where A and B (resp. A) are groups in \({\mathcal {H}_\textbf{ab}}\) for which the statement holds and C is cyclic. Since both A and B are quasi-isometrically embedded in G (for example, by [39, Theorem 1.2]), then G will contain a quasi-isometrically embedded surface if at least one of A or B does. So it remains to ensure the conclusion in the case when A and B (resp. A) are free. Viewing G as the fundamental group of a graph of two free groups (resp. one free group) with infinite cyclic edge groups, we apply a variant of Shenitzer’s theorem [78, Theorem 18] to deduce that, if G is not one-ended, then some vertex will split freely relative to its incident edge groups. In particular, applying this result a finite number of times (and taking out an infinite cyclic free factor of G each time), we deduce that G is isomorphic to the free product \(F* G'\) for a free group F and a one-ended group \(G'=A' *_C B'\) (resp. \(G=A' _{C, \theta }\) for the injection \(\theta : C\longrightarrow A'\)), where \(A'\) and \(B'\) are free factors of A and B (resp. \(A'\) is a free factor of A). Since G was hyperbolic, and \(G'\) is a quasi-convex subgroup, then \(G'\) is also hyperbolic. So \(G'\) is a hyperbolic one-ended fundamental group of a graph of free groups with cyclic edges. By Theorem 6.2, the group \(G'\) (and hence also G) contains a quasi-convex surface subgroup.

  • Suppose that G has a finite-index subgroup \(H\in {\mathcal {H}_\textbf{ab}}\) for which the statement is already true. Since G is torsion-free and not free, then H is not free by [69, Theorem 2]. So H (and hence also G) must contain a surface subgroup that is a virtual retract.

\(\square \)

10 Pro-p detection of algebraic and topological properties

We recall that by Theorem 2.2, groups in the finite, soluble or nilpotent genus of a free or surface group S, do belong to the p-genus of S for all primes p. So all the results here about any p-genus of S include all these genera.

10.1 Lücky groups

It is generally not well understood if being Lücky (Definition 5.6) is a profinite invariant (see Question 10.2 below). However, Jaikin-Zapirain [35] can answer affirmatively to this question for the genera of free and surface groups as a consequence of the following.

Proposition 10.1

Let S be a free or surface group and let G be an abstract subgroup of \(S_{\hat{p}}\). Then G is Lücky.

Proof

By Proposition 2.14 and Proposition 2.15, G is residually-(torsion-free nilpotent). By Corollary 5.5, G is Lücky. \(\square \)

It is not difficult to see that the previous G have to be RFRS (there is, in fact, a stronger statement in [35, Proposition 4.1]).

Question 10.2

Let \(\Gamma \) and \(\Lambda \) be finitely generated residually finite groups with \({\hat{\Gamma }}\cong {\hat{\Lambda }}\). If \(\Gamma \) is Lücky, does it follow that \(\Lambda \) is Lücky?

This relates the question of whether being RFRS is a profinite property.

Question 10.3

Let \(\Gamma \) and \(\Lambda \) be finitely generated residually finite groups with \({\hat{\Gamma }}\cong {\hat{\Lambda }}\). If \(\Gamma \) is RFRS, does it follow that \(\Lambda \) is RFRS?

10.2 Hyperbolic and special groups

Here we see how Theorem 4.1 allows us to study when groups from \({\mathcal {H}_\textbf{ab}}\) (Definition 1.3) or one-relator groups can be proven to be hyperbolic and virtually special by looking at their pro-p completion.

Corollary 10.4

Let p be a prime and let G be a group in the class \({\mathcal {H}_\textbf{ab}}\) that belongs to the p-genus of a free or hyperbolic surface group. Then G is hyperbolic and virtually compact special.

Proof

By Theorem 4.1, G is torsion-free, contains no Baumslag–Solitar groups and contains no non-cyclic abelian subgroups. Hence, by Proposition 9.2, G is hyperbolic virtually compact special. \(\square \)

Recently, Linton [46, Theorem 8.2] established that all one-relator groups with negative immersions are hyperbolic and virtually compact special. By [53, Theorem 1.3 and Remark 1.7], a one-relator group that is two-free has negative immersions. Hence the following is a consequence of these results and Theorem 4.1.

Corollary 10.5

(Corollary 2) Let G be a one-relator group that belongs to the p-genus of a free group or a hyperbolic surface group. Then G is hyperbolic and virtually compact special.

11 On the profinite rigidity of free and surface groups

We are now ready to establish the profinite rigidity of free and surface groups within the family \({\mathcal {H}_\textbf{ab}}\). The proof of Corollary 1 is divided in Theorem 11.1 and Theorem 11.2.

Theorem 11.1

Let G be a group belonging to the class \({\mathcal {H}_\textbf{ab}}\) and let F be a finitely generated free group. If G is residually finite and \({\hat{G}}\cong \hat{F}\), then \(G\cong F\).

Proof

Since free groups are distinguished from each other by their abelianisation, it suffices to show that G is free. Let G be a group in \({\mathcal {H}_\textbf{ab}}\) that belongs to the finite genus of F. By [35, Theorem 1.1], G also belongs to the p-genus of F. Consequently, by Corollary 10.4, G is hyperbolic and virtually compact special. To prove that G is free, we proceed by contradiction. Suppose that is G is not free. Then, by Proposition 9.4, there exists a surface subgroup \(\pi _1 S\) that it is a virtual retract of G. In particular, . This implies by the goodness of the surface \(\pi _1 S\) and the monotonicity of \(\textrm{cd}_p\) the following contradiction:

$$\begin{aligned} \qquad \qquad \qquad \qquad 2=\textrm{cd}_p(\pi _1 S)=\textrm{cd}_p (\hat{\pi _1 S})\le \textrm{cd}_p( {\hat{F}})=1. \qquad \qquad \qquad \qquad \qquad \quad \end{aligned}$$

\(\square \)

Theorem 11.2

Let G be a group belonging to the class \({\mathcal {H}_\textbf{ab}}\) and let \(\pi _1\Sigma \) be the fundamental group of a closed orientable surface. If G is residually finite and \({\hat{G}}\cong \hat{\pi _1\Sigma }\), then \(G\cong \pi _1 \Sigma \).

Proof

Since surface groups are distinguished from each other by their abelianisation, it suffices to show that G is a surface group. Let G be a group in \({\mathcal {H}_\textbf{ab}}\) that belongs to the finite genus of \(\pi _1\Sigma \). By [35, Theorem 1.1], G also belongs to the p-genus of \(\pi _1\Sigma \). Consequently, by Corollary 10.4, G is hyperbolic virtually compact special. Since G cannot be free, it follows from Proposition 9.4 that there exists a surface subgroup \(\pi _1 S\) that it is a virtual retract of G. Lastly, by Proposition 8.10, G is a surface group. \(\square \)