End Cat.
Module Import FmapE.
Definition fmapE := (fndSome, getfE, setfK, fnd_set, getf_set,
setfNK, fnd_reducef, get_reducef, fnd_filterf, get_filterf,
fnd_restrict, getf_restrict, fnd_rem, fnd_rem1,
restrictfT, restrictf0, restrictf_id, remf_id, remf1_id,
fnd_cat).
End FmapE.
Arguments catf : simpl never.
Notation "f + g" := (catf f g) : fset_scope.
Section FinMapKeyType.
Variables (K V : choiceType).
Implicit Types (f g : {fmap K -> V}).
Definition codomf f : {fset V} := [fset f k | k : domf f].

Lemma in_codomf_rem1 f (k : K) (kf : k \in domf f)  :
codomf f.[~ k] =
if [exists k' : domf f, (val k' != k) && (f k' == f.[kf])] then codomf f
else codomf f `\ f.[kf].