(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
(* Contribution to the Coq Library   V6.3 (July 1999)                    *)
Require Export Plump.
simple induction E1; intros A1 f1 HR1; simple induction E2; intros A2 f2 HR2.
simple induction 1; intros e1 e2.
apply INC_EQ; unfold INC in |- *.
change
(forall E : Ens,
IN E (Union (sup A1 (fun a1 : A1 => Power (Vee (f1 a1))))) ->
IN E (Union (sup A2 (fun a2 : A2 => Power (Vee (f2 a2))))))
in |- *.
intros E i.
apply
IN_sound_right with (Union (sup A1 (fun a1 : A1 => Power (Vee (f1 a1)))));
try trivial with zfc.
apply Union_sound.
split.
intros a1; elim (e1 a1).
intros a2 h.
exists a2.
apply Power_sound.
apply HR1.
assumption.
intros a2; elim (e2 a2); intros a1 h; exists a1; apply Power_sound;
auto with zfc.
change
(forall E : Ens,
IN E (Union (sup A2 (fun a2 : A2 => Power (Vee (f2 a2))))) ->
IN E (Union (sup A1 (fun a1 : A1 => Power (Vee (f1 a1))))))
in |- *.
intros E i.
apply
IN_sound_right with (Union (sup A2 (fun a2 : A2 => Power (Vee (f2 a2))))).
apply Union_sound.
split.
intros a2; elim (e2 a2); intros a1 h; exists a1.
apply Power_sound; auto with zfc.
intros a1; elim (e1 a1); intros a2 h; exists a2.
apply Power_sound; auto with zfc.
assumption.
Qed.
simple induction V; intros A f HR.
intros W i E inc.
change (IN E (Union (sup A (fun a : A => Power (Vee (f a)))))) in |- *.
apply IN_Union with (Power (Vee W)).
elim i; intros a h.
exists a.
apply Power_sound; apply Vee_sound; auto with zfc.
auto with zfc.
apply INC_IN_Power.
assumption.
Qed.
simple induction L; intros A f HR.
intros o inc.
unfold Succ in |- *.
apply IN_Vee with (sup A f).
apply IN_P_Comp.
intros; apply Ord_sound with w1; auto with zfc.
auto with zfc.
apply INC_IN_Power; auto with zfc.
assumption.
assumption.
Qed.
Definition PI1 (A : Type) (P : A -> Type) (c : depprod A P) :=
match c with
| dep_i a p => a
end.
Definition PI2 (A : Type) (P : A -> Type) (c : depprod A P) :=
match c return (P (PI1 A P c)) with
| dep_i a p => p
end.
simple induction E; intros A f HR X.
intros i.
change (IN X (Union (sup A (fun a : A => Power (Vee (f a)))))) in i.
elim (Union_IN _ _ i).
intros T c.
elim c; intros i1 i2.
elim i1; intros a e.
exists (f a); split.
exists a; auto with zfc.
apply IN_Power_INC.
apply IN_sound_right with T; auto with zfc.
Qed.
intros E1 E2 inc; unfold INC in |- *; intros X i.
elim (IN_Vee_EXType _ _ i).
intros Y; simple induction 1; intros i1 inc1.
apply IN_Vee with Y; auto with zfc.
Qed.
Hint Resolve IN_Power_INC: zfc.

Lemma IN_Succ_INC : forall E X : Ens, IN X (Succ E) -> INC X E.