Definition map (A B : Type) (f : A -> B) (m : t A) : t B :=
    (f (fst m), PTree.map1 f (snd m)).

(* Specifications: *)
Theorem gmap: forall (A B: Type) (f: A -> B) (i: positive) (m: t A), get i (map f m) = f(get i m).
Theorem set2: forall (A: Type) (i: elt) (x y: A) (m: t A), set i y (set i x m) = set i y m.
Theorem gmap: forall (A B: Type) (f: A -> B) (i: positive) (m: t A), get i (map f m) = f(get i m).
Theorem set2: forall (A: Type) (i: elt) (x y: A) (m: t A), set i y (set i x m) = set i y m.