Proof Validation Prove the intermediate value theorem using the least upper bound property of real numbers.
The statement of intermediate value theorem is as follows:
Let $f : [a, b] → R$ be a continuous function, and suppose that $f (a) < 0$ and $f (b) > 0$. In this case, the intermediate value theorem states that $f$ must have a root in the interval $[a, b]$.
My solution:
Consider the set
$$ S = \{x\in[a,b]: f(x) <0 \} \space\space\space\space \forall x\leq s$$
$S$ is non-empty because f is continuous in the interval $[a,b]$ whereby $f(a) < 0$ and $f(b)>0$.
$S$ is the initial segment of $[a,b]$ that takes negative values under $f$. Then $b$ is an upper bound for $S$. By the least upper bound property of real numbers, the set $S$ must have a least upper bound. Let the least upper bound of $S$ be $\alpha$ We will show that this least upper bound must occurs at $f(\alpha) = 0$ by ruling out $f(\alpha) < 0$ and $f(\alpha) >0$
Suppose $f(\alpha) :=0 -\epsilon <0 $. By the Archimedian principle, we can always find a real number M such that M is between $0-\epsilon < M < 0$. Since $f$ is continuous, $f^{-1}(M)$ exists and $\in [a,b]$. Therefore, we can find an element in $S$ that is greater than $\alpha$. This is a contradiction.
Similar argument can be given for the case of $f(\alpha) > 0$. 
Therefore, we can conclude that the least upper bound of $S$ must occur at $f(\alpha) = 0$.
 A: You don't need continuity to show $a\in S$ and hence $S\ne \emptyset$: It is given that $f(a)<0$.
$S$ need not be an initial segment; note that $f$ need not move in a "simple" manner from $f(a)<0$ to $f(b)>0$. But you don't need that anyway. The fact that $S\subseteq [a,b]$ is enough.
You cannot conclude that $f^{-1}(M)$ exists (that would require the IVT, which you are just about to prove).

You correctly showed that $S$ is nonempty and bounded above by $b$, so that a least upper bound $\alpha\in\mathbb R$ exists. As $b$ is an iupper bound, we have $\alpha\le b$. And as $a\in S$, we have $\alpha\ge a$. In other words, $\alpha\in [a,b]$. So $\alpha$ is in the domain of $f$ in the first place and $f(\alpha)$ is defined. Now we can show that $f(\alpha)=0$, and can do so as you planned by leading $f(\alpha)>0$ (and also $f(\alpha)<0$) to a contradiction.
Assume $f(\alpha)>0$. Then $\alpha\ne a$. By continuity, for the choice $\epsilon:=f(\alpha)>0$, there exists a $\delta>0$ such that for all $x$ with $a\le x\le b$ and $|x-\alpha|<\delta$, we have $|f(x)-f(\alpha)|<\epsilon$ and hence $f(x)>0$. As $\alpha>a$ we may assume wlog that $\delta<\alpha-a$. Then any $x\in(\alpha-\delta,\alpha)$ is an upper bound for $S$ and is smaller than $\alpha$ - contradiction! The argument against $f(\alpha)<0$ is similar.
A: Here is other way (Particularly I find this way much simpler to understand): 
Define $S= \{x\in [a,b]: f(x)<0\}$. $S$ is non-empty because $a\in S$, since $f(a)<0$, also $S$ is bounded above, indeed is bounded by $b$. By the least upper bound principle the supremum $s= \sup S$ exists and is finite.  Since $S$ is bounded by $b$ we know that $s\le b$ and  since $a\in S$, $a\le s$. It follows that $s\in [a,b]$.
The idea to show that $f(s)=0$ is to work from the left to show that $f(s)\le 0$ and from the right to show $0\le f(s)$. Let makes this idea precise.
For any given $n\in \mathbb{N}\setminus \{0\}$, there is a $x\in S$ such that $s-1/n<x$ (since $s-1/n$ is not the lub). Let $(x_n)$ be a sequence of these numbers then $f(x_n)\to f(s)$ by continuity. Since $x_n\in S$, so $\lim_n f(x_n) =f(s)\le 0$.  
To conclude we only need to show that $0\le f(s)$. Since $f(s) <f(b)$, clearly $s\not= b$, actually $s<b$, in particular there is a sufficient large $N$ such that $s+1/n<b$ for all $n\ge N$. Thus $s+1/n \notin S$, but $s+1/n\in [a,b]$ for all $n\ge N$. So $f(s+1/n)\ge0$ and then $\lim_n f(s+1/n)=f(s)\ge 0$, which is exactly what we wanted to prove.
A: I have presented many proofs of properties of continuous function on my blog but I will try to continue with your approach which in my opinion is started off correctly by forming set $S$ and getting its least upper bound $\alpha$. The problem with your approach is in the last stage when you try to derive a contradiction by assuming that $f(\alpha) < 0$.
This can be salvaged provided you understand a local property of continuous functions:

If $f$ is continuous at a point $a$ and $f(a) \neq 0$ then $f(x)$ maintains its sign in a neighborhood containing $a$.

In other words if $f(a) > 0$ then there is an interval containing $a$ where $f(x) > 0$ and if $f(a) < 0$ then there is an interval around $a$ where $f(x) < 0$. This is called the sign preserving property of continuous functions. You should be able to prove this by using standard definition of continuity namely that for every $\epsilon > 0$ we have a $\delta > 0$ such that $f(a) - \epsilon < f(x) < f(a) + \epsilon$ for all $x \in (a - \delta, a + \delta)$.
So let's assume that $f(\alpha) < 0$. Clearly $a < \alpha < b$ and therefore there is an interval around $\alpha$ say of the form $(\alpha - h, \alpha + h) \subseteq [a, b]$ where $f(x) < 0$. Therefore we can see that there are numbers $x > \alpha$ for which $f(x) < 0$ and all these numbers must lie in $S$. Then $S$ contains numbers greater than $\alpha$ which is contrary to the fact that $\alpha$ is the least upper bound of $S$. The above proof can be adapted for the case when $f(\alpha) > 0$. So we are only left with the option that $f(\alpha) = 0$.
