Suppose I have a continuous, differentiable (univariate) function $f: \mathbb{R}_{>0}\rightarrow \mathbb{R}$, and I have a local maximum at, say, $x_0$. My intuition now is that in order for the point $x_0$ to not be the global maximum, $f$ should first decrease and then at some point increase again to reach a global maximum somewhere else, implying that there should be at least one local minimum.
How do I formally prove this intuition, that is, that in order for $x_0$ to not be the global maximum, there should be a local minimum? Is there a well-known theorem that implies this result?
Or is my intuition perhaps not correct, in which case, I would love to see a counter example.