Definition rem k s := let: FinMap s' p' := s in FinMap (sorted_filter' k p').Definition supp s := map key (seq_of s).

(* Specifications: *)
Lemma ord_path (x y : K) s : ord x y -> path ord y s -> path ord x s.
Lemma last_ins' (x : K) (v : V) s : path ord x (map key s) -> ins' x v s = (x, v) :: s.
Lemma first_ins' (k : K) (v : V) s : (forall x, x \in map key s -> ord x k) -> ins' k v s = rcons s (k, v).
Lemma notin_path (x : K) s : path ord x s -> x \notin s.
Lemma path_supp_ord (s : fmap) k : path ord k (supp s) -> forall m, m \in supp s -> ord k m.
Lemma fmapP (s1 s2 : fmap) : (forall k, fnd k s1 = fnd k s2) -> s1 = s2.