(**************************************************)
(* assoc_find properties                          *)
(**************************************************)

(* Specifications: *)
Lemma assoc_semfind_nil :
assoc_eqm (assoc_find assoc_empty) (fun k : K => none V).
Lemma assoc_semfind_cons_1 :
forall (k : K) (v : V) (l : assoc),
assoc_almost_eqm k (assoc_find (mkTuple k v :: l)) (assoc_find l).
Lemma assoc_semfind_cons_2 :
forall (k : K) (v : V) (l : assoc),
assoc_find (mkTuple k v :: l) k = some V v.
Lemma assoc_semfind_change_valeur :
forall (k : K) (v v' : V) (l : assoc),
assoc_almost_eqm k (assoc_find (mkTuple k v :: l))
(assoc_find (mkTuple k v' :: l)).
Lemma assoc_semfind_increase_1 :
forall (a : Tuple) (l l' : assoc),
assoc_eqm (assoc_find l) (assoc_find l') ->
assoc_eqm (assoc_find (a :: l)) (assoc_find (a :: l')).
Lemma assoc_semfind_increase_2 :
forall (k : K) (a : Tuple) (l l' : assoc),
assoc_almost_eqm k (assoc_find l) (assoc_find l') ->
assoc_almost_eqm k (assoc_find (a :: l)) (assoc_find (a :: l')).
Lemma assoc_semfind_commute :
forall (k0 k1 : K) (v0 v1 : V) (l : assoc),
k0 <> k1 ->
assoc_eqm (assoc_find (mkTuple k1 v1 :: mkTuple k0 v0 :: l))
(assoc_find (mkTuple k0 v0 :: mkTuple k1 v1 :: l)).
Lemma assoc_hasmem_find :
forall (l : assoc) (k : K) (v : V),
assoc_hasmem l k v -> assoc_find l k = some V v.
Lemma assoc_find_hasmem :
forall (l : assoc) (k : K) (v : V),
assoc_find l k = some V v -> assoc_hasmem l k v.
Lemma assoc_find_none_hasmem :
forall (l : assoc) (k : K) (v : V),
assoc_find l k = none V -> forall v : V, ~ assoc_hasmem l k v.
Lemma assoc_find_mem :
forall (l : assoc) (k : K) (v : V),
assoc_find l k = some V v -> assoc_mem l k.