In some problem from my differential equations course, I stated that, given $f(x)$ a continuous function defined in a compact set $K$,
$$\sup_{x\in K} \{ \max_{x\in K}\{f(x)\}\} = \sup_{x\in K}\{f(x)\}.$$ Is this true? Is it trivial? If it's false, could you give a counterexample? Any help will be appreciated, thanks in advance.
$$\sup_{x\in K}f(x)=\max_{x\in K}f(x)=\sup_{x \in K}\max_{x\in K}f(x)$$ where the first equality is true since $K$ is compact(Weierstrass theorem) and the second is obvious since $\max_{x\in K}f(x)$ is constant