There is an exercise in Humphreys's An Introduction to Lie Algebras and Representation Theory: "Any nilpotent Lie algebra contains a codimension 1 ideal".
The proof I am thinking of is the following.
Suppose the Lie algebra $L$ satisfies $L\neq[L,L]$. Then $\pi\colon L\to L/[L,L]$ is a projection onto an abelian algebra. Choose a codimension 1 subspace $I\subset L/[L,L]$. Then $I$ is an ideal and its preimage $\pi^{-1}(I)$ is necessarily an ideal in $L$, because any subspace containing the derived algebra is an ideal. Moreover, $\pi^{-1}(I)$ has codimension 1. $\square$
The only condition on $L$ is that $L\neq[L,L]$, which holds for solvable Lie algebras as well. Is this proof correct? How come Humphreys didn't set the exercise with "nilpotent" replaced by "solvable"?