How can the generators of subalgebra $\mathfrak g^{\sigma}$ of $\sigma$-stable elements be expressed through generators of Lie algebra $\mathfrak g$? Let $\mathfrak g$ be the semisimple Lie algebra of type $D_{4}$. Let $\sigma$ be the 3-rd order automorphism of $\mathfrak g$ induced by the triality of $D_{4}$:

$$
\sigma:\alpha_{1}\mapsto\alpha_{3}\mapsto\alpha_{4},\alpha_{2}\mapsto\alpha_{2}
$$
Let $\mathfrak g^{\sigma}$ be the subalgebra of $\sigma$-stable elements of $\mathfrak g$.
How can Serre generators of $\mathfrak g^{\sigma}$ be expressed through Serre generators of $\mathfrak g$?
I suppose that "Serre generators", "Serre-Chevalley generators", and "Chevalley generators" are equivalent terms.
 A: Even though the question is answered on MathOverflow (via a reference), I think it is worthwhile and not too hard to give a direct answer.
One should first of all note that, contrary to popular belief (cf. Invariant subalgebra of a Lie algebra under an automorphism of the Dynkin diagram, Semisimple complex Lie algebra of type $A_3$ contains a Lie subalgebra of type $B_2$ as fixed points of an automorphism.) the notion of an "automorphism of a semisimple Lie algebra $\mathfrak{g}$ induced by an automorphism of the Dynkin diagram" is not well-defined. What is true is that if one fixes one specific "pinning" / "épinglage" / set of Serre-Chevalley generators, then there is indeed a unique element of $Aut(\mathfrak{g})$ which stabilises that épinglage and induces a given automorphism of the Dynkin diagram.
This makes our task at hand rather easy, because it means that once you fix your Chevalley-Serre-generators, for any simple root $\alpha$ the automorphism $\sigma$ will necessarily send $e_\alpha$ to $e_{\sigma(\alpha)}$ by the stabilising property (otherwise it could a priori send $e_\alpha$ to $c\cdot e_{\sigma(\alpha)}$ for any constant $c$); likewise, it sends $h_\alpha$ to $h_{\sigma(\alpha)}$.
In our case this gives
$h_{\beta_1} := h_{\alpha_1}+h_{\alpha_3}+h_{\alpha_4}$
$e_{\beta_1} := e_{\alpha_1}+e_{\alpha_3}+e_{\alpha_4}$
$f_{\beta_1} := f_{\alpha_1}+f_{\alpha_3}+f_{\alpha_4}$
$h_{\beta_2} := h_{\alpha_2}$
$e_{\beta_2} := e_{\alpha_2}$
$f_{\beta_2} := f_{\alpha_2}$
as obvious candidates for generators bor the basis roots in the fixed algebra $\mathfrak{g}^\sigma$, where $\beta_1$ and $\beta_2$ form a basis of a root system of type $G_2$ (with $\beta_1$ the short root). The others are then computed from them.
