Tricky detail in extreme value theorem proof I am reading Pugh's Real Mathematical Analysis, and in chapter 1, section 6, ``The Skeleton of Calculus,'' Pugh supplies a proof of the Extreme Value Theorem. I am having trouble understanding one particular point in the proof. Note that he proves the existence of maximums, and leaves minimums for the reader.
Theorem 23. A continuous function $f$ defined on an interval $[a, b]$ takes on absolute minimum and absolute maximum values: for some $x_0, x_1 \in [a,b]$ and for all $x \in [a,b]$,
$f(x_0) \leq f(x) \leq f(x_1)$.
Proof. Let $M = \sup f(t)$ as $t$ varies in $[a,b]$. This exists since the values of a continuous function defined on an interval $[a,b]$ form a bounded subset of $\mathbb R$ (his Theorem 22). Consider the set $X = \{x \in [a,b] : \sup V_x < M\}$ where $V_x$ is the set of values of $f(t)$ as $t$ varies on $[a,x]$.
Case 1: $f(a) = M$. Then $f$ takes on a maximum at $a$ and the theorem is proved.
Case 2: $f(a) < M$. Then $X$ is nonempty and we can consider the supremum of $X$, say $c$. Here's where I lose him---I don't seem to understand what's going on here. If $f(c) < M$, we choose $\epsilon > 0$ with $\epsilon < M - f(c)$. By continuity, there exists a $\delta > 0$ such that $|t - c| < \delta \implies |f(t) - f(c)| < \epsilon$. I understand the use of continuity and the application of the definition of a continuous function, but I don't understand the motivation for considering the continuity of $f$ at $c$. Thus, $\sup V_c < M$. I don't understand how we can deduce that $\sup V_c < M$ by considering the continuity of $f$ at $c$.
If you could help me understand this proof, and specifically how considering the continuity of $f$ at $c$ helps us determine that $\sup V_c < M$, I would greatly appreciate it.

My guess: the idea is to prove that $f(c)=M$. He proves it by contradiction. Assume that $f(c)<M$ then by continuity we can go a bit further to $c+\delta$ and still have all functional values being under $M$. It contradicts the choice of $c$ as the supremum of $X$.
P.S. It is easy, but you have to mention also that $c\in[a,b]$.
