Semi-continuity

In mathematical analysis, semicontinuity (or semi-continuity) is a property of extended real-valued functions that is weaker than continuity. An extended real-valued function $$f$$ is upper (respectively, lower) semicontinuous at a point $$x_0$$ if, roughly speaking, the function values for arguments near $$x_0$$ are not much higher (respectively, lower) than $$f\left(x_0\right).$$

A function is continuous if and only if it is both upper and lower semicontinuous. If we take a continuous function and increase its value at a certain point $$x_0$$ to $$f\left(x_0\right) + c$$ for some $$c>0$$, then the result is upper semicontinuous; if we decrease its value to $$f\left(x_0\right) - c$$ then the result is lower semicontinuous.



The notion of upper and lower semicontinuous function was first introduced and studied by René Baire in his thesis in 1899.

Definitions
Assume throughout that $$X$$ is a topological space and $$f:X\to\overline{\R}$$ is a function with values in the extended real numbers $$\overline{\R}=\R \cup \{-\infty,\infty\} = [-\infty,\infty]$$.

Upper semicontinuity
A function $$f:X\to\overline{\R}$$ is called upper semicontinuous at a point $$x_0 \in X$$ if for every real $$y > f\left(x_0\right)$$ there exists a neighborhood $$U$$ of $$x_0$$ such that $$f(x)<y$$ for all $$x\in U$$. Equivalently, $$f$$ is upper semicontinuous at $$x_0$$ if and only if $$\limsup_{x \to x_0} f(x) \leq f(x_0)$$ where lim sup is the limit superior of the function $$f$$ at the point $$x_0$$.

A function $$f:X\to\overline{\R}$$ is called upper semicontinuous if it satisfies any of the following equivalent conditions:
 * (1) The function is upper semicontinuous at every point of its domain.
 * (2) All sets $$f^{-1}([ -\infty ,y))=\{x\in X : f(x)<y\}$$ with $$y\in\R$$ are open in $$X$$, where $$[ -\infty ,y)=\{t\in\overline{\R}:t<y\}$$.
 * (3) All superlevel sets $$\{x\in X : f(x)\ge y\}$$ with $$y\in\R$$ are closed in $$X$$.
 * (4) The hypograph $$\{(x,t)\in X\times\R : t\le f(x)\}$$ is closed in $$X\times\R$$.
 * (5) The function is continuous when the codomain $$\overline{\R}$$ is given the left order topology. This is just a restatement of condition (2) since the left order topology is generated by all the intervals $$[ -\infty,y)$$.

Lower semicontinuity
A function $$f:X\to\overline{\R}$$ is called lower semicontinuous at a point $$x_0\in X$$ if for every real $$y < f\left(x_0\right)$$ there exists a neighborhood $$U$$ of $$x_0$$ such that $$f(x)>y$$ for all $$x\in U$$. Equivalently, $$f$$ is lower semicontinuous at $$x_0$$ if and only if $$\liminf_{x \to x_0} f(x) \ge f(x_0)$$ where $$\liminf$$ is the limit inferior of the function $$f$$ at point $$x_0$$.

A function $$f:X\to\overline{\R}$$ is called lower semicontinuous if it satisfies any of the following equivalent conditions:
 * (1) The function is lower semicontinuous at every point of its domain.
 * (2) All sets $$f^{-1}((y,\infty ])=\{x\in X : f(x)>y\}$$ with $$y\in\R$$ are open in $$X$$, where $$(y,\infty ]=\{t\in\overline{\R}:t>y\}$$.
 * (3) All sublevel sets $$\{x\in X : f(x)\le y\}$$ with $$y\in\R$$ are closed in $$X$$.
 * (4) The epigraph $$\{(x,t)\in X\times\R : t\ge f(x)\}$$ is closed in $$X\times\R$$.
 * (5) The function is continuous when the codomain $$\overline{\R}$$ is given the right order topology. This is just a restatement of condition (2) since the right order topology is generated by all the intervals $$(y,\infty ] $$.

Examples
Consider the function $$f,$$ piecewise defined by: $$f(x) = \begin{cases} -1  & \mbox{if } x < 0,\\ 1  & \mbox{if } x \geq 0 \end{cases}$$ This function is upper semicontinuous at $$x_0 = 0,$$ but not lower semicontinuous.

The floor function $$f(x) = \lfloor x \rfloor,$$ which returns the greatest integer less than or equal to a given real number $$x,$$ is everywhere upper semicontinuous. Similarly, the ceiling function $$f(x) = \lceil x \rceil$$ is lower semicontinuous.

Upper and lower semicontinuity bear no relation to continuity from the left or from the right for functions of a real variable. Semicontinuity is defined in terms of an ordering in the range of the functions, not in the domain. For example the function $$f(x) = \begin{cases} \sin(1/x) & \mbox{if } x \neq 0,\\ 1        & \mbox{if } x = 0, \end{cases}$$ is upper semicontinuous at $$x = 0$$ while the function limits from the left or right at zero do not even exist.

If $$X = \R^n$$ is a Euclidean space (or more generally, a metric space) and $$\Gamma = C([0,1], X)$$ is the space of curves in $$X$$ (with the supremum distance $$d_\Gamma(\alpha,\beta) = \sup\{d_X(\alpha(t),\beta(t)):t\in[0,1]\}$$), then the length functional $$L : \Gamma \to [0, +\infty],$$ which assigns to each curve $$\alpha$$ its length $$L(\alpha),$$ is lower semicontinuous. As an example, consider approximating the unit square diagonal by a staircase from below. The staircase always has length 2, while the diagonal line has only length $$\sqrt 2$$.

Let $$(X,\mu)$$ be a measure space and let $$L^+(X,\mu)$$ denote the set of positive measurable functions endowed with the topology of convergence in measure with respect to $$\mu.$$ Then by Fatou's lemma the integral, seen as an operator from $$L^+(X,\mu)$$ to $$[-\infty, +\infty]$$ is lower semicontinuous.

Properties
Unless specified otherwise, all functions below are from a topological space $$X$$ to the extended real numbers $$\overline{\R}= [-\infty,\infty].$$ Several of the results hold for semicontinuity at a specific point, but for brevity they are only stated for semicontinuity over the whole domain.


 * A function $$f:X\to\overline{\R}$$ is continuous if and only if it is both upper and lower semicontinuous.
 * The indicator function of a set $$A\subset X$$ (defined by $$\mathbf{1}_A(x)=1$$ if $$x\in A$$ and $$0$$ if $$x\notin A$$) is upper semicontinuous if and only if $$A$$ is a closed set. It is lower semicontinuous if and only if $$A$$ is an open set.


 * The sum $$f+g$$ of two lower semicontinuous functions is lower semicontinuous (provided the sum is well-defined, i.e., $$f(x)+g(x)$$ is not the indeterminate form $$-\infty+\infty$$). The same holds for upper semicontinuous functions.
 * If both functions are non-negative, the product function $$f g$$ of two lower semicontinuous functions is lower semicontinuous. The corresponding result holds for upper semicontinuous functions.
 * A function $$f:X\to\overline{\R}$$ is lower semicontinuous if and only if $$-f$$ is upper semicontinuous.
 * The composition $$f \circ g$$ of upper semicontinuous functions is not necessarily upper semicontinuous, but if $$f$$ is also non-decreasing, then $$f \circ g$$ is upper semicontinuous.
 * The minimum and the maximum of two lower semicontinuous functions are lower semicontinuous. In other words, the set of all lower semicontinuous functions from $$X$$ to $$\overline{\R}$$ (or to $$\R$$) forms a lattice.  The same holds for upper semicontinuous functions.
 * The (pointwise) supremum of an arbitrary family $$(f_i)_{i\in I}$$ of lower semicontinuous functions $$f_i:X\to\overline{\R}$$ (defined by $$f(x)=\sup\{f_i(x):i\in I\}$$) is lower semicontinuous.


 * In particular, the limit of a monotone increasing sequence $$f_1\le f_2\le f_3\le\cdots$$ of continuous functions is lower semicontinuous. (The Theorem of Baire below provides a partial converse.)  The limit function will only be lower semicontinuous in general, not continuous.  An example is given by the functions $$f_n(x)=1-(1-x)^n$$ defined for $$x\in[0,1]$$ for $$n=1,2,\ldots.$$


 * Likewise, the infimum of an arbitrary family of upper semicontinuous functions is upper semicontinuous. And the limit of a monotone decreasing sequence of continuous functions is upper semicontinuous.


 * (Theorem of Baire) Assume $$X$$ is a metric space.  Every lower semicontinuous function $$f:X\to\overline{\R}$$ is the limit of a monotone increasing sequence of extended real-valued continuous functions on $$X$$; if $$f$$ does not take the value $$-\infty$$, the continuous functions can be taken to be real-valued.


 * And every upper semicontinuous function $$f:X\to\overline{\R}$$ is the limit of a monotone decreasing sequence of extended real-valued continuous functions on $$X$$; if $$f$$ does not take the value $$\infty,$$ the continuous functions can be taken to be real-valued.


 * If $$C$$ is a compact space (for instance a closed bounded interval $$[a, b]$$) and $$f : C \to \overline{\R}$$ is upper semicontinuous, then $$f$$ has a maximum on $$C.$$ If $$f$$ is lower semicontinuous on $$C,$$ it has a minimum on $$C.$$
 * (Proof for the upper semicontinuous case: By condition (5) in the definition, $$f$$ is continuous when $$\overline{\R}$$ is given the left order topology. So its image $$f(C)$$ is compact in that topology.  And the compact sets in that topology are exactly the sets with a maximum.  For an alternative proof, see the article on the extreme value theorem.)


 * Any upper semicontinuous function $$f : X \to \N$$ on an arbitrary topological space $$X$$ is locally constant on some dense open subset of $$X.$$
 * Tonelli's theorem in functional analysis characterizes the weak lower semicontinuity of nonlinear functionals on Lp spaces in terms of the convexity of another function.