Definition t := R.
Definition eq := @eq R.
Definition eqb := Reqb.
Definition eqb_eq := Reqb_eq.
End R_as_UBE.
Module R_as_DT <: UsualDecidableTypeFull := Make_UDTF R_as_UBE.
(** Note that the last module fulfills by subtyping many other interfaces, such as [DecidableType] or [EqualityType]. *)
(** Note that [R_as_DT] can also be seen as a [DecidableType] and a [DecidableTypeOrig]. *)
(** * OrderedType structure for binary integers *)
Definition Rcompare x y :=
match total_order_T x y with
| inleft (left _) => Lt
| inleft (right _) => Eq
| inright _ => Gt
end.

Lemma Rcompare_spec : forall x y, CompareSpec (x=y) (x<y) (y<x) (Rcompare x y).
Module R_as_OT <: OrderedTypeFull.