Definition singleton {A} k (x : A) : list (option A) := repeat None k ++ Some x :: nil.Definition gname := nat.Definition list_set {A} (m : list (option A)) k v : list (option A) :=
  firstn k m ++ repeat None (k - length m) ++ Some v :: skipn (S k) m.

Lemma ghost_op: forall {RA: Ghost} g (a1 a2 a3: G) pp, join a1 a2 a3 -> own g a3 pp = own g a1 pp * own g a2 pp.