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 **)
unfold get, set; if_tac; intuition.
Qed.

Lemma gso h x y v : x<>y -> get (set x v h) y = get h y.