Definition map_add m1 m2 k := match m1 k with Some v' => Some v' | None => m2 k end.
Definition empty_map k : option B := None.
Global Instance Inhabitant_map : Inhabitant (A -> option B) := empty_map.
Definition singleton k v k1 := if eq_dec k1 k then Some v else None.
Definition map_incl m1 m2 := forall k v, m1 k = Some v -> m2 k = Some v.
Global Instance map_incl_refl : Reflexive map_incl.
Global Instance map_incl_antisym : Antisymmetric _ _ map_incl.
Global Instance map_incl_trans : Transitive map_incl.

Lemma map_add_incl_compat : forall m1 m2 m3, map_incl m1 m2 -> map_incl (map_add m3 m1) (map_add m3 m2).
Definition compatible m1 m2 := forall k v1 v2, m1 k = Some v1 -> m2 k = Some v2 -> v1 = v2.