I'm studying Gemignani's Elementary Topology. I need to determine that the open interval $(0,1)$ and the closed interval $[0,1]$ are homeomorphic or not when considered as subspaces of the real numbers with the absolute value topology.
My claim is that they're not. Suppose there was a homeomorphism $f$ from $(0,1)$ onto $[0,1]$. Then $f(c)=0$ for some $c\in (0,1)$. Now either $f([c,1))$ or $f((0,c])$ must contain $1$ otherwise $f$ won't be onto. Assume wlog that $f((0,c])$ contains $1$ then it follows by the intermediate value theorem that $f((0,c])=[0,1]$. But then $f$ cannot be one one, thus, a contradiction.
Are there better ways to prove that there is no homeomorphism without using the notions of compactness and connectedness? Also the author asks to find a "topological property" which one of the spaces has but which the other doesn't if the spaces are not homeomorphic. I'm not sure how to answer this using the proof that I gave.
Edit: Perhaps I got my answer to the last paragraph. If $X,\tau$ is a topological space and $Y,Z$ are subspace of $X$ which are homeomorphic and if every open subset of $Y$ is an open subset of $X$ then this must be true for $Z$ as well. If not, there must be an open subset $U$ of $Z$ which is not open in $X$ then the image/inverse image of $U$ under the homeomorphism must not be open in $Y$.
In this case, every open subset of $(0,1)$ is open in $\mathbb{R}$ but $[0,1]$ is open in the subspace topology of $[0,1]$ but is not open in $\mathbb{R}$. Please someone correct me if I'm wrong.