Intermediate Value Theorem (Topology)

Theorem
Let $X$ be a connected topological space.

Let $\left({Y, \preceq, \tau}\right)$ be a totally ordered set equipped with the order topology.

Let $f: X \to Y$ be a continuous mapping.

Let $a$ and $b$ are two points of $a, b \in X$ such that:
 * $f \left({a}\right) \prec f \left({b}\right)$

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 the sets:
 * $A = f \left({X}\right) \cap r^\prec$ and $B = f \left({X}\right) \cap r^\succ$

where $r^\prec$ and $r^\succ$ denote the strict lower closure and strict upper closure respectively of $r$ in $Y$.

$A$ and $B$ are disjoint by construction.

$A$ and $B$ are also non-empty since one contains $f \left({a}\right)$ and the other contains $f \left({b}\right)$.

$A$ and $B$ are also both open by definition as the intersection of open sets.

Suppose 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 Continuous Image of Connected Space is Connected.

Hence by Proof by Contradiction:
 * $\exists c \in X: f \left({c}\right) = r$

which is what was to be proved.

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.