(* This map instance requires that maps be disjoint, providing e.g. uniqueness of timestamps for histories. *)
Definition disjoint m1 m2 := forall k v1, m1 k = Some v1 -> m2 k = None.
Global Instance disjoint_comm : Symmetric disjoint.

Lemma disjoint_compatible : forall m1 m2, disjoint m1 m2 -> compatible m1 m2.
Instance map_disj_join : Join (A -> option B) :=
fun a b c => forall k, match a k, b k with Some v, None | None, Some v => c k = Some v | None, None => c k = None | _, _ => False end.