Limit inferior and limit superior (source code)

= Limit inferior and limit superior
{title2=$\liminf$, $\limsup$}
{wiki}

The <limit inferior> and <limit superior> retain the lower and upper long-run behaviour of a real <sequence>, even when it has no ordinary <limit of a sequence>. For each <tail of a sequence> beginning at $N$, define
$$
l_N=\inf\{a_n:n\geq N\},\qquad u_N=\sup\{a_n:n\geq N\}.
$$
Discarding more initial terms raises or preserves the <infimum> and lowers or preserves the <supremum>. Hence $(l_N)$ is nondecreasing and $(u_N)$ is nonincreasing. Their <limits> exist in the <extended real number line>:
$$
\liminf_{n\to\infty}a_n=\lim_{N\to\infty}l_N=\sup_N l_N,\qquad
\limsup_{n\to\infty}a_n=\lim_{N\to\infty}u_N=\inf_N u_N.
$$
For a <bounded sequence>, both values are finite and $\liminf a_n\leq\limsup a_n$. These bounds use the entire infinite <tail of a sequence>, rather than the last few observed terms. https://ocw.mit.edu/courses/18-100a-real-analysis-fall-2020/mit18_100af20_lec92.pdf[MIT 18.100A, Lecture 9, Definition 3 and Theorem 4: tail bounds and monotonicity]{ref}.

Take the original example $a_n=(-1)^n(1+1/n)$, beginning $-2,3/2,-4/3,5/4,\ldots$. The <subsequence> at <even integers> decreases toward one, while the <subsequence> at <odd integers> increases toward minus one. If $e_N$ is the first <even integer> at least $N$ and $o_N$ is the first <odd integer> at least $N$, then
$$
u_N=1+1/e_N,\qquad l_N=-1-1/o_N.
$$
Thus \b[$\liminf a_n=-1$ and $\limsup a_n=1$]. The finite initial extreme $a_1=-2$ disappears from later lower bounds; neither long-run value is attained by any term of this example.

\Image[/liminf-limsup-moving-tail-envelopes.png]
{title=<Infima> and <suprema> of successively shorter sequence tails approach the <limit inferior> and <limit superior>}
{description=The original <sequence> $a_n=(-1)^n(1+1/n)$ alternates beyond both limiting levels. The exact bounds are determined by the first remaining odd and even indices, producing monotone stair-step envelopes. Although only a finite portion is drawn, these formulas describe every infinite tail.}

For a <bounded sequence>, the <limit inferior> is the smallest <subsequential limit> and the <limit superior> is the largest <subsequential limit>; both are reached by suitable <convergent subsequences>. Every other <subsequential limit> lies between them. In the example there are only two <subsequential limits>, $-1$ and $1$: a convergent <subsequence> cannot retain infinitely many terms of both parities, because those two branches stay separated. The whole <interval> between the two bounds need not consist of <subsequential limits>. <Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl/2.3 Limit superior, limit inferior, and Bolzano–Weierstrass>[Lebl, Basic Analysis I, §2.3: extreme subsequential limits]{ref}.

A finite ordinary <limit of a sequence> exists exactly when the <limit inferior> and <limit superior> agree at the same finite value $L$. The bounds $l_N\leq a_N\leq u_N$ and the <squeeze theorem> prove the sufficient direction. For a <bounded sequence>, its <tail diameter of a sequence> is $D_N=u_N-l_N$, so the limiting gap is zero exactly when the <Cauchy sequence> condition holds. In the example the gap approaches two, not zero. The same framework allows infinite bounds: $a_n=n$ has both values $+\infty$, whereas $a_n=(-1)^n n$ has <limit inferior> $-\infty$ and <limit superior> $+\infty$. Equality at infinity describes escape rather than convergence to a real value. <Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl/2.3 Limit superior, limit inferior, and Bolzano–Weierstrass>[Lebl, Basic Analysis I, §2.3: equality of finite bounds and extended limits]{ref}.