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

First, I am not sure how exactly to prove the lemma, which is the first part of my problem. Here are my thoughts:

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 .

IVT proof: The thing is, I know how to prove the IVT without the use of this lemma, but I end up getting all mixed when I try to apply it. I know that I have to find the transitive relation that works, so I have been trying to use alone, but I need to add on some more conitions to the relation. So, basically I need some help finding the relation and how to apply it.

Thanks alot