simple induction E; simpl in |- *; intros B f HR A P H i; elim i;
simpl in |- *; intros.
cut (P (f x)).
intros Pf.
exists (exist B (fun x : B => P (f x)) x Pf); simpl in |- *;
auto with zfc.
apply H with A; auto with zfc.
Qed.
(* Again, extentionality is not stated, but easy *)
(* Projections of a set: *)
(*  1: its base type     *)
Definition pi1 : Ens -> Type.
simple induction 1.
intros A f r.
exact A.
Defined.
(*  2: the function      *)
Definition pi2 : forall E : Ens, pi1 E -> Ens.
simple induction E.
intros A f r.
exact f.
Defined.
(* The Union set   *)
Definition Union : forall E : Ens, Ens.
simple induction 1; intros A f r.
apply (sup (depprod A (fun x : A => pi1 (f x)))).
simple induction 1; intros a b.
exact (pi2 (f a) b).
Defined.

Theorem EQ_EXType :
forall E E' : Ens,
EQ E E' ->
forall a : pi1 E,
EXType (pi1 E') (fun b : pi1 E' => EQ (pi2 E a) (pi2 E' b)).