End OTF_to_TTLB.
(** * From [TotalTransitiveLeBool] to [OrderedTypeFull]  [le] is [leb ... = true]. [eq] is [le /\ swap le]. [lt] is [le /\ ~swap le]. *)
Local Open Scope bool_scope.
Module TTLB_to_OTF (Import O : TotalTransitiveLeBool') <: OrderedTypeFull.
Definition t := t.
Definition le x y : Prop := x <=? y.
Definition eq x y : Prop := le x y /\ le y x.
Definition lt x y : Prop := le x y /\ ~le y x.
Definition compare x y :=
if x <=? y then (if y <=? x then Eq else Lt) else Gt.

Lemma compare_spec : forall x y, CompSpec eq lt x y (compare x y).
Definition eqb x y := (x <=? y) && (y <=? x).