I'd like to show whether the intersection of two ideals is again an ideal or not. For this, consider two ideals $\mathfrak{h_1},\,\mathfrak{h_2}$ of the Lie algebra $\mathfrak{g}$. In order to answer this question I simply want to check whether the definition of ideals i.e. $[\mathfrak{h_1}\cap\mathfrak{h_2},\mathfrak{g}]\subseteq\mathfrak{h_1}\cap\mathfrak{h_2}$ is fullfilled or not. But I don't know how to express an arbitrary element of $\mathfrak{h_1}\cap\mathfrak{h_2}$.
I guess that the bracket is a subset of the intersection $[\mathfrak{h_1},\mathfrak{h_2}]\subseteq\mathfrak{h_1}\cap\mathfrak{h_2}$. For this bracket, the condition $[[\mathfrak{h_1},\mathfrak{h_2}],\mathfrak{g}]\subseteq [\mathfrak{h_1},\mathfrak{h_2}]$ is easy to show (using the Jacobi identity), but this is lacking the required generality.
How can I write down an arbitrary element of $\mathfrak{h_1}\cap\mathfrak{h_2}$? Additionally the same issue arises when I want to check whether the union $\mathfrak{h_1}\cup\mathfrak{h_2}$ is an ideal or not.