Definition empty : forall A, t A Dom.empty := fun A => exist (OK Dom.empty) (@S.empty A) (empty_OK A).Definition is_empty (A : Type) dom (m : t A dom) := Dom.equal dom Dom.empty.Definition mem (A : Type) dom (x : key) (m : t A dom) := Dom.mem x dom.Definition find (A : Type) dom (x : key) (m : t A dom) := S.find x (proj1_sig m).Definition domain (A : Type) dom (m : t A dom) := dom.

(* Specifications: *)
Lemma add_OK : forall A dom x v (m : t A dom), OK (Dom.add x dom) (S.add x v (proj1_sig m)).