We formalize Cardano's formula to solve a cubic equation
as well as Ferrari's formula to
solve a quartic equation. We further turn both formulas into
executable algorithms based on the algebraic number implementation in
the AFP. To this end we also slightly extended this library, namely by
making the minimal polynomial of an algebraic number executable, and
by defining and implementing -th roots of complex
numbers.