Question: Prove for $f,g$ continuous on a metric space $(X,d)$ then $h(x) = \text{min}\{f(x), g(x)\}$ is continuous.
I've proved for the case of $h(x) = \text{max}\{f(x), g(x)\}$, and min follows almost identically. However, I am unsure if case 2 is correct in the proof below:
Proof: Let $\epsilon > 0$ and suppose there exists some point $a \in X$. We have $f$ is continuous so it is continuous at $a$. Then there exists a $\delta_f$ such that $$|x - a| < \delta_f ~~~~~\text{and}~~~~~ |f(x) - f(a)| < \epsilon.$$ By the same argument for $g$, there exists a $\delta_g$ such that $$|x - a| < \delta_g ~~~~~\text{and}~~~~~ |g(x) - g(a)| < \epsilon.$$ Now we show that $h$ is continuous at $a$. Let $\delta = \text{min}\{\delta_f, \delta_g\}$ such that $|x - a| < \delta$. Suppose $h(a) = f(a)$ and $f(a) \leq g(a)$. Then we have two cases.
Case 1: $h(x) = f(x)$.
$|h(x) - h(a)| = |f(x) - f(a)| < \epsilon$, and $h$ is continuous at $a$.
Case 2: $h(x) = g(x)$, which occurs iff $g(x) \leq f(x)$. Thus, $$g(x) - g(a) \leq g(x) - f(a) \leq f(x) - f(a) < \epsilon.$$ But, we also have that $g(x) - g(a) > -\epsilon$. Hence, $|h(x) - h(a)| = |g(x) - f(a)| < \epsilon$. Therefore, $h$ is continuous at $a$, and is a continuous function.