Solution (source code)

= Solution

For $t\in\mathfrak t$, the <root-space decomposition> gives its <centralizer>
$$
\mathfrak z_{\mathfrak g}(t)
=\mathfrak t\oplus\bigoplus_{\alpha(t)=0}\mathfrak g_\alpha.
$$
Every root space is one-dimensional, so this centralizer has the minimum possible dimension $\ell=\dim\mathfrak t$ exactly when no summand on the right occurs. By the <Regular element criterion in a Cartan subalgebra>,
$$
\boxed{t\text{ is regular}\iff \alpha(t)\ne0\text{ for every root }\alpha.}
$$