(** * Relating [x ?= y] to [=], [<=], [<], [>=] or [>] *)

(* Specifications: *)
Lemma Zcompare_elim :
forall (c1 c2 c3:Prop) (n m:Z),
(n = m -> c1) ->
(n < m -> c2) ->
(n > m -> c3) -> match n ?= m with
| Eq => c1
| Lt => c2
| Gt => c3
end.
Lemma Zcompare_eq_case :
forall (c1 c2 c3:Prop) (n m:Z),
c1 -> n = m -> match n ?= m with
| Eq => c1
| Lt => c2
| Gt => c3
end.
Lemma Zle_compare :
forall n m:Z,
n <= m -> match n ?= m with
| Eq => True
| Lt => True
| Gt => False
end.
Lemma Zlt_compare :
forall n m:Z,
n < m -> match n ?= m with
| Eq => False
| Lt => True
| Gt => False
end.
Lemma Zge_compare :
forall n m:Z,
n >= m -> match n ?= m with
| Eq => True
| Lt => False
| Gt => True
end.
Lemma Zgt_compare :
forall n m:Z,
n > m -> match n ?= m with
| Eq => False
| Lt => False
| Gt => True
end.