Hint Resolve self_completable : init.
Section Discrete.
Program Instance discrete_PCM (A : Type) : Ghost := { valid a := True;
Join_G := Join_equiv A }.
Next Obligation.
auto.
Defined.
End Discrete.
Section GVar.
Context {A : Type}.
Definition ghost_var (sh : share) (v : A) g :=
own(RA := @pos_PCM (discrete_PCM A)) g (Some (sh, v)) NoneP.

Lemma ghost_var_update : forall v p v', ghost_var Tsh v p |-- |==> ghost_var Tsh v' p.
Global Program Instance nat_PCM: Ghost := { valid a := True; Join_G a b c := c = Nat.max a b }.