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.

Theorem compare_cont_refl p c : compare_cont c p p = c.