Variant ger0_xor_lt0 (x : R) : R -> bool -> bool -> Set :=
| Ger0NotLt0 of 0 <= x : ger0_xor_lt0 x x false true
| Ltr0NotGe0 of x < 0  : ger0_xor_lt0 x (- x) true false.
Variant ler0_xor_gt0 (x : R) : R -> bool -> bool -> Set :=
| Ler0NotLe0 of x <= 0 : ler0_xor_gt0 x (- x) false true
| Gtr0NotGt0 of 0 < x  : ler0_xor_gt0 x x true false.
Variant comparer0 x :
R -> bool -> bool -> bool -> bool -> bool -> bool -> Set :=
| ComparerGt0 of 0 < x : comparer0 x x false false false true false true
| ComparerLt0 of x < 0 : comparer0 x (- x) false false true false true false
| ComparerEq0 of x = 0 : comparer0 x 0 true true true true false false.

(* Specifications: *)
Lemma real_ger0P x : x \is real -> ger0_xor_lt0 x `|x| (x < 0) (0 <= x).
Lemma real_ler0P x : x \is real -> ler0_xor_gt0 x `|x| (0 < x) (x <= 0).
Lemma real_ltrgt0P x :
x \is real ->
comparer0 x `|x| (0 == x) (x == 0) (x <= 0) (0 <= x) (x < 0) (x > 0).
Lemma real_neqr_lt : {in real &, forall x y, (x != y) = (x < y) || (y < x)}.
Lemma real_wlog_ltr P :
(forall a, P a a) -> (forall a b, (P b a -> P a b)) ->
(forall a b, a < b -> P a b) ->
forall a b : R, a \is real -> b \is real -> P a b.
(* Monotony of addition *)
Lemma ler_add2l x : {mono +%R x : y z / y <= z}.
Lemma ler_add2r x : {mono +%R^~ x : y z / y <= z}.
Lemma naddr_eq0 (x y : R) :
x <= 0 -> y <= 0 -> (x + y == 0) = (x == 0) && (y == 0).
Lemma addr_ss_eq0 (x y : R) :
(0 <= x) && (0 <= y) || (x <= 0) && (y <= 0) ->
(x + y == 0) = (x == 0) && (y == 0).
(* :TODO: Cyril : See which form to keep *)
Lemma psumr_eq0P (I : finType) (P : pred I) (F : I -> R) :
(forall i, P i -> 0 <= F i) -> \sum_(i | P i) F i = 0 ->
(forall i, P i -> F i = 0).