Section Filtering.
Variables (K : ordType) (V : Type).
Notation fmap := (finMap K V).
Notation nil := (nil K V).
Definition kfilter' (p : pred K) (s : fmap) :=
filter (fun kv => p kv.1) (seq_of s).
Definition kfilter (p : pred K) (s : fmap) := FinMap (sorted_kfilter p s).
(* filter and fcat *)

Lemma eq_in_kfilter p1 p2 s :
{in supp s, p1 =1 p2} -> kfilter p1 s = kfilter p2 s.