Continuous function satisfying $ f\left(\dfrac{x+t}{2}\right) \le f(x) + f(t)$ inequality must be $0$ Let $f$ a real function defined and continuous on $[0,1]$ such that
$$f(0)=f(1)=0$$
$$ f\left(\dfrac{x+t}{2}\right) \le f(x) + f(t)$$ for all $x,t$

prove that $f$ is zero.

My try was proving first that f is nonnegative (no problem) then using the fact that $f([0,1]) = [0,M]$ try to prove that $M$ must be zero.
by contradiction if I assume that $M=f(\alpha)>0$ then continuity of $f$ must be positive on a whole neighbourhood of $\alpha$. but then I was stuck, trying to draw from here a contradiction.
Any advice would be greatly appreciated.

Hint
Let $f:[0,1]\to \mathbb R$ be continuous and s.t. $$f\left(\frac{x+t}{2}\right)\leq f(x)+f(t),\tag{P}$$
for all $x,t\in [0,1]$.

*

*Let $\mathcal D=\bigcup_{n\in\mathbb N}\left\{\frac{k}{2^n}\mid k\in\{0,...,2^n\}\right\},$ the set of dyadic numbers in $[0,1]$. It's a dense set in $[0,1]$.


*Using $\text{(P)}$, one can prove that $f(x)\geq 0$ for all $x\in [0,1]$ and that $f(u)=0$ for all $u\in \mathcal D$.


*Using a density argument, it follows that $f\equiv 0$.
