End ClosedFieldTheory.
Notation "n .-root" := (@nthroot _ n)
(at level 2, format "n .-root") : ring_scope.
Notation sqrtC := 2.-root.
Notation "'i" := (@imaginaryC _) (at level 0) : ring_scope.
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.
Arguments conjCK {C} x.
Arguments sqrCK {C} [x] le0x.
Arguments sqrCK_P {C x}.
End Theory.
Module RealMixin.
Section RealMixins.
Variables (R : idomainType) (le : rel R) (lt : rel R) (norm : R -> R).
Local Infix "<=" := le.
Local Infix "<" := lt.
Local Notation "`| x |" := (norm x) : ring_scope.
Section LeMixin.
Hypothesis le0_add : forall x y, 0 <= x -> 0 <= y -> 0 <= x + y.
Hypothesis le0_mul : forall x y, 0 <= x -> 0 <= y -> 0 <= x * y.
Hypothesis le0_anti : forall x, 0 <= x -> x <= 0 -> x = 0.
Hypothesis sub_ge0  : forall x y, (0 <= y - x) = (x <= y).
Hypothesis le0_total : forall x, (0 <= x) || (x <= 0).
Hypothesis normN: forall x, `|- x| = `|x|.
Hypothesis ge0_norm : forall x, 0 <= x -> `|x| = x.
Hypothesis lt_def : forall x y, (x < y) = (y != x) && (x <= y).
Let le0N x : (0 <= - x) = (x <= 0). Proof. by rewrite -sub0r sub_ge0. Qed.
Let leN_total x : 0 <= x \/ 0 <= - x.
Fact lt0_add x y : 0 < x -> 0 < y -> 0 < x + y.
Fact eq0_norm x : `|x| = 0 -> x = 0.
Fact le_def x y : (x <= y) = (`|y - x| == y - x).
Fact normM : {morph norm : x y / x * y}.
Fact le_normD x y : `|x + y| <= `|x| + `|y|.

(* Specifications: *)
Lemma le_total x y : (x <= y) || (y <= x).
Fact le0_mul x y : 0 <= x -> 0 <= y -> 0 <= x * y.