This is a lemma to prove Schröder-Bernstein theorem. I encountered this lemma when I read V. A. Zorich's Mathematical Analysis. In his textbook, prof Zorich does not give the detail of the proof. Now I will fill the gaps.
I'm very concerned with the correctness of the part that I prove $g(X)=Y$. Please take care of my proof!
Lemma:
Suppose that $Z \subseteq Y \subseteq X$ and that $f:X \to Z$ is bijective, then there exists a bijection $g : X \to Y$.
Proof:
Let $A=X \setminus Y$ and $B=\bigcup_{i\in \mathbb{N}}f^i(A)$. Here $f^i=f \circ \cdots \circ f$ is the $n$th iteration of the mapping $f$ and $\mathbb{N}$ is the set of natural numbers (including $0$).
$f(B)=f(\bigcup_{i \in \mathbb{N}}f^i(A))=\bigcup_{i \in \mathbb{N}}f(f^i(A))=\bigcup_{i \geq1}f^i(A)$
$B=f^0(A) \cup(\bigcup_{i \geq 1}f^i(A))=A \cup (\bigcup_{i \geq 1}f^i(A))=A \cup f(B)$.
We define $g$ as follows:
$$ g(x) = \begin{cases} \ f(x) & \text {if $x \in B$} \\ x & \text {if $x \in X \setminus B$} \\ \end{cases} $$
Now we prove $g : X \to Y$ is the desired function.
- $g$ is surjective.
$A \cap Y=\varnothing$ and $f(B) \subseteq Z \subseteq Y \implies A \cap f(B)=\varnothing \implies (A \cup f(B)) \setminus f(B)=A$.
$g(X)=(X \setminus B) \cup f(B)$
$=(X \setminus (A \cup f(B))) \cup f(B)$
$=(X \cup f(B)) \setminus ((A \cup f(B)) \setminus f(B))$
$=X \setminus A$
$= X \setminus (X \setminus Y)=Y$
$\implies g(X)=Y$. Thus $g$ is surjective.
- $g$ is injective.
$B=A \cup f(B) \implies f(B) \subseteq B \implies (X \setminus B) \cap f(B)= \varnothing \implies$ There does NOT exist $m \in B$ and $p \in X \setminus B$ such that $g(m)=g(p)$.
Let $m,p \in X$ such that $g(m)=g(p)$. We have two cases in total.
a. $m,p \in B$
$\implies g(m)=f(m)=f(p)=g(p) \implies m=p$ (Since $f$ is bijective).
b. $m,p \in X \setminus B$
$\implies g(m)=m=p=g(p) \implies m=p$.
Thus $g$ is injective.
Thank you for your patience!