Constructing symmetric invariants of the exceptional simple Lie algebra as restrictions Let $\mathfrak{g}$ be a complex simple Lie algebra with maximal torus $\mathfrak{h}$, Weyl group $W$. The adjoint representation $\operatorname{ad} : \mathfrak{g} \rightarrow \mathfrak{gl(g)}$ extends by derivations to a representation of $\mathfrak{g}$ in $S(\mathfrak{g})$. We identify $S(\mathfrak{g})$ and $\mathbb{C}[\mathfrak{g}]$ as $\mathfrak{g}$-modules via the Killing form. The most famous description of $S(\mathfrak{g})^{\mathfrak{g}}$ goes as follows: the Chevalley restriction theorem states that the restriction map $\mathbb{C}[\mathfrak{g}]^\mathfrak{g} \rightarrow \mathbb{C}[\mathfrak{h}]^W$ is an isomorphism and the Chevalley-Sheppard-Todd theorem implies that the Weyl group invariants are a polynomial ring on $\operatorname{rank}(\mathfrak{g})$ generators. 
I am interested in another approach to constructing the invariant rings via restriction. Take an $n$-dimensional vector space $V$ and set $\mathfrak{g} = \mathfrak{gl}(V)$. The characteristic polynomial $p(t, x)$ of an element $x \in \mathfrak{g}$ can be written as $t^n + \sum_{i=0}^{n-1} p_i(x) t^i$, and the coefficients $p_i$ form a complete set of algebraically independent generators for $S(\mathfrak{g})^{\mathfrak{g}}$. Now suppose that $\mathfrak{k} \subseteq \mathfrak{g}$ is a classical Lie algebra of type $\mathfrak{so}(V)$ or $\mathfrak{sp}(V)$. We can consider the restrictions $p_{i}\vert_{\mathfrak{k}}$ and in this case we have $p_{2i}\vert_{\mathfrak{k}} = 0$ for all $i$ and the remaining invariants form a complete set of algebraically independent generators for $S(\mathfrak{k})^\mathfrak{k}$, unless of course $\mathfrak{k}$ has type ${\sf D}$, in which case $p_{n-1} = P^2$ for some $P \in S(\mathfrak{g})$ known as the Pfaffian. In this case $p_{1}\vert_{\mathfrak{k}}, p_{3}\vert_{\mathfrak{k}},...,p_{n-3}\vert_{\mathfrak{k}}, P$ form a basic set of generators for the symmetric invariants. This is all very classical and probably goes back to Weyl.
What I would like to know is whether we can play the same game with exceptional Lie algebras. This is my question: for $\mathfrak{g}$ simple and exceptional, does there always exist a simple finite dimensional representation $\mathfrak{g} \rightarrow \mathfrak{gl}(V)$ such that some of the restrictions $p_0\vert_{\mathfrak{g}},...,p_{n-1}\vert_{\mathfrak{g}}$ are zero, whilst the others form a complete set of algebraically independent generators for $S(\mathfrak{g})^{\mathfrak{g}}$, perhaps after Pfaffing around with them a bit?
 A: You can do this in GAP. To check algebraic independence you can restrict to a Cartan subalgebra.
For type $G_2$ with the minimal faithful representation we obtain $p_1(sh_1+th_2)=-2(t^2-3st+3s^2)$ and $$p_5(sh_1+th_2)=-4s^6+12s^5t-13s^4t^2+6s^3t^3-s^2t^4=-s^2(t-s)^2(t-2s)^2$$ from which you can already see the main problem - these polynomials become somewhat unwieldy as the degree increases. In this case we know that these two polynomials (in $k[s,t]$) are algebraically independent since otherwise $p_5$ has to be a multiple of $p_1^3$.
This doesn't quite answer your question, as in this case we have $p_3=(t^2-3st+3s^2)^2\neq 0$. My feeling is that for the exceptional types it is extremely unlikely that you will find a representation satisfying the condition you require (that all except $r={\rm rank}({\mathfrak g})$ of the polynomials $p_i$ are zero). On the other hand, I would expect that if you pick any faithful representation $(\rho,V)$ of a simple Lie algebra ${\mathfrak g}$ then the restrictions of $r={\rm rank}({\mathfrak g})$ of the basic invariants on $\mathfrak{gl}(V)$ to $\rho({\mathfrak g})$ are algebraically independent. (I probably should be able to see why this is true straight away.) Usually we should be able to take the same degrees as the degrees of the basic invariants on ${\mathfrak g}$. I would point out that the issue with the Pfaffian for $\mathfrak{so}_{2n}$ arises because ${\rm GL}_{2n}$ contains the full orthogonal group, which includes all of the outer automorphisms of $\mathfrak{so}_{2n}$. So in fact when we restrict ${\rm GL}_{2n}$-invariants on $\mathfrak{gl}_{2n}$ to $\mathfrak{so}_{2n}$ then we obtain elements of $k[\mathfrak{so}_{2n}]^{{\rm O}_{2n}}$, and this is a polynomial ring with homogeneous generators of degrees $2,4,\ldots, 2n$. I expect that what happens is: if $V$ is ${\mathfrak g}$-isomorphic to its twist via any outer automorphism then we get the same situation as you have for $\mathfrak{so}_{2n}\hookrightarrow\mathfrak{gl}_{2n}$; otherwise the restriction of the invariants on $\mathfrak{gl}(V)$ to ${\mathfrak g}$ gives us an exact copy of the invariants on ${\mathfrak g}$ (plus extra complications in type $D_4$). This happens, for example, for either 27-dimensional faithful representation for $E_6$.
For the higher rank cases GAP can't compute the characteristic polynomial directly as the memory required (e.g. for a 248 x 248 matrix involving 8 or 9 variables) is too great for it to handle. Magma might be able to do it, but it's not clear what value you can get out of running the computation - for example, if we take the adjoint representation in type $E_8$ and we compute ${\rm Trace}(\rho(x)^i)$ for $i=2,8,12,\ldots$ and $x=sh_1+\ldots +zh_8$ then already for $i=8$ this produces 3 pages of unreadable degree 8 polynomial in $k[s,t,\ldots ,z]$. We can then prove that this is independent of ${\rm Trace}(\rho(x)^2)$, but you still have a long way to go to prove by this route that the polynomials ${\rm Trace}(\rho(x)^i)$ are algebraically independent.
