1 Introduction

We say that a non-empty class of groups \({\mathcal {C}}\) is a pseudovariety if it is closed under subgroups, homomorphic images and finite direct products. We denote by \({\mathcal {F}}\), \({\mathcal {P}}\), \({\mathcal {N}}\) and \({\mathcal {A}}\), respectively, the pseudovarieties of all finite groups, polycyclic groups, finitely generated nilpotent groups and finitely generated abelian groups. If \({\mathcal {C}}\) is a pseudovariety, we put \({\mathcal {C}}_{\mathrm f} ={\mathcal {C}}\cap {\mathcal {F}}\). The pseudovariety of all finite solvable groups \({\mathcal {P}}_{\mathrm f} \) will be also denoted by \({\mathcal {S}}\). If p is a prime number, then \({{\mathcal {C}}_p}\) will denote the pseudovariety of finite p-groups lying in \({\mathcal {C}}\) and \({{\mathcal {C}}_{p^\prime }}\) will denote the pseudovariety of finite \(p^\prime \)-groups lying in \({\mathcal {C}}\). Given two pseudovarieties \({\mathcal {C}} \) and \({\mathcal {B}}\), we denote by \({\mathcal {C}} {\mathcal {B}}\) the pseudovariety consisting of all groups G having a normal subgroup \(N\in {\mathcal {C}} \) such that \(G/N\in {\mathcal {B}}\).

Let \({\mathcal {C}}\) be a pseudovariety of finite groups and \(\Gamma \) a finitely generated residually-\({\mathcal {C}}\) group. The \({\mathcal {C}}\) -genus of \(\Gamma \), denoted by \({\mathcal {G}}_{{\mathcal {C}}}(\Gamma )\), is the set of isomorphism classes of finitely generated residually-\({\mathcal {C}}\) groups G having the same quotients in \({\mathcal {C}}\) as \(\Gamma \). It is well-known (see, for example, [37, Corollary 3.2.8]) that the isomorphism class of G belongs to \({\mathcal {G}}_{{\mathcal {C}}}(\Gamma )\) if and only if the pro-\({\mathcal {C}}\) completions of G and \(\Gamma \) are isomorphic: \(G_{\widehat{{\mathcal {C}}}}\cong \Gamma _{\widehat{{\mathcal {C}}}}\). A related but different definition of genus was introduced in [23].

A group G is called parafree if it is residually nilpotent and there exists a free group F such that \(G/\gamma _n(G)\cong F/\gamma _n(F)\) for every positive integer n, where \(\gamma _n(G)\) denotes the nth term of the lower central series of G. These groups were introduced by Baumslag in [5]. If G is finitely generated, then it is parafree if and only if the isomorphism class of G belongs to \({\mathcal {G}}_{{{\mathcal {N}}_{\mathrm f} }}(F)\) for a finitely generated free group F. Examples constructed by Baumslag show that \({\mathcal {G}}_{{{\mathcal {N}}_{\mathrm f} }}(F)\) is infinite (see, for example, [7]).

A well-known question attributed to Remeslennikov ( [30, Question 5.48]) asks whether \({\mathcal {G}}_{{\mathcal {F}}}(F)\) consists of a single class. We formulate this as a conjecture.

Conjecture 1

Let G be a finitely generated residually finite group. Assume that the profinite completion \({\widehat{G}}\) of G is a free profinite group. Then, G is a free group.

It was shown by Wilton [40] that Conjecture 1 holds if we additionally assume that G is a limit group. Recently, this was extended to a larger class of groups by Morales in [35].

By analogy with Conjecture 1, we propose a similar conjecture for groups in the \({\mathcal {S}}\)-genus of a finitely generated free group.

Conjecture 2

Let G be a finitely generated residually \({\mathcal {S}}\)-group. Assume that \(G_{\widehat{{\mathcal {S}}}}\) is a free prosolvable group. Then, G is a free group.

By a surface group, we will mean the fundamental group of a compact closed surface of negative Euler characteristic. In the orientable case, surface groups admit presentations of the form

$$\begin{aligned} S_g=\langle x_1,\ldots ,x_g, y_1,\ldots , y_g|\ [x_1y_1]\cdots [x_g,y_g]=1\rangle \ ( g\ge 2); \end{aligned}$$

in the non-orientable case, surface groups take the form

$$\begin{aligned} N_g=\langle x_1,\ldots , x_g|\ x_1^2\cdots x_g^2=1\rangle \ (g\ge 3). \end{aligned}$$

Although free groups arise as fundamental groups of non-closed surfaces of negative Euler characteristic, we will not consider free groups to be surface groups.

A group G is parasurface if it is residually nilpotent and there exists a surface group S such that \(G/\gamma _n(G)\cong S/\gamma _n(S)\) for every positive integer n. It is clear that if G is finitely generated, then \(G\in {\mathcal {G}}_{{{\mathcal {N}}_{\mathrm f} }}(S)\). Finitely generated non-surface parasurface groups were constructed by Bou-Rabee in [11]. As in the case of free groups it is not known whether \({\mathcal {G}}_{{\mathcal {S}}}(S)\) or \({\mathcal {G}}_{{\mathcal {F}}}(S)\) consist of a single class.

Conjecture 3

Let S be a surface group. The genera \({\mathcal {G}}_{{\mathcal {S}}}(S)\) and \({\mathcal {G}}_{{\mathcal {F}}}(S)\) each consists of a single class.

A finitely generated residually finite group \(\Gamma \) is called profinitely rigid if \({\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\) consists only of the isomorphism class of \(\Gamma \). It is straightforward to see that finitely generated abelian groups are profinitely rigid. However, there are examples of virtually cyclic groups [6] and of finitely generated torsion-free nilpotent groups of class 2 [22] that are not profinitely rigid. The first examples of profinitely rigid groups containing a non-abelian free group have recently been constructed in [9, 10]. Some of them are virtually surface groups. As yet no examples of profinitely rigid virtually non-abelian free groups are known.

In this paper, we prove that the groups in \({\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\) and \({\mathcal {G}}_{{\mathcal {S}}}(\Gamma )\), where \(\Gamma \) is either a finitely generated free group or a surface group, are residually-p for every prime p. This result answers a question of Baumslag (see [7, Problem 5]).

Theorem 1.1

Let \(\Gamma \) be either a finitely generated free group or a surface group and assume that the isomorphism class of G belongs to \({\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\) or \({\mathcal {G}}_{{\mathcal {S}}}(\Gamma )\). Then, G is residually-p for every prime p. Thus, \({\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\subseteq {\mathcal {G}}_{{\mathcal {S}}}(\Gamma )\subset {\mathcal {G}}_{{{\mathcal {N}}_{\mathrm f} }}(\Gamma )\subset {\mathcal {G}}_{{\mathcal {N}}_p}(\Gamma )\).

Observe that Theorem 1.1 implies that Conjecture 1 is a consequence of Conjecture 2.

Let \({\mathcal {P}}\) be a property of groups. We say that \({\mathcal {P}}\) is profinite if for two finitely generated residually finite groups \(G_1\) and \(G_2\), having the same finite quotients the following holds: if \(G_1\) satisfies \({\mathcal {P}}\), then \(G_2\) also does. In view of Theorem 1.1, we want to mention a result of Lubotzky [34] who showed that the property of being residually-p is not profinite.

A group G is called locally indicable if every non-trivial finitely generated subgroup of G maps onto \({\mathbb {Z}}\). An immediate consequence of Theorem 1.1 is the following corollary.

Corollary 1.2

Let \(\Gamma \) be either a finitely generated free group or a surface group and assume that the isomorphism class of G belongs to \({\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\). Then, \(\Gamma \) is locally indicable.

Proof

By Theorem 1.1, G is residually-p , and so it is a subgroup of the completion \(G_{\widehat{{\mathcal {N}}_p}}\) of G. Since the isomorphism class of G belongs to \({\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\), \(G_{\widehat{{\mathcal {N}}_p}}\) is either a free pro-p group or a non-finite Demushkin pro-p group. Thus, every non-trivial subgroup of \(G_{\widehat{{\mathcal {N}}_p}}\) has infinite abelianization. Therefore, \(G_{\widehat{{\mathcal {N}}_p}}\) is locally indicable, and so is G. \(\square \)

In fact, we believe that the following more general result should hold.

Conjecture 4

A finitely generated free profinite group is locally indicable (as an abstract group).

Observe that a non-abelian free profinite group, as opposed to free pro-p groups, has finitely generated closed subgroups with trivial abelianization: consider the universal Frattini cover of a perfect finite group [18, Section 22.6]. Therefore, the argument of the proof of Corollary 1.2 does not work in this case.

In [21], Grothendieck posed the following problem: let \(\Gamma _1\) and \(\Gamma _2\) be finitely presented, residually finite groups, and let \(u : \Gamma _1\rightarrow \Gamma _2\) be a homomorphism such that the induced map between the profinite completions \({\widehat{u}} : \widehat{\Gamma _1}\rightarrow \widehat{\Gamma _2}\) is an isomorphism; does it follow that u is an isomorphism? Bridson and Grunewald [8] provided a negative answer on this question. In this paper, we will settle positively a more general instance of Grothendieck’s problem, in the special case where \(\Gamma _1\) is free.

Theorem 1.3

Let \({\mathcal {C}}\) be either \({\mathcal {S}}\) or \({\mathcal {F}}\). Let F be a finitely generated free group, G a residually-\({\mathcal {C}}\) group and \(u:F\rightarrow G\) a homomorphism. Suppose that the induced homomorphism \(u_{\widehat{{\mathcal {C}}}}:F_{\widehat{{\mathcal {C}}}}\rightarrow G_{\widehat{{\mathcal {C}}}}\) between pro-\({\mathcal {C}}\) completions is an isomorphism. Then, u is an isomorphism.

Remark 1.4

Alex Lubotzky informed us that the case where \({\mathcal {C}}={\mathcal {F}}\) can already be obtained from Grothendieck’s results in [21]. For more details, see [26].

The proof of Theorem 1.3 uses another direct consequence of Theorem 1.1: the groups from \({\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\) and \({\mathcal {G}}_{{\mathcal {S}}}(\Gamma )\), where \(\Gamma \) is either a finitely generated free group or a surface group are residually finite rationally solvable (RFRS) groups (see Sect. 4.1 for the definition). The notion of RFRS groups arose in a work of Agol [1], in connection with the virtual-fibering of 3-manifolds [2].

The results on profinite rigidity of finitely generated free groups are related to the questions about the characterization of measure preserving word maps. Let F be a finitely generated free group on d free generators \(x_1,\ldots , x_d\) and \(w=(w_1,\ldots , w_k)\) a non-empty tuple of elements of F. We say that w is primitive in F if it is a part of a free generating tuple of F. In the same way, we define primitive tuples in a free profinite group \({\widehat{F}}\) and in a free pro \({\mathcal {C}}\)-group \(F_{\widehat{{\mathcal {C}}}}\), where \({\mathcal {C}}\) is a pseudovariety of finite groups.

Given a finite group G, we define a map \(w_G:G^d\rightarrow G^k\) that sends \((g_1,\ldots , g_d)\) to the image of w under the homomorphism \(F\rightarrow G\) sending \(x_i\) to \(g_i\). If the tuple w is primitive, then the map \(w_G\) is measure preserving (i.e. all the fibers of this map are of equal size) for every finite group G. If \({\mathcal {C}}\) is a family of finite groups, we say that w is measure preserving in \({\mathcal {C}}\) if \(w_G\) is measure preserving for all \(G\in {\mathcal {C}}\). We ask the following natural question.

Question 5

Which families \({\mathcal {C}}\) of finite groups have the property that for every finite tuple \(w=(w_1,\ldots , w_k)\) of elements in a finitely generated free groupF the following is true: if w is measure preserving in \({\mathcal {C}}\), then w is primitive in F?

A positive answer to this question for the family of finite symmetric groups was given by Puder and Parzanchevski in [36]. The following result shows that the most difficult case of Question 5 corresponds to the special case where \(w=(w_1)\) consists a single word.

Theorem 1.5

Let \({\mathcal {C}}\) be a non-empty family of finite groups, F a finitely generated free group and \(k\ge 1\). Let \(w=(w_1,\ldots , w_k)\) be a tuple of elements of F such that w is measure preserving in \({\mathcal {C}}\). Assume that for any finitely generated free group U only primitive words \(u\in U\) satisfy that u is measure preserving in \( {\mathcal {C}}\). Then, w is primitive in F.

In the case where \({\mathcal {C}}\) is a pseudovariety of finite groups, w is measure preserving in \({\mathcal {C}}\) if and only if w is primitive in \(F_{\widehat{{\mathcal {C}}}}\) (see, Proposition 5.1). In particular, the result of Puder and Parzanchevski implies that \((w_1,\ldots , w_k)\) is primitive in F if \((w_1,\ldots , w_k)\) is primitive in \({\widehat{F}}\). In [40] Wilton gave an alternative proof of this using his result, which we have mentioned before, that limit groups with free profinite completion are free. It is natural to ask whether \((w_1,\ldots , w_k)\) should be primitive in F if \((w_1,\ldots , w_k)\) is primitive in \(F_{\widehat{{\mathcal {S}}}}\).

Conjecture 6

Let F be a finitely generated free group, \(k\ge 1\) and \(w=(w_1,\ldots , w_k)\) a tuple of elements of F. Assume that w is measure preserving in \({\mathcal {S}}\). Then, w is primitive in F.

Our next results provide support for the plausibility of Conjecture 6.

Theorem 1.6

The following holds.

  1. (a)

    Conjecture 6 is equivalent to the assertion in Conjecture 2 for groups G of the form \(G=U*_uU\), where U is free and \(u\in U\) is not a proper power.

  2. (b)

    Let \(F_k\) be a free group of rank k and assume that a tuple \(w=(w_1,\ldots , w_k)\) of k elements of \(F_k\) is measure preserving in \({{\mathcal {A}}_{q}({\mathcal {A}}_{q^\prime }}{\mathcal {N}}_p)\) for some primes p and q. Then, w is primitive in \(F_k\). In particular, the assertion in Conjecture  6 holds in the special case where the rank of F equals k.

We remark that, if U is a free group and u is not a proper power, then the double \(U*_uU\) featuring in Theorem 1.6 (a) is residually free [4], and hence residually an \({\mathcal {S}}\)-group, as required

The paper is organized as follows. Our proof of Theorem  1.1 is divided into two parts, which require different techniques. In the first part, covered in Sect. 2, the isomorphism class of G belongs to the finite genus \({\mathcal {G}}_{\mathcal {F}}(\Gamma )\) and our argument is based on the study of representation varieties of G. In the second part, covered in Sect. 3, the isomorphism class of G belongs to the solvable genus \({\mathcal {G}}_{{\mathcal {S}}}(\Gamma )\) and we use properties of \(L^2\)-Betti numbers. In Sect. 4, we prove Theorem 1.3, and in Sect. 5, we prove Theorems 1.5 and 1.6.

2 Proof of Theorem 1.1: the finite genus

As indicated above, we divide the proof of Theorem 1.1 into two parts. In this section, we prove the case of finite genus.

2.1 Commutative algebra preliminaries

Let R be a finitely generated commutative ring. Denote by \({\widehat{R}}\) the profinite completion of R and by \({{\,\textrm{Max}\,}}R\) the set of maximal ideals of R.

Let \({\textbf{m}}\in {{\,\textrm{Max}\,}}R\). Observe that, since the field \(R/{\textbf{m}}\) is finitely generated as a ring, it is of positive characteristic and thus, by Hilbert’s Nullstellensatz [3, Corollary 5.24], it is also finite.

Let \( R_{ {{\textbf{m}}}}\) denote the localization of R at the maximal ideal \({\textbf{m}}\), and let \(R_{\widehat{{\textbf{m}}}}=\varprojlim R /{\textbf{m}}^i\) be the \({\textbf{m}}\)-adic completion of R. By [3, Corollary 10.20], the natural homomorphism \(R_{ {{\textbf{m}}}}\rightarrow R_{\widehat{{\textbf{m}}}}\) is injective. On the other hand, by [3, Proposition 3.9], the natural isomorphism \(R\rightarrow \prod _{{\textbf{m}}\in {{\,\textrm{Max}\,}}(R)} R_{ {{\textbf{m}}}}\) is also injective. Thus, we obtain that the map \(R\rightarrow \prod _{{\textbf{m}}\in {{\,\textrm{Max}\,}}(R)} R_{\widehat{{\textbf{m}}}}\) is injective, and so, R is residually finite.

If R is finite, then, in fact, we have that

$$\begin{aligned} R\cong \prod _{{\textbf{m}}\in {{\,\textrm{Max}\,}}(R)} R_{ {{\textbf{m}}}}\cong \prod _{{\textbf{m}}\in {{\,\textrm{Max}\,}}(R)} R_{\widehat{{\textbf{m}}}}. \end{aligned}$$

This implies that if R is finitely generated, then its profinite completion \({\widehat{R}}\) is isomorphic to \(\prod _{{\textbf{m}}\in {{\,\textrm{Max}\,}}(R)} R_{\widehat{{\textbf{m}}}}\) (as a topological ring). This description of \({\widehat{R}}\) implies the following criterion for two finitely generated commutative rings R and S to have isomorphic profinite completions \({\widehat{R}}\cong {\widehat{S}}\).

Lemma 2.1

Let R and S be two finitely generated commutative rings. Then, \({\widehat{R}}\cong {\widehat{S}}\) if and only if there exists a bijection \(\alpha :{{\,\textrm{Max}\,}}(R)\rightarrow {{\,\textrm{Max}\,}}(S)\) such that for every \({\textbf{m}}\in {{\,\textrm{Max}\,}}(R)\), \((R)_{\widehat{{\textbf{m}}}}\cong (S)_{\widehat{\alpha ({\textbf{m}})}}\).

In this section, we fix a finite field \({\mathbb {F}}\) and denote by \(\overline{{\mathbb {F}}}\) its algebraic closure. Let R be a finitely generated commutative \({\mathbb {F}}\)-algebra. We denote by \(X_R\) the affine \(\overline{{\mathbb {F}}}\)-set

$$\begin{aligned} X_R={{\,\textrm{Hom}\,}}_{\overline{{\mathbb {F}}}\text{- } \textrm{algebras}} (\overline{{\mathbb {F}}}\otimes _{{\mathbb {F}}} R, \overline{{\mathbb {F}}}). \end{aligned}$$

We endow \(X_R\) with the Zariski topology and denote by \(\overline{{\mathbb {F}}}[X_R ]\) the ring of regular functions on \(X_R\). Recall that \(\overline{{\mathbb {F}}}[X_R ]\cong \overline{{\mathbb {F}}}\otimes _{{\mathbb {F}}} R/{{\,\textrm{rad}\,}}( \overline{{\mathbb {F}}}\otimes _{{\mathbb {F}}} R)\) and that there exists a natural bijection between \(X_R\) and \({{\,\textrm{Max}\,}}(\overline{{\mathbb {F}}}\otimes _{{\mathbb {F}}} R)\): a point \(p\in X_R\) corresponds to the ideal \(\ker p\).

The \({\mathbb {F}}\)-affine set \(X_R\) is irreducible if and only if \({\mathbb {F}}[X_R]\) is a domain. In this case \(R/{{\,\textrm{rad}\,}}(R)\) is also a domain. However, the converse is not always true: \(R/{{\,\textrm{rad}\,}}(R)\) may be a domain, while \({\mathbb {F}}[X_R]\) is not.

For any \(p\in X_R\), \(\ker p\cap R\) is a maximal ideal of R. The field of definition of p, denoted by \({\mathbb {F}}(p)\), is equal to \(R/(\ker p\cap R)\). It is a finite extension of \({\mathbb {F}}\).

Let \(\widetilde{{\mathbb {F}}}\) be a finite extension of \({\mathbb {F}}\). The set \(X_R(\widetilde{{\mathbb {F}}})\) consists of all \(p\in X_R\) such that \({\mathbb {F}}(p)\) can be embedded in \(\widetilde{{\mathbb {F}}}\). The homomorphisms from \(X_R(\widetilde{{\mathbb {F}}})\) can be identified naturally with homomorphism from \( {{\,\textrm{Hom}\,}}_{{\mathbb {F}}\text{- }\textrm{algebras}} (R, \widetilde{{\mathbb {F}}}).\)

The Krull dimension of a commutative ring R, denoted \(\dim R\), is the supremum of the lengths of all chains of prime ideals (see [3, page 90 and Chapter 11]). The dimension of an affine \(\overline{{\mathbb {F}}}\)-set X is the Krull dimension of \(\overline{{\mathbb {F}}}[X]\). We will use the following two facts about the Krull dimension.

Proposition 2.2

Let R be a finitely generated commutative \({\mathbb {F}}\)-algebra and \({\widetilde{R}}\) a commutative \({\mathbb {F}}\)-algebra.

  1. (1)

    If R is a \({\mathbb {F}}\)-subalgebra of \({\widetilde{R}}\) and \({\widetilde{R}}\) is integral over R, then \(\dim {\widetilde{R}}= \dim R\).

  2. (2)

    If R is a domain and \({\textbf{m}}\) is a maximal ideal of R, then \(\dim R=\dim R_{\widehat{{\textbf{m}}}}.\)

Proof

(1) follows from [3, Corollary 5.9 and Theorem 5.11]).

(2) We have that by [3, Corollary 11.19], \(\dim R_{\widehat{{\textbf{m}}}}=\dim R_{ {{\textbf{m}}}}\) and by [16, Theorem A on page 286], \( \dim R_{ {{\textbf{m}}}}=\dim R\). \(\square \)

The main result of this section is the following proposition.

Proposition 2.3

Let R and S be two finitely generated \({\mathbb {F}}\)-algebras and \(k\ge 0\). Assume that

  1. (a)

    \({\widehat{S}}\cong {\widehat{R}}\) and

  2. (b)

    \(X_R\) is irreducible of dimension k.

Then, \(X_S\) is irreducible of dimension k. In particular, \(S/{{\,\textrm{rad}\,}}S\) is a domain of Krull dimension k.

Proof

Put \({\widetilde{R}}=\overline{{\mathbb {F}}}\otimes _{\mathbb {F}}R\) and \({\widetilde{S}}=\overline{{\mathbb {F}}}\otimes _{\mathbb {F}}S\). We proceed by establishing three claims, the last two of which yield the desired assertions about \(X_S\).

Claim 2.4

For every \({\textbf{m}}\in {{\,\textrm{Max}\,}}(S)\), \(S_{\widehat{{\textbf{m}}}}\) is of Krull dimension k.

Proof

Consider first a maximal ideal \({\textbf{m}}\) of R. Since \(X_R\) is irreducible, \({{\,\textrm{rad}\,}}R\) is a prime ideal of R and \(R/{{\,\textrm{rad}\,}}R\) is a domain. Moreover, since \({{\,\textrm{rad}\,}}R\) is nilpotent,

$$\begin{aligned} \dim R_{\widehat{{\textbf{m}}}}=\dim (R/{{\,\textrm{rad}\,}}R)_{\widehat{{\textbf{m}} /{{\,\textrm{rad}\,}}R}} \text { and } \dim R=\dim (R/{{\,\textrm{rad}\,}}R). \end{aligned}$$

Therefore, we conclude that,

$$\begin{aligned}{} & {} \dim R_{\widehat{{\textbf{m}}}}=\dim (R/{{\,\textrm{rad}\,}}R)_{\widehat{{\textbf{m}} /{{\,\textrm{rad}\,}}R}}\overset{\text { Proposition}~2.2(2)}{=} \\{} & {} \quad \dim (R/{{\,\textrm{rad}\,}}R)=\dim R\overset{\text { Proposition}~2.2(1)}{=} \dim {\widetilde{R}}=\dim \overline{{\mathbb {F}}}[X_R]=\dim X_R=k. \end{aligned}$$

Now, the claim follows from Lemma 2.1. \(\square \)

Claim 2.5

Let Y be an irreducible component of \(X_S\). Then, \(\dim Y=k\).

Proof

Decompose \(X_S\) as the union of its irreducible components \(X_S=\bigcup _{i=1}^l Y_i\) (all \(Y_i\) are different) and assume that \(Y=Y_1\). Let \(p\in Y\setminus \bigcup _{i=2}^l Y_i\), and let \(\widetilde{{\textbf{m}}}=\ker p\) be the corresponding maximal ideal of \({\widetilde{S}}\).

Put \({\textbf{m}}=S\cap \widetilde{ {\textbf{m}}}\). Then, \({\textbf{m}} \in {{\,\textrm{Max}\,}}(S)\) because \({\widetilde{S}}\) is integral over S. Let \({\widetilde{P}}=\bigcap _{q\in Y}\ker q\) be the prime ideal of \({\widetilde{S}}\) corresponding to Y. Thus, \(\overline{{\mathbb {F}}}[Y]\cong {\widetilde{S}}/{\widetilde{P}}\). Since p is not contained in other irreducible components \(Y_i\) for \(2\le i\le l\), \( \widetilde{P}\) is the only minimal prime ideal of \({\widetilde{S}}\) contained in \(\widetilde{{\textbf{m}}}\). Put \(P=S\cap {\widetilde{P}} \). Then, P is the only minimal prime ideal of S contained in \({\textbf{m}}\). This implies that \(P_{{\textbf{m}}}=S_{{\textbf{m}}}P\) is the only minimal prime ideal of \(S_{{\textbf{m}}}\) and so \(P_{{\textbf{m}}} ={{\,\textrm{rad}\,}}S_{{\textbf{m}}}\) is nilpotent. Hence,

$$\begin{aligned} \text {the image of } P \text { in } S_{\widehat{{\textbf{m}}}} \text { is also nilpotent.} \end{aligned}$$
(1)

Therefore, we conclude that

$$\begin{aligned}{} & {} \dim Y=\dim \overline{{\mathbb {F}}}[Y]=\dim ({\widetilde{S}}/{\widetilde{P}})\overset{\text {Proposition}~2.2(1)}{=} \dim S/ P \overset{\text {Proposition}~2.2(2)}{=}\\{} & {} \quad \dim (S/P)_{\widehat{{\textbf{m}}/P}}= \dim (S_{\widehat{{\textbf{m}}}}/S_{\widehat{{\textbf{m}}}}P) \overset{{(1)}}{=} \dim S_{\widehat{{\textbf{m}}}}\overset{\text {Claim}~2.4}{=} k. \end{aligned}$$

\(\square \)

Claim 2.6

The affine \(\overline{{\mathbb {F}}}\)-set \(X_S\) is irreducible.

Proof

Let \({\mathbb {E}}_i/{\mathbb {F}}\) be a field extension of degree i. By the Lang-Weil inequality (see [32]),

$$\begin{aligned} \lim _{i\rightarrow \infty }\frac{|X_R({\mathbb {E}}_i)|}{|{\mathbb {E}}_i|^k}=\lim _{i\rightarrow \infty }\frac{|{{\,\textrm{Hom}\,}}_{{\mathbb {F}}\text{- }\textrm{algebras}}(R,{\mathbb {E}}_i)|}{|{\mathbb {E}}_i|^k} \end{aligned}$$

is equal to the number of irreducible components of \(X_R\) of dimension k. Since \(X_R\) is irreducible, we obtain that this number is 1. Applying that \({\widehat{S}}\cong {\widehat{R}}\), we also obtain that

$$\begin{aligned} \displaystyle \lim _{i\rightarrow \infty }\frac{|X_S({\mathbb {E}}_i)|}{|{\mathbb {E}}_i|^k}=\lim _{i\rightarrow \infty }\frac{|{{\,\textrm{Hom}\,}}_{{\mathbb {F}}\text{- }\textrm{algebras}}(S,{\mathbb {E}}_i)|}{|{\mathbb {E}}_i|^k}=\lim _{i\rightarrow \infty }\frac{|{{\,\textrm{Hom}\,}}_{{\mathbb {F}}\text{- }\textrm{algebras}}(R,{\mathbb {E}}_i)|}{|{\mathbb {E}}_i|^k}=1. \end{aligned}$$

Therefore, using again the Lang-Weil inequality, we conclude that \(X_S\) has only one irreducible component of dimension k. Combining this with Claim 2.5, we obtain that \(X_S\) is irreducible \(\square \)

Since \(X_S\) is irreducible, \(S/{{\,\textrm{rad}\,}}S\) is a domain. The Krull dimension of \(S/{{\,\textrm{rad}\,}}S\) is equal to the dimension of \(X_S\). \(\square \)

2.2 A criterion to be residually-p

Let \({\mathbb {F}}\) be a finite field of characteristic p and \({\textbf{A}}\) an affine algebraic group defined over \({\mathbb {F}}\). Let G be a finitely generated group and assume that it is given by a presentation

$$\begin{aligned} G=\langle x_1,\ldots ,x_d|W\rangle , \end{aligned}$$

where W is a set of words in \(\{x_1^{\pm 1},\ldots ,x_d^{\pm 1} \}\). We will study properties of the group G with the aid of certain ring \(R_{{\textbf{A}}}(G)\) which encodes all the information about representations \(G\rightarrow {\textbf{A}}(\overline{{\mathbb {F}}})\). To simplify the reader can think that \({\textbf{A}}={{\,\textrm{SL}\,}}_n\) (compare the example below).

We denote by \({\mathbb {F}}[{\textbf{A}}]\) the ring of \({\mathbb {F}}\)-regular functions on \({\textbf{A}}\). Assume that it has the following presentation

$$\begin{aligned} {\mathbb {F}}[{\textbf{A}}]={\mathbb {F}}[y_1,\ldots , y_l| s_1=0,\ldots , s_m=0], \end{aligned}$$

where \(s_1,\ldots , s_m\) are polynomials in commuting variables \(y_1,\ldots , y_l\) over \({\mathbb {F}}\).

Thus, if T is a commutative \({\mathbb {F}}\)-algebra, any element of \({\textbf{A}}(T)\) can be represented by an l-tuple \((t_1,\ldots , t_l)\) of elements of T satisfying

$$\begin{aligned} s_1(t_1,\ldots , t_l)=0,\ldots , s_m(t_1,\ldots , t_l)=0. \end{aligned}$$

The ring \(R_{{\textbf{A}}}(G)\) is the commutative \({\mathbb {F}}\)-algebra generated by

$$\begin{aligned} \{y_{1,1},\ldots , y_{1,l}, \ldots , y_{d,1}, \ldots , y_{d,l}\} \end{aligned}$$

with relations

$$\begin{aligned} s_1(y_{1,1},\ldots , y_{1,l})=0,\ldots , s_m(y_{d,1}, \ldots , y_{d,l})=0 \end{aligned}$$

expressing that the tuples

$$\begin{aligned} X_1=(y_{1,1},\ldots , y_{1,l}),\ldots , X_d=(y_{d,1},\ldots , y_{d,l}) \end{aligned}$$

satisfy the relations of elements of \({\textbf{A}}\), and relations

$$\begin{aligned} w(X_1,\ldots ,X_d)=1_{{\textbf{A}}({\mathbb {F}})}, w\in W, \end{aligned}$$

associated with the relations of the group G.

Observe that the construction gives \(R_{{\textbf{A}}}(G)\), up to isomorphism, independently of the chosen presentations for G and \({\mathbb {F}}[{\textbf{A}}]\).

Example

  1. (1)

    Consider \({\textbf{A}}={{\,\textrm{SL}\,}}_n\). In this case \(l=n^2\) and

    $$\begin{aligned} {\mathbb {F}}[{{\,\textrm{SL}\,}}_n]={\mathbb {F}}[y_{ij}: 1\le i,j\le n]/(\det (y_{ij})-1). \end{aligned}$$

    Then, the ring \(R_{{{\,\textrm{SL}\,}}_n}(G)\) is the commutative \({\mathbb {F}}\)-algebra generated by

    $$\begin{aligned} \{y^m_{i,j}: 1\le m\le d, 1\le i,j\le n\} \end{aligned}$$

    with relations \(\det X_l=1,\) expressing that the images of generators (\(X_l=(y_{ij}^l)\)) have determinant 1 and the relations \(w(X_1,\ldots ,X_d)=1_{{{\,\textrm{SL}\,}}_n({\mathbb {F}})}\) for any \(w\in W\) associated with the relations of the group G.

  2. (2)

    If \(F=\langle x_1,\ldots ,x_d\rangle \) is a free group, then

    $$\begin{aligned} R_{{\textbf{A}}}(F)\cong {\mathbb {F}}[{\textbf{A}}]^{\otimes _{{\mathbb {F}}} d}. \end{aligned}$$
    (2)

We denote by \(X_{{\textbf{A}}}^G\) the affine \(\overline{{\mathbb {F}}}\)-set

$$\begin{aligned} X_{{\textbf{A}}}^G= {{\,\textrm{Hom}\,}}_{\overline{{\mathbb {F}}}\text{- }\textrm{algebras}} (\overline{{\mathbb {F}}}\otimes _{{\mathbb {F}}} R_{{\textbf{A}}}(G), \overline{{\mathbb {F}}}) . \end{aligned}$$

There is a natural bijection between \(X_{{\textbf{A}}}^G\) and \({{\,\textrm{Hom}\,}}_{{{\mathbb {F}}}\text{- }\textrm{algebras}} ( R_{{\textbf{A}}}(G)/{{\,\textrm{rad}\,}}(R_{{\textbf{A}}}(G)), \overline{{\mathbb {F}}})\), and in the following if \(p\in X_{{\textbf{A}}}^G\) we will think about it as a \({\mathbb {F}}\)-homomorphism

$$\begin{aligned} p:R_{{\textbf{A}}}(G)/{{\,\textrm{rad}\,}}(R_{{\textbf{A}}}(G))\rightarrow \overline{{\mathbb {F}}}. \end{aligned}$$

The tuples \(X_i\) can be seen as elements of \({\textbf{A}}(R_{{\textbf{A}}}(G))\). Let \(\overline{X_i}\) be the image of \(X_i\) in \( {\textbf{A}}(R_{{\textbf{A}}}(G)/{{\,\textrm{rad}\,}}(R_{{\textbf{A}}}(G))\). Consider the representation

$$\begin{aligned} \Phi _{{\textbf{A}}}^G:G\rightarrow {\textbf{A}}(R_{{\textbf{A}}}(G)/{{\,\textrm{rad}\,}}(R_{{\textbf{A}}}(G)) \end{aligned}$$

which sends \(x_i\) to the matrix \(\overline{X_i}\). Then, for any representation \(\phi : G\rightarrow {\textbf{A}}(\overline{{\mathbb {F}}})\), there exists a unique homomorphism \(p^{\phi }\in X_{{\textbf{A}}}^G\) such that the diagram

$$\begin{aligned} \begin{array}{ccc} G &{}\xrightarrow {\Phi _{{\textbf{A}}}^G}&{} {\textbf{A}}(R_{{\textbf{A}}}(G)/{{\,\textrm{rad}\,}}(R_{{\textbf{A}}}(G)))\\ ||&{}&{}\downarrow ^ { p_{{\textbf{A}}}^\phi }\\ G&{}\xrightarrow {\phi } &{}{\textbf{A}} (\overline{{\mathbb {F}}}) \end{array} \end{aligned}$$
(3)

is commutative. (In this diagram \(p_{{\textbf{A}}}^\phi \) should be thought of as applying \(p^\phi \) to the entries of the l-tuples).

Lemma 2.7

Let H be the image of G in its pro-p completion, where p is the characteristic of the field of definition \({\mathbb {F}}\) of \({\textbf{A}}\). Denote by \(\pi :G\rightarrow H\) the canonical map and let

$$\begin{aligned} \pi ^*: R_{{\textbf{A}}}(G)/{{\,\textrm{rad}\,}}(R_{{\textbf{A}}}(G))\rightarrow R_{{\textbf{A}}}(H)/{{\,\textrm{rad}\,}}(R_{{\textbf{A}}}(H))\end{aligned}$$

be the induced surjective map. Suppose that the ring \(R_{{\textbf{A}}}(G)\) has only one minimal prime ideal, in other words that \({{\,\textrm{rad}\,}}(R_{{\textbf{A}}}(G))\) is a prime ideal. Then, \(\pi ^*\) is also injective.

Proof

For simplicity of notation, we put

$$\begin{aligned}R_G= R_{{\textbf{A}}}(G)/{{\,\textrm{rad}\,}}(R_{{\textbf{A}}}(G))\text { and } R_H=R_{{\textbf{A}}}(H)/{{\,\textrm{rad}\,}}(R_{{\textbf{A}}}(H)). \end{aligned}$$

Let \(\phi :G\rightarrow {\textbf{A}}(\overline{{\mathbb {F}}})\) be the trivial representation and let \({\textbf{m}}=\ker p^\phi \), where \(p^\phi : R_G\rightarrow \overline{{\mathbb {F}}}\) is as in the description of the diagram (3).

Denote by \(\overline{ (R_G)_{\widehat{{\textbf{m}}}}}\) the ring \( (R_G)_{\widehat{{\textbf{m}}}}/{{\,\textrm{rad}\,}}( (R_G)_{\widehat{{\textbf{m}}}})\). We denote by \(\alpha \) the canonical map \(R_G\rightarrow \overline{ (R_G)_{\widehat{{\textbf{m}}}}}\). Since \(R_G\) is a domain, by [3, Corollary 10.18], \(R_G\rightarrow (R_G)_{\widehat{{\textbf{m}}}}\) is injective. Hence, \(\alpha \) is also injective.

The maps \(\alpha \) and \(\pi ^*\) induce two homomorphisms

$$\begin{aligned} \alpha _{{\textbf{A}}}: {\textbf{A}}(R_ G)\rightarrow {\textbf{A}}(\overline{ (R_G)_{\widehat{{\textbf{m}}}}}) \text { and } \pi ^*_{{\textbf{A}}}: {\textbf{A}}(R_G)\rightarrow {\textbf{A}}(R_H), \end{aligned}$$

respectively. Since \(\alpha \) is injective, \(\alpha _{{\textbf{A}}}\) is injective as well.

Observe that the group

$$\begin{aligned} {\textbf{A}}^1(\overline{ (R_G)_{\widehat{{\textbf{m}}}}})=\{A\in {\textbf{A}}(\overline{ (R_G)_{\widehat{{\textbf{m}}}}}):\ A\equiv 1_{{\textbf{A}} ({\mathbb {F}})} \pmod {{\textbf{m}}}\} \end{aligned}$$

is a pro-p group and the image of the map \(\alpha _{{\textbf{A}}} \circ \Phi ^G_{{\textbf{A}}}:G\rightarrow {\textbf{A}}(\overline{ (R_G)_{\widehat{{\textbf{m}}}}})\) lies in \( {\textbf{A}}^1(\overline{ (R_G)_{\widehat{{\textbf{m}}}}})\). Thus, \(\alpha _{{\textbf{A}}}\circ \Phi ^G_{{\textbf{A}}}\) factors through \(\pi \). Therefore, there exists a unique map \(\beta :R_H\rightarrow \overline{ (R_G)_{\widehat{{\textbf{m}}}}}\) such that the following diagram is commutative.

$$\begin{aligned} \begin{array}{ccccc} G &{}\xrightarrow {\Phi _{{\textbf{A}}}^G}&{} {\textbf{A}}(R_G)&{}\xrightarrow {\alpha _{{\textbf{A}}}} &{} {\textbf{A}}(\overline{ (R_G)_{\widehat{{\textbf{m}}}}}) \\ \downarrow ^ {\pi }&{}&{}\downarrow ^ {\pi ^*_{{\textbf{A}}}}&{}&{}||\\ H&{}\xrightarrow {\Phi _{{\textbf{A}}}^H}&{} {\textbf{A}}(R_H)&{}\xrightarrow {\beta _{{\textbf{A}}}} &{} {\textbf{A}}(\overline{ (R_G)_{\widehat{{\textbf{m}}}}}) \end{array} . \end{aligned}$$

Since \(\alpha _{{\textbf{A}}}\) is injective, \(\pi ^*_{{\textbf{A}}}\) is also injective. Without loss of generality, we may assume that the trivial l-tuple represents \(1_{{\textbf{A}}({\mathbb {F}})}\). Hence, \(\ker \pi ^*\) is equal to the radical \(\sqrt{I}\) of the ideal I of \(R_G\) generated by entries of \(\{\Phi ^G_{{\textbf{A}}}(g): g\in \ker \pi \}\). However, since \(\pi ^*_{{\textbf{A}}}\) is injective, \(\Phi ^G_{{\textbf{A}}}(g)\) is trivial if \(g\in \ker \pi ^*\). Hence, \(\pi ^*\) is also injective. \(\square \)

Now we are ready to present the main result of this section.

Proposition 2.8

Let G be a finitely generated residually finite group and let p be a prime. For each \(n\in {\mathbb {N}}\) let \({\textbf{A}}_n\) be an affine algebraic group defined over a finite field \({\mathbb {F}}\) of characteristic p. Assume that

  1. (a)

    for every finite quotient \(\overline{G}\) of G, there exists \(n\in {\mathbb {N}}\) such that \(\overline{G}\) is a subgroup of \({\textbf{A}}_n(\overline{{\mathbb {F}}})\) and

  2. (b)

    for each \(n\in {\mathbb {N}}\) the ring \(R_{{\textbf{A}}_n}(G)\) has only one minimal prime ideal.

Then, G is residually-p .

Proof

Let H be the image of G in its pro-p completion and denote by \(\pi :G\rightarrow H\) the canonical map.

Assume, by way of contradiction, that there exists a non-trivial element g in the kernel of the canonical map \(\pi : G\rightarrow H\). There exists a finite quotient \(\overline{G}\) of G such that the image of g in \({\overline{G}}\) is non-trivial. The group \({\overline{G}}\) can be embedded in \({\textbf{A}}_n(\overline{{\mathbb {F}}})\) for some n. Let

$$\begin{aligned} \phi :G\rightarrow {\overline{G}}\hookrightarrow {\textbf{A}}_n(\overline{{\mathbb {F}}}) \end{aligned}$$

be the induced representation of G.

Let \(\pi ^*: R_{{\textbf{A}}_n}(G)/{{\,\textrm{rad}\,}}( R_{{\textbf{A}}_n}(G)) \rightarrow R_{{\textbf{A}}_n}(H)/{{\,\textrm{rad}\,}}(R_{{\textbf{A}}_n}(H))\) be the map induced by \(\pi \). Since the representation \(\phi \) does not factor through \(\pi \), \(\ker \pi ^*\) is not trivial. However, by Lemma  2.7, \(\pi ^*\) is injective. This is a contradiction. \(\square \)

2.3 Applications to free and surface groups

Let \({\mathbb {F}}\) be a finite field of characteristic p and \({\textbf{A}}\) an affine algebraic group defined over \({\mathbb {F}}\). We will use the same notation for \({\textbf{A}}\) as in Sect. 2.2.

Let \({\textbf{G}}\) be a finitely generated profinite group and assume that it is given by a profinite presentation

$$\begin{aligned} {\textbf{G}}=\langle x_1,\ldots ,x_d|W\rangle , \end{aligned}$$

where W is a set of profinite words in \(\{x_1^{\pm 1},\ldots ,x_d^{\pm 1} \}\). The ring \({\widehat{R}}_{{\textbf{A}}}({\textbf{G}})\) is the profinite commutative \({\mathbb {F}}\)-algebra generated by

$$\begin{aligned} \{y_{1,1},\ldots , y_{1,l}, \ldots , y_{d,1}, \ldots , y_{d,l}\} \end{aligned}$$

with relations

$$\begin{aligned} s_1(y_{1,1},\ldots , y_{1,l})=0,\ldots , s_m(y_{d,1}, \ldots , y_{d,l})=0 \end{aligned}$$

expressing that the tuples

$$\begin{aligned} X_1=(y_{1,1},\ldots , y_{1,l}),\ldots , X_d=(y_{d,1},\ldots , y_{d,l}) \end{aligned}$$

satisfy the relations of elements of \({\textbf{A}}\), and relations

$$\begin{aligned} w(X_1,\ldots ,X_d)=1_{{\textbf{A}}({\mathbb {F}})}, w\in W, \end{aligned}$$

associated with the relations of the group \({\textbf{G}}\). As in the case of \(R_{{\textbf{A}}}(G)\), the construction gives \({\widehat{R}}_{{\textbf{A}}}({\textbf{G}})\), up to isomorphism of profinite rings, independently of the chosen presentations for \({\textbf{G}}\) and \({\mathbb {F}}[{\textbf{A}}]\). In particular, if G is a finitely generated group, then we obtain that

$$\begin{aligned} {\widehat{R}}_{{\textbf{A}}}({\widehat{G}})\cong \widehat{ R_{{\textbf{A}}}( G)}. \end{aligned}$$

This implies the following lemma.

Lemma 2.9

Let \({\mathbb {F}}\) be a finite field and \({\textbf{A}}\) an affine algebraic group defined over \({\mathbb {F}}\). Let \(G_1\) and \(G_2\) be two finitely generated groups with isomorphic profinite completions. Then, \(\widehat{R_{{\textbf{A}}}(G_1)}\cong \widehat{R_{{\textbf{A}}}(G_2)}\).

Now we are ready to present the main tool for our proof of the first part of Theorem 1.1.

Proposition 2.10

Let \(\Gamma \) be a finitely generated residually finite group and let p be a prime. For each \(n\in {\mathbb {N}}\), let \({\textbf{A}}_n\) be an affine algebraic group defined over a finite field \({\mathbb {F}}\) of characteristic p. Assume that

  1. (a)

    for every finite quotient \(\overline{\Gamma }\) of \(\Gamma \), there exists \(n\in {\mathbb {N}}\) such that \(\overline{\Gamma }\) is a subgroup of \({\textbf{A}}_n(\overline{{\mathbb {F}}})\) and

  2. (b)

    for each \(n\in {\mathbb {N}}\) the affine \(\overline{{\mathbb {F}}}\)-set \(X_{{\textbf{A}}_n}^{\Gamma }\) is irreducible.

Let \(G\in {\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\). Then, G is residually-p .

Remark 2.11

If \({\textbf{A}}_n={{\,\textrm{GL}\,}}_n\) or \({\textbf{A}}_n={{\,\textrm{SL}\,}}_n\), then the condition (a) holds automatically.

Proof

Lemma 2.9 shows that \(\widehat{R_{{\textbf{A}}_n}(\Gamma )}\cong \widehat{R_{{\textbf{A}}_n}(G)}\) for all \(n\in {\mathbb {N}}\). Hence, by Proposition 2.3, \(X_{{\textbf{A}}_n}^G\) is irreducible for every \(n\in {\mathbb {N}}\), and so, \(R_{{\textbf{A}}_n}(G)\) contains a unique prime ideal. Therefore, by Proposition 2.8, G is residually-p . \(\square \)

Now we are ready to prove the first part of Theorem 1.1.

Theorem 2.12

Let \(\Gamma \) be either a finitely generated free group or a surface group and assume that G belongs to \({\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\). Then, G is residually-p for every prime p.

Proof

In this proof, \({{\,\textrm{GL}\,}}_n\) and \({{\,\textrm{SL}\,}}_n\) are affine algebraic groups defined over \({\mathbb {F}}_p\).

First consider the case where \(\Gamma =F \) is free. In this case \(\overline{{\mathbb {F}}_p}\otimes _{{\mathbb {F}}_p} R_{{{\,\textrm{GL}\,}}_n}(F)\) is a domain (see (2)), and so \(X_{{{\,\textrm{GL}\,}}_n}^F\) is irreducible. Thus, we can apply Proposition 2.10.

Now assume that \(\Gamma =S_g\) is an orientable surface group of genus g. Consider the \({\mathbb {F}}_p\)-algebra R generated by

$$\begin{aligned} \{y^l_{i,j}: 1\le l\le 2g, 1\le i,j\le n\}\cup \{d_l: 1\le l\le 2g\}\cup \{e\} \end{aligned}$$

with relations \(d_l\cdot \det X_l=1\) for \(l=1,\ldots , 2g\) and the relations coming from the equality

$$\begin{aligned}{}[X_1,X_2]\cdots [X_{2g-1},X_{2g}]=e\cdot 1_{{{\,\textrm{GL}\,}}_n({\mathbb {F}}_p)}, \end{aligned}$$

where \(X_l\) represents a n by n matrix \(X_l=(y^l_{ij})\). Since R is generated by \(2gn^2+2g+1\) variables and defined by \( 2g+n^2\) equations, by [39, Corollary 1.14], the dimension of an irreducible component of \(X_{R}\) is at least \((2g-1)n^2+1\).

The ring \(R_{{{\,\textrm{GL}\,}}_n}(S_g)\) is obtained from R by adding the relation \(e=1\). Since \(e^n=1\) in R, there is a natural bijective correspondence between the irreducible components of \(X_{{{\,\textrm{GL}\,}}_n}^{S_g}\) and those of \(X_{R}\) satisfying \(e=1\), which preserves dimensions. By [33, Theorem 1.8], the dimension of \(X_{{{\,\textrm{GL}\,}}_n}^{S_g}\) is \((2g-1)n^2+1\) and there exists only one irreducible component of dimension \((2g-1)n^2+1\). Therefore, \(X_{{{\,\textrm{GL}\,}}_n}^{S_g}\) is irreducible. Now the result follows from Proposition 2.10.

Finally, assume that \(\Gamma \) is non-orientable surface group. Combining the previous argument with [33, Corollary 1.11] we obtain that \(X_{{{\,\textrm{SL}\,}}_n}^\Gamma \) is irreducible. Thus, we can again apply Proposition 2.10. \(\square \)

3 Proof of Theorem 1.1: the solvable genus

We start this section by explaining several results about the first \(L^2\)-Betti numbers \(b_1^{(2)}(H)\) of a group H which we will use in this paper. The reader can find the definition of \(L^2\)-Betti numbers and their basic properties in [28]. In the following, p denotes a prime.

Proposition 3.1

The following holds.

  1. (a)

    Let H be a group and T a subgroup of finite index in H. Then,

    $$\begin{aligned}b_1^{(2)}(T)=|H:T|\cdot b_1^{(2)}(H).\end{aligned}$$
  2. (b)

    Let S be a surface group and H a non-trivial subgroup of \(S_{\widehat{{\mathcal {N}}_p}}\). Then,

    $$\begin{aligned}b_1^{(2)}(H)\le \dim _{{\mathbb {Q}}} H_1(H, {\mathbb {Q}})-1.\end{aligned}$$
  3. (c)

    Let \(\Gamma \) be either a free or a surface group and H a dense subgroup of \(\Gamma _{\widehat{{\mathcal {N}}_p}}\). Then,

    $$\begin{aligned} b_1^{(2)}(H)\ge b_1^{(2)}(\Gamma ). \end{aligned}$$

Proof

(a) This is [28, Theorem 4.15(iii)].

(b) By [27, Corollary 5.2], H is residually-(amenable locally indicable). Hence by [24, Corollary 1.4], the Neumann rank function \({{\,\textrm{rk}\,}}_H\) and the Sylvester matrix rank function \({{\,\textrm{rk}\,}}_{ \{1\} }\) induced by the augmentation map satisfy \({{\,\textrm{rk}\,}}_H\ge {{\,\textrm{rk}\,}}_{\{1\}}\). Arguing as in the proof of [24, Corollary 1.6], we conclude that \(b_1^{(2)}(H)\le \dim _{{\mathbb {Q}}} H_1(H, {\mathbb {Q}})-1.\)

c) Let \(\Gamma _{\widehat{{\mathcal {N}}_p}}>U_1>U_2>\ldots \) be a chain of open normal subgroups of \(\Gamma _{\widehat{{\mathcal {N}}_p}}\) with trivial intersection. Put \(H_i=H\cap U_i\) and \(\Gamma _i=\Gamma \cap U_i\). Then,

$$\begin{aligned}{} & {} b_1^{(2)}(H)\overset{[35, {\textrm{Theorem}} 1.1]}{\ge } \limsup _{i\rightarrow \infty } \frac{\dim _{{\mathbb {Q}}} H_1(H_i,{\mathbb {Q}})}{|H:H_i|} \\{} & {} \quad \ge \limsup _{i\rightarrow \infty } \frac{\dim _{{\mathbb {Q}}_p} H_1(U_i,{\mathbb {Q}}_p)}{|\Gamma _{\widehat{{\mathcal {N}}_p}}:U_i|}= \limsup _{i\rightarrow \infty } \frac{\dim _{{\mathbb {Q}}} H_1(\Gamma _i,{\mathbb {Q}})}{|\Gamma :\Gamma _i|} = b_1^{(2)}(\Gamma ). \end{aligned}$$

\(\square \)

We will also need the following lemma. Recall that \({\mathcal {S}}\) denotes the pseudovariety of all finite soluble groups.

Lemma 3.2

Let S be a surface group and N a non-trivial closed normal subgroup of \(S_{\widehat{{\mathcal {S}}}}\). Then, there exist a normal open subgroup K of \(S_{\widehat{{\mathcal {S}}}}\), such that \(NK/K\cong C_q^s\), where q is a prime and \(s\ge 2\).

Proof

There exists a prime q such that q divides the (profinite) order of \(N/\overline{[N,N]}\), We want to show that the order of \(N/\overline{[N,N]N^q}\) is at least \(q^2\).

There exists an open subgroup U of \(S_{\widehat{{\mathcal {S}}}}\), such the image of the induced map

$$\begin{aligned} N/\overline{[N,N]N^q}\rightarrow U/[U,U]U^q \end{aligned}$$

is not trivial. This implies that the image M of N in the pro-q quotient \(U_{\widehat{{\mathcal {N}}_q}}\) of U is non-trivial. If M is of finite index in \(U_{\widehat{{\mathcal {N}}_q}}\), then clearly

$$\begin{aligned} |M/[M,M]M^q|\ge |S/[S,S]S^q|\ge q^2. \end{aligned}$$

If M is of infinite index, it cannot be finitely generated (see for example, [19, Theorem 1.1]), and so, \(M/\overline{[M,M]M^q}\) is infinite.

Since M is a quotient of N, we conclude that the order of \(N/\overline{[N,N]N^q}\) is at least \(q^2\). Thus, there exist a normal open subgroup K of \(S_{\widehat{{\mathcal {S}}}}\) containing \(\overline{[N,N]N^q}\) such that \(NK/K\cong C_q^s\) and \(s\ge 2\). \(\square \)

Now we are ready to prove the second part of Theorem 1.1.

Theorem 3.3

Let \(\Gamma \) be a finitely generated free group or a surface group and let p be a prime. If \(G\in {\mathcal {G}}_{{\mathcal {S}}}(\Gamma )\), then G is residually-p .

Proof

We will prove the theorem in the case where \(\Gamma =N_g\) is a non-orientable surface group. The case where \(\Gamma \) is a free group or an orientable surface group can be proved in the same way.

Let H be the image of G in the pro-p completion of G and regard G as a subgroup of \(G_{\widehat{{\mathcal {S}}}}\). Observe that, via the isomorphism \(G_{\widehat{{\mathcal {S}}}}\cong \Gamma _{\widehat{{\mathcal {S}}}}\), the group H maps to a dense subgroup of \(\Gamma _{\widehat{{\mathcal {N}}_{p}}}\). Let N be the kernel of the map \(G_{\widehat{{\mathcal {S}}}}\rightarrow H_{\widehat{{\mathcal {S}}}}\). it suffices to show that \(N=\{1\}\). For a contradiction, we assume that \(N\ne \{1\}\).

Since \(G_{\widehat{{\mathcal {S}}}}\cong \Gamma _{\widehat{{\mathcal {S}}}}\), by Lemma 3.2 there exists a normal open subgroup K of \(G_{\widehat{{\mathcal {S}}}}\), such that \(NK/K\cong C_q^s\), where q is prime and \(s\ge 2\). Put \({\widetilde{T}}=G\cap NK\) and let T be the image of \({\widetilde{T}}\) in H.

Observe that NK is isomorphic to the prosolvable completion of \({\tilde{T}}\). Thus,

$$\begin{aligned} \dim _{{\mathbb {F}}_q} H_1({\widetilde{T}};{\mathbb {F}}_q)= \dim _{{\mathbb {F}}_q} H_1(NK;{\mathbb {F}}_q). \end{aligned}$$

If U is an open subgroup of \(\Gamma _{\widehat{{\mathcal {S}}}}\), then

$$\begin{aligned} \dim _{{\mathbb {F}}_q} H_1(U;{\mathbb {F}}_q)=\dim _{{\mathbb {F}}_q} H_1(U\cap \Gamma ;{\mathbb {F}}_q)\le (g-2)|\Gamma :U\cap \Gamma |+2=(g-2)|\Gamma _{\widehat{{\mathcal {S}}}}:U|+2. \end{aligned}$$

Therefore, since \(G_{\widehat{{\mathcal {S}}}}\cong \Gamma _{\widehat{{\mathcal {S}}}}\), we also have that

$$\begin{aligned} \dim _{{\mathbb {F}}_q} H_1(NK;{\mathbb {F}}_q)\le (g-2)|G_{\widehat{{\mathcal {S}}}}:NK|+2=(g-2)|G:{\widetilde{T}}|+2=(g-2)|H: T|+2. \end{aligned}$$

Hence,

$$\begin{aligned} \dim _{{\mathbb {F}}_q} H_1(T;{\mathbb {F}}_q)\le \dim _{{\mathbb {F}}_q} H_1({\widetilde{T}};{\mathbb {F}}_q)-2=(g-2)|H: T|. \end{aligned}$$

On the other hand, taking into account that T is a subgroup of \(\Gamma _{\widehat{{\mathcal {N}}_p}}\) and \(b_1^{(2)}(\Gamma )=g-2\), we obtain that

$$\begin{aligned}{} & {} \dim _{{\mathbb {F}}_p} H_1(T;{\mathbb {F}}_q)\ge \dim _{{\mathbb {Q}}} H_1(T;{\mathbb {Q}})\overset{\text { Proposition}~3.1(b)}{\ge }\\{} & {} \quad b_1^{(2)}(T)+1 \overset{\text { Proposition}~3.1}{=} |H: T|b_1^{(2)}(H)+1\overset{\text { Proposition}~3.1(c)}{\ge }\\{} & {} \quad (g-2)|H: T|+1. \end{aligned}$$

We have arrived to a contradiction. \(\square \)

4 Grothendieck’s problem concerning prosolvable completions for a finitely generated free group

4.1 RFRS groups

A group G is called residually finite rationally solvable or RFRS if there exists a chain \(G=H_0>H_1>\ldots \) of finite index normal subgroups of G with trivial intersection such that each term \(H_{i+1}\) contains a normal subgroup \(K_{i+1}\) of \(H_i\) with the property that \(H_i/K_{i+1}\) is torsion-free abelian. Any chain \(\{H_i\}\) meeting these conditions is called a witnessing chain (for G).

Let \({\mathcal {C}} \) a pseudovariety of finite solvable groups. We say that a group G is \({\mathcal {C}}\)-RFRS if G has a witnessing chain \(\{H_i\}\) such that \(G/H_i\in {\mathcal {C}}\) for all i. Observe that in this case G is residually-\({\mathcal {C}} \). It is clear that an RFRS group is also \({\mathcal {S}}\)-RFRS. The class of \({\mathcal {N}}_p\)-RFRS groups has already appeared in the literature with the name RFRp groups (see [31]).

Proposition 4.1

Let G be a group from \({\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\) or \({\mathcal {G}}_{{\mathcal {S}}}(\Gamma )\), where \(\Gamma \) is a finitely generated free or a surface group. Let p be a prime and assume that \(p\ne 2\) if \(\Gamma \) is a non-orientable surface group. Then, G is \({\mathcal {N}}_p\)-RFRS.

Proof

The pro-p completion of G can be describe as follows:

$$\begin{aligned} G_{\widehat{{\mathcal {N}}_p}}\cong \left\{ \begin{array}{cl} (F_k)_{\widehat{{\mathcal {N}}_p}} &{} \quad \text {if } \quad \Gamma =F_k \quad \text { or } \quad \Gamma =N_{k+1} \quad \text { and } \quad p\ne 2\\ (S_g)_{\widehat{{\mathcal {N}}_p}} &{} \quad \text {if } \quad \Gamma =S_g \end{array}\right. . \end{aligned}$$

Thus, we have that for every open subgroup V of \(G_{\widehat{{\mathcal {N}}_p}}\), the abelinization of V is torsion-free. Consider a chain of normal open subgroups \(G_{\widehat{{\mathcal {N}}_p}}=U_0>U_1>U_2>\cdots \) of \(G_{\widehat{{\mathcal {N}}_p}}\) with trivial intersection such that \(|U_i:U_{i+1}|=p\) for every \(i\ge 0\). We put \(H_i=G\cap U_i\). It is clear that \(\{H_i\}\) is a witnessing chain for G and \(G/H_i\in {\mathcal {N}}_p\). \(\square \)

4.2 Universal K[G]-ring of fractions

Let R be a unital ring. A division R-ring \(\phi :R\rightarrow {{\,\mathrm{{\mathcal {D}}}\,}}\) is called epic if \(\phi (R)\) generates \({{\,\mathrm{{\mathcal {D}}}\,}}\) as a division ring. Each division R-ring \({\mathcal {D}}\) induces a (generalized) Sylvester module rank function \(\dim _{{{\,\mathrm{{\mathcal {D}}}\,}}}\) for R: for an R-module M we define \(\dim _{{\mathcal {D}}} M\) to be the dimension of \({\mathcal {D}}\otimes _R M\) as a \({\mathcal {D}}\)-space.

Given a ring R, Cohn introduced the notion of a universal division R-ring (see, for example, [15, Section 7.2]). In the language of Sylvester rank functions, an epic division R-ring \({{\,\mathrm{{\mathcal {D}}}\,}}\) is universal if for every division R-ring \({\mathcal {E}}\) and for every finitely generated R-module M, \(\dim _{{{\,\mathrm{{\mathcal {D}}}\,}}}M\le \dim _{\mathcal {E}}{\mathcal {M}}\). By a result of Cohn [14, Theorem 4.4.1], a universal epic division R-ring (if it exists) is unique up to R-isomorphism. A universal division R-ring \({{\,\mathrm{{\mathcal {D}}}\,}}\) is called the universal division ring of fractions of R if \({{\,\mathrm{{\mathcal {D}}}\,}}\) is epic and R is embedded in \({{\,\mathrm{{\mathcal {D}}}\,}}\).

Let K be a field and G an RFRS group. By [24, Corollary 1.3], the universal division K[G]-ring of fractions exists. We denote it by \({\mathcal {D}}_{K[G]}\). In the case where \(K={\mathbb {Q}}\), \({\mathcal {D}}_{K[G]}\) is isomorphic to the Linnell ring \({\mathcal {D}}(G)\). In [29] Kielak gave a description of \({\mathcal {D}}_{{\mathbb {Q}}[G]}\). A similar description for an arbitrary field K was given in [24]. Although this description may appear complicated, it is very useful (as, for example, the results of [17, 29] show) and it is a key ingredient in our proof of Theorem 1.3.

Let H be a subgroup of finite index in G and \(T=\{t_1,\ldots , t_{|G:H|}\}\) a right transversal to H in G. The division subring of \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}\) generated by K[H] is isomorphic to \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[H]}\) as a K[H]-ring, and so, we will denote it also by \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[H]}\). Moreover we have that

$$\begin{aligned} {{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}=\bigoplus _{i=1}^{|G:H|} {{\,\mathrm{{\mathcal {D}}}\,}}_{K[H]}t_i. \end{aligned}$$

Let \(\alpha :H\rightarrow {\mathbb {Z}}\) be an epimorphism and \(N=\ker \alpha \). Then, the ring \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}H\) generated by \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}\) and H is isomorphic to a crossed product \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}*{\mathbb {Z}}\). Moreover, if \(g\in H\) such that \(\alpha (g)=1\), then any element \(a\in {{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}H\) can be written uniquely as \(a=\sum _{i=k}^m a_ig^i\) with \(k,m\in {\mathbb {Z}}\) and \(a_i\in {{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}\). Denote by \(\Vert \ \Vert _\alpha \) the norm on \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}H\) defined by means of

$$\begin{aligned} \Vert \sum _i a_i g^i\Vert _\alpha =\max \{2^{-i}: \ a_i\ne 0\}. \end{aligned}$$

Observe that \(-\alpha :H\rightarrow {\mathbb {Z}}\), \(h\mapsto -\alpha (h)\), is also a homomorphism, and that, for \(a\in {{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}H\) ,

$$\begin{aligned} \Vert \sum _i a_i g^i\Vert _{-\alpha }=\max \{2^{i}: \ a_i\ne 0\}. \end{aligned}$$

Our convention is that \(\Vert 0\Vert _\alpha =0\). Let be the completion of \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}H\) with respect to the metric induced by the norm \(\Vert \ \Vert _\alpha \). Then,

The subring of is called the Novikov ring of K[H] with respect to \(\alpha \). Observe that is a division ring. Since \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[H]}\) is the Ore ring of fractions of \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}H\), the canonical embedding extends uniquely to an embedding

This leads us to the following commutative diagram.

which defines an embedding \(\theta _{H,\alpha } \). The following theorem follows directly from [29, Theorem 4.13] (see also [24, Theorem 5.10] for the case where K has positive characteristic).

Proposition 4.2

[29] Let K be a field, G an RFRS group and \(G=H_0>H_1>H_2>\ldots \) a witnessing chain. Let \(a_1,\ldots , a_s\in {{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}\). Then, there exists \(n\in {\mathbb {N}}\) and an epimorphism \(\alpha :H\rightarrow {\mathbb {Z}}\) for \(H=H_n\) such that if \(T=\{t_1,\ldots , t_{|G:H|}\}\) is a transversal to H in G and

$$\begin{aligned} a_i=\sum _{j=1}^{|G:H|} a_{ij}t_j, \ a_{ij}\in {{\,\mathrm{{\mathcal {D}}}\,}}_{K[H]}, \end{aligned}$$

then for all relevant indices i and j,

$$\begin{aligned} \delta _{H,\alpha }(a_{ij})\in {{\,\textrm{Im}\,}}\theta _{H, \alpha } \text { and } \delta _{H, -\alpha }(a_{ij})\in {{\,\textrm{Im}\,}}\theta _{H, -\alpha }. \end{aligned}$$

4.3 Grothendieck’s problem for free modules

In this section, let Z be a finite field or \({\mathbb {Z}}\) and let K denotes its field of fractions. Let R be a unital ring and \({\mathcal {D}}\) a division R-ring. We say that an R-module M is \({\mathcal {D}}\)-torsion-free if the canonical map \(M\rightarrow {\mathcal {D}}\otimes _R M\) is injective. The following result, which we think is of independent interest, is the main step in the proof of Theorem 1.3. Recall that \({\mathcal {A}}\) denotes the pseudovariety of finitely generated abelian groups.

Theorem 4.3

Let \({\mathcal {C}} \) be a pseudovariety of finite solvable groups, \({\mathcal {E}}={\mathcal {A}}{\mathcal {C}}\) and G a finitely generated \({\mathcal {C}}\)-RFRS group. Let M be a finitely generated \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}\)-torsion-free Z[G]-module, L a free Z[G]-module and \(\alpha :L\rightarrow M\) a homomorphism of Z[G]-modules. Assume that for every quotient \(P\in {\mathcal {E}}_{\mathrm f} \) of G, the induced map

$$\begin{aligned} {{\,\textrm{Id}\,}}_{Z[P]}\otimes \alpha : Z[P]\otimes _{Z[G]} L\rightarrow Z[P]\otimes _{Z[G]}M \end{aligned}$$

is onto and

$$\begin{aligned} \dim _{{{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]} }L=\dim _{{{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}} M. \end{aligned}$$

Then, \(\alpha \) is an isomorphism.

Proof

Let \(G_0\) be a subgroup of G of finite index and let \(\phi :Z[G_0]\rightarrow R\) be a \(Z[G_0]\)-ring. The following notation will be used later for various choices of \(G_0\).

The map \(\alpha \) induces the map

$$\begin{aligned} \widetilde{\phi }:={{\,\textrm{Id}\,}}_R\otimes \alpha :R \otimes _{Z[G_0]} L\rightarrow R\otimes _{Z[G_0]}M. \end{aligned}$$

Fix a free basis \(l_1,\ldots , l_d\) of L as a \({\mathbb {Z}}[G_0]\)-module. Assume that \(\widetilde{\phi }\) is an isomorphism of R-modules. Then, \( R\otimes _{Z[G_0]}M\) is a free R-module with free basis \(\widetilde{\phi }(1\otimes l_i)\). For every \(m\in M\), there exists a unique \(a^\phi (m)=(a_1^\phi (m), \ldots , a_d^\phi (m))\in R^d\) such that

$$\begin{aligned} 1\otimes m=a_1^\phi (m)\cdot \widetilde{\phi }(1\otimes l_1)+\ldots +a_d^\phi (m)\cdot \widetilde{\phi }(1\otimes l_d). \end{aligned}$$

The coefficients \(a_i^{\phi }(m)\) depend on the basis \(l_1,\ldots , l_d\). It will always be clear from the context which choice of \(G_0\) we have made and with respect to what basis we carry out the calculation.

Claim 4.4

Let \(G_0\) be a subgroup of G of finite index, \(\phi : Z[G_0]\rightarrow R\) a \(Z[G_0]\)-ring and \(\psi : R\rightarrow S\) an R-ring. Assume that \(\widetilde{\phi }\) is an isomorphism of R-modules. Then, \(\widetilde{\psi \circ \phi }\) is an isomorphism of S-modules. Moreover,

$$\begin{aligned} a^{\psi \circ \phi }(m)=\psi (a^{\phi }(m)) \text { for every } m\in M. \end{aligned}$$

Proof

If \(\widetilde{\phi }\) is an isomorphism, then it is clear that \(\widetilde{\psi \circ \phi }\) is also an isomorphism. The equality

$$\begin{aligned} a^{\psi \circ \phi }(m)=\psi (a^{\phi }(m)) \text { for every } m\in M \end{aligned}$$

follows from the uniqueness of \(a^{\psi \circ \phi }(m)\). \(\square \)

Claim 4.5

Let \(P\in {\mathcal {E}}\) be a quotient of G and \(\pi _P:Z[G]\rightarrow Z[P]\) the canonical map. Then, \(\widetilde{\pi _P}\) is an isomorphism.

Proof

First assume that P is finite. Then from the hypothesis of the theorem, it follows that \(\widetilde{\pi _P}\) is onto. Let N be such that \(P=G/N\). Then using that \({\mathcal {D}}_{K[N]}\) is the universal division ring of fractions of K[N], we obtain that

$$\begin{aligned}{} & {} \dim _K (K\otimes _{Z[N]} L)=\dim _K (K[P]\otimes _{Z[G]} L)\ge \dim _K (K[P]\otimes _{Z[G]} M)\\{} & {} \quad =\dim _K (K\otimes _{Z[N]} M)\ge \dim _{{{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}} M= |G:N|\cdot \dim _{{{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}} M \\{} & {} \quad = |G:N|\cdot \dim _{{{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}} L=\dim _{{{\,\mathrm{{\mathcal {D}}}\,}}_{K[N]}} L=\dim _K (K\otimes _{Z[N]} L). \end{aligned}$$

Thus, \(\dim _K (K[P]\otimes _{Z[G]} L)= \dim _K (K[P]\otimes _{Z[G]} M)\), and so \(\widetilde{\pi _P}\) is injective.

Now assume that P is infinite. Let us first show that \(\widetilde{\pi _P}\) is injective. Let \(0 \ne x\in Z[P]\otimes _{Z[G]} L\). Let \(l_1,\ldots . l_d\) be a free basis of L. Then, \(1\otimes l_1,\ldots , 1\otimes l_d\) is a free basis of \(Z[P]\otimes _{Z[G]} L\). Write \(x=\sum _{i=1}^d x_i\otimes l_i\) with \(x_i\in Z[P]\). Since P is polycyclic, it is residually finite. Therefore, there exists a finite quotient \({\overline{P}}\) of P such that if \(\eta _{{\overline{P}}}:Z[P]\rightarrow Z[{\overline{P}}]\) denotes the canonical map, then for some i, \(\eta _{{\overline{P}}}(x_i)\ne 0\). Hence,

$$\begin{aligned} (\eta _{{\overline{P}}}\otimes {{\,\textrm{Id}\,}}_L)(x)=\sum _{i=1}^d \eta _{{\overline{P}}}({x_i})\otimes l_i\ne 0. \end{aligned}$$

Observe that

$$\begin{aligned} \widetilde{\pi _{{\overline{P}}}}\circ (\eta _{{\overline{P}}}\otimes {{\,\textrm{Id}\,}}_L)=(\eta _{{\overline{P}}}\otimes {{\,\textrm{Id}\,}}_M)\circ \widetilde{\pi _{ P}}. \end{aligned}$$

Since \({\overline{P}}\in {\mathcal {E}}_{\mathrm f} \), as we have proved before \( \widetilde{\pi _{{\overline{P}}}}\) is an isomorphism. Thus, \(\widetilde{\pi _{ P}}(x)\ne 0\).

Now we want to show that \(\widetilde{\pi _P}\) is surjective. Let

$$\begin{aligned} U=(Z[ P]\otimes _{Z[G]} M)/{{\,\textrm{Im}\,}}\widetilde{\pi _P}. \end{aligned}$$

Since P is polycyclic, by [38, Theorem A and Corollary A], an irreducible Z[P]-module is finite. Thus if \(U\ne \{0\}\), there exists a finite quotient \({\overline{P}}\) of P such that \(Z[{\overline{P}}]\otimes _{Z[P]} U\ne 0\). But this is impossible because \( \widetilde{\pi _{{\overline{P}}}}\) is an isomorphism. Thus, U is trivial, and so \(\widetilde{\pi _P}\) is surjective. \(\square \)

Let \({\theta _G}: Z[G]\hookrightarrow {{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}\) be the canonical embedding of Z[G] in the universal division K[G]-ring of fractions.

Claim 4.6

The homomorphism \(\widetilde{\theta _G}\) is an isomorphism.

Proof

Let \(A=K[G]\otimes _{Z[G]} (M/\alpha (L))\). Then, A is a finitely generated K[G]-module. The hypothesis of the theorem includes that \(Z\otimes _{Z[G]} (M/\alpha (L))=\{0\}\). Hence, \(K\otimes _{K[G]} A=\{0\}\). Since \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}\) is universal, \({{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}\otimes _{K[G]} A=\{0\}\), and so \(\widetilde{\theta _G}\) is onto. Since \(\dim _{{{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]} }L=\dim _{{{\,\mathrm{{\mathcal {D}}}\,}}_{K[G]}} M\), \(\widetilde{\theta _G}\) is an isomorphism. \(\square \)

Let \(S\subset M\) be a finite generating set of M. Let \(l_1,\ldots , l_d\) be a free basis of L as a Z[G]-module. By Proposition 4.2, there exists a finite-index normal subgroup H of G and an epimorphism \(\tau :H\rightarrow {\mathbb {Z}}\) such that \(G/H\in {\mathcal {C}}\) and if \(T=\{t_1,\ldots , t_{|G:H|}\}\) is a transversal to H in G, \(m\in M\) and

$$\begin{aligned} a^{\theta _G}_i(m)=\sum _{j=1}^{|G:H|}a^{\theta _G}_{ij}(m) \cdot t_j, \ a^{\theta _G}_{ij}(m)\in {{\,\mathrm{{\mathcal {D}}}\,}}_{K[H]}, \end{aligned}$$

then for every \(m\in S\), and all ij such that \(1\le i\le d\) and \(1\le j\le |G:H|\),

$$\begin{aligned} \delta _{H,\tau }(a^{\theta _G}_{ij}(m))\in {{\,\textrm{Im}\,}}\theta _{H, \tau } \text { and } \delta _{H, -\tau }(a^{\theta _G}_{ij}(m))\in {{\,\textrm{Im}\,}}\theta _{H, -\tau }, \end{aligned}$$
(4)

We put

$$\begin{aligned} {\textbf{S}}=\{a^{\theta _G}_{ij}(m)\in {{\,\mathrm{{\mathcal {D}}}\,}}_{K[H]} :m\in S,\ 1\le i\le d, \ 1\le j\le |G:H|\}. \end{aligned}$$

There is also another way to construct \({\textbf{S}}\) from the elements of S. Observe that \(\{t_j\cdot l_i: 1\le i\le d, 1\le j\le |G:H|\}\) is a basis of L as a Z[H]-module and also \(\widetilde{\theta _H}\) is an isomorphism. Hence,

$$\begin{aligned} {\textbf{S}}=\{ a^{\theta _H}_i(m)\in {{\,\mathrm{{\mathcal {D}}}\,}}_{K[H]} :1\le i\le |G:H|\cdot d,\ m\in S\}. \end{aligned}$$

By our assumption, G is residually-\({\mathcal {C}} \). Thus, there exists a chain of normal subgroups \(G>N_1>N_2>\ldots \) with trivial intersection such that each \(G/N_i\in {\mathcal {C}} \). Since \({\mathcal {C}}\) is a pseudo-variety, \(G/(H\cap N_i)\in {\mathcal {C}}\). Put \(H_i=[H,H]\cap N_i\) and observe that \((H\cap N_i)/H_i\in {\mathcal {A}}\). Hence, \(G/H_i\in {\mathcal {A}} {\mathcal {C}}={\mathcal {E}} \).

For each \(k\ge 1\) and \(\beta =\pm \tau \), there exists a canonical map that leads to the following commutative diagram

Claim 4.7

For every \(a\in {\textbf{S}}\) and every \(k\ge 1\), we have that

$$\begin{aligned} \pi _{H/H_k, \beta }(\theta _{H,\beta }^{-1}(\delta _{H,\beta }(a)))\in {{\,\textrm{Im}\,}}\delta _{H/H_k,\beta } ~~\text {for } ~~\beta =\pm \tau . \end{aligned}$$

Moreover, if \(a=a^{ \theta _H}_i(m)\)

$$\begin{aligned} \delta _{H/H_k,\beta }^{-1}(\pi _{H/H_k, \beta }(\theta _{H,\beta }^{-1}(\delta _{H,\beta }(a))))=a_i^{\pi _{H/H_k}}(m) . \end{aligned}$$

Proof

As we have already observed, Claim 4.6 implies that \(\widetilde{\theta _H}\) is an isomorphism. Thus, (4) implies that \(\widetilde{\delta _{H,\beta }}\) is onto. Claim 4.4 implies that \(\widetilde{\delta _{H,\beta }\circ \theta _H}=\widetilde{\theta _{H,\beta }\circ \delta _{H,\beta }}\) is an isomorphism. Hence since \(\theta _{H,\beta }\) is injective, \(\widetilde{\delta _{H,\beta }}\) is also injective and so bijective. Applying Claim 4.4, twice we obtain that

$$\begin{aligned} \delta _{H,\beta }(a^{\theta _H}_i(m))=a^{\delta _{H,\beta }\circ \theta _H}_i(m)=a^{\theta _{H,\beta }\circ \delta _{H,\beta }}_i(m)=\theta _{H,\beta }(a^{ \delta _{H,\beta }}_i(m)). \end{aligned}$$
(5)

By Claim 4.5, \(\widetilde{ \pi _{G/H_k}}\) is an isomorphism. Again this implies that \(\widetilde{\pi _{H/H_k}}\) is also an isomorphism. Thus, Claim 4.4 implies that

$$\begin{aligned}{} & {} \delta _{H/H_k,\beta }(a^{\pi _{H/H_k}}_i(m))=a^{\delta _{H/H_k,\beta }\circ \pi _{H/H_k}}_i(m)\nonumber \\{} & {} \quad =a^{\pi _{H/H_k,\beta }\circ \delta _{H,\beta }}_i(m)=\pi _{H/H_k,\beta }(a^{ \delta _{H,\beta }}_i(m)). \end{aligned}$$
(6)

Thus, from (5) and (6) we obtain that

$$\begin{aligned} \pi _{H/H_k, \beta }(\theta _{H,\beta }^{-1}(\delta _{H,\beta }(a^{ \theta _H}_i(m))))\in {{\,\textrm{Im}\,}}\delta _{H/H_k,\beta } \end{aligned}$$

and

$$\begin{aligned} \delta _{H/H_k,\beta }^{-1}(\pi _{H/H_k, \beta }(\theta _{H,\beta }^{-1}(\delta _{H,\beta }(a^{ \theta _H}_i(m)))))=a^{\pi _{H/H_k}}_i(m). \end{aligned}$$

\(\square \)

Claim 4.8

We have that \({\textbf{S}}\) is a subset of Z[H].

Proof

Choose \(g\in H\) such that \(\tau (g)=1\). Let \(a=a^{ \theta _H}_i(m)\in {\textbf{S}}\). Then for some \(l_1,l_2\in {\mathbb {Z}}\),

$$\begin{aligned} \theta _{H,\tau }^{-1}(\delta _{H,\tau }(a))=\sum _{i=l_1}^\infty q_i g^i \text { and }\theta _{H,-\tau }^{-1}(\delta _{H,-\tau }(a))=\sum _{i=-l_2}^\infty r_i g^{-i} \end{aligned}$$

with \(q_i,r_i\in K[\ker \tau ].\) Let us show that \(q_i=0\) if \(i> l_2\). Indeed, by Claim 4.7, for all \(k\ge 1\), almost all \(\pi _{H/H_k}(q_i)\) and \(\pi _{H/H_k}(r_i)\) are trivial and, moreover, we have the following equality in \(Z[H/H_k]\):

$$\begin{aligned}{} & {} \sum _{i=l_1}^\infty \pi _{H/H_k}(q_i)g^i =\delta _{H/H_k,\tau }^{-1}(\pi _{H/H_k, \tau }(\theta _{H,\tau }^{-1}(\delta _{H,\tau }(a)))) \\{} & {} \quad =\delta _{H/H_k,-\tau }^{-1}(\pi _{H/H_k, -\tau }(\theta _{H,-\tau }^{-1}(\delta _{H,-\tau }(a)))) =\sum _{i=-l_2}^\infty \pi _{H/H_k}(r_i )g^{-i}. \end{aligned}$$

Therefore, \(\pi _{H/H_k}(q_i)=0\) if \(i>l_2\). Since \(\cap H_k=\{1\}\), this implies that \(q_i=0\). Thus, \(a\in K[H]\). However, since the image \(\pi _{H/H_k}(a)\) of a in \( K[H/H_k]\) is in \( Z[H/H_k]\) for all k, a is in fact in Z[H]. \(\square \)

Consider the following commutative diagram of Z[G]-modules:

$$\begin{aligned} \begin{array}{ccc} L &{} \hookrightarrow &{} M \\ \downarrow &{}&{} \downarrow \\ 1\otimes L&{} \xrightarrow {\widetilde{\theta _G}_{|1\otimes L} }&{} 1\otimes M\end{array}. \end{aligned}$$

By Claim 4.8, \(\widetilde{\theta _G}(1\otimes L)=1\otimes M\). Since M is \({\mathcal {D}}_{K[G]}\)-torsion-free, the map \(M\rightarrow 1\otimes M\) that sends m to \(1\otimes m\) is an isomorphism. This implies that the map \(L \hookrightarrow M \) is onto. \(\square \)

The following result gives a criterion for invertibility of a matrix over Z[G].

Corollary 4.9

Let \({\mathcal {C}} \) be a pseudovariety of finite solvable groups, \({\mathcal {E}}={\mathcal {A}} {\mathcal {C}}\) and G a finitely generated \({\mathcal {C}}\)-RFRS group. Let \(A\in {{\,\textrm{Mat}\,}}_n(Z[G])\). If for every quotient \(P\in {\mathcal {E}}_{\mathrm f} \) of G the image of A in \( {{\,\textrm{Mat}\,}}_n(Z[P])\) is invertible, then A is invertible over Z[G].

Proof

Multiplication by the matrix A from the right induces a homomorphism \(\alpha : Z[G]^n\rightarrow Z[G]^n\). Theorem 4.3 implies that \(\alpha \) is an isomorphism of Z[G]-modules. Hence, A is invertible. \(\square \)

Corollary 4.10

Let G be a group from \({\mathcal {G}}_{{\mathcal {F}}}(\Gamma )\) or \({\mathcal {G}}_{{\mathcal {S}}}(\Gamma )\), where \(\Gamma \) is a finitely generated free or a surface group. Let p and q be primes, possibly equal to one another. Let M be a finitely generated \({{\,\mathrm{{\mathcal {D}}}\,}}_{{\mathbb {F}}_q[G]}\)-torsion-free \({\mathbb {F}}_q[G]\)-module, L a free \({\mathbb {F}}_q[G]\)-module and \(\alpha :L\rightarrow M\) a homomorphism of \({\mathbb {F}}_q[G]\)-modules. Assume that for every quotient \(P\in {\mathcal {A}}_{q^\prime }{\mathcal {N}}_p\) of G the induced map

$$\begin{aligned} {{\,\textrm{Id}\,}}_{{\mathbb {F}}_q[P]}\otimes \alpha : {\mathbb {F}}_q[P]\otimes _{{\mathbb {F}}_q[G]} L\rightarrow {\mathbb {F}}_q[P]\otimes _{{\mathbb {F}}_q[G]}M \end{aligned}$$

is onto and \(\dim _{{{\,\mathrm{{\mathcal {D}}}\,}}_{{\mathbb {F}}_q[G]} }L=\dim _{{{\,\mathrm{{\mathcal {D}}}\,}}_{{\mathbb {F}}_q[G]}} M.\) Then, \(\alpha \) is an isomorphism.

Proof

If \(\Gamma \) is a non-orientable surface group, then G has a subgroup \(G_0\) of index 2 such that \(G_0\) belongs to \({\mathcal {G}}_{{\mathcal {F}}}(S)\) or \({\mathcal {G}}_{{\mathcal {S}}}(S)\), where S is an orientable surface group. Hence if \(p=2\), then for every quotient \(P\in {\mathcal {A}}_{2^\prime }{\mathcal {N}}_2\) of \(G_0\) the induced map \( {\mathbb {F}}_q[P]\otimes _{{\mathbb {F}}_q[G_0]} L\rightarrow {\mathbb {F}}_q[P]\otimes _{{\mathbb {F}}_p[G_0]}M \) is also onto. This means that in the case of \(p=2\), we can assume that \(\Gamma \) is a free group or an orientable surface group. Thus, by Proposition 4.1, G is \({\mathcal {N}}_p\)-RFRS.

Let \({\mathcal {E}}={\mathcal {A}} {\mathcal {N}}_p\) and \(P\in {\mathcal {E}}_{\mathrm f} \). Then, there exists a normal subgroup \(N\in {\mathcal {A}}_q\) of P such that \({\overline{P}}=P/N\in {\mathcal {A}}_{q^\prime }{\mathcal {N}}_p\). The following assertions are equivalent to one another:

  1. (1)

    the map \({{\,\textrm{Id}\,}}_{{\mathbb {F}}_q[P]}\otimes \alpha \) is onto;

  2. (2)

    \({\mathbb {F}}_q[P]\otimes _{{\mathbb {F}}_q[G]} (M/\alpha (M))=0\) ;

  3. (3)

    \({\mathbb {F}}_q[{\overline{P}}]\otimes _{{\mathbb {F}}_q[G]} (M/\alpha (M))=0\) (because the Jacobson ideal of \({\mathbb {F}}_q[P]\) contains \(\{n-1:n\in N\}\));

  4. (4)

    \({{\,\textrm{Id}\,}}_{{\mathbb {F}}_q[{\overline{P}}]}\otimes \alpha \) is onto.

Hence, \({{\,\textrm{Id}\,}}_{{\mathbb {F}}_q[P]}\otimes \alpha \) is onto. By Theorem 4.3, \(\alpha \) is an isomorphism. \(\square \)

For a group algebra K[G] we denote by \(I_{K[G]}\) its augmentation ideal and, if H is a subgroup of G, by \(^G{}I_{K[H]} \) the left ideal of K[G] generated by \(I_{K[H]}\).

Lemma 4.11

Let q be a prime, G and H groups and \(u:H\rightarrow G\) a homomorphism. Let N be a normal subgroup of G. Assume that \(G=u(H)[N,N]N^q\). Then, the induced map

$$\begin{aligned} {\mathbb {F}}_q[G/N]\otimes _{{\mathbb {F}}_q[H]} I_{{\mathbb {F}}_q[H]}\rightarrow {\mathbb {F}}_q[G/N]\otimes _{{\mathbb {F}}_q[G]} I_{{\mathbb {F}}_q[G]} \end{aligned}$$

is onto, where on the left-hand side \({\mathbb {F}}_q[G/N] \) is regarded as a right \({\mathbb {F}}[H]\)-module via u.

Proof

For simplicity, we assume that H is a subgroup of G and u is the inclusion map. Consider the following commutative diagram of left \({\mathbb {F}}_q[G]\)-modules.

$$\begin{aligned}\begin{array}{ccccccc} 0\rightarrow &{} {}^GI_{{\mathbb {F}}_q[H]} &{}\rightarrow &{} {\mathbb {F}}_q[G]&{}\rightarrow &{} {\mathbb {F}}_q[G/H]&{}\rightarrow 0\\ &{}\downarrow &{}&{}||&{}&{}\downarrow &{}\\ 0\rightarrow &{}I_{{\mathbb {F}}_p[G]} &{} \rightarrow &{}{\mathbb {F}}_q[G]&{}\rightarrow &{} {\mathbb {F}}_q&{}\rightarrow 0. \end{array}\end{aligned}$$

After applying \({\mathbb {F}}_q[G/N]\otimes _{{\mathbb {F}}_q[G]} \), and taking into account that \(G=HN\), we obtain the following commutative diagram with exact horizontal sequences.

$$\begin{aligned}\begin{array}{cccccccc} H_1(H, {\mathbb {F}}_q[G/N])&{}\rightarrow &{} {\mathbb {F}}_q[G/N]\otimes _{{\mathbb {F}}_q[G]} {}^GI_{{\mathbb {F}}_q[H]} &{}\rightarrow &{} {\mathbb {F}}_q[G/N] &{}\rightarrow &{} {\mathbb {F}}_q[G/NH] &{}\rightarrow 0 \\ \downarrow &{}&{}\downarrow &{}&{}|| &{}&{}||&{}\\ H_1(G, {\mathbb {F}}_q[G/N])&{}\rightarrow &{}{\mathbb {F}}_q[G/N]\otimes _{{\mathbb {F}}_q[G]} I_{{\mathbb {F}}_q[G]} &{} \rightarrow &{}{\mathbb {F}}_q[G/N]&{}\rightarrow &{} {\mathbb {F}}_q &{}\rightarrow 0. \end{array} \end{aligned}$$

Thus, we will prove the lemma if we show that the map \(H_1(H, {\mathbb {F}}_q[G/N])\rightarrow H_1(H, {\mathbb {F}}_q[G/N])\) is onto. Since \(G=HN\) and using Shapiro’s Lemma we obtain

$$\begin{aligned}{} & {} H_1(H, {\mathbb {F}}_q[G/N])\cong H_1 (H,{\mathbb {F}}_q[H/N\cap H] )\cong H_1(N\cap H, {\mathbb {F}}_q)\\{} & {} \quad \text { and } H_1(G, {\mathbb {F}}_q[G/N])\cong H_1(N,{\mathbb {F}}_q). \end{aligned}$$

Since \(G=H[N,N]N^q\), \(N=(H\cap N)[N,N]N^q\). Therefore, the canonical map \( H_1(N\cap H, {\mathbb {F}}_q)\rightarrow H_1(N,{\mathbb {F}}_q)\) is onto. \(\square \)

Proof of Theorem 1.3

Let q be a prime. Observe that \(u:F\rightarrow G\) induces the homomorphism

$$\begin{aligned} \alpha : {{\mathbb {F}}_q[G]}\otimes _{{\mathbb {F}}_q[F]}I_{{\mathbb {F}}_q[F]}\rightarrow I_{{\mathbb {F}}_q[G]} \end{aligned}$$

of \({\mathbb {F}}_q[G]\)-modules.

Since \(u_{\widehat{{\mathcal {C}}}}:F_{\widehat{{\mathcal {C}}}}\rightarrow G_{\widehat{{\mathcal {C}}}}\) is an isomorphism, for every normal subgroup N of G such that \(G/N\in {\mathcal {C}}\), \(G/[N,N]N^q\in {\mathcal {C}}\) and so \(G=u(F)[N,N]N^q\). Thus, by Lemma 4.11, the induced map

$$\begin{aligned} {\mathbb {F}}_q[G/N]\otimes _{{\mathbb {F}}_q[G]}( {{\mathbb {F}}_q[G]}\otimes _{{\mathbb {F}}_q[F]}I_{{\mathbb {F}}_q[F]})\rightarrow {\mathbb {F}}_q[G/N]\otimes _{{\mathbb {F}}_q[G]} I_{{\mathbb {F}}_q[G]} \end{aligned}$$

is onto.

Le d be the rank of F. If \(x_1,\ldots , x_d\) are free generators of F, then \(x_1-1,\ldots , x_d-1\) is a basis of the free left \({\mathbb {F}}_q[F]\)-module \(I_{{\mathbb {F}}_q[F]}\). Therefore, \(L={{\mathbb {F}}_q[G]}\otimes _{{\mathbb {F}}_q[F]}I_{{\mathbb {F}}_q[F]}\) is a free \({\mathbb {F}}_q[G]\)-module of rank d. In particular, \(\dim _{{\mathcal {D}}_{{\mathbb {F}}_q[G]}} L=d\). By Theorem 1.1, G is parafree. Therefore, it follows from [25, Corollary 3.7 and the discussion afterwards] that \(\dim _{{\mathcal {D}}_{{\mathbb {F}}_q[G]}} I_{{\mathbb {F}}_q[G]}\) is also equal to d. Hence, by Corollary 4.10, the map \( \alpha \) is an isomorphism. Therefore, u is an isomorphism. \(\square \)

5 Images in finite solvable groups

In this section, we prove Theorems 1.5 and 1.6.

5.1 Measure preserving tuples in free pro-\({\mathcal {C}}\)-groups

Let \({\mathcal {C}}\) be a pseudovariety of finite groups, \(F_{\widehat{{\mathcal {C}}}}\) a free pro-\({\mathcal {C}}\) group with free generators \(x_1,\ldots , x_d\), \(k\ge 1\) and \(w=(w_1,\ldots , w_k)\) a tuple of elements of \(F_{\widehat{{\mathcal {C}}}}\). Given a finite group \(G\in {\mathcal {C}}\), we can define a map \(w_G:G^d\rightarrow G^k\) that sends \((g_1,\ldots , g_d)\) to the image of w under the homomorphism \(F_{\widehat{{\mathcal {C}}}}\rightarrow G\) sending \(x_i\) to \(g_i\). In this section, we prove the following result mentioned in the introduction.

Proposition 5.1

Let \({\mathcal {C}}\) be a pseudovariety of finite groups, \(F_{\widehat{{\mathcal {C}}}}\) a free pro-\({\mathcal {C}}\) group with free generators \(x_1,\ldots , x_d\), \(k\ge 1\) and \(w=(w_1,\ldots , w_k)\) a tuple of elements of \(F_{\widehat{{\mathcal {C}}}}\). Then, w is measure preserving in \({\mathcal {C}}\) if and only if w is primitive in \(F_{\widehat{{\mathcal {C}}}}\).

Proof

The “if” part of the proposition is clear. Let us prove the “only if ”part. We use the results of [20, Section 3]. There it is assumed that \({\mathcal {C}}\) is extension-closed, but all proofs work perfectly without this assumption.

It is clear that \(k\le d\). Let \(H_1\) be the closed subgroup of \(F_{\widehat{{\mathcal {C}}}}\) generated by \(x_1,\ldots , x_k\) and \(H_2\) the closed subgroup of \(F_{\widehat{{\mathcal {C}}}}\) generated by \(w_1,\ldots , w_k\). Observe that \(H_1\) is free pro-\({\mathcal {C}}\) with free generators \(x_1,\ldots , x_k\).

First, we will show that \(H_2\) is also free pro-\({\mathcal {C}}\) of rank k. Let \(\alpha : H_1\rightarrow H_2\) be the map hat sends \(x_i\) to \(w_i\). Let N be an open normal subgroup of \(H_1\) and \(G=H_1/N\). Since \(w_G\) is measure preserving, there exists a homomorphism from \(F_{\widehat{{\mathcal {C}}}}\) to G whose restriction to \(H_2\) gives a homomorphism \(H_2 \rightarrow G\) sending \(w_i\) to \(x_iN\). This implies that \(\alpha \) is an isomorphism.

Since the map \(w_P\) is measure preserving for every \(P\in {\mathcal {C}}\), the condition (b) of [20, Proposition 3.2] holds. This implies that there exists \(\widetilde{\alpha }\in {{\,\textrm{Aut}\,}}(F_{\widehat{{\mathcal {C}}}})\) whose restriction on \(H_1\) is \(\alpha \). Thus, w is primitive in \(F_{\widehat{{\mathcal {C}}}}\). \(\square \)

5.2 Measure preserving tuples in free groups

In order to prove Theorems 1.5 and 1.6 (a), we will need the following result, which is known to the specialists. We include its proof for the convenience of the reader.

Proposition 5.2

Let F be a free group of rank d and \( w_1,\ldots , w_k\in F\). Let H be a subgroup of F generated by \(w_1,\ldots , w_k\) and \(G =F*_{H} F\) the double of F over H. Assume that G is free of rank \(2d-k\). Then, the tuple \((w_1,\ldots , w_k)\) is primitive in F.

Proof

Let \({\mathbb {F}}\) be a field. There is a natural homomorphism \(G \rightarrow F\), determined by the property that it restricts to the identity map on each of the two factors isomorphic to F. Thus, \({\mathbb {F}}[F]\) naturally carries the structure of an \({\mathbb {F}}[G]\)-module. We denote two copies of F inside G by \(F_1\) and \(F_2\). A standard calculation of the cohomology groups of an amalgamated product (see for example, [12, Theorem 2]) gives an exact sequence

$$\begin{aligned} H^1(G; {\mathbb {F}}[F])\rightarrow H^1(F_1;{\mathbb {F}}[F])\oplus H^1(F_2;{\mathbb {F}}[F])\rightarrow H^1(H;{\mathbb {F}}[F])\rightarrow H^2(G; {\mathbb {F}}[F]). \end{aligned}$$

Since G is free \(H^2(G;{\mathbb {F}}[F])= 0\). The images of the restriction maps

$$\begin{aligned}H^1(F;{\mathbb {F}}[F])\rightarrow H^1(H;{\mathbb {F}}[F]) \text { and} ~~H^1(F_i;{\mathbb {F}}[F])\rightarrow H^1(H;{\mathbb {F}}[F])\text { for } i=1,2 \end{aligned}$$

are the same. Therefore, the restriction map

$$\begin{aligned} r: H^1(F;{\mathbb {F}}[F])\rightarrow H^1(H;{\mathbb {F}}[F]) \end{aligned}$$

is onto. Consider the exact sequence of \({\mathbb {F}}[F]\)-modules

$$\begin{aligned} 0\rightarrow I_{{\mathbb {F}}[H]}\rightarrow {\mathbb {F}}[H]\rightarrow {\mathbb {F}}\rightarrow 0. \end{aligned}$$

After applying \({\mathbb {F}}[F]\otimes _{{\mathbb {F}}[H]}\) we obtain the exact sequence

$$\begin{aligned} 0\rightarrow {\mathbb {F}}[F]\otimes _{{\mathbb {F}}[H]} I_{{\mathbb {F}}[H]}\rightarrow {\mathbb {F}}[F]\rightarrow {\mathbb {F}}[F/H]\rightarrow 0. \end{aligned}$$

In particular, \({\mathbb {F}}[F]\otimes _{{\mathbb {F}}[H]} I_{{\mathbb {F}}[H]}\cong {}^FI_{{\mathbb {F}}[H]} \). Hence, we obtain the exact sequence

$$\begin{aligned} 0\rightarrow H^1(H; {\mathbb {F}}[F])\rightarrow {{\,\textrm{Hom}\,}}_{{\mathbb {F}}[F]}(I_{{\mathbb {F}}[H]}^F , {\mathbb {F}}[F]) \rightarrow {{\,\textrm{Hom}\,}}_{{\mathbb {F}}[F]}({\mathbb {F}}[F],{\mathbb {F}}[F])\rightarrow 0 \end{aligned}$$

of right \({\mathbb {F}}[F]\)-modules. In the same way, we have the exact sequence

$$\begin{aligned} 0\rightarrow H^1(F; {\mathbb {F}}[F)\rightarrow {{\,\textrm{Hom}\,}}_{{\mathbb {F}}[F]}(I_{{\mathbb {F}}[F]}, {\mathbb {F}}[F]) \rightarrow {{\,\textrm{Hom}\,}}_{{\mathbb {F}}[F]}({\mathbb {F}}[F],{\mathbb {F}}[F])]\rightarrow 0. \end{aligned}$$

Thus, since the restriction map r is onto, the restriction map

$$\begin{aligned} {{\,\textrm{Hom}\,}}_{{\mathbb {F}}[F]}(I_{{\mathbb {F}}[F]}, {\mathbb {F}}[F]) \rightarrow {{\,\textrm{Hom}\,}}_{{\mathbb {F}}[F]}(I_{{\mathbb {F}}[H]}^F , {\mathbb {F}}[F]) \end{aligned}$$

is onto as well. Since \(I_{{\mathbb {F}}[F]}\) is a free \({\mathbb {F}}[F]\)-module, \({}^FI_{{\mathbb {F}}[H]} \) is a direct summand of \(I_{{\mathbb {F}}[F]}\). Thus, by [13, Theorem D], H is a free factor of F. \(\square \)

5.3 Proof of Theorem 1.5

Let F be a free group of rank d. We prove the theorem by induction on k. Thus, by our assumption, the base of induction (\(k=1\)) holds true.

Assume now that \(k\ge 2\). Let \({\overline{F}} \) be a copy of F. We will denote by \(g^\prime \in {\overline{F}}\) a copy of the element \(g\in F\). Since w is measure preserving in \({\mathcal {C}}\), \((w_1,\ldots , w_{k-1})\) is also measure preserving in \({\mathcal {C}}\). Therefore, by induction hypothesis,

$$\begin{aligned} v=(w_1,\ldots , w_{k-1}) \end{aligned}$$

is primitive in F. Hence, the group

$$\begin{aligned}U=F*{\overline{F}}/\langle w_1^{.-1}w_1^\prime , \ldots , w_{k-1}^{-1}w_{k-1}^{\prime }\rangle ^{F*{\overline{F}}} \end{aligned}$$

is free of rank \(2d-k+1\). By an abuse of notation, we will see F and \({\overline{F}}\) as subgroups of U. Thus, we regard \(\tau =(w_1,\ldots , w_k, w_k^\prime ) \) as a tuple of elements from U. Let \(G\in {\mathcal {C}}\) and let \((g_1,\ldots , g_k,g^\prime _k)\in G^{k+1}\). Then,

$$\begin{aligned} |\tau _G^{-1}(g_1,\ldots , g_k,g^\prime _k)|= {|w_G^{-1}(g_1,\ldots , g_k)||(w^\prime _G)^{-1}(g_1,\ldots , g_{k-1}, g^\prime _k)|} \end{aligned}$$

is constant. Therefore, \(\tau \) is measure preserving in \({\mathcal {C}}\). Let \(u=w_k^{-1}w_k^\prime \in U\). Since \(\tau \) is measure preserving in \({\mathcal {C}}\), \((w_1,\ldots , w_k, u)\) is also measure preserving in \({\mathcal {C}}\). In particular, u is measure preserving in \({\mathcal {C}}\). By the hypothesis of the theorem, this implies that u is primitive in U. Thus, \(U/\langle u\rangle ^U\) is free of rank \(2d-k\). By Proposition 5.2, \((w_1,\ldots , w_k)\) is primitive in F.

5.4 Proof of Theorem 1.6(a)

First assume that the assertion in Conjecture 2 holds for the groups \(U*_uU\), where U is free and \(u\in U\) is not a proper power. In view of Theorem 1.5, it is enough to establish the assertion of Conjecture 6 in the special case \(k=1\).

Assume that U is a free group and \(u\in U\) is measure preserving in \({\mathcal {S}}\). Then, it is clear that u is not a proper power. By Proposition 5.1, u is primitive in \( U_{\widehat{{\mathcal {S}}}}\). Let \(G=U*_uU\). By [4], we know that G is residually free and so, it is residually-(finite solvable). Since, u is primitive in \({\widehat{U}}_{\mathcal {S}}\), \( G_{\widehat{{\mathcal {S}}}}\) is free prosolvable of rank \(2d-1\). Since we assume that Conjecture 2 holds for G, G is free of rank \(2d-1\). Thus, by Proposition 5.2, u is primitive in U.

Now assume that Conjecture 6 holds. Let F be a finitely generated free group on d free generators \(x_1,\ldots , x_d\) and let \(1\ne w\in F\). Assume that \((F*_w F)_{ \widehat{{\mathcal {S}}}}\cong U_{ \widehat{{\mathcal {S}}}}\), where U is a free group. It is clear that since w is not trivial the rank of U is \(2d-1\). Then, for every finite solvable group G, we have that

$$\begin{aligned} |G|^{2d-1}=|{{\,\textrm{Hom}\,}}( U_{\widehat{ {\mathcal {S}}}}, G)|=\sum _{g\in G}|w_G^{-1}(g)|^2. \end{aligned}$$

Thus,

$$\begin{aligned} \frac{1}{|G|}\sum _{g\in G}|w_G^{-1}(g)|^2=|G|^{2(d-1)}. \end{aligned}$$

By the Cauchy-Schwarz inequality,

$$\begin{aligned} |G|^{2(d-1)}=\frac{1}{|G|}\sum _{g\in G}|w_G^{-1}(g)|^2\ge \left( \frac{1}{|G|}\sum _{g\in G} |w_G^{-1}(g)|\right) ^2=|G|^{2(d-1)}, \end{aligned}$$

and equality holds if and only if \(|w_G^{-1}(g)|\) is constant. This implies that w is measure preserving in \({\mathcal {S}}\) and by Conjecture 6, w is primitive. Hence, \(F*_w F\) is free.

5.5 Proof of Theorem 1.6(b)

Let \(F=\langle x_1,\ldots , x_k\rangle \) be a free group of rank k,

$$\begin{aligned} u:F\rightarrow F \end{aligned}$$

the homomorphism that sends \(x_i\) to \(w_i\) for \(1\le i\le k\) and

$$\begin{aligned} \alpha : {\mathbb {F}}_q[F]^k\rightarrow I_{{\mathbb {F}}_q[F]} \end{aligned}$$

the homomorphism of \({\mathbb {F}}_q[F]\)-modules that sends \((a_1,\ldots ,a_k)\) to \(\sum _{i=1}^k a_i(w_i-1)\).

Since w is measure preserving in \({{\mathcal {A}}_{q}({\mathcal {A}}_{q^\prime }}{\mathcal {N}}_p)\), by Proposition 5.1, w is primitive in \(F_{\widehat{{{\mathcal {A}}_{q}({\mathcal {A}}_{q^\prime }}{\mathcal {N}}_p)}}\). Thus for any normal subgroup N of F such that \(F/N\in {{\mathcal {A}}_{q}({\mathcal {A}}_{q^\prime }}{\mathcal {N}}_p)\), \(F=u(F)N\). By Lemma 4.11, for any quotient \(P\in {\mathcal {A}}_{q^\prime }{\mathcal {N}}_p\) of F, the induced map

$$\begin{aligned} {\mathbb {F}}_q[P]\otimes _{{\mathbb {F}}_q[F]} {\mathbb {F}}_q[F]^k\rightarrow {\mathbb {F}}_q[P]\ \otimes _{{\mathbb {F}}_q[F]} I_{{\mathbb {F}}_q[F]} \end{aligned}$$

is onto. Hence by Corollary 4.10, \(\alpha \) is an isomorphism, and so, u is an isomorphism. Thus, w is primitive in F.