Proof with auto with typeclass_instances.
intros x y Fx Fy H.
destruct (Rle_or_lt 0 x) as [Hx|Hx].
now apply succ_le_lt_aux.
unfold succ; rewrite Rle_bool_false; try assumption.
case (Rle_or_lt y 0); intros Hy.
rewrite <- (Ropp_involutive y).
apply Ropp_le_contravar.
apply le_pred_pos_lt.
now apply generic_format_opp.
now apply generic_format_opp.
split.
rewrite <- Ropp_0; now apply Ropp_le_contravar.
now apply Ropp_lt_contravar.
apply Rle_trans with (-0)%R.
apply Ropp_le_contravar.
apply pred_pos_ge_0.
rewrite <- Ropp_0; now apply Ropp_lt_contravar.
now apply generic_format_opp.
rewrite Ropp_0; now left.
Qed.

(* Specifications: *)
Theorem le_pred_lt :
forall x y,
F x -> F y ->
(x < y)%R ->
(x <= pred y)%R.
Theorem lt_succ_le :
forall x y,
(y <> 0)%R ->
(x <= y)%R ->
(x < succ y)%R.
Theorem pred_lt_le :
forall x y,
(x <> 0)%R ->
(x <= y)%R ->
(pred x < y)%R.
Theorem succ_pred_aux : forall x, F x -> (0 < x)%R -> succ (pred x)=x.
Theorem pred_ulp_0 :
pred (ulp 0) = 0%R.
Theorem succ_0 :
succ 0 = ulp 0.
Theorem pred_0 :
pred 0 = Ropp (ulp 0).
Theorem pred_succ_aux :
forall x, F x -> (0 < x)%R ->
pred (succ x) = x.
Theorem succ_pred :
forall x, F x ->
succ (pred x) = x.
Theorem pred_succ :
forall x, F x ->
pred (succ x) = x.
Theorem round_UP_pred_plus_eps :
forall x, F x ->
forall eps, (0 < eps <= if (Rle_bool x 0) then (ulp x)
else (ulp (pred x)))%R ->
round beta fexp Zceil (pred x + eps) = x.
Theorem round_DN_minus_eps:
forall x,  F x ->
forall eps, (0 < eps <= if (Rle_bool x 0) then (ulp x)
else (ulp (pred x)))%R ->
round beta fexp Zfloor (x - eps) = pred x.
(** Error of a rounding, expressed in number of ulps *)
(** false for x=0 in the FLX format *)
(* was ulp_error *)
Theorem error_lt_ulp :
forall rnd { Zrnd : Valid_rnd rnd } x,
(x <> 0)%R ->
(Rabs (round beta fexp rnd x - x) < ulp x)%R.