# Limit superior and limit inferior

In mathematics, the limit inferior and limit superior of a sequence can be thought of as limiting (i.e., eventual and extreme) bounds on the sequence. They can be thought of in a similar fashion for a function (see limit of a function). For a set, they are the infimum and supremum of the set's limit points, respectively. In general, when there are multiple objects around which a sequence, function, or set accumulates, the inferior and superior limits extract the smallest and largest of them; the type of object and the measure of size is context-dependent, but the notion of extreme limits is invariant. Limit inferior is also called infimum limit, liminf, inferior limit, lower limit, or inner limit; limit superior is also known as supremum limit, limit supremum, limsup, superior limit, upper limit, or outer limit.

An illustration of limit superior and limit inferior. The sequence xn is shown in blue. The two red curves approach the limit superior and limit inferior of xn, shown as dashed black lines. In this case, the sequence accumulates around the two limits. The superior limit is the larger of the two, and the inferior limit is the smaller of the two. The inferior and superior limits agree if and only if the sequence is convergent (i.e., when there is a single limit).

## Definition for sequences

The limit inferior of a sequence (xn) is defined by

${\displaystyle \liminf _{n\to \infty }x_{n}:=\lim _{n\to \infty }{\Big (}\inf _{m\geq n}x_{m}{\Big )}}$

or

${\displaystyle \liminf _{n\to \infty }x_{n}:=\sup _{n\geq 0}\,\inf _{m\geq n}x_{m}=\sup\{\,\inf\{\,x_{m}:m\geq n\,\}:n\geq 0\,\}.}$

Similarly, the limit superior of (xn) is defined by

${\displaystyle \limsup _{n\to \infty }x_{n}:=\lim _{n\to \infty }{\Big (}\sup _{m\geq n}x_{m}{\Big )}}$

or

${\displaystyle \limsup _{n\to \infty }x_{n}:=\inf _{n\geq 0}\,\sup _{m\geq n}x_{m}=\inf\{\,\sup\{\,x_{m}:m\geq n\,\}:n\geq 0\,\}.}$

If the terms in the sequence are real numbers, the limit superior and limit inferior always exist, as real numbers or ±∞ (i.e., on the extended real number line). More generally, these definitions make sense in any partially ordered set, provided the suprema and infima exist, such as in a complete lattice.

Whenever the ordinary limit exists, the limit inferior and limit superior are both equal to it; therefore, each can be considered a generalization of the ordinary limit which is primarily interesting in cases where the limit does not exist. Whenever lim inf xn and lim sup xn both exist, we have

${\displaystyle \liminf _{n\to \infty }x_{n}\leq \limsup _{n\to \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 en 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.

The limit superior and limit inferior of a sequence are a special case of those of a function (see below).

## The case of sequences of real numbers

In mathematical analysis, limit superior and limit inferior are important tools for studying sequences of real numbers. Since the supremum and infimum of an unbounded set of real numbers may not exist (the reals are not a complete lattice), it is convenient to consider sequences in the affinely extended real number system: we add the positive and negative infinities to the real line to give the complete totally ordered set (−∞,∞), which is a complete lattice.

### Interpretation

Consider a sequence ${\displaystyle (x_{n})}$ consisting of real numbers. Assume that the limit superior and limit inferior are real numbers (so, not infinite).

### Properties

The relationship of limit inferior and limit superior for sequences of real numbers is as follows

${\displaystyle \limsup _{n\to \infty }(-x_{n})=-\liminf _{n\to \infty }x_{n}}$

As mentioned earlier, it is convenient to extend ${\displaystyle \mathbb {R} }$ to [−∞,∞]. Then, (xn) in [−∞,∞] converges if and only if

${\displaystyle \liminf _{n\to \infty }x_{n}=\limsup _{n\to \infty }x_{n}}$

in which case ${\displaystyle \lim _{n\to \infty }x_{n}}$ is equal to their common value. (Note that when working just in ${\displaystyle \mathbb {R} }$, convergence to −∞ or ∞ would not be considered as convergence.) Since the limit inferior is at most the limit superior, the condition

${\displaystyle \liminf _{n\to \infty }x_{n}=\infty \;\;\Rightarrow \;\;\lim _{n\to \infty }x_{n}=\infty }$

and the condition

${\displaystyle \limsup _{n\to \infty }x_{n}=-\infty \;\;\Rightarrow \;\;\lim _{n\to \infty }x_{n}=-\infty .}$

If ${\displaystyle I=\liminf _{n\to \infty }x_{n}}$ and ${\displaystyle S=\limsup _{n\to \infty }x_{n}}$, then the interval [I, S] need not contain any of the numbers xn, but every slight enlargement [I − ε, S + ε] (for arbitrarily small ε > 0) will contain xn for all but finitely many indices n. In fact, the interval [I, S] is the smallest closed interval with this property. We can formalize this property like this: there exist subsequences ${\displaystyle x_{k_{n}}}$ and ${\displaystyle x_{h_{n}}}$ of ${\displaystyle x_{n}}$ (where ${\displaystyle k_{n}}$ and ${\displaystyle h_{n}}$ are monotonous) for which we have

${\displaystyle \liminf _{n\to \infty }x_{n}+\epsilon >x_{h_{n}}\;\;\;\;\;\;\;\;\;x_{k_{n}}>\limsup _{n\to \infty }x_{n}-\epsilon }$

On the other hand, there exists a ${\displaystyle n_{0}\in \mathbb {N} }$ so that for all ${\displaystyle n\geq n_{0}}$

${\displaystyle \liminf _{n\to \infty }x_{n}-\epsilon

To recapitulate:

In general we have that

${\displaystyle \inf _{n}x_{n}\leq \liminf _{n\to \infty }x_{n}\leq \limsup _{n\to \infty }x_{n}\leq \sup _{n}x_{n}}$

The liminf and limsup of a sequence are respectively the smallest and greatest cluster points.

${\displaystyle \limsup _{n\to \infty }(a_{n}+b_{n})\leq \limsup _{n\to \infty }(a_{n})+\limsup _{n\to \infty }(b_{n}).}$.

Analogously, the limit inferior satisfies superadditivity:

${\displaystyle \liminf _{n\to \infty }(a_{n}+b_{n})\geq \liminf _{n\to \infty }(a_{n})+\liminf _{n\to \infty }(b_{n}).}$

In the particular case that one of the sequences actually converges, say ${\displaystyle a_{n}\to a}$, then the inequalities above become equalities (with ${\displaystyle \limsup _{n\to \infty }a_{n}}$ or ${\displaystyle \liminf _{n\to \infty }a_{n}}$ being replaced by ${\displaystyle a}$).

#### Examples

• As an example, consider the sequence given by xn = sin(n). Using the fact that pi is irrational, one can show that
${\displaystyle \liminf _{n\to \infty }x_{n}=-1}$

and

${\displaystyle \limsup _{n\to \infty }x_{n}=+1.}$

(This is because the sequence {1,2,3,...} is equidistributed mod 2π, a consequence of the Equidistribution theorem.)

${\displaystyle \liminf _{n\to \infty }(p_{n+1}-p_{n}),}$

where pn is the n-th prime number. The value of this limit inferior is conjectured to be 2 – this is the twin prime conjecture – but Template:As of has only been proven to be less than or equal to 246.[1] The corresponding limit superior is ${\displaystyle +\infty }$, because there are arbitrary gaps between consecutive primes.

## Real-valued functions

Assume that a function is defined from a subset of the real numbers to the real numbers. As in the case for sequences, the limit inferior and limit superior are always well-defined if we allow the values +∞ and −∞; in fact, if both agree then the limit exists and is equal to their common value (again possibly including the infinities). For example, given f(x) = sin(1/x), we have lim supx0 f(x) = 1 and lim infx0 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 [1]. Note that points of nonzero oscillation (i.e., points at which f is "badly behaved") are discontinuities which, unless they make up a set of zero, are confined to a negligible set.

## Functions from metric spaces to metric spaces

There is a notion of lim sup and lim inf for functions defined on a metric space whose relationship to limits of real-valued functions mirrors that of the relation between the lim sup, lim inf, and the limit of a real sequence. Take metric spaces X and Y, a subspace E contained in X, and a function f : E → Y. The space Y should also be an ordered set, so that the notions of supremum and infimum make sense. Define, for any limit point a of E,

${\displaystyle \limsup _{x\to a}f(x)=\lim _{\varepsilon \to 0}(\sup\{f(x):x\in E\cap B(a;\varepsilon )\setminus \{a\}\})}$

and

${\displaystyle \liminf _{x\to a}f(x)=\lim _{\varepsilon \to 0}(\inf\{f(x):x\in E\cap B(a;\varepsilon )\setminus \{a\}\})}$

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

${\displaystyle \limsup _{x\to a}f(x)=\inf _{\varepsilon >0}(\sup\{f(x):x\in E\cap B(a;\varepsilon )\setminus \{a\}\})}$

and similarly

${\displaystyle \liminf _{x\to a}f(x)=\sup _{\varepsilon >0}(\inf\{f(x):x\in E\cap B(a;\varepsilon )\setminus \{a\}\}).}$

This finally motivates the definitions for general topological spaces. Take X, Y, E and a as before, but now let X and Y both be topological spaces. In this case, we replace metric balls with neighborhoods:

${\displaystyle \limsup _{x\to a}f(x)=\inf\{\sup\{f(x):x\in E\cap U\setminus \{a\}\}:U\ \mathrm {open} ,a\in U,E\cap U\setminus \{a\}\neq \emptyset \}}$
${\displaystyle \liminf _{x\to a}f(x)=\sup\{\inf\{f(x):x\in E\cap U\setminus \{a\}\}:U\ \mathrm {open} ,a\in U,E\cap U\setminus \{a\}\neq \emptyset \}}$

(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 ℘(X) of a set X is a complete lattice that is ordered by set inclusion, and so the supremum and infimum of any set of subsets (in terms of set inclusion) always exist. In particular, every subset Y of X is bounded above by X and below by the empty set ∅ because ∅ ⊆ YX. Hence, it is possible (and sometimes useful) to consider superior and inferior limits of sequences in ℘(X) (i.e., sequences of subsets of X).

There are two common ways to define the limit of sequences of sets. In both cases:

• The sequence accumulates around sets of points rather than single points themselves. That is, because each element of the sequence is itself a set, there exist accumulation sets that are somehow nearby to infinitely many elements of the sequence.
• The supremum/superior/outer limit is a set that joins these accumulation sets together. That is, it is the union of all of the accumulation sets. When ordering by set inclusion, the supremum limit is the least upper bound on the set of accumulation points because it contains each of them. Hence, it is the supremum of the limit points.
• The infimum/inferior/inner limit is a set where all of these accumulation sets meet. That is, it is the intersection of all of the accumulation sets. When ordering by set inclusion, the infimum limit is the greatest lower bound on the set of accumulation points because it is contained in each of them. Hence, it is the infimum of the limit points.
• Because ordering is by set inclusion, then the outer limit will always contain the inner limit (i.e., lim inf Xn ⊆ lim sup Xn). Hence, when considering the convergence of a sequence of sets, it generally suffices to consider the convergence of the outer limit of that sequence.

The difference between the two definitions involves how the topology (i.e., how to quantify separation) is defined. In fact, the second definition is identical to the first when the discrete metric is used to induce the topology on X.

### General set convergence

In this case, a sequence of sets approaches a limiting set when the elements of each member of the sequence approach the elements of the limiting set. In particular, if {Xn} is a sequence of subsets of X, then:

• lim sup Xn, which is also called the outer limit, consists of those elements which are limits of points in Xn taken from (countably) infinitely many n. That is, x ∈ lim sup Xn if and only if there exists a sequence of points xk and a subsequence {Xnk} of {Xn} such that xkXnk and xkx as k → ∞.
• lim inf Xn, which is also called the inner limit, consists of those elements which are limits of points in Xn for all but finitely many n (i.e., cofinitely many n). That is, x ∈ lim inf Xn if and only if there exists a sequence of points {xk} such that xkXk and xkx as k → ∞.

The limit lim Xn exists if and only if lim inf Xn and lim sup Xn agree, in which case lim Xn = lim sup Xn = lim inf Xn.[2]

### Special case: discrete metric

In this case, which is frequently used in measure theory, a sequence of sets approaches a limiting set when the limiting set includes elements from each of the members of the sequence. That is, this case specializes the first case when the topology on set X is induced from the discrete metric. For points xX and yX, the discrete metric is defined by

${\displaystyle d(x,y):={\begin{cases}0&{\text{if }}x=y,\\1&{\text{if }}x\neq y.\end{cases}}}$

So a sequence of points {xk} converges to point xX if and only if xk = x for all but finitely many k. The following definition is the result of applying this metric to the general definition above.

If {Xn} is a sequence of subsets of X, then:

• lim sup Xn consists of elements of X which belong to Xn for infinitely many n (see countably infinite). That is, x ∈ lim sup Xn if and only if there exists a subsequence {Xnk} of {Xn} such that xXnk for all k.
• lim inf Xn consists of elements of X which belong to Xn for all but finitely many n (i.e., for cofinitely many n). That is, x ∈ lim inf Xn if and only if there exists some m>0 such that xXn for all n>m.

The limit lim X exists if and only if lim inf X and lim sup X agree, in which case lim X = lim sup X = lim inf X.[3] This definition of the inferior and superior limits is relatively strong because it requires that the elements of the extreme limits also be elements of each of the sets of the sequence.

Using the standard parlance of set theory, consider the infimum of a sequence of sets. The infimum is a greatest lower bound or meet of a set. In the case of a sequence of sets, the sequence constituents meet at a set that is somehow smaller than each constituent set. Set inclusion provides an ordering that allows set intersection to generate a greatest lower bound ∩Xn of sets in the sequence {Xn}. Similarly, the supremum, which is the least upper bound or join, of a sequence of sets is the union ∪Xn of sets in sequence {Xn}. In this context, the inner limit lim inf Xn is the largest meeting of tails of the sequence, and the outer limit lim sup Xn is the smallest joining of tails of the sequence.

• Let In be the meet of the nth tail of the sequence. That is,
${\displaystyle I_{n}:=\inf\{X_{m}:m\in \{n,n+1,n+2,\ldots \}\}=\bigcap _{m=n}^{\infty }X_{m}=X_{n}\cap X_{n+1}\cap X_{n+2}\cap \cdots .}$
Then IkIk+1Ik+2 because Ik+1 is the intersection of fewer sets than Ik. In particular, the sequence {Ik} is non-decreasing. So the inner/inferior limit is the least upper bound on this sequence of meets of tails. In particular,
{\displaystyle {\begin{aligned}\liminf _{n\to \infty }X_{n}&:=\lim _{n\to \infty }\inf\{X_{m}:m\in \{n,n+1,\ldots \}\}\\&=\sup\{\inf\{X_{m}:m\in \{n,n+1,\ldots \}\}:n\in \{1,2,\dots \}\}\\&={\bigcup _{n=1}^{\infty }}\left({\bigcap _{m=n}^{\infty }}X_{m}\right).\end{aligned}}}
So the inferior limit acts like a version of the standard infimum that is unaffected by the set of elements that occur only finitely many times. That is, the infimum limit is a subset (i.e., a lower bound) for all but finitely many elements.
• Similarly, let Jm be the join of the mth tail of the sequence. That is,
${\displaystyle J_{m}:=\sup\{X_{m}:m\in \{n,n+1,n+2,\ldots \}\}=\bigcup _{m=n}^{\infty }X_{m}=X_{n}\cup X_{n+1}\cup X_{n+2}\cup \cdots .}$
Then JkJk+1Jk+2 because Jk+1 is the union of fewer sets than Jk. In particular, the sequence {Jk} is non-increasing. So the outer/superior limit is the greatest lower bound on this sequence of joins of tails. In particular,
{\displaystyle {\begin{aligned}\limsup _{n\to \infty }X_{n}&:=\lim _{n\to \infty }\sup\{X_{m}:m\in \{n,n+1,\ldots \}\}\\&=\inf\{\sup\{X_{m}:m\in \{n,n+1,\ldots \}\}:n\in \{1,2,\dots \}\}\\&={\bigcap _{n=1}^{\infty }}\left({\bigcup _{m=n}^{\infty }}X_{m}\right).\end{aligned}}}
So the superior limit acts like a version of the standard supremum that is unaffected by the set of elements that occur only finitely many times. That is, the supremum limit is a superset (i.e., an upper bound) for all but finitely many elements.

The limit lim Xn exists if and only if lim sup Xn=lim inf Xn, and in that case, lim Xn=lim inf Xn=lim sup Xn. In this sense, the sequence has a limit so long as all but finitely many of its elements are equal to the limit.

### Examples

The following are several set convergence examples. They have been broken into sections with respect to the metric used to induce the topology on set X.

Using the discrete metric
Using either the discrete metric or the Euclidean metric
• Consider the set X = {0,1} and the sequence of subsets:
${\displaystyle \{X_{n}\}=\{\{0\},\{1\},\{0\},\{1\},\{0\},\{1\},\dots \}.}$
The "odd" and "even" elements of this sequence form two subsequences, {{0},{0},{0},...} and {{1},{1},{1},...}, which have limit points 0 and 1, respectively, and so the outer or superior limit is the set {0,1} of these two points. However, there are no limit points that can be taken from the {Xn} sequence as a whole, and so the interior or inferior limit is the empty set {}. That is,
• lim sup Xn = {0,1}
• lim inf Xn = {}
However, for {Yn} = {{0},{0},{0},...} and {Zn} = {{1},{1},{1},...}:
• lim sup Yn = lim inf Yn = lim Yn = {0}
• lim sup Zn = lim inf Zn = lim Zn = {1}
• Consider the set X = {50, 20, -100, -25, 0, 1} and the sequence of subsets:
${\displaystyle \{X_{n}\}=\{\{50\},\{20\},\{-100\},\{-25\},\{0\},\{1\},\{0\},\{1\},\{0\},\{1\},\dots \}.}$
As in the previous two examples,
• lim sup Xn = {0,1}
• lim inf Xn = {}
That is, the four elements that do not match the pattern do not affect the lim inf and lim sup because there are only finitely many of them. In fact, these elements could be placed anywhere in the sequence (e.g., at positions 100, 150, 275, and 55000). So long as the tails of the sequence are maintained, the outer and inner limits will be unchanged. The related concepts of essential inner and outer limits, which use the essential supremum and essential infimum, provide an important modification that "squashes" countably many (rather than just finitely many) interstitial additions.
Using the Euclidean metric
${\displaystyle \{X_{n}\}=\{\{0\},\{1\},\{1/2\},\{1/2\},\{2/3\},\{1/3\},\{3/4\},\{1/4\},\dots \}.}$
The "odd" and "even" elements of this sequence form two subsequences, {{0},{1/2},{2/3},{3/4},...} and {{1},{1/2},{1/3},{1/4},...}, which have limit points 1 and 0, respectively, and so the outer or superior limit is the set {0,1} of these two points. However, there are no limit points that can be taken from the {Xn} sequence as a whole, and so the interior or inferior limit is the empty set {}. So, as in the previous example,
• lim sup Xn = {0,1}
• lim inf Xn = {}
However, for {Yn} = {{0},{1/2},{2/3},{3/4},...} and {Zn} = {{1},{1/2},{1/3},{1/4},...}:
• lim sup Yn = lim inf Yn = lim Yn = {1}
• lim sup Zn = lim inf Zn = lim Zn = {0}
In each of these four cases, the elements of the limiting sets are not elements of any of the sets from the original sequence.
• The Ω limit (i.e., limit set) of a solution to a dynamic system is the outer limit of solution trajectories of the system.[2]:50–51 Because trajectories become closer and closer to this limit set, the tails of these trajectories converge to the limit set.
• For example, an LTI system that is the cascade connection of several stable systems with an undamped second-order LTI system (i.e., zero damping ratio) will oscillate endlessly after being perturbed (e.g., an ideal bell after being struck). Hence, if the position and velocity of this system are plotted against each other, trajectories will approach a circle in the state space. This circle, which is the Ω limit set of the system, is the outer limit of solution trajectories of the system. The circle represents the locus of a trajectory corresponding to a pure sinusoidal tone output; that is, the system output approaches/approximates a pure tone.

## Generalized definitions

The above definitions are inadequate for many technical applications. In fact, the definitions above are specializations of the following definitions.

### Definition for a set

The limit inferior of a set XY is the infimum of all of the limit points of the set. That is,

${\displaystyle \liminf X:=\inf\{x\in Y:x{\text{ is a limit point of }}X\}\,}$

Similarly, the limit superior of a set X is the supremum of all of the limit points of the set. That is,

${\displaystyle \limsup X:=\sup\{x\in Y:x{\text{ is a limit point of }}X\}\,}$

Note that the set X needs to be defined as a subset of a partially ordered set Y that is also a topological space in order for these definitions to make sense. Moreover, it has to be a complete lattice so that the suprema and infima always exist. In that case every set has a limit superior and a limit inferior. Also note that the limit inferior and the limit superior of a set do not have to be elements of the set.

### Definition for filter bases

Take a topological space X and a filter base B in that space. The set of all cluster points for that filter base is given by

${\displaystyle \bigcap \{{\overline {B}}_{0}:B_{0}\in B\}}$

where ${\displaystyle {\overline {B}}_{0}}$ is the closure of ${\displaystyle B_{0}}$. This is clearly a closed set and is similar to the set of limit points of a set. Assume that X is also a partially ordered set. The limit superior of the filter base B is defined as

${\displaystyle \limsup B:=\sup \bigcap \{{\overline {B}}_{0}:B_{0}\in B\}}$

when that supremum exists. When X has a total order, is a complete lattice and has the order topology,

${\displaystyle \limsup B=\inf\{\sup B_{0}:B_{0}\in B\}}$

Proof: Similarly, the limit inferior of the filter base B is defined as

${\displaystyle \liminf B:=\inf \bigcap \{{\overline {B}}_{0}:B_{0}\in B\}}$

when that infimum exists; if X is totally ordered, is a complete lattice, and has the order topology, then

${\displaystyle \liminf B=\sup\{\inf B_{0}:B_{0}\in B\}}$

If the limit inferior and limit superior agree, then there must be exactly one cluster point and the limit of the filter base is equal to this unique cluster point.

#### Specialization for sequences and nets

Note that filter bases are generalizations of nets, which are generalizations of sequences. Therefore, these definitions give the limit inferior and limit superior of any net (and thus any sequence) as well. For example, take topological space ${\displaystyle X}$ and the net ${\displaystyle (x_{\alpha })_{\alpha \in A}}$, where ${\displaystyle (A,{\leq })}$ is a directed set and ${\displaystyle x_{\alpha }\in X}$ for all ${\displaystyle \alpha \in A}$. The filter base ("of tails") generated by this net is ${\displaystyle B}$ defined by

${\displaystyle B:=\{\{x_{\alpha }:\alpha _{0}\leq \alpha \}:\alpha _{0}\in A\}.\,}$

Therefore, the limit inferior and limit superior of the net are equal to the limit superior and limit inferior of ${\displaystyle B}$ respectively. Similarly, for topological space ${\displaystyle X}$, take the sequence ${\displaystyle (x_{n})}$ where ${\displaystyle x_{n}\in X}$ for any ${\displaystyle n\in \mathbb {N} }$ with ${\displaystyle \mathbb {N} }$ being the set of natural numbers. The filter base ("of tails") generated by this sequence is ${\displaystyle C}$ defined by

${\displaystyle C:=\{\{x_{n}:n_{0}\leq n\}:n_{0}\in \mathbb {N} \}.\,}$

Therefore, the limit inferior and limit superior of the sequence are equal to the limit superior and limit inferior of ${\displaystyle C}$ respectively.