Suppose there is function $f:\mathbb{R}^n \to \mathbb{R}$. We say that it is upper semicontinuous at point $x$ if $\lim\sup_{y\to x}f(y) \le f(x)$, which means that $$ \forall \epsilon>0, \quad \exists \delta > 0, \text{ such that } |x-y| < \delta \implies f(y) \le f(x) + \epsilon \,. $$ Now given $g:\mathbb{R}^n \to \mathbb{R}$ and $r>0$, we define $h$ as $$ h(x) = \inf\{g(y): y \in B_r(x)\} \,. $$ Here $B_r(x)$ is an open ball centered at $x$ with radius $r$ in $\mathbb{R}^n$. how to prove $h(x)$ is upper semicontinuous ?
My thinking: I split the proof into two cases.
Case I: if the infimum is obtained at some $y'\in B_r(x)$. Let the distance between $y'$ and $x$ be $d$. Then we have $y'\in B_r(c)$ for any $c\in B_{r-d}(x)$ because $|y'-c|\le |y'-x| + |x-c| \le d + (r-d) = r$. So $h(c) \le h(x)$.
Case II : if the infimum is obtained at some border of $B_r(x)$. What to do in this case ?
Also, I am week in using mathematical language. how to express my argument strictly ?