Is Lower Envelope of Compact and Convex Set always continuous? From a picture in $\mathbb{R}^2$, say a square $[0, 1]\times [0, 1]$, the lower envelope of the square is $[0, 1]\times 0$ and can be seen as a continuous function over $[0, 1]$. I wonder if there exists a general theorem proving this intuition or there exist some examples showing things might go wrong. Thanks in advance.
 A: For a compact and connected set $S \subset \Bbb R^2$ the projection of $S$ onto the x-axis is a compact interval $[a, b] \subset \Bbb R$, and one can define the lower envelope of $S$ as the function
$$
f: [a, b] \to \Bbb R, f(x) = \min \{ y \mid (x, y) \in S \} \, .
$$
$f$ is not necessarily continuous, but in the case of a convex set $S$ it is. Here is a proof in three steps. (We can exclude the degenerate case by assuming that $a < b$).

Step 1. $f$ is lower
semi-continuous, i.e.
$$  \liminf_{x \to x_0} f(x) \ge f(x_0) $$ for all $x_0 \in [a, b]$.

Proof: If $x_0 \in [a, b]$ and $(x_n)$ is a sequence in $[a, b]\setminus \{ x_0 \}$ with $x_n \to x_0$ and $f(x_n) \to \liminf_{x \to x_0} f(x)$ then
$$
 \forall n: (x_n, f(x_n)) \in K 
\implies (x_0, \liminf_{x \to x_0} f(x)) \in K 
$$
and that implies $f(x_0) \le \liminf_{x \to x_0} f(x)$.

Step 2. If, in addition,  $S$ is convex, then $f$ is convex.

Proof: Consider $x, y \in [a, b]$ with $x < y$. Then $(x, f(y)) \in S$ and $(x, f(y)) \in S$, so that for $0 < \lambda < 1$
$$
 ((1-\lambda)x + \lambda y, (1-\lambda)f(x) + \lambda f(y)) \in S
$$
and that implies
$$
 f((1-\lambda)x + \lambda y) \le (1-\lambda)f(x) + \lambda f(y) \, .
$$
Remark: It is known this implies that $f$ is continuous on $(a, b)$, but that does not help at the boundary points.

Step 3. A convex function $f: [a, b] \to \Bbb R$ is upper semi-continuous, i.e.
$$  \limsup_{x \to x_0} f(x) \le f(x_0) $$ for all $x_0 \in [a, b]$.

Proof: Let $a \le x_0 < x_1 \le b$. Then
$$
 f(x) \le \frac{x_1-x}{x_1-x_0}f(x_0) + \frac{x-x_0}{x_1-x_0}f(x_1)
$$
for $x_0 < x < x_1$, and that implies
$$
 \limsup_{x \to x_0+} f(x) \le f(x_0) 
$$
and
$$
 \limsup_{x \to x_1-} f(x) \le f(x_0) \, .
$$
Combining these three results, we see that if $S$ is compact and convex then its lower envelope function is both upper and lower semicontinuous, and therefore continuous.
