# Given a pair of continuous functions from a topological space to an ordered set, how to prove that this set is closed?

Given that $X$ is an arbitrary topological space, $Y$ is a totally ordered set in the order topology, and $f$, $g \colon X \to Y$ are continuous, how to show that the subset $A$ of $X$ given by $$A := \{ x \in X \colon f(x) \leq g(x) \}$$ is closed in $X$?

-

You can prove it directly from the definitions. Let $U=X\setminus A=\{x\in X:f(x)>g(x)\}$; we need only prove that $U$ is open. Let $x\in U$ be arbitrary; we’ll find an open nbhd of $x$ contained in $U$. Since $x\in U$, we know that $g(x)<f(x)$. There are now two cases.

1. There is some $a\in Y$ such that $g(x)<a<f(x)$. Let $$V=g^{-1}\big[(\leftarrow,a)\big]\quad\text{and}\quad W=f^{-1}\big[(a,\to)\big]\;.$$ Then $V\cap W$ is an open nbhd of $x$ (why?), and for each $y\in V\cap W$ we have $g(y)<a<f(y)$, so $V\cap W\subseteq U$.

2. The interval $\big(g(x),f(x)\big)$ in $Y$ is empty. Then let $$V=g^{-1}\big[(\leftarrow,f(x))\big]\quad\text{and}\quad W=f^{-1}\big[(g(x),\to)\big]$$ and argue almost exactly as in the first case.

-
your answers are so instructive and illuminating!! How much I've benefitted from your presence on this forum!! God bless you!! –  Saaqib Mahmuud Mar 24 at 6:36
@Saaqib: Thank you! –  Brian M. Scott Mar 24 at 6:38

The set $\{(x,y)\in Y^2\mid x\le y\}$ is closed in $Y^2$ and $X\to Y^2, x\mapsto (f(x),g(x))$ is continuous.

-
how is the set $\{ (x,y) \in Y^2 \ \vert \ x \leq y \ \}$ is closed in $Y^2$? –  Saaqib Mahmuud Mar 24 at 6:41