# Continuity of a function (upper envelope)

Suppose $$n,m\geq 1$$ and let $$A\subset \mathbb{R}^m$$ compact. Let $$f:\mathbb{R}^n\times A\to \mathbb{R}^n$$ and $$l:\mathbb{R}^n\times A\to \mathbb{R}$$ such that

• $$f$$ is continuous and there exist $$L_f,M_f>0$$ such that $$\left\lVert f(x_1,a)-f(x_2,a)\right\rVert \leq L_f\left\lVert x_1-x_2\right\rVert,\qquad\left\lVert f(x_1,a)\right\rVert \leq M_f$$ for all $$x_1,x_2 \in \mathbb{R}^n$$ and $$a\in A$$.

• $$l$$ is continuous, and there exist a modulus of continuity $$w_l$$ and $$M_l>0$$ such that $$|l(x_1,a)-l(x_2,a)| \leq w_l(\left\lVert x_1-x_2\right\rVert)\qquad |l(x_1,a)|\leq M_l$$ for all $$x_1,x_2 \in \mathbb{R}^n$$ and $$a\in A$$.

Fix $$\lambda>0$$. I have to prove that the function $$F:\mathbb{R}^n\times\mathbb{R}\times\mathbb{R}^n\to\mathbb{R}$$ such that $$F(x,z,p)=\lambda z+\sup_{a \in A}\{-p\cdot f(x,a)-l(x,a)\}$$ for all $$(x,z,p)\in \mathbb{R}^n\times\mathbb{R}\times\mathbb{R}^n$$ is continuous.

Certainly $$F$$ is well posed since for every $$(x,p)$$ we have $$\left|\sup_{a \in A}\{-p\cdot f(x,a)-l(x,a)\}\right|\leq (\left\lVert p\right\rVert M_f+M_l).$$

I'm a little bit confused about how to proceed in order to prove continuity.

For $$x,p\in\mathbb R^n$$ and $$a\in A$$, denote $$H(x,p,a)=-p\cdot f(x,a)-l(x,a)$$ and $$G(x,p)=\sup\{H(x,p,a)\!:a\in A\}$$. Let $$x_1,p_1\in\mathbb R^n$$ and $$\varepsilon>0$$ be fixed. Then there exists $$\delta>0$$ such that $$\big(\!\left\|p_1\right\|L_f+M_f\big)\delta+\omega_l(\delta)\le\varepsilon.$$ If $$\left\|x_1-x_2\right\|\le\delta$$ and $$\left\|p_1-p_2\right\|\le\delta$$ then for all $$a\in A$$ we have $$\big|H(x_1,p_1,a)-H(x_2,p_2,a)\big|\le\big|p_1\cdot f(x_1,a)-p_1\cdot f(x_2,a)\big|+\big|p_1\cdot f(x_2,a)-p_2\cdot f(x_2,a)\big|+\big|l(x_1,a)-l(x_2,a)\big|\le\left\|p_1\right\|\big\|f(x_1,a)-f(x_2,a)\big\|+\left\|p_1-p_2\right\|\big\|f(x_2,a)\big\|+\omega_l(\left\|x_1-x_2\right\|)\le\big(\!\left\|p_1\right\|L_f+M_f\big)\delta+\omega_l(\delta)\le\varepsilon,$$ hence $$H(x_1,p_1,a)\le G(x_2,p_2)+\varepsilon$$ and $$H(x_2,p_2,a)\le G(x_1,p_1)+\varepsilon$$. It folows that $$G(x_1,p_1)\le G(x_2,p_2)+\varepsilon$$ and $$G(x_2,p_2)\le G(x_1,p_1)+\varepsilon$$, hence $$\big|G(x_1,p_1)-G(x_2,p_2)\big|\le\varepsilon$$.
This implies the continuity of $$G$$. The continuity of $$F$$ follows easily.