I need to prove the intermediate value theorem using the following lemma:

Lemma: Let be a transitive relation on the interval . If each has a neighborhood such that whenever and , then .

So, the main goal is to actaully produce a transitive relation , but I am having no such luck. I'd assume or ought to work, but I am not sure what other conditions are needed to make the relation work in the proof.

Also, does this prove the lemma given above?

Let be arbitray and be a transitive relation on . By our hypothesis, we can find a neighborhood of such that whenever and . But, if we condsider the set it is clear that exists and because is compact . Since must share a transitive relation with and a transitive relation with , it must be that case that .

Note: I have posted this question in the analysis thread, but I thought it might actaully fit better here, given it really comes down to using the proper relation.

Thanks