Semisimple elements in Lie-algebra $\mathfrak{g} \subset \mathfrak{gl}_n(k)$ Let $\mathfrak{g} \subset \mathfrak{gl}_n(k)$ ($k$ some base field) a
Lie subalgebra und let $\mathfrak{g}_s \subset \mathfrak{g} $ denote the
set of semisimple elements of $\mathfrak{g}$. These are precisely the elements in $\mathfrak{g}$ which become
diagonalizable when passing to algebraic closure; ie diagonalizable
in $\mathfrak{g} \otimes_k \overline{k} $ under canonical inclusion $\mathfrak{g} \subset \mathfrak{g} \otimes_k \overline{k} $.
Question: Which topological (with resp. to induced Zariski topology)
properties does the set $\mathfrak{g}_s $ of semisimple elements have? How to check that it cannot be Zariki open?
Motivation: In this answer Qiaochu Yuan conjectured that for $\mathfrak{g} := \mathfrak{sl}_2 \mathbb{C} $
the semisimple elements not form an open set.
Can it be proved generally that the subset of semisimple elements of
a Lie algebra in general cannot be Zariski open (except maybe in some 'pathological'
examples)? What do we know else about the topology of this subset? Is it
constructible/locally closed?
 A: I will focus on reductive Lie algebras $\mathfrak{g}$ of semisimple rank $\geq 1$ (so they're not abelian, for which the question is easy).
In that case, the set of semisimple element is dense in $\mathfrak{g}$, but is neither open, nor closed, nor locally closed in the Zariski topology.
Density is easy to see in $\mathfrak{sl}_n$, because any matrix whose characteristic polynomial has no multiple roots over $\bar{k}$ (such matrices form a non-empty open hence dense subset) is semisimple. In general, the same proof works, noting that the set of regular semisimple elements is a dense open subset of $\mathfrak{g}$.
The set of nilpotent elements $\mathcal{N}$ in $\mathfrak{g}$ is Zariski closed (this being defined by the vanishing of all polynomial invariants of the Lie algebra); in the case of $\mathfrak{sl}_n$ this is because nilpotency is defined by having characteristic polynomial coefficients equal to zero.
If $\mathfrak{g}_s$ were open in $\mathfrak{g}$, the set of semisimple nilpotent elements $\mathfrak{g}_s\cap \mathcal{N}$ would be open in $\mathcal{N}$. However, the only element that is both nilpotent and semisimple is zero, and $\{0\}$ is not open in $\mathcal{N}$. (The last sentences uses the fact that the semisimple rank is $\geq 1$, so $\mathcal{N}  \neq \{0\}$ because it contains for example regular nilpotent elements.)
It's now easy to see that $\mathfrak{g}_s$ can't be closed or even locally closed either. Indeed, if it would be, it would be open in its closure. But we showed that its closure is $\mathfrak{g}$ and we showed it's not open in $\mathfrak{g}$!
If you're looking for a positive result, the best thing I can think of is the following: let $G$ be a reductive group with Lie algebra $\mathfrak{g}$ and write $S = \mathfrak{g} // G$ for the space of invariant polynomials for the adjoint action of $G$ on $\mathfrak{g}$. Let $\pi \colon \mathfrak{g} \rightarrow \mathfrak{g} // G$ be the morphism of taking invariants. In the case of $G = SL_n$, $\mathfrak{g} // G$ is the space of monic polynomials with no $x^{n-1}$ term and $\pi$ is the morphism of sending a matrix to its characteristic polynomial. Then the theorem is (I think this is due to Kostant) that the intersection of $\mathfrak{g}_s$ with every fibre of $\pi$ is closed. (Taking the fibre above zero, you get the subvariety of nilpotent elements.) So somehow $\mathfrak{g}_s$ is well-behaved and closed in every fibre where you have fixed the invariants, but packaging all the fibres together gives a slightly weird set with bad topological properties.
If you want to read more about this, I highly recommend Kostant's papers 'Lie Group Representations on Polynomial Rings' and 'The Principal Three-Dimensional Subgroup and the Betti Numbers of a Complex Simple Lie Group'.
