# Axiom of Completeness to prove intermediate value theorem Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Axiom of Completeness to prove intermediate value theorem without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I am having a little trouble understanding one of the steps in this proof.
From Stephen Abbott’s Analysis:

Using AoC to prove the IVT:

TO simplify matters, consider \$f\$ as a continuous function which satisfies \$f(a)<0<f(b)\$
and show that \$f(c) =0 \$ for some \$c in (a,b)\$. First let

Clearly we can see \$K\$ satisfies the axiom of completeness, and thus we can let \$c = sup K\$

There are three cases to consider: \$f(c) > 0, f(c)<0 space text{and} space f(c) = 0\$

Part where I have difficulty understanding the proof
. The author states:

“Since \$c\$ is the least upper bound of \$K\$, we can rule out the first two cases.

I don’t understand how we can conclude this immediately?

Thinking about it, if \$f(c)>0\$, then \$c notin K\$ so this would contradict \$c\$ being a least upper bound.(Right?)

However, how can we rule out \$f(c)<0\$? Here \$c in K\$, which is a valid least upper bound?

As Wojuvu said, it does require an extra step of proof.

First of all, the claim

Thinking about it, if \$f(c)>0\$, then \$cnotin K\$ so this would contradict c being a least upper bound.(Right?)

is not quite true. The least upper bound of a set \$A\$ does not need to be an element of the set. (Take the set \$[0,1)\$ and its least upper bound \$1\$, for example.) We need to do something a bit more delicate.

To rule out the two cases \$f(c)>0\$ and \$f(c)<0\$ in the proof you will need to use the continuity of \$f\$. (Note that the theorem requires a continuous mapping, as can be seen with some examples of step-functions, and we have not yet used continuity.) For both cases the idea is similar: if, for example you would have \$f(c)>0\$, then you should be able to find an \$varepsilon > 0\$ such that for all points \$z in (c – varepsilon,c) \$ you have \$f(z) > 0\$. And this would be a contradiction with \$c\$ being the least upper bound.