Divisible subset generates divisible subgroup in nilpotent group

Statement
Suppose $$G$$ is a nilpotent group, $$A$$ is a subset of $$G$$, $$H = \langle A \rangle$$ is the subgroup generated by $$A$$, and $$\pi$$ is a set of primes such that for every $$a \in A$$ and every $$p \in \pi$$, there exists $$b \in A$$ such that $$b^p = a$$. Then, $$H$$ is a $$\pi$$-divisible group: for every $$x \in H$$, there exists $$y \in H$$ such that $$y^p = x$$.

Note that we do not assume that $$G$$ is $$\pi$$-torsion-free, and the subgroup $$H$$ that we obtain need not be a completely divisibility-closed subgroup.

Related facts

 * Root set of a subgroup for a set of primes in a nilpotent group is a subgroup: This has a very similar proof, though the key step is done in reverse.

Conceptual explanation of the dual role of the two facts
In general, we can consider "closing" a subset in a group under divisibility by certain primes, and under group operations (multiplication and inversion). The problem is that in general" closing" under one of these may disturb closure under the other. For instance, if we close under divisibility by certain primes, we may "un-close" under multiplication.

In nilpotent groups, the closure operators preserve the other kind of closure. If the subset is already divisible, taking the subgroup generated by it we still get something divisible.

Facts used

 * 1) uses::Divisibility is central extension-closed

Proof
Since we have access to Fact (1), we can prove the statement by induction on the nilpotency class.

Key step
Given: A group $$G$$ of nilpotency class $$c$$, a $$\pi$$-divisible subset $$A$$ of $$G$$. $$H = \langle A \rangle$$.

To prove: $$\gamma_c(H)$$ is a $$\pi$$-divisible subgroup of $$G$$.

Iterative algorithm arising from the proof
The proof gives an explicit iterative algorithm that can be used to work out concrete formulas for a $$n^{th}$$ root of any word in any number of symbols in terms of roots of the symbols used, where $$n$$ and all the other numbers used to take roots are $$\pi$$-numbers. Note that the actual formula depends on the class, and in general, the formula for each class is obtained by applying a step of the iterative algorithm to the formula for a lower class.

Example of the square root of a product
Suppose $$x,y$$ are elements of a nilpotent group $$G$$. Suppose $$x_0, x_1,x_2,\dots,x_n,\dots$$ are elements of $$G$$ such that $$x_{i+1}^2 = x_i$$ for all $$i$$, and $$x_0 = x$$. Similarly, construct a sequence $$y_0,y_1,\dots,y_n,\dots$$ such that $$y_{i+1}^2 = y_i$$ for all $$i$$, and $$y_0 = y$$.

Define:

$$A = \{ x_0,x_1,\dots,x_n,\dots \} \cup \{ y_0,y_1,\dots,y_n,\dots \}$$

Note that $$A$$ is a 2-divisible subset of $$G$$. By the fact proved on this page, $$H = \langle A \rangle$$ is a 2-divisible subgroup of $$G$$. In particular, this means that there is an explicit expression as a product of elements from $$A$$ (and their inverses) for a square root of $$x_0y_0$$ (note that the expression is non-unique, and the element itself need not be unique since we are not assuming 2-torsion-free).

Expression for class one
If $$G$$ is an abelian group, the element $$x_1y_1$$ works as a square root of $$x_0y_0$$.

Expression for class two
Our goal is to find a square root for $$x_0y_0$$ assuming $$G$$ has class two. As with all iterative algorithms, we first solve the problem modulo $$\gamma_2(H)$$, where it reduces to the abelian group case. We obtain $$x_1y_1$$ as the first order approximation for a square root. Explicitly:

$$(x_1y_1)^2 \equiv x_0y_0 \pmod{\gamma_2(H) = H'}$$

We now want to use the inductive step. In order to do so, we need to use the underlying mechanics of Fact (1), namely: find the error term in the expression above, compute a square root for that, and then refine the first order approximation. In this case, the second order approximation gives the exact square root.

Let's do this. We wish to compute:

$$u = x_0y_0((x_1y_1)^2)^{-1}$$

Simplifying, we obtain that:

$$u = [x_1,[x_1,y_1]][x_1,y_1]$$

By the class two assumption, this becomes:

$$u = [x_1,y_1]$$

Since class two implies commutator map is endomorphism, the following element works as a square root of $$u$$:

$$v = [x_2,y_1]$$

Plug this back in and get the following candidate for a square root of $$x_0y_0$$:

$$w = x_1y_1[x_2,y_1]$$

Note that the expression obtained for $$w$$ here expresses it as an element of $$H$$, since it is a word in the elements from $$A$$.

Note that if $$G$$ is 2-powered, the above gives the unique square root, and the above can be rewritten as:

$$\sqrt{xy} = \sqrt{x}\sqrt{y}[\sqrt[4]{x},\sqrt{y}]$$