Proof: We first prove that if is increasing, then and . Indeed, suppose that and . By definition of supremum and infimum, for each the sets and contain some points. Hence, so do the sets and . By continuity of , whenever is arbitrary and is sufficiently small, and . Since , we obtain and . On the other hand, for we have by monotonicity, so that and .
If is decreasing instead, then is increasing, so that . Similarly .