Definition insert :
   forall (n : key) (v : data) (t : btree), insert_spec n v t.(* realisation of the DICT  signature *)

(* dictionaries are represented as  certified binary search trees *)

 Definition dict : Set := sig search_tree.Definition empty : dict.Definition find (k : key) (d : dict) : option data :=
   let (t, Ht) := d in
   match occ_dec k t Ht with
   | inleft s => let (v, _) := s in Some v
   | inright _ => None (A:=data)
   end.Definition add : key -> data -> dict -> dict.(* Now, we've got to prove the axioms *)

 Definition D_tree (d : dict) : btree := match d with
                                         | exist t Ht => t
                                         end.

(* Specifications: *)
Lemma D_search : forall d : dict, search_tree (D_tree d).
Lemma find_occ_dec : forall (k : key) (v : data) (d : dict), occ v k (D_tree d) -> find k d = Some v.
Lemma not_find_occ_dec : forall (k : key) (d : dict), (forall v : data, ~ occ v k (D_tree d)) -> find k d = None.
Theorem empty_def : forall k : key, find k empty = None.