# Limit superior and limit inferior

In mathematics, the **limit inferior** and **limit superior** of a sequence can be thought of as limiting bounds on the sequence. (See limit of a function.)

The limit inferior (or **lower limit**) of a sequence (*x*_{n}) is defined as

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \liminf_{n\rightarrow\infty}x_n=\sup_{n\geq 0}\,\inf_{k\geq n}x_k=\sup\{\,\inf\{\,x_k:k\geq n\,\}:n\geq 0\,\}.}**

or

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \liminf_{n\rightarrow\infty}x_n=\lim_{n\rightarrow\infty}\left(\inf_{m\geq n}x_m\right).}**

Similarly, the limit superior (or **upper limit**) of (*x*_{n}) is defined as

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \limsup_{n\rightarrow\infty}x_n=\inf_{n\geq 0}\,\sup_{k\geq n}x_k=\inf\{\,\sup\{\,x_k:k\geq n\,\}:n\geq 0\,\}.}**

or

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \limsup_{n\rightarrow\infty}x_n=\lim_{n\rightarrow\infty}\left(\sup_{m\geq n}x_m\right).}**

These definitions make sense in any partially ordered set, provided the suprema and infima exist. In a complete lattice, the suprema and infima always exist, and so in this case every sequence has a limit superior and a limit inferior.

Whenever lim inf *x*_{n} and lim sup *x*_{n} both exist, then

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \liminf_{n\rightarrow\infty}x_n\leq\limsup_{n\rightarrow\infty}x_n.}**

Limits inferior/superior are related to big-O notation in that they bound a sequence only "in the limit"; the sequence may exceed the bound. However, with big-O notation the sequence can only exceed the bound in a finite prefix of the sequence, whereas the limit superior of a sequence like e^{-n} may actually be less than all elements of the sequence. The only promise made is that some tail of the sequence can be bounded by the limit superior (inferior) plus (minus) an arbitrarily small positive constant.

## Sequences of real numbers

In calculus, the case of sequences in **R** (the real numbers) is important.
**R** itself is not a complete lattice, but positive and negative infinities can be added to give the complete totally ordered set [-∞,∞].
Then (*x*_{n}) in [-∞,∞] converges if and only if
lim inf *x*_{n} = lim sup *x*_{n}, in which case lim *x*_{n} is equal to their common value.
(Note that when working just in **R**, convergence to -∞ or ∞ would not be considered as convergence.)

As an example, consider the sequence given by *x*_{n} = sin(*n*). Using the fact that pi is irrational, one can show that lim inf *x*_{n} = −1 and lim sup *x*_{n} = +1.

If *I* = lim inf *x*_{n} and *S* = lim sup *x*_{n}, then the interval [*I*, *S*] need not contain any of the numbers *x*_{n}, but every slight enlargement [*I* − ε, *S* + ε] (for arbitrarily small ε > 0) will contain *x*_{n} for all but finitely many indices *n*. In fact, the interval [*I*, *S*] is the smallest closed interval with this property.

An example from number theory is

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \liminf_n(p_{n+1}-p_n),}**

where *p*_{n} is the *n*-th prime number.
The value of this limit inferior is conjectured to be 2 - this is the twin prime conjecture - but as yet has not even been proved finite.

## Functions from metric and topololgical spaces to the real numbers

There is a notion of lim sup and lim inf for real-valued functions defined on a metric space whose relationship to limits of real-valued functions mirrors that of the relation between the lim sup, liminf, and the limit of a real sequence. Given a metric space *X*, a subspace *E* contained in *X*, and *f* : *E* → **R** we define, for *a* any point in the closure of *E*:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \limsup_{x \to a} f(x) = \lim_{\epsilon \to 0} \sup \{ f(x) : x \in E \cap B(a;\epsilon) \} }**

and

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \liminf_{x \to a} f(x) = \lim_{\epsilon \to 0} \inf \{ f(x) : x \in E \cap B(a;\epsilon) \} }**

where *B*(*a*,ε) denotes the metric ball of radius ε about *a*. As in the case for sequences, these are always well-defined if we allow the values +∞ and -∞, and if both are equal then the limit exists and is equal to their common value (again possibly including the infinties). For example, given *f*(*x*) = sin(1/*x*), we have lim sup_{x→0} *f*(*x*) = 1 and lim inf_{x→0} *f*(*x*) = -1. The difference between the two is a rough measure of how "wildly" the function oscillates, and in observation of this fact, it is called the **oscillation** of *f* at *a*. This idea of oscillation is sufficient to, for example, characterize Riemann-integrable functions as continuous except on a set of measure zero: points of nonzero oscillation i.e. points at which *f* is "badly behaved" are confined to a negligible set.

Note that as ε shrinks, the supremum of the function over the ball is monotone decreasing, so we have

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \limsup_{x\to a} f(x) = \inf_{\epsilon > 0} (\sup \{ f(x) : x \in E \cap B(a;\epsilon) \}) }**

and similarly

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \liminf_{x\to a} f(x) = \sup_{\epsilon > 0}(\inf \{ f(x) : x \in E \cap B(a;\epsilon) \}).}**

This finally motivates the definitions for general topological spaces, for *X*, *E* and *a* as before, but now *X* only a topological space, we replace balls with neighborhoods:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \limsup_{x\to a} f(x) = \inf \{ \sup \{ f(x) : x \in E \cap U \} : U\ \mathrm{open}, a \in U \}}****Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \liminf_{x\to a} f(x) = \sup \{ \inf \{ f(x) : x \in E \cap U \} : U\ \mathrm{open}, a \in U \}}**

(there is a way to write the formula using a *lim* using nets and the neighborhood filter). This version is often useful in discussions of semi-continuity which crop up in analysis quite often. An interesting note is that this version subsumes the sequential version by considering sequences as functions from the natural numbers as a topological subspace of the extended real line, into the space (the closure of **N** in [-∞, ∞] is **N** ∪ {∞}.)

## Sequences of sets

The power set *P*(*X*) of a set *X* is a complete lattice, and it is sometimes useful to consider limits superior and inferior of sequences in *P*(*X*), that is, sequences of subsets of *X*.
If *X*_{n} is such a sequence, then an element *a* of *X* belongs to lim inf *X*_{n} if and only if there exists a natural number *n*_{0} such that *a* is in *X*_{n} for all *n* > *n*_{0}. The element *a* belongs to lim sup *X*_{n} if and only if for every natural number *n*_{0} there exists an index *n* > *n*_{0} such that *a* is in *X*_{n}.
In other words, lim sup *X*_{n} consists of those elements which are in *X*_{n} for infinitely many *n*, while lim inf *X*_{n} consists of those elements which are in *X*_{n} for all but finitely many *n*.

Using the standard parlance of set theory, the infimum of a sequence of sets is the countable intersection of the sets, the largest set included in all of the sets:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \inf\left\{\,x_n : n=1,2,3,\dots\,\right\}={\bigcap_{n=1}^\infty}x_n}**

The sequence of n=1,2,3,...,*I*_{n}, where *I*_{n} is the infimum of set *n*, is non-decreasing, because *I*_{n}⊂*I*_{n+1}. Therefore, the countable union of infimum from 1 to n is equal to the nth infimum. Taking this sequence of sets to the limit:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \liminf_{n\rightarrow\infty}x_n={\bigcup_{n=1}^\infty}\left({\bigcap_{m=n}^\infty}x_m\right).}**

The limsup can be defined as the opposite. The supremum of a sequence of sets is the smallest set containing all the sets, i.e., the countable union of the sets.

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \sup\left\{\,x_n : n=1,2,3,\dots\,\right\}={\bigcup_{n=1}^\infty}x_n}**

The limsup is the countable intersection of this non-increasing (each supremum is a subset of the previous supremum) sequence of sets.

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \limsup_{n\rightarrow\infty}x_n={\bigcap_{n=1}^\infty}\left({\bigcup_{m=n}^\infty}x_m\right).}**

See Borel-Cantelli lemma for an example.

de:Limes superior und Limes inferior it:Limite superiore e limite inferiore ru:Частичный предел zh:上极限和下极限