Consider the following proposition:
Let $A$ be a closed bounded part of $\Bbb R$. Assume $f: A\rightarrow \Bbb R$ is a continuous injective function. Then $f^{-1}: f(A) \rightarrow A$ is also continuous.
So part of the condition is that $A$ needs to be closed and bounded. I see how these conditions help in proving the proposition and how an open $A$ would void the proposition, but I don't see why $A$ needs to be bounded.
What kind of functions would slip through otherwise? Is there a function that demonstrates the need for this condition?
For example: Take $A=[0,1]\cup [2,\infty)$. Define $f: A\rightarrow [0,2]$ by setting $f(x)=x$ for $x\in[0,1]$ and $f(x)=1+2/x$ for $x\in [2,\infty)$.