limit inferior and superior for sets vs real numbers
I am looking for an intuitive explanation of $\liminf$ and $\limsup$ for sequence of sets and how it corresponds to $\liminf$ and $\limsup$ for sets of real numbers. I researched online but cannot find a good comparison. Any link, reference or answer very much appreciated.
For example, what is $\liminf$ and $\limsup$ of real number sequences $a_n=(-1)^n$ and $b_n=1/n$. Corresponding to this, what is the $\liminf$ and $\limsup$ of sequence of sets $A_n=\{(−1)^n\}$ and $B_n=\{1/n\}$?
Let's deal with the examples first.
The $\liminf$ of the real sequence $\{a_n\}$ with $a_n = (-1)^n$ is $-1$; the $\limsup$ of the same sequence is $1$. For the sequence $\{b_n\}$, with $b_n=\frac{1}{n}$, since the sequence converges to $0$, every subsequence converges to $0$ so both $\liminf$ and $\limsup$ are equal to $0$. You can think of the $\liminf$ as the infimum of the all the limits of all converging subsequences of the sequence, and the $\limsup$ is the supremum of all the limits of all converging subsequences of the sequences.
Using the definitions given by Jens, for $A_n=\{(-1)^n\}$ the $\limsup$ is $\{-1, 1\}$, because both elements show up in infinitely many of the $A_n$, and the $\liminf$ is empty, because no element occurs in all but finitely many of the $A_n$. For $B_n$, they are both empty because no element occurs in infinitely many of the sets, nor in all but finitely many (each element occurs in only one $B_n$). Again, $\liminf$ is the collection of all points that are in all but finitely many of the sets, while $\limsup$ is the collection of all points that are in infinitely many of the sets.
But you are looking at the wrong sets if you want your sets to be related to your sequences. As Nate Eldredge points out, what you should be looking at is the set $A_n = (-\infty,a_n)$, or $A_n = (-\infty,(-1)^n)$. Using that definition, you have that $\limsup A_n = (-\infty,1)$ (as expected, since $\limsup a_n = 1$; each of these numbers occurs in infinitely many of the $A_n$), and $\liminf A_n=(-\infty,-1)$ because those are the only ones that occur in all but finitely many of the sets (in fact, in all; every other number that occurs in any $A_n$ occurs only in the $A_n$ with even $n$, so is missing from infinitely many $A_n$); while if you let $B_n = (-\infty,\frac{1}{n})$, then $\liminf B_n=\limsup B_n = (-\infty,0]$ (again, as expected, since the limit inferior and limit superior of $b_n$ are both equal to $0$).
Now, the reason you seem to be getting hung up is that there seems to be little relation between the limits inferior and superior of a $a_n$, and the limits inferior and superior of the sequence of sets $\{a_n\}$. But the point that Nate Eldredge made is that these are not the sets you want to associate with the sequence $a_n$.
You may remember that a sequence $\{a_n\}$ converges to $L$ if and only if every subsequence $\{a_{n_k}\}$ converges to $L$. Also, every sequence contains a monotone sequence, so if we allow $\infty$ and $-\infty$ as "limits", it follows that every sequence will necessarily have a converging subsequence. So one can ask: "what are all the points $M$ for which there is a subsequence of $\{a_n\}$ that converges to $M$?" One can view the limits inferior and superior in terms of this set: the limit inferior of the sequence is the smallest number $\ell$ (including possibly $\infty$ or $-\infty$) for which there is a subsequence of $\{a_n\}$ converging to $\ell$. The limit superior is the largest number $L$ for which there is a subsequence of $\{a_n\}$ that converges to $L$. As it happens, the limit exists if and only if $\ell=L$. The limits inferior and superior can also be defined by $$\liminf a_n = \lim_{n\to\infty}(\inf\{a_m|m\geq n\}) = \sup_n\left(\inf\{a_m|m\geq n\}\right)$$ and $$\limsup a_n = \lim_{n\to\infty}(\sup\{a_m|m\geq n\}) = \inf_n\left(\sup\{a_m|m\geq n\}\right).$$
Viewed like this, you can perhaps see a bit more of a connection with the limits inferior and superior of a sequence of sets. If $\{A_n\}$ is a sequence of sets, then the limits inferior and superior are defined to be: $$\liminf A_n = \cup_{n=1}^{\infty}\left(\cap_{m=n}^{\infty} A_m\right)$$ and $$\limsup A_n = \cap_{n=1}^{\infty}\left(\cup_{m=n}^{\infty} A_m\right).$$ Think of an intersection as taking "smallest" thing in common (so like an infimum), and think of union as taking "largest" thing in common (so like a supremum). The limit inferior is the supremum of the infima, while the limit superior is the infimum of the suprema. It is now a nice exercise to verify that $\liminf A_n$ is the collection of all things which are in all but finitely many of the $A_i$, while $\limsup A_n$ is the collection of all things which are in infinitely many of the $A_i$ (as described by Jens).
So, how do you connect a sequence $\{a_n\}$ to sets so that the limits inferior and superior correspond in some way? You can't just take $A_n = \{a_n\}$, because then each $A_n$ knows nothing about what came before or after; you lose all information that could tell you something about subsequences. You could try letting $A_n =\{a_m|m\geq n\}$, and that will even work in some instances, but the problem here is that the information you are losing is that in the real numbers, a sequence may converge to a number even if no term in the sequence equals the limit; then the limit is never going to show up in any of the sets, and it's not going to show up in the limits inferior nor superior of the sets.
What's the solution? The limit inferior of a sequence is going to be a lower bound for all but finitely many of the terms of the sequence (if there were infinitely many terms of the sequence strictly smaller than $\liminf a_n$, then you would be able to get a subsequence from among them that converges to something strictly smaller than $\liminf a_n$, a contradiction). This suggests that what you want to do is let $A_n$ be the collection of all lower bounds to $a_n$; then the limit inferior of the $A_n$ will be the collection of all things that are lower bounds to all but finitely many terms of the sequence, exactly the set you want to consider to find $\liminf a_n$.
What is the limit superior of $a_n$? You can define it dually, as the smallest of all numbers that upper bounds for all but finitely many terms of the sequence (this will lead to the formula that says that $\limsup a_n = -\liminf(-a_n)$). Or you can try to define it in terms of the lower bounds again: any number $k$ strictly smaller than the limit superior must have infinitely many terms of the sequence larger than $k$ (otherwise, no subsequence could converge to something larger, so no subsequence could converge to the limit superior). That is: look at the collection of all things that are lower bounds for infinitely many of the $a_n$, and the supremum of that will be the limit superior. So we again look at $A_n = (-\infty,a_n)$ (the set of all lower bounds to $a_n$), and consider the limit superior of the $A_n$; this is the collection of all numbers that are lower bounds to infinitely many of the $a_n$, and so its supremum will be $\limsup a_n$. So that's why you consider the set $A_n(-\infty,a_n)$ instead of the set $\{a_n\}$, and where they come from.
There are other ways of associating to each $a_n$ an appropriate set; in this situation, note that $\sup A_n = a_n$ for each $n$, that $\sup(\liminf A_n) = \liminf (\sup A_n) = \liminf a_n$, and $\sup(\limsup A_n) = \limsup(\sup A_n) = \limsup a_n$, which makes this association pretty nice.
I hope this helps clarify it further.
Here are two facts that may help with the analogy.
Let $x_n$ be a real sequence; let $A_n = (-\infty, x_n)$. Then $\limsup A_n = (-\infty, \limsup x_n)$ or $(-\infty, \limsup x_n]$. Similarly, $\liminf A_n = (-\infty, \liminf x_n)$ or $(-\infty, \liminf x_n]$.
Let $A_n$ be subsets of some set $\Omega$, and let $1_{A_n} : \Omega \to \mathbb{R}$ be the function which is 1 on $A_n$ and 0 on $A_n^c$. Then $\limsup 1_{A_n}(\omega) = 1_{\limsup A_n}(\omega)$ for all $\omega \in \Omega$, and similarly $\liminf 1_{A_n}(\omega) = 1_{\liminf A_n}(\omega)$.
As I know the limits of sequences of sets, the limit superior consists of all points contained in infinitely many of these sets, the limit inferior are all points contained in almost all sets.
$$\limsup A_n = \{x | x\in A_n \text{ for infinitely many }n\}$$
$$\liminf A_n = \{x | x\in A_n \text{ for all but finitely many }n\}$$
As far as I know, they do not correspond with the limits of sequences of real numbers in an obvious way. I've come to the conclusion that they are poorly named, but I may lack insight here. =)