# Semi-continuity

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

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 x0 to f(x0)+c (for some positive constant c), then the result is upper-semicontinuous; if we decrease its value to f(x0)-c then the result is lower-semicontinuous.

## Examples

An upper semi-continuous function. The solid blue dot indicates f(x0).

Consider the function f, piecewise defined by:

${\displaystyle f(x)={\begin{cases}-1&{\mbox{if }}x<0,\\1&{\mbox{if }}x\geq 0\end{cases}}}$

This function is upper semi-continuous at x0 = 0, but not lower semi-continuous.

A lower semi-continuous function. The solid blue dot indicates f(x0).

The indicator function of a closed set is upper semi-continuous, whereas the indicator function of an open set is lower semi-continuous. The floor function ${\displaystyle f(x)=\lfloor x\rfloor }$, which returns the greatest integer less than or equal to a given real number x, is everywhere upper semi-continuous. Similarly, the ceiling function ${\displaystyle f(x)=\lceil x\rceil }$ is lower semi-continuous.

A function may be upper or lower semi-continuous without being either left or right continuous. For example, the function

${\displaystyle f(x)={\begin{cases}1&{\mbox{if }}x<1,\\2&{\mbox{if }}x=1,\\1/2&{\mbox{if }}x>1,\end{cases}}}$

is upper semi-continuous at x = 1, since its value there is higher than its value in its neighborhood. However, it is neither left nor right continuous: The limit from the left is equal to 1 and the limit from the right is equal to 1/2, both of which are different from the function value of 2. If f is modified e.g. by setting f(1) = 0, then it is lower semi-continuous

Similarly the function

${\displaystyle f(x)={\begin{cases}\sin(1/x)&{\mbox{if }}x\neq 0,\\1&{\mbox{if }}x=0,\end{cases}}}$

is upper semi-continuous at x = 0 while the function limits from the left or right at zero do not even exist.

If ${\displaystyle X=\mathbb {R} ^{n}}$ is a Euclidean space (or more generally, a metric space) and ${\displaystyle \Gamma =C([0,1],X)}$ is the space of curves in ${\displaystyle X}$ (with the supremum distance ${\displaystyle d_{\Gamma }(\alpha ,\beta )=\sup _{t}\ d_{X}(\alpha (t),\beta (t))}$, then the length functional ${\displaystyle L:\Gamma \to [0,+\infty ]}$, which assigns to each curve ${\displaystyle \alpha }$ its length ${\displaystyle L(\alpha )}$, is lower semicontinuous.

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

## Formal definition

Suppose ${\displaystyle X}$ is a topological space, ${\displaystyle x_{0}}$ is a point in ${\displaystyle X}$ and ${\displaystyle f\colon X\to \mathbb {R} \cup \{-\infty ,\infty \}}$ is an extended real-valued function.

We say that ${\displaystyle f}$ is upper semi-continuous at ${\displaystyle x_{0}}$ if for every ${\displaystyle y>f(x_{0})}$ there exists a neighborhood ${\displaystyle U}$ of ${\displaystyle x_{0}}$ such that ${\displaystyle f(x) for all ${\displaystyle x\in U}$. For the particular case of a metric space, this can be expressed as

${\displaystyle \limsup _{x\to x_{0}}f(x)\leq f(x_{0})}$

where lim sup is the limit superior (of the function ${\displaystyle f}$ at point ${\displaystyle x_{0}}$). (For non-metric spaces, an equivalent definition using nets may be stated.)

The function ${\displaystyle f}$ is called upper semi-continuous if it is upper semi-continuous at every point of its domain. A function is upper semi-continuous if and only if ${\displaystyle \{x\in X:~f(x) is an open set for every ${\displaystyle y\in \mathbb {R} }$.

We say that ${\displaystyle f}$ is lower semi-continuous at ${\displaystyle x_{0}}$ if for every ${\displaystyle y there exists a neighborhood ${\displaystyle U}$ of ${\displaystyle x_{0}}$ such that ${\displaystyle y for all ${\displaystyle x}$ in ${\displaystyle U}$. Equivalently, in the case of a metric space, this can be expressed as

${\displaystyle \liminf _{x\to x_{0}}f(x)\geq f(x_{0})}$

where ${\displaystyle \liminf }$ is the limit inferior (of the function ${\displaystyle f}$ at point ${\displaystyle x_{0}}$).

The function ${\displaystyle f}$ is called lower semi-continuous if it is lower semi-continuous at every point of its domain. A function is lower semi-continuous if and only if ${\displaystyle \{x\in X:~f(x)>y\}}$ is an open set for every ${\displaystyle y\in \mathbb {R} }$; alternatively, a function is lower semi-continuous if and only if all of its lower level sets ${\displaystyle \{x\in X:~f(x)\leq y\}}$ are closed. Lower level sets are also called sublevel sets or trenches.[1]

## Properties

A function is continuous at x0 if and only if it is both upper and lower semi-continuous there. Therefore, semi-continuity can be used to prove continuity.

If f and g are two real-valued functions which are both upper semi-continuous at x0, then so is f + g. If both functions are non-negative, then the product function fg will also be upper semi-continuous at x0. The same holds for functions lower semi-continuous at x0.[2]

The composition fg of upper semi-continuous functions f and g is not necessarily upper semi-continuous, but if f is also non-decreasing, then fg is upper semi-continuous.[3]

Multiplying a positive upper semi-continuous function with a negative number turns it into a lower semi-continuous function.

If C is a compact space (for instance a closed, bounded interval [ab]) and f : C → [–∞,∞) is upper semi-continuous, then f has a maximum on C. The analogous statement for (–∞,∞]-valued lower semi-continuous functions and minima is also true. (See the article on the extreme value theorem for a proof.)

Suppose fi : X → [–∞,∞] is a lower semi-continuous function for every index i in a nonempty set I, and define f as pointwise supremum, i.e.,

${\displaystyle f(x)=\sup _{i\in I}f_{i}(x),\qquad x\in X.}$

Then f is lower semi-continuous.[4] Even if all the fi are continuous, f need not be continuous: indeed every lower semi-continuous function on a uniform space (e.g. a metric space) arises as the supremum of a sequence of continuous functions.

Likewise, the pointwise infimum of an arbitrary collection of upper semicontinuous functions is upper semicontinuous.

The indicator function of any open set is lower semicontinuous. The indicator function of a closed set is upper semicontinuous. However, in convex analysis, the term "indicator function" often refers to the characteristic function, and the characteristic function of any closed set is lower semicontinuous, and the characteristic function of any open set is upper semicontinuous.

A function f : RnR is lower semicontinuous if and only if its epigraph (the set of points lying on or above its graph) is closed.

A function f : XR, for some topological space X, is lower semicontinuous if and only if it is continuous with respect to the Scott topology on R.

Any upper semicontinuous function f : XN on an arbitrary topological space X is locally constant on some dense open subset of X.

The maximum and minimum of finitely many upper semicontinuous functions is upper semicontinuous, and the same holds true of lower semicontinuous functions.

## References

1. ^ Kiwiel, Krzysztof C. (2001). "Convergence and efficiency of subgradient methods for quasiconvex minimization". Mathematical Programming, Series A. 90 (1). Berlin, Heidelberg: Springer. pp. 1–25. doi:10.1007/PL00011414. ISSN 0025-5610. MR 1819784.
2. ^ Puterman, Martin L. (2005). Markov Decision Processes Discrete Stochastic Dynamic Programming. Wiley-Interscience. pp. 602. ISBN 978-0-471-72782-8.
3. ^ Moore, James C. (1999). Mathematical methods for economic theory. Berlin: Springer. p. 143. ISBN 9783540662358.
4. ^ "Baire theorem". Encyclopedia of Mathematics.