Help! I cannot solve this exercise
If $g$ is a nilpotent Lie algebra, the two following assertions are equivalent:
a) $\{x_1,\ldots,x_k\}$ is a minimal system of generators;
b) $\{x_1 + g',\ldots, x_k + g'\}$ is a basis for the vector space $g/g'$ (where $g'=[g, g]$).
The suggestion of the exercise is as follows:
Let $b$ a vector subspace of $g$ such that $b+g'=g$. Show that the subalgebra of $g$ generated by $b$ is $g$. Apply (#)
(#)if $g$ is nilpotent, then every subalgebra $h$ is subinvariant in $g$
Hint: Use that no elements of a minimal set $S$ of generators can be in the commutator algebra, and show by induction that any subset of a nilpotent Lie algebra $L$ generates $L$ if and only if the cosets $\{s+[L,L]\mid s\in S\}$ span the vector space $L/[L,L]$.