Let $X$ be a separable metric space (but I suppose a paracompact space might be enough) and let $f , g : X \to \mathbb{R}$ be functions such that:
- $f$ is upper semi-continuous,
- $g$ is lower semi-continuous,
- $0 \leq f(x) \leq g(x) \leq 1$ for every $x \in X$,
- $f(x)<1$ for every $x \in X$,
- $g(x)>0$ for every $x \in X$.
I'm trying to prove that there exists a continuous function $h : X \to \mathbb{R}$ such that $f(x) \leq h(x) \leq g(x)$ and $0<h(x)<1$ for every $x \in X$.
By the Michael selection theorem used for the set-valued mapping $x \mapsto \big\lbrace t \in \mathbb{R} : f(x) \leq t \leq g(x) \big\rbrace$, we obtain a continuous function $h : X \to \mathbb{R}$ such that $f(x) \leq h(x) \leq g(x)$. However, this function $h$ might not satisfy the condition $0<h(x)<1$.
I'll appreciate any help.
There is a variant of the Michael theorem you've used:
This is Theorem 3.1''' from E. Michael, "Continuous selections I", Ann. of Math. 63 (1956) 361–382.
Note that we don't require the set-valued mapping to have closed values (although this only works with $\mathbb{R}$ on the right side). Also we can drop both separable and paracompact assumptions on $X$, metrizable is enough. With that we can use a different set-valued mapping:
$$\varphi(x)=\begin{cases} \big\{f(x)\big\} &\text{if }f(x)=g(x)\\ \big\{f(x)<t<g(x)\big\} &\text{otherwise} \end{cases}$$
The crucial observation is that $\varphi$ satisfies the above variant of the Michael theorem. The rest follows easily.