Corollary ghost_set_remove : forall {A} g a (s : Ensemble A) (Hdec : forall b, b = a \/ b <> a),
  In s a -> ghost_set g s = ghost_set g (Singleton a) * ghost_set g (Subtract s a).Definition iname := nat.Class invG := { g_inv : gname; g_en : gname; g_dis : gname }.Class invG := { g_inv : gname; g_en : gname; g_dis : gname }.Class invG := { g_inv : gname; g_en : gname; g_dis : gname }.Class invG := { g_inv : gname; g_en : gname; g_dis : gname }.Definition master_list {A} g (l : list (option A)) := ghost_master1(ORD := list_order A) l g.(* up *)
Instance Inhabitant_option {A} : Inhabitant (option A) := None.(* Our ghost state construction makes it awkward to put agree inside other ghost state constructions.
   As a workaround, instead of having one ghost location with a map from indices to agrees,
   we have a map from indices to ghost locations, each with an agree. *)

Instance token_PCM : Ghost := exclusive_PCM unit.

Lemma nth_singleton : forall {A} n (a : A) d, nth n (list_singleton n a) d = Some a.