(** A ternary comparison function in the spirit of [Z.compare].
    See now [Nat.compare] and its properties.
    In scope [nat_scope], the notation for [Nat.compare] is "?=" *)

Notation nat_compare_S := Nat.compare_succ (only parsing).

(* Specifications: *)
Lemma nat_compare_lt n m : n<m <-> (n ?= m) = Lt.
Lemma nat_compare_gt n m : n>m <-> (n ?= m) = Gt.
Lemma nat_compare_le n m : n<=m <-> (n ?= m) <> Gt.
Lemma nat_compare_ge n m : n>=m <-> (n ?= m) <> Lt.
Lemma nat_compare_eq n m : (n ?= m) = Eq -> n = m.
Lemma nat_compare_Lt_lt n m : (n ?= m) = Lt -> n<m.
Lemma nat_compare_Gt_gt n m : (n ?= m) = Gt -> n>m.