Inductive not_racy : option permission -> Prop :=
  | empty : not_racy None.Inductive not_racy : option permission -> Prop :=
  | empty : not_racy None.Inductive racy : option permission -> Prop :=
  | freeable : racy (Some Freeable).Inductive racy : option permission -> Prop :=
  | freeable : racy (Some Freeable).

(* Specifications: *)
Lemma not_racy_union : forall p1 p2 (Hnot_racy: not_racy p1), exists pu, perm_union p1 p2 = Some pu.
Lemma no_race_racy : forall p1 p2 (Hracy: racy p1) (Hnorace: exists pu, perm_union p1 p2 = Some pu), not_racy p2.
Lemma perm_order_clash: forall p p' (Hreadable: Mem.perm_order' p Readable) (Hwritable: Mem.perm_order' p' Writable), ~ exists pu, perm_union p p' = Some pu.
Lemma perm_order_incompatible: forall p p' (Hreadable: Mem.perm_order'' p (Some Readable)) (Hwritable: Mem.perm_order'' p' (Some Writable)), perm_union p p' = None.