While thinking about [this question](https://mathoverflow.net/questions/90046/nilpotent-pro-p-groups), I was led to the following question:



> 
> **My question**: Let $G$ be a [topologically finitely generated](http://groupprops.subwiki.org/wiki/Topologically_finitely_generated_group) [pro-$p$](http://en.wikipedia.org/wiki/Pro-p_group) nilpotent group. Does there exist a finitely generated nilpotent subgroup $\Gamma \leq G$ with $\hat \Gamma\_p = \overline{\Gamma} = G$ (where $\overline{\Gamma}$ is the closure of $\Gamma$ in $G$)?
> 
> 
> 


**Motivation**: if the answer is *yes*, then I believe one can use this fact, together with results in Segal's *Polycyclic groups*, to answer the [linked question](https://mathoverflow.net/questions/90046/nilpotent-pro-p-groups) above. Here is an outline of such a solution proposing the answer of "yes":


Recall the following comment on line 14 of p. 229 in Segal's *Polycyclic groups*:



> 
> **Segal's Comment**: Let $\Gamma \leq U\_n(\mathbb{Z})$ be a group.
>  Then $\hat \Gamma\_p$, the pro-$p$ closure of $\Gamma$, may be identified with the congruence closure of $\Gamma$, w.r.t. the congruence topology, in $U\_n(\mathbb{Z}\_p)$.
> 
> 
> 


Let $G$ be a finitely generated torsion free nilpotent pro-$p$ group. 
If the answer to my question above is *yes*, then $G = \hat \Gamma\_p$ for some finitely generated nilpotent group $\Gamma$. Since $G$ is torsion-free, it follows from Hall's embedding theorem, that $\Gamma$ injects into $U\_n(\mathbb{Z})$ for some natural number $n$. So by Segal's comment, $G = \hat \Gamma\_p$ embeds into $U\_n(\mathbb{Z}\_p)$, as desired. 



Is any finitely generated nilpotent pro-$p$ group necessarily the pro-$p$ completion of some finitely generated nilpotent group?
Here is an amalgamation of the comments of [Ben Steinberg](https://mathoverflow.net/users/15934/benjamin-steinberg) and [Yves Cornulier](https://mathoverflow.net/users/14094/ycor) with added details. I am grateful to Cornulier for his help over email.


The answer is *no*.


Suppose, for the sake of a contradiction, that the answer is yes. Then we may assign to every topologically finitely generated pro-p group a finitely generated nilpotent group. This gives a surjective map from the class of finitely generated nilpotent groups to the class of topologically finitely generated pro-$p$ nilpotent groups. Hence, the cardinality of the former is greater than that of the latter, and it follows that the class of topologically finitely generated pro-$p$ nilpotent groups is countable (since any finitely generated nilpotent group is finitely presented as it must be linear, by Hall’s embedding theorem). This conclusion, however, contradicts the following claim.



> 
> **Cornulier's claim**: There exists uncountably many topologically finitely generated pro-$p$ nilpotent groups.
> 
> 
> 


**Proof**: 
Consider the family of Lie algebras (147E) on page 61 from [Ming-Peng Gong’s thesis](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.16.5538&rep=rep1&type=pdf), which are parametrized by the invariant $I(c) = \frac{(1-c+c^2)^3}{c^2(c-1)^2}$ where $c \in \mathbb{Z}\_p$. Since $\mathbb{Z}\_p$ is uncountable and $I(c)$ is finite to one, it follows that this is an uncountable family. By abusing notation a bit, we will simply denote this family by $\{ \mathfrak{g}\_c : c \in \mathbb{Z}\_p \}$.


By [Ado’s theorem](http://en.wikipedia.org/wiki/Ado's_theorem), we may realize any $\mathfrak{g}\_c(\mathbb{Q}\_p)$ as a Lie subalgebra of $\mathfrak{gl}(V)$, where $V$ is a vector space over $\mathbb{Q}\_p$. Then by [Engel’s theorem](http://en.wikipedia.org/wiki/Engel's_theorem) (also see [Tao](https://terrytao.wordpress.com/tag/engels-theorem/)), we may embed $\mathfrak{g}\_c(\mathbb{Q}\_p)$ into an upper-triangulized lie algebra over $V$ (that is there exists a basis in $V$, where $\mathfrak{g}\_c(\mathbb{Q}\_p)$ is upper triangularized with respect to this basis). The [Baker-Campbell-Hausdorff formula](http://en.wikipedia.org/wiki/Baker%E2%80%93Campbell%E2%80%93Hausdorff_formula) now applied to $\mathfrak{gl}(V)$ takes $\mathfrak{g}\_c(\mathbb{Q}\_p)$ to a Lie Group, $G\_c(\mathbb{Q}\_p)$. While this is not needed, note that the family $\{ \mathfrak{g}\_c \}$ consists of Lie algebras that are of class 3, so the Baker-Campbell-Hausdorff formula giving multiplication simply as


$$
x\*y=x+y+ \frac{1}{2}[x,y]+\frac{1}{12}([x,[x,y]]-[y,[x,y]]).
$$


It follows that we may actually define $G\_c$ over $\mathbb{Z}\_p$ (so long as $p > 3$) and $G\_c(\mathbb{Z}\_p)$ is compact. For these cases we see, somewhat concretely, how a Lie group $G\_c (\mathbb{Q}\_p)$ contains a compact subgroup that, roughly speaking, completely determines $G\_c(\mathbb{Q}\_p)$. For the general case, we set $K\_c$ to be a [maximal compact subgroup](http://en.wikipedia.org/wiki/Maximal_compact_subgroup) of $G\_c(\mathbb{Q}\_p)$. Since we are working p-adically, it turns out that $K\_c$ is also open! And, as Cornulier stated in his comments below, any open subgroup of a Lie group shares the same Lie algebra as that of the bigger Lie group. Thus, $K\_c$ and $G\_c(\mathbb{Q}\_p)$ share the same Lie algebra. It follows that distinct $c$ yield non-isomorphic $K\_c$, and so the family $\{ K\_c \}$ is uncountable.


Through the embedding of $G\_c(\mathbb{Q}\_p)$, we see that $K\_c$ embeds into $U\_n(\mathbb{Q}\_p)$ (this is the set of upper triangular matrices with ones along the diagonal realized by the basis given above over $V$). Since $K\_c$ is compact, only finitely many fractions can appear in this embedding into $U\_n(\mathbb{Q}\_p)$, thus we may find an automorphism of $U\_n(\mathbb{Q}\_p)$ so that the image of $K\_c$ is in $U\_n(\mathbb{Z}\_p)$. It follows then that $K\_c$ is pro-$p$. It is a [well-known result](http://en.wikipedia.org/wiki/Pro-p_group) of Lazard (his solution to Hilbert's fifth problem) that $p$-adic analytic and pro-$p$ groups are finite rank. **QED**



> 
> **tl;dr**: The take away from this is that nilpotent groups are very strictly determined by their nilpotent lie algebra, and doing things
>  $p$-adically just makes this correspondence stronger.
> 
> 
> 


