Definition ghost_master sh (a : @G P) p := own p (sh, a) NoneP.

(* Specifications: *)
Lemma snap_master_join : forall v1 sh v2 p, sh <> Share.bot ->
ghost_snap v1 p * ghost_master sh v2 p = !!(ord v1 v2) && ghost_master sh v2 p.
Corollary snaps_master_join : forall lv sh v2 p, sh <> Share.bot ->
fold_right sepcon emp (map (fun v => ghost_snap v p) lv) * ghost_master sh v2 p =
!!(Forall (fun v1 => ord v1 v2) lv) && ghost_master sh v2 p.
Lemma master_update : forall v v' p, ord v v' -> ghost_master Tsh v p |-- |==> ghost_master Tsh v' p.
Lemma master_init : forall (a : @G P), exists g', joins (Tsh, a) g'.
Lemma make_snap : forall (sh : share) v p, ghost_master sh v p |-- |==> ghost_snap v p * ghost_master sh v p.
Lemma ghost_snap_forget : forall v1 v2 p, ord v1 v2 -> ghost_snap v2 p |-- |==> ghost_snap v1 p.
Lemma ghost_snap_choose : forall v1 v2 p, ghost_snap v1 p * ghost_snap v2 p |-- |==> ghost_snap v1 p.
Lemma master_share_join : forall sh1 sh2 sh v p, sepalg.join sh1 sh2 sh ->
ghost_master sh1 v p * ghost_master sh2 v p = ghost_master sh v p.
Lemma master_inj : forall sh1 sh2 v1 v2 p, readable_share sh1 -> readable_share sh2 ->
ghost_master sh1 v1 p * ghost_master sh2 v2 p |-- !!(v1 = v2).
Lemma master_share_join' : forall sh1 sh2 sh v1 v2 p, readable_share sh1 -> readable_share sh2 ->
sepalg.join sh1 sh2 sh ->
ghost_master sh1 v1 p * ghost_master sh2 v2 p = !!(v1 = v2) && ghost_master sh v2 p.