Set-theoretic limit

In mathematics, the limit of a sequence of sets $$A_1, A_2, \ldots$$ (subsets of a common set $$X$$) is a set whose elements are determined by the sequence in either of two equivalent ways: (1) by upper and lower bounds on the sequence that converge monotonically to the same set (analogous to convergence of real-valued sequences) and (2) by convergence of a sequence of indicator functions which are themselves real-valued. As is the case with sequences of other objects, convergence is not necessary or even usual.

More generally, again analogous to real-valued sequences, the less restrictive limit infimum and limit supremum of a set sequence always exist and can be used to determine convergence: the limit exists if the limit infimum and limit supremum are identical. (See below). Such set limits are essential in measure theory and probability.

It is a common misconception that the limits infimum and supremum described here involve sets of accumulation points, that is, sets of $$x = \lim_{k \to \infty} x_k,$$ where each $$x_k$$ is in some $$A_{n_k}.$$ This is only true if convergence is determined by the discrete metric (that is, $$x_n \to x$$ if there is $$N$$ such that $$x_n = x$$ for all $$n \geq N$$). This article is restricted to that situation as it is the only one relevant for measure theory and probability. See the examples below. (On the other hand, there are more general topological notions of set convergence that do involve accumulation points under different metrics or topologies.)

The two definitions
Suppose that $$\left(A_n\right)_{n=1}^\infty$$ is a sequence of sets. The two equivalent definitions are as follows.


 * Using union and intersection: define $$\liminf_{n \to \infty} A_n = \bigcup_{n \geq 1} \bigcap_{j \geq n} A_j$$ and $$\limsup_{n \to \infty} A_n = \bigcap_{n \geq 1} \bigcup_{j \geq n} A_j$$ If these two sets are equal, then the set-theoretic limit of the sequence $$A_n$$ exists and is equal to that common set. Either set as described above can be used to get the limit, and there may be other means to get the limit as well.
 * Using indicator functions: let $$\mathbb{1}_{A_n}(x)$$ equal $$1$$ if $$x \in A_n,$$ and $$0$$ otherwise. Define $$\liminf_{n \to \infty} A_n = \Bigl\{ x \in X : \liminf_{n \to \infty} \mathbb{1}_{A_n}(x) = 1 \Bigr\}$$ and $$\limsup_{n \to \infty} A_n = \Bigl\{ x \in X : \limsup_{n \to \infty} \mathbb{1}_{A_n}(x) = 1 \Bigr\},$$ where the expressions inside the brackets on the right are, respectively, the limit infimum and limit supremum of the real-valued sequence $$\mathbb{1}_{A_n}(x).$$ Again, if these two sets are equal, then the set-theoretic limit of the sequence $$A_n$$ exists and is equal to that common set, and either set as described above can be used to get the limit.

To see the equivalence of the definitions, consider the limit infimum. The use of De Morgan's law below explains why this suffices for the limit supremum. Since indicator functions take only values $$0$$ and $$1,$$ $$\liminf_{n \to \infty} \mathbb{1}_{A_n}(x) = 1$$ if and only if $$\mathbb{1}_{A_n}(x)$$ takes value $$0$$ only finitely many times. Equivalently, $x \in \bigcup_{n \geq 1} \bigcap_{j \geq n} A_j$ if and only if there exists $$n$$ such that the element is in $$A_m$$ for every $$m \geq n,$$ which is to say if and only if $$x \not\in A_n$$ for only finitely many $$n.$$ Therefore, $$x$$ is in the $$\liminf_{n \to \infty} A_n$$ if and only if $$x$$ is in all but finitely many $$A_n.$$ For this reason, a shorthand phrase for the limit infimum is "$$x$$ is in $$A_n$$ all but finitely often", typically expressed by writing "$$A_n$$ a.b.f.o.".

Similarly, an element $$x$$ is in the limit supremum if, no matter how large $$n$$ is, there exists $$m \geq n$$ such that the element is in $$A_m.$$ That is, $$x$$ is in the limit supremum if and only if $$x$$ is in infinitely many $$A_n.$$ For this reason, a shorthand phrase for the limit supremum is "$$x$$ is in $$A_n$$ infinitely often", typically expressed by writing "$$A_n$$ i.o.".

To put it another way, the limit infimum consists of elements that "eventually stay forever" (are in set after  $$n$$), while the limit supremum consists of elements that "never leave forever" (are in  set after  $$n$$). Or more formally:


 * $\lim_{n\in\N}A_n = L \quad \Longleftrightarrow$     || for every $$x\in L$$     &thinsp; there is a $$n_0\in\N$$ with $$x\in A_n$$ for all $$n\ge n_0$$ and
 * ||for every $$y\in X\!\setminus\! L$$ there is a $$p_0\in\N$$ with $$y\not\in A_p$$ for all $$p\ge p_0$$.
 * }
 * ||for every $$y\in X\!\setminus\! L$$ there is a $$p_0\in\N$$ with $$y\not\in A_p$$ for all $$p\ge p_0$$.
 * }

Monotone sequences
The sequence $$\left(A_n\right)$$ is said to be nonincreasing if $$A_{n+1} \subseteq A_n$$ for each $$n,$$ and nondecreasing if $$A_n \subseteq A_{n+1}$$ for each $$n.$$ In each of these cases the set limit exists. Consider, for example, a nonincreasing sequence $$\left(A_n\right).$$ Then $$\bigcap_{j \geq n} A_j = \bigcap_{j \geq 1} A_j \text{ and } \bigcup_{j \geq n} A_j = A_n.$$ From these it follows that $$\liminf_{n \to \infty} A_n = \bigcup_{n \geq 1} \bigcap_{j \geq n} A_j = \bigcap_{j \geq 1} A_j = \bigcap_{n \geq 1} \bigcup_{j \geq n} A_j = \limsup_{n \to \infty} A_n.$$ Similarly, if $$\left(A_n\right)$$ is nondecreasing then $$\lim_{n \to \infty} A_n = \bigcup_{j \geq 1} A_j.$$

The Cantor set is defined this way.

Properties
= \left(\bigcap_n \bigcup_{j \geq n} A_j^c\right)^c = \left(\limsup_{n \to \infty} A_n^c\right)^c.$$ That is, $$x \in A_n$$ all but finitely often is the same as $$x \not\in A_n$$ finitely often.
 * If the limit of $$\mathbb{1}_{A_n}(x),$$ as $$n$$ goes to infinity, exists for all $$x$$ then $$\lim_{n \to \infty} A_n = \left\{ x \in X : \lim_{n \to \infty} \mathbb{1}_{A_n}(x) = 1 \right\}.$$ Otherwise, the limit for $$\left(A_n\right)$$ does not exist.
 * It can be shown that the limit infimum is contained in the limit supremum: $$\liminf_{n\to\infty} A_n \subseteq \limsup_{n\to\infty} A_n,$$ for example, simply by observing that $$x \in A_n$$ all but finitely often implies $$x \in A_n$$ infinitely often.
 * Using the monotonicity of $ B_n = \bigcap_{j \geq n} A_j$ and of $ C_n = \bigcup_{j \geq n} A_j,$  $$\liminf_{n\to\infty} A_n = \lim_{n\to\infty}\bigcap_{j \geq n} A_j \quad \text{ and } \quad \limsup_{n\to\infty} A_n = \lim_{n\to\infty} \bigcup_{j \geq n} A_j.$$
 * By using De Morgan's law twice, with set complement $$A^c := X \setminus A,$$ $$\liminf_{n \to \infty} A_n = \bigcup_n \left(\bigcup_{j \geq n} A_j^c\right)^c
 * From the second definition above and the definitions for limit infimum and limit supremum of a real-valued sequence, $$\mathbb{1}_{\liminf_{n \to \infty} A_n}(x) = \liminf_{n \to \infty}\mathbb{1}_{A_n}(x) = \sup_{n \geq 1} \inf_{j \geq n} \mathbb{1}_{A_j}(x)$$ and $$\mathbb{1}_{\limsup_{n \to \infty} A_n}(x) = \limsup_{n \to \infty} \mathbb{1}_{A_n}(x) = \inf_{n \geq 1} \sup_{j \geq n} \mathbb{1}_{A_j}(x).$$
 * Suppose $$\mathcal{F}$$ is a $\sigma$-algebra of subsets of $$X.$$ That is, $$\mathcal{F}$$ is nonempty and is closed under complement and under unions and intersections of countably many sets. Then, by the first definition above, if each $$A_n \in \mathcal{F}$$ then both $$\liminf_{n \to \infty} A_n$$ and $$\limsup_{n \to \infty} A_n$$ are elements of $$\mathcal{F}.$$

Examples
$$\liminf_{n \to \infty} A_n = \bigcup_n \bigcap_{j \geq n} \left(-\tfrac{1}{j}, 1 - \tfrac{1}{j} \right] = \bigcup_n \left[0, 1 - \tfrac{1}{n}\right] = [0, 1)$$ and $$\limsup_{n \to \infty} A_n = \bigcap_n \bigcup_{j \geq n}\left(-\tfrac{1}{j}, 1 - \tfrac{1}{j}\right] = \bigcap_n \left(- \tfrac{1}{n}, 1\right) = [0, 1)$$ so $$\lim_{n \to \infty} A_n = [0, 1)$$ exists. $$\liminf_{n \to \infty} A_n = \bigcup_n \bigcap_{j \geq n} \left(\tfrac{(-1)^j}{j}, 1-\tfrac{(-1)^j}{j}\right] = \bigcup_n \left(\tfrac{1}{2n}, 1 - \tfrac{1}{2n}\right] = (0, 1)$$ and $$\limsup_{n \to \infty} A_n = \bigcap_n \bigcup_{j \geq n} \left(\tfrac{(-1)^j}{j}, 1 - \tfrac{(-1)^j}{j}\right] = \bigcap_n \left(-\tfrac{1}{2n-1}, 1 + \tfrac{1}{2n-1}\right] = [0, 1],$$ so $$\lim_{n \to \infty} A_n$$ does not exist, despite the fact that the left and right endpoints of the intervals converge to 0 and 1, respectively. $$\bigcup_{j \geq n} A_j = \Q\cap[0,1]$$ is the set of all rational numbers between 0 and 1 (inclusive), since even for $$j < n$$ and $$0 \leq k \leq j,$$ $$\tfrac{k}{j} = \tfrac{nk}{nj}$$ is an element of the above. Therefore, $$\limsup_{n \to \infty} A_n = \Q \cap [0, 1].$$ On the other hand, $$\bigcap_{j \geq n} A_j = \{0, 1\},$$ which implies $$\liminf_{n \to \infty} A_n = \{0,1\}.$$ In this case, the sequence $$A_1, A_2, \ldots$$ does not have a limit. Note that $$\lim_{n \to \infty} A_n$$ is not the set of accumulation points, which would be the entire interval $$[0, 1]$$ (according to the usual Euclidean metric).
 * Let $$A_n = \left(- \tfrac{1}{n}, 1 - \tfrac{1}{n}\right].$$ Then
 * Change the previous example to $$A_n = \left(\tfrac{(-1)^n}{n}, 1 - \tfrac{(-1)^n}{n}\right].$$ Then
 * Let $$A_n = \left\{ 0, \tfrac{1}{n}, \tfrac{2}{n}, \ldots, \tfrac{n - 1}{n}, 1\right\}.$$ Then

Probability uses
Set limits, particularly the limit infimum and the limit supremum, are essential for probability and measure theory. Such limits are used to calculate (or prove) the probabilities and measures of other, more purposeful, sets. For the following, $$(X,\mathcal{F},\mathbb{P})$$ is a probability space, which means $$\mathcal{F}$$ is a σ-algebra of subsets of $$ X$$ and $$\mathbb{P}$$ is a probability measure defined on that σ-algebra. Sets in the σ-algebra are known as events.

If $$A_1, A_2, \ldots$$ is a monotone sequence of events in $$\mathcal{F}$$ then $$\lim_{n \to \infty} A_n$$ exists and $$\mathbb{P}\left(\lim_{n \to \infty} A_n\right) = \lim_{n \to \infty} \mathbb{P}\left(A_n\right).$$

Borel–Cantelli lemmas
In probability, the two Borel–Cantelli lemmas can be useful for showing that the limsup of a sequence of events has probability equal to 1 or to 0. The statement of the first (original) Borel–Cantelli lemma is $$ The second Borel–Cantelli lemma is a partial converse: $$

Almost sure convergence
One of the most important applications to probability is for demonstrating the almost sure convergence of a sequence of random variables. The event that a sequence of random variables $$Y_1, Y_2, \ldots$$ converges to another random variable $$Y$$ is formally expressed as $\left\{\limsup_{n\to\infty} \left|Y_n - Y\right| = 0\right\}.$ It would be a mistake, however, to write this simply as a limsup of events. That is, this the event $\limsup_{n\to\infty} \left\{ \left|Y_n - Y\right| = 0\right\}$ ! Instead, the of the event is $$\begin{align} \left\{\limsup_{n\to\infty} \left|Y_n - Y\right| \neq 0\right\} &= \left\{\limsup_{n\to\infty} \left|Y_n - Y\right| > \frac{1}{k} \text{ for some } k\right\}\\ &= \bigcup_{k \geq 1} \bigcap_{n \geq 1} \bigcup_{j \geq n} \left\{\left|Y_j - Y\right| > \tfrac{1}{k}\right\} \\ &= \lim_{k\to\infty} \limsup_{n\to\infty} \left\{ \left|Y_n - Y\right| > \tfrac{1}{k}\right\}. \end{align}$$ Therefore, $$\mathbb{P}\left(\left\{\limsup_{n\to\infty} \left|Y_n - Y\right| \neq 0 \right\}\right) = \lim_{k\to\infty} \mathbb{P}\left(\limsup_{n\to\infty} \left\{ \left|Y_n - Y\right| > \tfrac{1}{k} \right\}\right).$$