Section Bijection.
(**************************************************************************)
(** We now show that if f and g are injections resp from A to B and from  *)
(** B to A, then there is a subset J of A s.t. h, defined to be f on A    *)
(** and the converse of g on A\J is a bijection from A to B               *)
Variable f g : Relation U.  (* f and g are relations *)
Hypothesis f_inj : injection U A B f. (* f and g are injections *)
Hypothesis g_inj : injection U B A g.
Let Imf : Ensemble U -> Ensemble U := Im U f.
Let Img : Ensemble U -> Ensemble U := Im U g.
(** Constructing J s.t. g(B\f(J))=A\J *)
(** (Setminus U A C) denotes the difference A\C         *)
(** (Included U A C) means that A is included in C  *)
Let F (C : SU) := Setminus U A (Img (Setminus U B (Imf C))).
Let D (C : SU) := Included U C (F C).
Let J := Set_Sum U D.
(**  We show that so-built J is the subset we are looking for *)
(** J is Tarski's fix-point of F, a function which is growing *)
(** w.r.t. inclusion                                          *)
(** Lemma: F is growing *)
(** We show F(J)=A\Img(B\Imf(J))=J *)
(** First left-to-right inclusion *)
(** Lemma: J_is_in_FJ (Included U J (F J))  *)

Lemma J_is_in_FJ : Included U J (F J).