I'm having some problems to proof the following result:
Let $G$ be a Lie group with Lie algebra $\mathfrak{g}$,and $H,K$ be lie subgroups with Lie algebras $\mathfrak{h}$ and $ \mathfrak{k}$ respectively. Assume that $\mathfrak{g}=\mathfrak{h}\oplus \mathfrak{k}$. If $H\cap K$ is a discrete group, show that $K$ and $H$ are closed.
Some things I noticed:
Since $H\cap K$ is discrete then $H\cap K$ is closed since $G$ in particular is Hausdorff. So, the action
$a:G\times G/H\cap K \rightarrow G/H\cap K,\quad (g,x(H\cap K))\mapsto gx(H\cap K)\quad $ is $C^{\infty}$.
In this way, the map $f=a(\cdot, e(H\cap K))$ is $C^{\infty}$ and a Lie groups homomorphism. On the other hand, since $H\cap K$ is discrete, $0=Lie(H\cap K)=Ker(df)$ and so, $df$ is injective.
I would like to know if this way by functions is correct or there is some another way to prove this. Thank you very much.