Continuity implies the intermediate value property How can someone prove that continuity implies the intermediate value property?
P.S.: If $I$ is an interval, and $f:I\rightarrow\mathbb{R}$, we say that $f$ has the intermediate value property (IVP) iff whenever $a<b$ are points in $I$ and $f(a)\leq c\leq f(b)$, there is a $d$ between $a$ and $b$ such that $f(d)=c$.
 A: Hint: This theorem can be proven using an epsilon/delta approach, given the completeness property of the real numbers.
A: Yes. This follows from the fact that the image of a connected space under a continuous map is again connected. 
Suppose there were some point $a \in f(I)$ so that that there were no $x$ sub that $f(x)=a.$ by the extreme value theorem, $a$ is on the interior of $f(I)$ and hence $f(I)$ would be the disjoint union of two open sets $\{x \in I \mid f(x)<a\}$ and $\{x \in I \mid f(x)>a\}$ in the sub space topology, a contradiction.
This specialization of the aforementioned fact is sometimes called the intermediate value theorem for calculus. 
A: Note that if $f(a) = f(b)$, then $c = f(a) = f(b)$, so $c$ can be chosen as $a$ or $b$. Otherwise $f(a) \neq f(b)$, and without loss of generality, $f(a) < f(b)$ (otherwise consider $-f$).
Let $S = \lbrace x \in [a, b] : f(x) \le c\rbrace$. Note that $a \in S$ and $S$ is bounded (above), so it has a supremum $p$. For all points $x \in (p, b]$, we have $x \notin S$, so $f(x) > c$. Therefore, using the continuity of $f$,
$$f(p) = \lim_{x\rightarrow p} f(x) = \lim_{x\rightarrow p^+} f(x) \ge c.$$
On the other hand, since $p$ is the supremum of $S$, there must be a sequence $x_n \in S$ (i.e. such that $f(x_n) \le c$) such that $x_n \rightarrow p$. Therefore, by the continuity of $f$,
$$f(p) = f\left(\lim_{n\rightarrow \infty} x_n\right) = \lim_{n\rightarrow \infty} f(x_n) \le c.$$
Putting together, $f(p) = c$, as required.
A: I guess it depends on the logical framework you're using.
In smooth infinitesimal analysis (which uses intuitionistic logic rather than classical logic), every function is continuous, and the intermediate value theorem fails!
