Suppose $A$ and $B$ are two sets with $B\subset A.$ Let $f:A\to B$ be injective. Then show that $\exists$ a bijection $h:A\to B.$
The proof given was :
Let $$X=(A-B)\cup f(A-B)\cup f^2(A-B)\cup \cdots=\bigcup_{n=0}^{\infty}f^n(A- B);f^0(A-B)=A-B.$$
Then clearly if $x\in X,x\in f^n(A-B)$ for some $n.$ Then $f(x)\in f^{n+1}(A-B)\implies f(x)\in X.$
Thus, $f(X)\subset X.$ We define, $$h:A\to B$$ by
$$h(x)=f(x)\text{, if }x\in X,$$ $$x\text{ otherwise. }$$
To show that $h$ is one-one, let $x,y\in A$ and $h(x)=h(y).$
If $x,y\in X$ then $f(x)=f(y)\implies x=y$
If $x,y\in A-X$ then, $x=y,$ by definition of $h.$
If $x\in X$ and $y\in A-X$ then $$h(x)=h(y)\implies f(x)=y\implies y\in f(X)\subset X,$$ a contradiction.
So, the last case can't occur. Thus, $h$ is one-one.
To show that $h$ is onto, let $y\in B.$
If $y\in X$ then $y\in f^n(A-B)$ for some $n\geq 1\implies y=f^n(x),$ for some $x\in A-B$ $$\implies y=f(x')$$ where $x'=f^{n-1}(x)\in f(A-B)\subset X.$ $$\implies y=h(x').$$
If $y\notin X$ thhen, $h(y)=y.$ Thus, $h$ is onto. This completes the proof.
However, I find this proof much convoluted, which was not at all necessary. I tried devising an alternative proff, which is quite straight-foerward in it's working and might even be considered simpler.
Here it is :
Notation: If S is a set, then by $|S|$ I mean, Cardinality of the set $S$
Given,
$B$ is a subset of $A$ and $f:A\to B$ is an injective mapping.
Since, $B$ is a subset of $A,$ we have, $|B|\leq |A|.$
Also, $f$ is an injective mapping from $A$ to $B$ implies, $|A|\leq |B|.$
Hence, $|A|=|B|$ is the only possible conclusion. Again, as $f$ is an injection from $A$ to $B$ (and with the (now) established fact that, $|A|=|B|,$ ) $f$ is a bijection. Thus, $f=h$ and $h:A\to B$ is a bijection.
I hope that my alternative approach is a correct one. Is there any way, I can improve the proof? I am looking, for some specific suggestions that might make my proof look more readable and understandable. Any suggestions/remarks against ways of improving it, will be highly appreciated. Also, please do point out if any requisite changes should be made or not. Lastly, if there are any errors in my proof, please correct me.