Any local minimum of convex function on convex set $U \subseteq \mathbb{R}^n$ is $\mathbf{global}$ minimum
Attempt:
Let $x \in U$ be a local minimum. Let $f: U \to \mathbb{R}$ be convex function. We want to show that $f(x) \leq f(z)$ for every $z \in U$. Suppose there is some $y \in U$ such that $f(y) < f(x)$. Now, since $f$ is convex, we know
$$ f( tx + ( 1 - t) y ) \leq t f(x) + (1 - t) f(y) $$
where $t \in [0,1]$. with $t = 1/2$, we see that
$$ f( (x+y)/2) \leq \frac{ f(x) + f(y) }{2} < \frac{ f(x) + f(x) }{2} = f(x) $$
but, here Im stuck. How can I obtain a contradiction from here? Is my approach correct?