The orientation records the exact sign of the imaginary part.
The real tag characterizes real values.
theorem
Hex.AlgebraicNumber.OrientedIsolation.side_eq_of_im_eq
{p q : ZPoly}
(r : OrientedIsolation p)
(s : OrientedIsolation q)
(h : r.rep.root.im = s.rep.root.im)
:
Equal imaginary parts have the same orientation, even in different fields.
Flipping orientation conjugates the represented value.
Half-plane classification depends only on the represented complex value.
theorem
Hex.AlgebraicNumber.orient?_exists
{p : ZPoly}
(r base : RefinedIsolation p)
(hb : base.root = (if sideOf r = RootSide.lower then r.conj else r).root)
:
Reorienting a matching upper representative succeeds and preserves the root.