theorem
HexNumberFieldMathlib.PrincipalRoot.eq_of_re
{z w : ℂ}
{n : ℕ}
(hn : n ≠ 0)
(hw : w ^ n = z)
(hre : (z ^ (↑n)⁻¹).re ≤ w.re)
(him : (z ^ (↑n)⁻¹).re = w.re → 0 ≤ (z ^ (↑n)⁻¹).im → 0 ≤ w.im)
:
Maximal real part, with the nonnegative imaginary side preferred on a tie, selects exactly Mathlib's principal nth root.