Zulip Chat Archive
Stream: Is there code for X?
Topic: Euler-Mascheroni constant
Michael Stoll (Dec 31 2023 at 22:08):
Is the Euler-Mascheroni constant defined somewhere in Mathlib?
Yury G. Kudryashov (Dec 31 2023 at 22:29):
Probably, no: @loogle tsum, Real.log
loogle (Dec 31 2023 at 22:29):
:shrug: nothing found
Terence Tao (Dec 31 2023 at 23:07):
Are there any properties would you like to have about beyond its mere existence? I started a project to obtain elementary estimates on sums of slowly varying functions which would eventually give things like this, but it's only in its early stages right now ( https://github.com/teorth/asymptotic ).
Terence Tao (Dec 31 2023 at 23:11):
In particular, I aim to show that whenever for some interval and is an element of , which is a useful estimate for estimating things like sums of , , etc..
Terence Tao (Dec 31 2023 at 23:14):
The unit fractions project may possibly already have this constant though, since they worked out Mertens' theorem. Let me check
Eric Rodriguez (Dec 31 2023 at 23:16):
It does, bhavik mentioned it.
Terence Tao (Dec 31 2023 at 23:19):
Terence Tao (Dec 31 2023 at 23:21):
I guess we should ping @Bhavik Mehta or @Thomas Bloom for the current status of this code (e.g., if it has been ported to Lean4 and/or Mathlib)
Michael Stoll (Dec 31 2023 at 23:28):
I'm trying to formalize the reduction of PNT to Wiener-Ikehara. The Euler-Mascheroni constant comes up like this:
import Mathlib
open BigOperators in
/-- The *Euler-Mascheroni Constant*, also equal to the limit of `∑ n < N, 1/n - log N`. -/
noncomputable
def γ : ℝ := ∫ x in Set.Ici (1 : ℝ), 1 / ⌊x⌋ - 1 / x
/-- The negative logarithmic derivative of the Riemann zeta function with a term added
to cancel the simple pole at `z = 1`. -/
noncomputable
def F (z : ℂ) : ℂ := if z = 1 then (-γ) else -deriv riemannZeta z / riemannZeta z - 1 / (z - 1)
lemma continuousOn_F : ContinuousOn F {z | z = 1 ∨ riemannZeta z ≠ 0} := by sorry
Of course, one only needs that one can fill in the singularity of F
with some value.
Terence Tao (Dec 31 2023 at 23:55):
If you already have meromorphic continuation of zeta around 1, and that zeta has a simple pole at 1, then one can get the existence of the constant from pure complex analysis.
Terence Tao (Dec 31 2023 at 23:57):
e.g., from the removable singularity theorem https://leanprover-community.github.io/mathlib4_docs/Mathlib/Analysis/Complex/RemovableSingularity.html
Terence Tao (Dec 31 2023 at 23:58):
Huh. I'm not seeing much support for meromorphic functions in Mathlib.
Terence Tao (Jan 01 2024 at 00:00):
But the analyticity and non-zero nature of the completed zeta function at s=1 should be enough.
Terence Tao (Jan 01 2024 at 00:05):
Indeed, one should be able to rewrite -deriv riemannZeta z / riemannZeta z - 1 / (z - 1)
as negative the log derivative of fun z ↦ (Λ z) * (z-1)
plus some terms that are easily seen to be analytic at z=1
, and the analyticity of the renormalized completed zeta function Λ₀
guarantees that (Λ z) * (z-1)
is analytic and non-zero at z=1
, and that suffices.
Junyan Xu (Jan 01 2024 at 01:25):
Meromorphic functions were last discussed here, but there has been no further PR since #7456 ...
Terence Tao (Jan 01 2024 at 02:07):
I guess one doesn't strictly speaking need a theory of memomorphic functions in order to have Laurent expansions around isolated singularities and the residue theorem (say for rectangular contours), which is what would be needed for analytic number theory applications.
Yaël Dillies (Jan 01 2024 at 08:38):
@Bhavik Mehta has it in unit-fractions Damn, I was too slow!
David Loeffler (Jan 03 2024 at 11:22):
Junyan Xu said:
Meromorphic functions were last discussed here, but there has been no further PR since #7456 ...
Yeah, I got side-tracked a bit on that one, sorry! I will dig up the code I wrote (definition of "meromorphic") and PR it.
David Loeffler (Jan 09 2024 at 13:38):
David Loeffler said:
Junyan Xu said:
Meromorphic functions were last discussed here, but there has been no further PR since #7456 ...
Yeah, I got side-tracked a bit on that one, sorry! I will dig up the code I wrote (definition of "meromorphic") and PR it.
I failed to dig up the code (I think I must have git stash
-ed it and then deleted that git checkout without realising it was there). Anyway, I've reconstructed the first chunk of it at #9590, which defines what it means for f
to be MeromorphicAt
a specific point.
Last updated: May 02 2025 at 03:31 UTC