Definition mapk (m : finMap A V) : finMap B V := 
  foldfmap (fun p s => ins (f (key p)) (value p) s) (nil B V) m.

(* Specifications: *)
Lemma sorted_mapk m: sorted ord (supp (mapk m)).
Lemma path_mapk m k: path ord k (supp m) -> path ord (f k) (supp (mapk m)).
Lemma mapk_nil : mapk (nil A V) = nil B V.
Lemma mapk_ins k v s : path ord k (supp s) -> mapk (ins k v s) = ins (f k) v (mapk s).
Lemma map_id m : @mapk A A V id m = m.
Lemma map_comp m: mapk g (@mapk A B V f m) = mapk (comp g f) m.