Section BoolSpec.
Variable elt elt' elt'' : Type.
Implicit Types m : t elt.
Implicit Types x y z : key.
Implicit Types e : elt.
Hint Resolve add_neq_o : map.
Hint Resolve remove_eq_o : map.
Hint Resolve remove_neq_o : map.

Lemma mapi_o : forall m x (f:key->elt->elt'),
(forall x y e, E.eq x y -> f x e = f y e) ->
find x (mapi f m) = Datatypes.option_map (f x) (find x m).