TITLE: Explanation of $\overline{\lim} A_n$ and $\underline{\lim}A_n$
QUESTION [5 upvotes]: Let $(A_n)_n$ be a countable family of subsets of a set $X$. We define:
$$\lim \inf A_n = \underline{\lim} A_n = \bigcup_{n \in \mathbb N} \bigcap_{k \ge n} A_k$$
$$\lim \sup A_n = \overline{\lim} A_n = \bigcap_{n \in \mathbb N} \bigcup_{k \ge n} A_k$$
I don't quite understand what is meant by these notions.
I'm studying measure theory, and this is part of the preliminaries section. The author only mentions the definitions with no further explanation or examples. 
I would appreciate some explanation and perhaps an example or two.
Thank you.

REPLY [2 votes]: Warning: this is more of a picture of the idea, rather than mathematically rigorous explanation.
The two limits are basically defining a candidate "limit set" by giving a bound from outside or inside. 
The lim sup is considering big union of sets, namely $\bigcup_{k \ge n} A_k$, and by taking intersections over $n$, we are throwing away stuff that appears only in finitely many $A_k$. If something appears in infinitely many $A_k$, it is a plausible candidate to be an element of a "limit set".
The lim inf works the other way around: we first select elements that, for $k\geq n$, appear in every $A_k$, that is $\bigcap_{k \ge n} A_k$. Those are definitely good candidates for a "limit set". Then we consider the union of all these intersections.
These two limits are good bounds for a candidate "limit set". On one hand, if $x$ is not in the limsup, then it means that $x$ is contained in only finitely many $A_n$, so it cannot belong to a reasonable "limit set"; the limsup is an "outer bound". On the other hand, anything that is contained in every set (except possibly finitely many) should probably be also in the "limit set"; the liminf is therefore an "inner bound".
To give an example, consider this sequence of sets:
$$
A_n = \begin{cases}
[0,1/2)\quad \mbox{if n is odd}\\
[1/2,1]\quad \mbox{if n is even}\\
\end{cases}
$$
Since $A_n\cap A_{n+1}=\emptyset$, the liminf is the empty set. Makes sense: there's no element that is contained in every set (for $n$ large enough). The limsup on the other hand is $[0,1]$, since every element in it keeps appearing in the sequence.