Zulip Chat Archive

Stream: mathlib4

Topic: Is Stolz–Cesàro theorem formalized in mathlib?


Planck Anderson (Jul 15 2025 at 07:26):

Hi all,

I was wondering whether the Stolz–Cesàro theorem has been formalized in mathlib4 yet. I searched but couldn't find anything like stolz, cesaro, or relevant lemmas involving difference quotients of sequences.

To clarify, I’m referring to the version that says:

If bnb_n is strictly increasing and tends to ++\infty, and if

limnan+1anbn+1bn=L\lim_{n \to \infty} \frac{a_{n+1} - a_n}{b_{n+1} - b_n} = L

then

limnanbn=L.\lim_{n \to \infty} \frac{a_n}{b_n} = L.

Has this been proven or is anyone working on it?

Sébastien Gouëzel (Jul 15 2025 at 07:30):

We have docs#Filter.Tendsto.cesaro and docs#Filter.Tendsto.cesaro_smul (which are the classical version for b_n = n), but probably not the version you're mentioning (although the proof won't be really different).

Sébastien Gouëzel (Jul 15 2025 at 07:31):

(The main lemma in our proof is docs#Asymptotics.IsLittleO.sum_range, which is also suitable for your statement)

Planck Anderson (Jul 15 2025 at 08:12):

Hi Sébastien, thanks a lot for the detailed response!

My math background is still not very strong, and I'm not yet familiar with how to use the tools you mentioned to prove this version of the theorem.
So far I only know how to prove the Stolz–Cesàro theorem using the classical ε\varepsilonNN language, i.e.,

limnan=Lε>0, NN, nN, anL<ε.\lim_{n \to \infty} a_n = L \quad \Longleftrightarrow \quad \forall \varepsilon > 0,\ \exists N \in \mathbb{N},\ \forall n \ge N,\ |a_n - L| < \varepsilon.

But I’ll try to understand how to approach it using the Filter framework now — really appreciate the guidance!

Sébastien Gouëzel (Jul 15 2025 at 08:18):

The ϵN\epsilon-N approach is exactly what is done in the proof of docs#Asymptotics.IsLittleO.sum_range, there's no way around it in this proof. But it has already been done for you there, you just need to apply the lemma now.

Planck Anderson (Jul 15 2025 at 08:23):

Thanks for the reply!

How about the version of the Stolz–Cesàro theorem I’m referring to is the one usually proven in undergraduate real analysis using an ε–N argument. Below is the version and proof I mean, presented in full detail:

Let {yn}\{y_n\} be a strictly increasing sequence tending to ++\infty, and suppose

limnxnxn1ynyn1=a,for a+,\lim_{n \to \infty} \frac{x_n - x_{n-1}}{y_n - y_{n-1}} = a, \quad \text{for } -\infty \le a \le +\infty,

then we have

limnxnyn=a.\lim_{n \to \infty} \frac{x_n}{y_n} = a.

The proof I’m following goes like this:

• First prove the case a=0a = 0:

For any ε>0\varepsilon > 0, there exists NN such that for all n>Nn > N,

xnxn1<ε(ynyn1).|x_n - x_{n-1}| < \varepsilon (y_n - y_{n-1}).

Summing up, we get:

xnxN<ε(ynyN).|x_n - x_N| < \varepsilon (y_n - y_N).

Dividing both sides by yny_n and letting nn \to \infty gives:

xnynxNyn<ε(1yNyn)ε.\left| \frac{x_n}{y_n} - \frac{x_N}{y_n} \right| < \varepsilon \left( 1 - \frac{y_N}{y_n} \right) \to \varepsilon.

Hence limnxnyn=0\lim_{n \to \infty} \frac{x_n}{y_n} = 0.

• For general aRa \in \mathbb{R}, let xn=xnaynx_n' = x_n - a y_n. Then

limnxnyn=limn(xnyna),\lim_{n \to \infty} \frac{x_n'}{y_n} = \lim_{n \to \infty} \left( \frac{x_n}{y_n} - a \right),

and we reduce to the a=0a = 0 case again.

• For a=+a = +\infty, one shows that

xnxn1ynyn1>G\frac{x_n - x_{n-1}}{y_n - y_{n-1}} > G

for any G>0G > 0, eventually in nn, which implies xnx_n is also strictly increasing and diverges to ++\infty.

I will try to read docs#Asymptotics.IsLittleO.sum_range and prove it. And I also wanna try something like I mentioned~

Kenny Lau (Jul 15 2025 at 08:36):

@Planck Anderson well if there's a relevant lemma then you should always use it, in mathlib you shouldn't have to prove a lot of things from scratch

Planck Anderson (Jul 15 2025 at 08:47):

thanks a lot, I just found that docs#Asymptotics.IsLittleO.sum_range was really useful!!


Last updated: Dec 20 2025 at 21:32 UTC