Intermediate Value Theorem (Topology)

Theorem
Let $f: X \to Y$ be a continuous map, where $X$ is a connected space and $Y$ is a totally ordered set equipped with the order topology.

Let $a$ and $b$ are two points of $a, b \in X$.

Let:
 * $r \in Y: f \left({a}\right) \prec r \prec f \left({b}\right)$

Then there exists a point $c$ of $X$ such that $f \left({c}\right) = r$.

Proof
Let $a, b \in X$, and let $r \in Y$ lie between $f \left({a}\right)$ and $f \left({b}\right)$.

Define sets $A = f \left({X}\right) \cap \left({-\infty \,.\,.\, r}\right)$ and $B = f \left({X}\right) \cap \left({r \,.\,.\, \infty}\right)$.

These sets are clearly disjoint, and they are clearly nonempty since one contains $f \left({a}\right)$ and the other contains $f \left({b}\right)$.

We can also see that they are both open by definition as the intersection of open sets.

Assume there is no point $c$ such that $f \left({c}\right) = r$.

Then $f \left({X}\right) = A \cup B$, so $A$ and $B$ constitute a separation of $X$.

But this contradicts the fact that the image of a connected space under a continuous mapping is connected.

Also see

 * Intermediate Value Theorem of calculus, which follows as a corollary from this by considering $\R$ under the order topology and noting that Subset of Real Numbers is Interval iff Connected.