Module Map. Section map.
Variables (B : Type).
Definition t := positive -> option B.
Definition get (h: t) (a:positive) : option B := h a.
Definition set (a:positive) (v: B) (h: t) : t :=
fun i => if ident_eq i a then Some v else h i.
Definition remove (a: positive) (h: t) : t :=
fun i => if ident_eq i a then None else h i.
Definition empty : t := fun _ => None.
(** MAP Axioms **)

Lemma gss h x v : get (set x v h) x = Some v.