
*)

Definition finfun_finMixin (aT rT : finType) := 
  [finMixin of @finfun_type aT rT by <:].
Canonical finfun_finType (aT rT : finType) := 
     Eval hnf in FinType (finfun_type aT rT) (finfun_finMixin aT rT).

Lemma card_ffun (aT rT : finType) : #| {ffun aT -> rT} | = #|rT| ^ #|aT|.
Proof. Admitted. (* The proof was an exercise for ch2, see size_all_words *)

Definition eqfun A B (f g : B -> A) : Prop := forall x, f x = g x.
Notation "f1 =1 f2" := (eqfun f1 f2).

Lemma ffunP (aT : finType) rT (f1 f2 : {