If $f$ is continuous on $[a,b]$ and every point of $[a,b]$ is a local maximum point, then $f$ is a constant function. Claim to prove:

If $f$ is continuous on $[a,b]$ and every point of $[a,b]$ is a local maximum point, then $f$ is a constant function.

I think I have a valid argument, which I will include below, but it strikes me as a little clunky. If there are alternative basic methods (I think there are topology arguments, which are foreign to me, so preferably not those), please share.

We will prove that for any $c_1, c_2 \in [a,b]: f(c_1)=f(c_2)$, which is equivalent to saying that there is a constant $k$ such that for any $x\in[a,b]: f(x)=k$...i.e. $f$ is a constant function on $[a,b]$.
To do this, we will show that the following two statements are true:
$\left [\forall x \in [c_1,c_2): \exists \delta_x \gt 0 : \forall y \in [x,x+\delta_x):f(x) \geq f(y) \right ] \rightarrow \left [\forall x \in [c_1,c_2]: f(x) \leq f(c_1) \right] \quad(*)$
$\left [\forall x \in (c_1,c_2]: \exists \delta_x \gt 0 : \forall y \in (x-\delta_x,x]:f(y) \leq f(x) \right ] \rightarrow \left [ \forall x \in [c_1,c_2]: f(x) \leq f(c_2)\right] \quad(**)$
Together, these two statements ensure that $f(c_1)=f(c_2)$, which will then prove our overarching claim specific to the interval $[a,b]$.

To prove $(*)$, consider the set
$S= \left\{x\in[c_1,c_2]: \forall y \in [c_1,x] \big(f(y) \leq f(c_1)\big)\right\}$.
$c_1 \in S$ and therefore $S$ is non-empty. Further, $S$ has an upper bound of $c_2$. Therefore $S$ has a least upper bound $\alpha$. Note that because $[c_1,c_2] \subseteq [a,b]$, $\alpha \in [a,b]$.
Suppose $\alpha=c_1$. Firstly, we must have $\alpha \in S$, but this is not possible because, by assumption, there is a right neighborhood of $\alpha$ that includes elements all $\leq f(c_1)$, which would disqualify $\alpha$ as an upper bound. So $\alpha \neq c_1$.
Next, suppose $\alpha = x \in (c_1,c_2)$. If $\alpha \in S$, we will encounter a similar issue as above. So $\alpha \notin S$, which means that $f(\alpha) \gt f(c_1)$. By continuity of $f$ on the interval $[c_1,c_2]$, we can apply the Intermediate Value Theorem (IVT) on the interval $[c_1,\alpha]$. In particular, there must be an $x \in (c_1,\alpha)$ such that $f(x)=\frac{f(\alpha)+f(c_1)}{2} \gt f(c_1)$, but this would mean that $x \notin S$. Moreover, for any $x' \gt x$, we must then have $x' \notin S$. As such, $\alpha$ would be disqualified as being the least upper bound. Therefore, $\alpha = c_2$.
Suppose $\alpha=c_2 \notin S$. A similar argument using the IVT on the interval $[c_1,\alpha]$ would, once again, lead to a contradiction. So $\alpha \in S$, which means $c_2 \in S$. Therefore, for all $x \in [c_1,c_2]: f(x) \leq f(c_1)$, proving $(*)$.
A similar structured argument (using the greatest lower bound $\beta$) working from right to left will prove $(**)$. Use the set $S= \left\{x\in[c_1,c_2]: \forall y \in [y,c_2] \big(f(y) \leq f(c_2)\big)\right\}$.
Together, we then have that $f(c_1)=f(c_2)$. These two points were arbitrary elements of $[a,b]$, so we can generalize and reach our desired conclusion.
 A: The function $f$ is continuous on the compact $[a,b]$, so it achieves its global minimum at a point $m\in[a,b]$. Now $C:=\{x\in[a,b]: f(x)=f(m)\}$ is non-empty ($m\in C$), closed in $[a,b]$ (it is equal to $f^{-1}\langle\{f(m)\}\rangle$ and $f$ is continuous), and open in $[a,b]$ (because any $x\in C$ is a local maximum point, so $f(m)=f(x)\ge f(t)\ge f(m)$ for all $t$ sufficiently close to $x$). Since $[a,b]$ is a connected set, this proves that $C=[a,b]$.
A: 
If f is continuous on [a,b] and every point of [a,b] is a local maximum point, then f is a constant function.

an heuristic approach could be this one:

*

*basic idea: choose a random point, $p$, then check if $p-1$, and $p+1$ are the same point, then repeat that with every points.

this could result in an infinite sequence in which you add a small value over and over again, until you reach the bounds of the function.
$\sum_{i=0}^n f(x_i) = f(x_p)$,  where x_p are the next points and the past points to be checked.
the sum could be updated like a for-loop in coding, instead of a constant n, you could put a condition to be satisfied: if it's true, then go inside the summation body; otherwise go outside.
