Ltac simpl_compare := autorewrite with compare.Ltac simpl_compare_in H := autorewrite with compare in H.(** Relation between [compare] and [sub_mask] *)

Definition mask2cmp (p:mask) : comparison :=
 match p with
  | IsNul => Eq
  | IsPos _ => Gt
  | IsNeg => Lt
 end.

Lemma compare_antisym p q : (q ?= p) = CompOpp (p ?= q).