(** Comparisons and variation intervals *)
Definition zcmp (c: comparison) (n1 n2: Z) : bool :=
match c with
| Ceq => zeq n1 n2
| Cne => negb (zeq n1 n2)
| Clt => zlt n1 n2
| Cle => zle n1 n2
| Cgt => zlt n2 n1
| Cge => zle n2 n1
end.

Lemma zcmp_intv_sound:
forall c i x n,
fst i <= x <= snd i ->
cmatch (Some (zcmp c x n)) (cmp_intv c i n).