# Show that upper semicontinuous envelope satisfies triangle inequality

Let $X$ be a metric space. For any extended real-valued function $f:X\rightarrow \mathbb{R} \cup \{ -\infty,\infty \}$, we define its upper semicontinuous envelope $Uf$ as follows:

For each $x \in X,$ $Uf(x)=\inf \{ \sup_{y \in U} f(y): U \text{ is a neighbourhood of } x\}.$

Prove that for any two extended real-valued functions $f,g$ defined on $X$, upper semicontinuous envelope satisfies sub-additivity: $U(f+g) \leq Uf + Ug.$

Intuitively, I know that it cannot be $U(f+g) > Uf + Ug$> For example, $f = \chi_{\{ 0 \}}$ and $g = -\chi_{\{ 0 \}}$. Then $Uf =f$ and $Ug = 0$. But $U(f+g) = U(0) = 0.$

My attempt in showing $U(f+g) \leq Uf + Ug.$

For each $x \in X$ and its neighbourhood $U$, we have $\sup_{y \in U}(f(y)+g(y)) \leq \sup_{z \in U} f(z) + \sup_{v \in U} g(v).$ Then I stuck here. I do not know whether we can just take infimum on both sides and conclude it.

You can. But to write it out in more details, let's take $\epsilon>0$ and pick neighborhoods $V, W$ of $x$ such that $$Uf(x) > \sup_V f - \epsilon, \quad \text{and }\ Ug(x)>\sup_W g-\epsilon$$ The intersection $V\cap W$ is also a neighborhood of $x$, and in this neighborhood $f+g$ is bounded by $\sup_Vf+\sup_W g$. Hence, $$U(f+g) \le \sup_Vf+\sup_W g$$ which together with the above imply $$U(f+g) < Uf(x)+Ug(x) + 2\epsilon$$ Since $\epsilon>0$ can be arbitrarily small, the claim follows.