(* Proof of lem_fun_part_inv_eval_prop                                     *)
intros; apply axs_extensionnalite; intros; unfold iff in |- *; split; intros.
unfold App in H0.
elim
(axs_comprehension
(fun z : E => exists y : E, In (couple x y) (fun_part_inv f Af) /\ In z y)
(reunion (Img (fun_part_inv f Af))) v2); intros;
generalize (H1 H0); clear H0 H1 H2; intros.
elim H0; clear H0; intros; elim H1; clear H1; intros; elim H1; clear H1;
intros.
unfold fun_part_inv in H1.
elim
(axs_comprehension
(fun x1 : E => exists y : E, x1 = couple y (fun_img_inverse f Af y))
(cartesien (parties (Img f)) (parties (dom f)))
(couple x x0)); intros; generalize (H3 H1); clear H1 H3 H4;
intros.
elim H1; clear H1; intros; elim H3; clear H3; intros.
elim (lem_couple_propertie x x1 x0 (fun_img_inverse f Af x1)); intros;
generalize (H4 H3); clear H3 H4 H5; intros.
elim H3; clear H3; intros.
rewrite H3; rewrite <- H4; auto with zfc.
unfold fun_img_inverse in H0.
elim
(axs_comprehension
(fun x0 : E => In x (parties (Img f)) -> In (App f Af x0) x)
(dom f) v2); intros; generalize (H1 H0); clear H0 H1 H2;
intros.
elim H0; clear H0; intros.
generalize H; rewrite (lem_fun_part_inv_dom f Af); intros.
generalize (H1 H2); clear H1 H2; intros.
unfold App in |- *.
elim
(axs_comprehension
(fun z : E => exists y : E, In (couple x y) (fun_part_inv f Af) /\ In z y)
(reunion (Img (fun_part_inv f Af))) v2); intros;
apply H3; clear H2 H3; intros.
generalize (lem_fun_part_inv_is_fun f Af); intros.
elim (lem_App (fun_part_inv f Af) x H2 H); intros.
elim H3; clear H3; intros.
split.
elim (axs_reunion (Img (fun_part_inv f Af)) v2); intros; apply H6;
clear H5 H6; intros.
exists x0.
split; [ auto with zfc | idtac ].
unfold fun_part_inv in H4.
elim
(axs_comprehension
(fun x1 : E => exists y : E, x1 = couple y (fun_img_inverse f Af y))
(cartesien (parties (Img f)) (parties (dom f)))
(couple x x0)); intros; generalize (H5 H4); clear H4 H5 H6;
intros.
elim H4; clear H4; intros; elim H5; clear H5; intros.
elim (lem_couple_propertie x x1 x0 (fun_img_inverse f Af x1)); intros;
generalize (H6 H5); clear H5 H6 H7; intros.
elim H5; clear H5; intros.
rewrite H6; rewrite <- H5; clear H5 H6.
unfold fun_img_inverse in |- *.
elim
(axs_comprehension
(fun x0 : E => In x (parties (Img f)) -> In (App f Af x0) x)
(dom f) v2); intros; apply H6; clear H5 H6; intros.
split; intros; auto with zfc.
exists x0; split; [ auto with zfc | idtac ].
unfold fun_part_inv in H4.
elim
(axs_comprehension
(fun x1 : E => exists y : E, x1 = couple y (fun_img_inverse f Af y))
(cartesien (parties (Img f)) (parties (dom f)))
(couple x x0)); intros; generalize (H5 H4); clear H4 H5 H6;
intros.
elim H4; clear H4; intros; elim H5; clear H5; intros.
elim (lem_couple_propertie x x1 x0 (fun_img_inverse f Af x1)); intros;
generalize (H6 H5); clear H5 H6 H7; intros.
elim H5; clear H5; intros.
rewrite H6; rewrite <- H5; clear H5 H6.
unfold fun_img_inverse in |- *.
elim
(axs_comprehension
(fun x0 : E => In x (parties (Img f)) -> In (App f Af x0) x)
(dom f) v2); intros; apply H6; clear H5 H6; intros.
split; intros; auto with zfc.
Qed.
(* End of proof of lem_fun_part_inv_eval_prop                              *)
(***************************************************************************)
(***************************************************************************)
(* Relation inverse d'une application et applications au cas des bijections*)
(***************************************************************************)
(***************************************************************************)
(***************************************************************************)
(* On peut definir la relation inverse d'une application                   *)
(***************************************************************************)
Definition fun_recip (f : E) (Af : fun_ f) :=
subset
(fun c : E =>
exists x : E, (exists y : E, In (couple x y) f /\ c = couple y x))
(cartesien (Img f) (dom f)).

(***************************************************************************)
(* fun_recip est une application ssi f est une injection                   *)
(***************************************************************************)
Lemma lem_fun_recip_is_fun_under_inj :
forall (f : E) (Af : fun_ f),
fun_inj f (dom f) (Img f) <-> fun_ (fun_recip f Af).