I want to make sure I am understanding this correctly. If we have a function $f$ which maps $A$ to $B$, and $A$ is a subset or proper subset of $B$ then $f$ is one to one from $A$ to $B$? Is that true?
Or does that only hold in the case of $f(x)=x$?
My textbook is trying to show that the $|(0,1)| = |(0,1]|$. I sort of understand the first part:
1) Because $(0,1) ⊂ (0,1]$, $f(x)=x$ is a one to one function from $(0,1)$ to $(0,1]$.
Then it says:
2) The function $g(x)=x/2$ is clearly one-to-one and maps $(0,1] $to $(0, 1/2] ⊂ (0,1)$.
By Schroder-Bernstein theorem, $|(0,1)| = |(0,1]|$
Yet I don't get how the second part is sufficient as the function $g$ maps $(0,1]$ to a subset of $(0,1)$ but forgets about $[1/2, 1)$.
My instinct tells me that these two have different cardinalities, since one includes "1" while the other does not...
Although $A$ is a proper subset of $B$, the function from $A$ to $B$ need not to be one-to-one, even if $f$ is onto. For example you can consider $A = (-\pi/2,\pi/2)$, $B=\Bbb{R}$ and $f(x) = \tan x$.
You can examine the proof of Schroder-Bernstein theorem. It 'constructs' a bijection between $A$ and $B$ from two one-to-one functions $f:A\to B$ and $g:B\to A$. So the proof of $|(0,1)| = |(0,1]|$ does not forget about $[1/2,1)$, though it looks like be.
Moreover, removing a finite subset from an infinite set does not affect its cardinality. For example, we can construct a bijection between $\Bbb{N}$ and $\Bbb{N}-\{1\}$.