Section Fold_More.
Variables (A:Type)(eqA:A->A->Prop)(st:Equivalence eqA).
Variables (f:elt->A->A)(Comp:Proper (E.eq==>eqA==>eqA) f)(Ass:transpose eqA f).
(** ** Fold is a morphism *)
(** ** Fold and other set operators *)
End Fold_More.
End Fold.
(** * Cardinal *)
(** ** Characterization of cardinal in terms of fold *)
(** ** Old specifications for [cardinal]. *)
(** ** Cardinal and (non-)emptiness *)
Hint Resolve cardinal_inv_1 : core.
(** ** Cardinal is a morphism *)
Instance cardinal_m : Proper (Equal==>Logic.eq) cardinal.
Hint Resolve Add_add Add_remove Equal_remove cardinal_inv_1 Equal_cardinal : core.
(** ** Cardinal and set operators *)
Hint Immediate empty_cardinal cardinal_1 : set.

Lemma singleton_cardinal : forall x, cardinal (singleton x) = 1.