(* R misc *)

Ltac deep_Rle_trans h :=
  match type of h with
  | ?n <= ?u =>
    match goal with
    | |- (?l <= _)%R =>
      let q := subst_tac n u l
      in apply Rle_trans with q
    | _ => assert (False)
    end
  end.

(* Specifications: *)
Lemma Rmult_eq_compat_r (r r1 r2: R): (r1 = r2 -> r1 * r = r2 * r)%R.
Lemma Rle_eq_trans x y z: (x <= y -> y = z -> x <= z)%R.
Lemma Req_ne_dec (x y: R): { x = y } + { x <> y }.
Lemma Rmult_0_inv (a b: R): (a * b)%R = 0%R -> (a = 0%R \/ b = 0%R).
Lemma Req_le_trans x y z: x = y -> y <= z -> x <= z.
Lemma Rle_plus_trans_l r a b c: a <= r -> r + b <= c -> a + b <= c.
Lemma Rne_nlt_lt x y: x <> y -> ~ x < y -> y < x.
Lemma Rdiv_le_1 a b: 0 < a -> a <= b -> 1 <= b / a.
Lemma Rdiv_lt_1 n m: 0 <= n -> n < m -> n / m < 1.
Lemma zero_le_2_div_Sn n: 0 <= (2 * / INR (S n))%R.