In mathematics, the limit inferior and limit superior of a sequence can be thought of as limiting bounds on the sequence.

The limit inferior (or lower limit) of a sequence (xn) is defined as

Similarly, the limit superior (or upper limit) of (xn) is defined as

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

Whenever lim inf xn and lim sup xn both exist, then

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 (xn) in [-∞,∞] converges if and only if lim inf xn = lim sup xn, in which case lim xn 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 xn = sin(n). Using the fact that pi is irrational, one can show that lim inf xn = -1 and lim sup xn = +1.

If I = lim inf xn and S = lim sup xn, 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.

An example from number theory is

lim inf (pn+1 - pn),
where pn represents 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.

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 Xn is such a sequence, then an element a of X belongs to lim inf Xn if and only if there exists a natural number n0 such that a is in Xn for all n > n0. The element a belongs to lim sup Xn if and only if for every natural number n0 there exists an index n > n0 such that a is in Xn. In other words, lim sup Xn consists of those elements which are in Xn for infinitely many n, while lim inf Xn consists of those elements which are in Xn for all but finitely many n.

See Borel-Cantelli lemma for an example.