Section Fold.
(** Alternative specification via [fold_right] *)
Notation NoDup := (NoDupA E.eq).
Notation InA := (InA E.eq).
(** ** Induction principles for fold (contributed by S. Lescuyer) *)
(** In the following lemma, the step hypothesis is deliberately restricted to the precise set s we are considering. *)
(** Same, with [empty] and [add] instead of [Empty] and [Add]. In this case, [P] must be compatible with equality of sets *)

Lemma fold_rec_nodep :
forall (A:Type)(P : A -> Type)(f : elt -> A -> A)(i:A)(s:t),
P i -> (forall x a, In x s -> P a -> P (f x a)) ->
P (fold f s i).