Module Type CompareBasedOrderFacts
(Import E:EqLtLe')
(Import C:HasCmp E)
(Import O:CompareBasedOrder E C).

(* Specifications: *)
Lemma compare_spec x y : CompareSpec (x==y) (x<y) (y<x) (x?=y).
Lemma compare_eq x y : (x ?= y) = Eq -> x==y.
Lemma compare_refl x : (x ?= x) = Eq.
Lemma compare_gt_iff x y : (x ?= y) = Gt <-> y<x.
Lemma compare_ge_iff x y : (x ?= y) <> Lt <-> y<=x.
Lemma compare_ngt_iff x y : (x ?= y) <> Gt <-> ~(y<x).
Lemma compare_nlt_iff x y : (x ?= y) <> Lt <-> ~(x<y).
Lemma compare_nle_iff x y : (x ?= y) = Gt <-> ~(x<=y).
Lemma compare_nge_iff x y : (x ?= y) = Lt <-> ~(y<=x).
Lemma lt_irrefl x : ~ (x<x).
Lemma lt_eq_cases n m : n <= m <-> n < m \/ n==m.
End CompareBasedOrderFacts.