(** *** Cancellation in inequalities of products *)

(* Specifications: *)
Lemma Rmult_lt_reg_l : forall r r1 r2, 0 < r -> r * r1 < r * r2 -> r1 < r2.
Lemma Rmult_lt_reg_r : forall r r1 r2 : R, 0 < r -> r1 * r < r2 * r -> r1 < r2.
Lemma Rmult_gt_reg_l : forall r r1 r2, 0 < r -> r * r1 < r * r2 -> r1 < r2.
Lemma Rmult_le_reg_r : forall r r1 r2, 0 < r -> r1 * r <= r2 * r -> r1 <= r2.
(** *** Order and inverse *)
Lemma Rinv_0_lt_contravar : forall r1 r2, 0 < r1 -> r1 < r2 -> / r2 < / r1.
#[global]
Hint Resolve Rinv_0_lt_contravar: real.
Lemma Rinv_lt_0_contravar : forall r1 r2, r2 < 0 -> r1 < r2 -> / r2 < / r1.
#[global]
Hint Resolve Rinv_lt_0_contravar: real.
(* TODO: We may want to deprecate it but cannot because of the hint used in external libs (the stdlib can already be compiled without it) *)
Lemma Rinv_1_lt_contravar : forall r1 r2, 1 <= r1 -> r1 < r2 -> / r2 < / r1.
#[global]
Hint Resolve Rinv_1_lt_contravar: real.
Lemma Rinv_lt_contravar : forall r1 r2, 0 < r1 * r2 -> r1 < r2 -> / r2 < / r1.
(* NOTE: keeping inconsistent variable names for backward compatibility. *)
Lemma Rinv_le_contravar :
forall x y, 0 < x -> x <= y -> / y <= / x.