Module FinSupp : FinSuppSig.
Definition fs := (fun K V d f => domf (@fmap_of_fsfun K V d f)).
Definition E := erefl fs.
End FinSupp.
Notation finsupp := FinSupp.fs.
Canonical unlockable_finsupp := Unlockable FinSupp.E.
Section FSfunBasics.
Variables (K : choiceType) (V : eqType) (default : K -> V).
Implicit Types (f : fsfun default) (k : K) (v : V).

(* Specifications: *)
Lemma mem_finsupp f k : (k \in finsupp f) = (f k != default k).
Lemma memNfinsupp f k : (k \notin finsupp f) = (f k == default k).
Lemma fsfunP f f' : f =1 f' <-> f = f'.
Lemma fsfun_injective_inP  f (T : {fset K}) :
reflect {in T &, injective f} (injectiveb [ffun x : T => f (val x)]).