TITLE: Is any finitely generated nilpotent pro-$p$ group necessarily the pro-$p$ completion of some finitely generated nilpotent group?
QUESTION [6 upvotes]: While thinking about this question, I was led to the following question:

My question: Let $G$ be a topologically finitely generated pro-$p$ 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 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.

REPLY [6 votes]: Here is an amalgamation of the comments of Ben Steinberg and Yves Cornulier 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, 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, 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 (also see Tao), 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 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 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 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.