Topological Continuous Functions Let $Y$ be an ordered set in the order topology. Let $f,g:X\to Y$ be continuous.
(a) Show that the set $\{x\mid f(x)\le g(x)\}$ is closed in $X$.
(b) Let $h:X\to Y$ be the function $h(x)=\min\{f(x),g(x)\}$. Show that $h$ is continuous. [Hint: Use the pasting lemma.]
Looking for reasons as to why this proof fails, or is not entirely complete.
Let $v=\{f(x)\mid f(x)\leq g(x)\}$, then $Y-v=\{f(x)\mid f(x)>g(x)\}$ which is an open set in $Y$, thus $v$ is a closed set in $Y$. By Thm 18.1 (see bottom) $f^{-1}(v)=u$ where $u=\{x\mid f(x)\leq g(x)\}$ and thus is a closed set.
Thm 18.1: a continous function takes closed sets to closed set.
 A: (b) follows from the pasting lemma as soon as we have shown (a):
Let $A = \{x: f(x) \le g(x)\}$, $B = \{x: g(x) \le f(x)\}$. They are both closed by two applications of a). Also $h | A = f$ by definition and $h | B = g$ and so on both sets $h$ restricted is continuous. As we have a linear order, for any $x$, we always have $f(x) \le g(x)$ or $g(x) \le f(x)$ (or both when $f(x)= g(x)$). So $A \cup B = X$. The pasting lemma for finitely many closed sets now says that $h$ is continuous on $X$.
(a) would follow from the following lemma: 
If $Y$ is an ordered topological space, $L = \{(y,y') \in Y^2: y \le y'\}$ is closed in $Y^2$.
Assuming this lemma, (a) follows from standard facts on the product topology:
The function $f \nabla g: X \rightarrow Y \times Y$ defined by $(f \nabla g)(x) = (f(x), g(x))$ is continuous (as the compositions $\pi_1 \circ (f \nabla g) = f, \pi_2 \circ (f \nabla g) = g$ are both continuous). And by definition:
$$\{x: f(x) \le g(x)\} = (f \nabla g)^{-1}[L]$$
and the inverse image of a closed set under a continuous function is closed.
Now prove the lemma from the definition of the product topology and the ordered topology. 
