# Show that two topological spaces are not homeomorphic.

Let $X = (-1,1)$ be considered with the Euclidean metric, and $Y = (0, \infty)$ be given the cofinite topology. Prove that $X$ and $Y$ are not homeomorphic.

My current thoughts are that a homeomorphism is a continuous bijection with a continuous inverse, and that it's relatively trivial to define a bijection between $(-1,1)$ and $(0,\infty)$, so I need to show that any function between $X$ and $Y$ is not continuous due to the topologies. This would be done by showing that if $f:X\rightarrow Y$ is a bijective function, and a set $A$ is open in $X$, then $f^{-1}(A)$ is closed in $Y$. Here is where I hit a wall and am unable to continue, any help would be appreciated!

Here is an argument that is not the most general, but it works. Suppose that $f:Y\to X$ is a homeomorphism.
Write $$X= \bigcup_{n≥2}[-1+1/n,1-1/n]$$ Then $$Y=f^{-1}(X) = \bigcup_{n≥2} f^{-1}([-1+1/n,1-1/n])$$ should be a countable union of finite sets, which is not possible.
Notice that I only used the fact that $f$ is continuous, the fact that $f$ has a continuous inverse was not useful.
$[0,1/2]$ is an infinite closed and proper subset of $X$, whereas all proper closed subsets of $Y$ are finite.