(* Proof of lem_equiv_comp_prop                                            *)
intros; apply axs_extensionnalite; unfold iff in |- *; split; intros.
elim Afs; intros; elim H1; clear H1; intros.
generalize (lem_x_in_fun_form f H0 v2 H); intros; elim H3; clear H3; intros;
elim H3; clear H3; intros.
generalize H; clear H; rewrite H3; clear H3; intros.
generalize (lem_fun_and_dom f x x0 H0 H) (lem_fun_and_img f x x0 H0 H);
intros.
cut (In x a); intros; [ idtac | rewrite <- H1; auto with zfc ].
generalize (H2 x0 H4); intros.
generalize (lem_x_equiv_in_projQ r a rRel rEqv rD x H5); intros.
generalize
(lem_fun_and_img (projQuotient r a rRel rEqv rD) x
(equivClass r a rRel rEqv x) (lem_projQuotient_is_fun r a rRel rEqv rD)
H7); rewrite (lem_projQuotient_img r a rRel rEqv rD);
intros.
generalize (lem_equiv_comp_elem r a rRel rEqv rD s f Afs Pr x H5); intros.
unfold comp in |- *.
elim
(axs_comprehension
(fun c : E =>
exists y : E,
In (couple (first c) y) (projQuotient r a rRel rEqv rD) /\
In (couple y (second c)) (equiv_comp r a rRel rEqv rD s f Afs Pr))
(cartesien a s) (couple x x0)); intros; apply H11;
clear H10 H11; intros.
split;
[ idtac
| exists (equivClass r a rRel rEqv x); rewrite (lem_first_propertie x x0);
rewrite (lem_second_propertie x x0); split; [ auto with zfc | idtac ] ].
elim (lem_cartesian_propertie a s (couple x x0)); intros; apply H11;
clear H10 H11; intros.
exists x; exists x0; split;
[ auto with zfc | split; [ exact (H2 x0 H4) | reflexivity ] ].
rewrite (lem_eval_propertie f x x0 (lem_fun_sig_is_fun f a s Afs) H);
auto with zfc.
unfold comp in H.
elim
(axs_comprehension
(fun c : E =>
exists y : E,
In (couple (first c) y) (projQuotient r a rRel rEqv rD) /\
In (couple y (second c)) (equiv_comp r a rRel rEqv rD s f Afs Pr))
(cartesien a s) v2); intros; generalize (H0 H);
clear H H0 H1; intros.
elim H; clear H; intros; elim H0; clear H0; intros; elim H0; clear H0; intros.
unfold projQuotient in H0.
elim
(axs_comprehension
(fun x0 : E =>
exists z : E,
(exists t : E, x0 = couple z t /\ t = equivClass r a rRel rEqv z))
(cartesien a (quotient r a rRel rEqv rD)) (couple (first v2) x));
intros; generalize (H2 H0); clear H0 H2 H3; intros.
elim H0; clear H0; intros; elim H2; clear H2; intros; elim H2; clear H2;
intros; elim H2; clear H2; intros.
elim (lem_couple_propertie (first v2) x0 x x1); intros; generalize (H4 H2);
clear H2 H4 H5; intros; elim H2; clear H2; intros.
generalize H3; rewrite <- H2; rewrite <- H4; clear H2 H3 H4; intros.
unfold equiv_comp in H1.
elim
(axs_comprehension
(fun z : E =>
exists x0 : E,
In x0 a /\
z =
couple (equivClass r a rRel rEqv x0)
(App f (lem_fun_sig_is_fun f a s Afs) x0))
(cartesien (quotient r a rRel rEqv rD) s) (couple x (second v2)));
intros; generalize (H2 H1); clear H1 H2 H4; intros.
elim H1; clear H1; intros; elim H2; clear H2; intros; elim H2; clear H2;
intros.
elim
(lem_couple_propertie x (equivClass r a rRel rEqv x2)
(second v2) (App f (lem_fun_sig_is_fun f a s Afs) x2));
intros; generalize (H5 H4); clear H4 H5 H6; intros;
elim H4; clear H4; intros.
elim (lem_cartesian_propertie a s v2); intros; generalize (H6 H); clear H6 H7;
intros.
elim H6; clear H6; intros; elim H6; clear H6; intros; elim H6; clear H6;
intros; elim H7; clear H7; intros.
generalize H H0 H1 H3 H5; rewrite H8; rewrite (lem_first_propertie x3 x4);
rewrite (lem_second_propertie x3 x4); clear H H0 H1 H3 H5;
intros.
generalize H4; rewrite H3; clear H3; intros.
generalize (lem_equivClass_is_same r a rRel rEqv rD x3 x2 H6 H2 H3); intros.
generalize (Pr x3 x2 H9); intros.
rewrite H5; rewrite <- H10.
elim Afs; intros; elim H12; clear H12; intros.
cut (In x3 (dom f)); intros; [ idtac | rewrite H12; auto with zfc ].
exact (lem_eval_prop2 f x3 (lem_fun_sig_is_fun f a s Afs) H14).
Qed.
(* End of proof of lem_equiv_comp_prop                                     *)

(***************************************************************************)
(* Si f = g o projQuotient alors g = equiv_comp                            *)
(***************************************************************************)
Lemma lem_equiv_comp_unicite :
forall (r a : E) (rRel : rel_sig r a a) (rEqv : equivalence r a rRel)
(rD : rdom r a a rRel = a) (s f : E) (Afs : fun_sig f a s)
(Pr : forall x y : E,
In (couple x y) r ->
App f (lem_fun_sig_is_fun f a s Afs) x =
App f (lem_fun_sig_is_fun f a s Afs) y) (g : E)
(Ags : fun_sig g (quotient r a rRel rEqv rD) s),
f =
comp (projQuotient r a rRel rEqv rD) g a (quotient r a rRel rEqv rD) s
(lem_projQuotient_sig r a rRel rEqv rD) Ags ->
g = equiv_comp r a rRel rEqv rD s f Afs Pr.