For a field $K$ let denote by $Tr\_1(d,K)$ the nilpotent group of all upper triangular $d\times d$-matrices over $K$ with each diagonal entry equal to 1. Let $\mathbb{Q}\_p$ the field of $p$-adic numbers and consider $Tr\_1(d,\mathbb{Q}\_p)$ with the $p$-adic topology (observe that this is a $p$-adic analytic group). Then $Tr\_1(d,\mathbb{Q})$ is a dense subgroup of $Tr\_1(d,\mathbb{Q}\_p)$.
The question is: If $H$ is a closed subgroup of $Tr\_1(d,\mathbb{Q}\_p)$ is it true that $H\cap Tr\_1(d,\mathbb{Q})$ is dense in $H$?.


Now $Tr\_1(d,\mathbb{Z}\_p)$ is an open compact subgroup of $Tr\_1(d,\mathbb{Q}\_p)$ and in fact it is the pro-$p$ completion of $Tr\_1(d,\mathbb{Z})$.
It is a fact that for every closed subgroup $H$ of $Tr\_1(d,\mathbb{Z}\_p)$ we have that $H\cap Tr\_1(d,\mathbb{Z})$ is dense in $H$. Using this it is easy to see that for any closed subgroup $H$ of $Tr(d,\mathbb{Q}\_p)$ we have that $\overline{H\cap Tr(d,\mathbb{Q})}$ is a an open subgroup of $H$. But I can't prove that it is equal to $H$.



Closed subgroups of $Tr_1(d,\mathbb{Q}_p)$
Pick $\lambda \in \mathbb{Z}\_p \backslash \mathbb{Q}$ and define 


$H = \left\lbrace\begin{pmatrix} 1 & 0 & a 
\cr 0 & 1 & \lambda a \cr 0 & 0 & 1 \end{pmatrix} : a \in \mathbb{Z}\_p\right\rbrace$.


Then $H$ is a closed subgroup of $Tr\_1(3,\mathbb{Q}\_p)$ but $H \cap Tr\_1(3,\mathbb{Q})$ is the trivial group, hence certainly not dense in $H$.


