Definition t := PTree.t L.t.Definition set (p: positive) (v: L.t) (x: t) : t :=
  if L.beq v L.bot
  then PTree.remove p x
  else PTree.set p v x.

Lemma gsspec: forall p v x q, L.eq (get q (set p v x)) (if peq q p then v else get q x).