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$.