Definition conjC {C : numClosedFieldType} : {rmorphism C -> C} :=
ClosedField.conj_op (ClosedField.conj_mixin (ClosedField.class C)).
Notation "z ^*" := (@conjC _ z) (at level 2, format "z ^*") : ring_scope.
Definition imaginaryC {C : numClosedFieldType} : C :=
ClosedField.imaginary (ClosedField.conj_mixin (ClosedField.class C)).
Notation "'i" := (@imaginaryC _) (at level 0) : ring_scope.
Section ClosedFieldTheory.
Variable C : numClosedFieldType.
Implicit Types a x y z : C.
Definition normCK x : `|x| ^+ 2 = x * x^*.
Let Re2 z := z + z^*.
Definition nnegIm z := (0 <= imaginaryC * (z^* - z)).
Definition argCle y z := nnegIm z ==> nnegIm y && (Re2 z <= Re2 y).
Variant rootC_spec n (x : C) : Type :=
RootCspec (y : C) of if (n > 0)%N then y ^+ n = x else y = 0
& forall z, (n > 0)%N -> z ^+ n = x -> argCle y z.
Fact rootC_subproof n x : rootC_spec n x.
Definition nthroot n x := let: RootCspec y _ _ := rootC_subproof n x in y.
Notation "n .-root" := (nthroot n) (at level 2, format "n .-root") : ring_core_scope.
Notation "n .-root" := (nthroot n) (only parsing) : ring_scope.
Notation sqrtC := 2.-root.
Definition Re x := (x + x^*) / 2%:R.
Definition Im x := 'i * (x^* - x) / 2%:R.
Notation "'Re z" := (Re z) (at level 10, z at level 8) : ring_scope.
Notation "'Im z" := (Im z) (at level 10, z at level 8) : ring_scope.
Let nz2 : 2%:R != 0 :> C. Proof. by rewrite pnatr_eq0. Qed.

Lemma invCi : 'i^-1 = - 'i :> C.