I just wanted to ask if this proof can be used for exercise 7-13b in Spivak Calculus
The exercise: Suppose that $f$ satisfies the conclusion of the Intermediate Value Theorem, and that $f$ takes on each value only once. Prove that $f$ is continuous.
By I.V.T. we have that $f\left(a\right)<e<f\left(b\right)$, then there is some $x$ in $\left[a,b\right]$ such that $f\left(x\right)=e$.
Then there are too $f\left(a\right)<f\left(c\right)<e<f\left(d\right)<f\left(b\right)$, and we can assume that $e-\alpha<f\left(c\right)<e<f\left(d\right)<\alpha + e$. Then there is $a<c< y<d<b$ $($The property, that if $f\left(a\right)<f\left(c\right)$ then $a<c$ comes from the fact that $f\left(x\right)$ is injective) , and $f\left(y\right)=e$. By this we have $f\left(y\right)-\alpha<f\left(y\right)<f\left(y\right)+\alpha$, and that $y-\delta<y<y+\delta$. Then there is some $f\left(x\right)$, such as $f\left(y\right)-\alpha<f\left(x\right)<f\left(y\right)$, so too $f\left(y\right)-\alpha<f\left(x\right)<\alpha+f\left(y\right)$. Then $y-\delta<x<y$. This is a definition of limit, where $\alpha=\epsilon$, so $\lim\limits_{x \to y^{-}}f\left(x\right)=f\left(y\right)$. There is too $\lim\limits_{x \to y^{+}}f\left(x\right)=f\left(y\right)$, and by this, $\lim\limits_{x \to y}f\left(x\right)=f\left(y\right)$ for any $x$ in $\left[a,b\right]$. By this, $f\left(x\right)$ is continuous.