Root set of a subgroup for a set of primes in a nilpotent group is a subgroup

Statement
Suppose $$G$$ is a nilpotent group, $$H$$ is a subgroup of $$G$$, and $$\pi$$ is a set of primes. Denote by $$\sqrt[\pi]{H}$$ the set of all elements $$g \in G$$ such that $$g^n = h$$ for some natural number $$n$$ all of whose prime factors are in $$\pi$$. Then, $$\sqrt[\pi]{H}$$ is a subgroup of $$G$$.

Related facts

 * Equivalence of definitions of periodic nilpotent group: The equivalence of definitions (1) and (3) can be thought of as a special case where the subgroup in question is the trivial subgroup and the prime set is all primes, and we wish for the set of roots to be the whole group.
 * Divisible subset generates divisible subgroup in nilpotent group: The proof is almost identical, with the key step being done in reverse.

Conceptual explanation of the dual role of the two facts
The other related fact is divisible subset generates divisible subgroup in nilpotent group.

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.

Proof idea
The idea is to induct on the lower central series, but pivoting on from the smallest member (and using the fact that the iterated commutator is multilinear).

Simplifying assumptions for proof
We will assume that $$G = \langle \sqrt[\pi]{H} \rangle$$. Note that this assumption can be made without loss of generality, because we can replace $$G$$ by the subgroup of $$G$$ given as $$\langle \sqrt[\pi]{H}$$. With this assumption, our goal shifts to proving that $$G = \sqrt[\pi]{H}$$, i.e., that every element of $$G$$ has some $$\pi$$-power in $$H$$.

Inductive setup
We will assume that the corresponding result is true for all groups of nilpotency class strictly less than the nilpotency class of $$G$$, and we will then prove it for the nilpotency class of $$G$$.

Key step of proof
Given: A group $$G$$ of nilpotency class $$c$$, a prime set $$\pi$$, a subgroup $$H$$ of $$G$$ such that $$G = \langle S \rangle$$ where $$S = \sqrt[\pi]{H}$$.

To prove: $$\gamma_c(G) \subseteq \sqrt[\pi]{\gamma_c(H)}$$

Proof:

Inductive step
Inductive hypothesis: The result has been established for nilpotency class strictly less than $$c$$.

Given: A group $$G$$ of nilpotency class $$c$$, a prime set $$\pi$$, a subgroup $$H$$ of $$G$$ such that $$G = \langle S \rangle$$ where $$S = \sqrt[\pi]{H}$$.

To prove: $$G = S$$

Proof: Define $$G_1 = G/\gamma_c(G)$$ and let $$\varphi:G \to G_1$$ be the quotient map. Let $$H_1 = \varphi(H) = H\gamma_c(G)/\gamma_c(G)$$ and let $$S_1 = \varphi(S)$$. The following are true: