1 Euler’s constant in infinite sum form. (Sondow (2005).)
(Note: The index of the inner summand in the Lean definition is shifted by one so the series can be expressed as a sum from \(n=0\) to \(\infty \) (so we can use "tsum" for cleaner proof).)
For every integer \(n \ge 1\),
The inequality \(\ln x \le x-1\) holds for all \(x {\gt} 0\). Taking \(x=\frac{n+1}{n}\) gives
Rearranging yields the stated nonnegativity.
For every integer \(N \ge 1\),
where \(H_{N}=\sum _{n=1}^N \frac{1}{n}\) is the \(N\)-th harmonic number.
Split the sum:
The first term is \(H_{N}\). The second term telescopes:
Combining gives the claimed identity.
For every integer \(N \ge 1\),
We use the results from the previous lemma, and get the sum as \(H_N - \ln {N + 1}\). This is the same as mathlib’s "Real.eulerMascheroniSeq" we can use the results from mathlib. (Alternately, we can use the fact that the upper bound of \(\gamma \) is \(2/3\) and \(\gamma {\lt} H_{N} - \ln {N+1}\) to get a stricter results?)
By combining all of the previous results (plus the fact that \(H_n - \ln {n+1}\) that we got from partial sum is basically the same as mathlib’s one), we can conclude that the infinite sum is equal to \(\lim _{n \to \infty }\left(H_{n} - \ln n\right)\)