The problem is stated as follows:
Show that there is a one-to-one correspondence between the points of the closed interval $[0,1]$ and the points of the open interval $(0,1)$. Give an explicit description of such a correspondence.
Now, I think I can prove the first part of the problem by demonstrating the following:
Define $f: (0,1) \to \mathbb{R}$ as follows.
For $n \in \mathbb{N}$, $n \geq 2$, $\space{ }f(\frac{1}{n}) = \frac{1}{n-1}$
and for all other $x \in (0,1)$, $\space{}f(x) = x$
Prove that $f$ is a $1-1$ function from $(0,1)$ onto $(0,1]$
Slightly modify the above function to prove that $[0,1)$ is equivalent to $[0,1]$
Prove that $[0,1)$ is equivalent to $(0,1]$
Since the "equivalent to" relation is both symmetric and transitive, it should follow that $[0,1]$ is equivalent to $(0,1)$. Hence, there does exist a one-to-one correspondence between $[0,1]$ and $(0,1)$.
I have no trouble with the above. My problem is in "finding an explicit description of such a correspondence." Can I modify the above function, or will that not suffice?
Answer
Steps 2 and 3 are not necessary. The function $g:(0,1] \to [0,1]$ defined by $g(1) = 0$ and $g(x) = f(x)$ if $x \neq 1$ is a bijection. This shows that $(0,1]$ is equivalent to $[0,1]$ and, by transitivity, that $(0,1)$ is equivalent to $[0,1]$. Furthermore, the function $g \circ f$ is a one-to-one correspondence between $(0,1)$ and $[0,1]$ that you can describe explicitly.