Zulip Chat Archive
Stream: mathlib4
Topic: Nat.ArithmeticFunction --> ArithmeticFunction
Michael Stoll (Feb 09 2024 at 19:00):
It seems to me that the Nat.
part in the namespace Nat.ArithmeticFunction
is unnecessary, as I would not expect the need for "arithmetic functions" defined on something else than Nat
to arise.
Would there be any objections to removing it?
Kevin Buzzard (Feb 09 2024 at 19:20):
You should change it to PNat
;-)
Yaël Dillies (Feb 09 2024 at 19:56):
I agree you can remove it
Michael Stoll (Feb 09 2024 at 20:29):
I'll do that once #10385 is merged (and I had some sleep...).
Michael Stoll (Feb 10 2024 at 10:59):
Michael Stoll (Feb 10 2024 at 13:32):
As a next step here. I would like to put the various notations introduced in NumberTheory.AithmeticFunction
into separate scopes (like ArithmeticFunction.vonMangoldt
for Λ
), so that it will be possible to make them available more selectively. For example, in some context I would like to use Λ
for the von Mangoldt function but at the same time ζ
as a (local) notation for the Riemann zeta function.
Objections?
Yaël Dillies (Feb 10 2024 at 13:33):
Objection: Make it possible to get all notations by opening a single locale
Michael Stoll (Feb 10 2024 at 13:33):
How does one do that?
Yaël Dillies (Feb 10 2024 at 13:33):
Can locales be hierarchised?
Michael Stoll (Feb 10 2024 at 13:34):
No idea.
Michael Stoll (Feb 10 2024 at 13:34):
Is there documentation on locales somewhere?
Yaël Dillies (Feb 10 2024 at 13:34):
At worse you can define the notations in two locales
Michael Stoll (Feb 10 2024 at 13:35):
So just add separate locales for the various definitions in addition to what exists, I guess?
Yaël Dillies (Feb 10 2024 at 13:35):
I think that's good, yes
Michael Stoll (Feb 10 2024 at 13:36):
OK; I'll try that.
Michael Stoll (Feb 10 2024 at 13:43):
This approach seems to work in a simple test file, so it looks good.
Michael Stoll (Feb 10 2024 at 14:04):
Antoine Chambert-Loir (Feb 10 2024 at 16:49):
I wonder whether the locale shouldn't be named RiemannZeta
and RiemannSigma
, for example if one wishes to have DedekindZeta
or WeierstrassSigma
…
Michael Stoll (Feb 10 2024 at 18:29):
Note that this zeta is not the Riemann zeta function, but the arithmetic function giving its coefficients (i.e., it is the constant function 1 except that zero is mapped to zero). So I don't think RiemannZeta
is a good name here.
(We can of course introduce notation ζ
for the Riemann zeta function in a locale RiemannZeta
in addition.)
Antoine Chambert-Loir (Feb 10 2024 at 22:44):
Well, then zeta is a rather confusing name, is it?
(Stupid remark that shows I must have missed some episodes: the ring of arithmetic functions is just the large monoid algebra of the strictly positive integers. Thinking of it in this way would have a lot of the lemmas be general instances of what exists, say, for power series, etc.)
Junyan Xu (Feb 11 2024 at 00:01):
HahnSeries (Additive ℕ+) R
probably works :)
(Edit: maybe only Additive (Associates ℕ+)
has the correct order + algebra structure.)
Michael Stoll (Feb 11 2024 at 10:10):
It would, I think, but is perhaps a bit overkill and likely painful to use in concrete cases.
Michael Stoll (Feb 11 2024 at 10:11):
(Historically, arithmetic functions in Mathlib seem to predate Hahn series.)
Michael Stoll (Feb 11 2024 at 10:14):
Antoine Chambert-Loir said:
Well, then zeta is a rather confusing name, is it?
I assume it is fairly standard in the context of arithmetic functions. The goal of #10403 is to mitigate the confusion by enabling you to just import notation for the Möbius and von Mangoldt functions (say).
Antoine Chambert-Loir (Feb 11 2024 at 11:03):
(It is called z
in the book where I learnt this, D. P. Parent, Exercises in Number Theory, and I have to admit that z
is not really better than ζ
.)
Antoine Chambert-Loir (Feb 11 2024 at 11:04):
Serious question : can you define the Riemann zeta function using the notation, and have the notation ζ
for both of them?
Michael Stoll (Feb 11 2024 at 11:42):
I think yes:
import Mathlib.NumberTheory.LSeries.Basic
import Mathlib.NumberTheory.ZetaFunction
open ArithmeticFunction
open scoped ArithmeticFunction -- defines `ζ` as an arith. function
notation "ζ" => riemannZeta
#check (ζ : ℂ → ℂ) = LSeries ζ -- error without type ascription
variable (s : ℂ)
#check ζ s = LSeries ζ s
Last updated: May 02 2025 at 03:31 UTC