Inductive t' : Type :=
  | Bot: t'
  | Top_except: PTree.t L.t -> t'.Inductive t' : Type :=
  | Bot: t'
  | Top_except: PTree.t L.t -> t'.Inductive t' : Type :=
  | Bot: t'
  | Top_except: PTree.t L.t -> t'.Definition t: Type := t'.Definition set (p: positive) (v: L.t) (x: t) : t :=
  match x with
  | Bot => Bot
  | Top_except m =>
      if L.beq v L.bot
      then Bot
      else Top_except (if L.beq v L.top then PTree.remove p m else PTree.set p v m)
  end.

Lemma gsspec: forall p v x q, x <> Bot -> ~L.eq v L.bot -> L.eq (get q (set p v x)) (if peq q p then v else get q x).