Definition fnd k (s : fmap) :=
if (filter (predk k) (seq_of s)) is (_, v):: _
then Some v else None.
Fixpoint ins' (k : K) (v : V) (s : seq (K * V)) {struct s} : seq (K * V) :=
if s is (k1, v1)::s1 then
if ord k k1 then (k, v)::s else
if k == k1 then (k, v)::s1 else (k1, v1)::(ins' k v s1)
else [:: (k, v)].

(* Specifications: *)
Lemma path_ins' s k1 k2 v :
ord k1 k2 -> path ord k1 (map key s) ->
path ord k1 (map key (ins' k2 v s)).
Lemma sorted_ins' s k v :
sorted ord (map key s) -> sorted ord (map key (ins' k v s)).