New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat(NumberTheory/EulerProduct/Basic): use infinite products, golf #12161
Conversation
!bench |
Here are the benchmark results for commit 33b2a2b. |
Mathlib.NumberTheory.EulerProduct.Basic instructions: 12,643 Mrd. -1,52 Mrd. -12,023 % 11,123 Mrd. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! It's great to have these results for two reasons – not just because it's the morally right generality for Euler products, but also because it's a good testing ground for whether the new HasProd
stuff is set up as it should be.
Co-authored-by: David Loeffler <d.loeffler.01@cantab.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good now!
maintainer merge
🚀 Pull request has been placed on the maintainer queue by loefflerd. |
Thanks! bors merge |
…12161) This adds versions of the various Euler product statements in terms of the new topological products, namely `HasProd (fun p : Primes ↦ ∑' e, f (p ^ e)) (∑' n, f n)` and `∏' p : Primes, ∑' e, f (p ^ e) = ∑' n, f n` (and similar for completely multiplicative `f` in terms of `(1 - f p)⁻¹`). At the same time, I have reworked the proofs to some extent (in particular removing a few slow `convert`s). I also added a bunch of local instances that speed up instance synthesis by a factor of 2 (from 1.4 to 0.7 seconds on my laptop). Unfortunately, this means that the diff is fairly large. See [here](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/L-series/near/432666616) and [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Infinite.20products/near/431508883) on Zulip. Co-authored-by: Michael Stoll <99838730+MichaelStollBayreuth@users.noreply.github.com>
Build failed (retrying...): |
Re-adding to the queue: |
Canceled. |
bors r+ |
…12161) This adds versions of the various Euler product statements in terms of the new topological products, namely `HasProd (fun p : Primes ↦ ∑' e, f (p ^ e)) (∑' n, f n)` and `∏' p : Primes, ∑' e, f (p ^ e) = ∑' n, f n` (and similar for completely multiplicative `f` in terms of `(1 - f p)⁻¹`). At the same time, I have reworked the proofs to some extent (in particular removing a few slow `convert`s). I also added a bunch of local instances that speed up instance synthesis by a factor of 2 (from 1.4 to 0.7 seconds on my laptop). Unfortunately, this means that the diff is fairly large. See [here](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/L-series/near/432666616) and [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Infinite.20products/near/431508883) on Zulip. Co-authored-by: Michael Stoll <99838730+MichaelStollBayreuth@users.noreply.github.com>
Build failed (retrying...): |
…12161) This adds versions of the various Euler product statements in terms of the new topological products, namely `HasProd (fun p : Primes ↦ ∑' e, f (p ^ e)) (∑' n, f n)` and `∏' p : Primes, ∑' e, f (p ^ e) = ∑' n, f n` (and similar for completely multiplicative `f` in terms of `(1 - f p)⁻¹`). At the same time, I have reworked the proofs to some extent (in particular removing a few slow `convert`s). I also added a bunch of local instances that speed up instance synthesis by a factor of 2 (from 1.4 to 0.7 seconds on my laptop). Unfortunately, this means that the diff is fairly large. See [here](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/L-series/near/432666616) and [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Infinite.20products/near/431508883) on Zulip. Co-authored-by: Michael Stoll <99838730+MichaelStollBayreuth@users.noreply.github.com>
Pull request successfully merged into master. Build succeeded: |
…12161) This adds versions of the various Euler product statements in terms of the new topological products, namely `HasProd (fun p : Primes ↦ ∑' e, f (p ^ e)) (∑' n, f n)` and `∏' p : Primes, ∑' e, f (p ^ e) = ∑' n, f n` (and similar for completely multiplicative `f` in terms of `(1 - f p)⁻¹`). At the same time, I have reworked the proofs to some extent (in particular removing a few slow `convert`s). I also added a bunch of local instances that speed up instance synthesis by a factor of 2 (from 1.4 to 0.7 seconds on my laptop). Unfortunately, this means that the diff is fairly large. See [here](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/L-series/near/432666616) and [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Infinite.20products/near/431508883) on Zulip. Co-authored-by: Michael Stoll <99838730+MichaelStollBayreuth@users.noreply.github.com>
…12161) This adds versions of the various Euler product statements in terms of the new topological products, namely `HasProd (fun p : Primes ↦ ∑' e, f (p ^ e)) (∑' n, f n)` and `∏' p : Primes, ∑' e, f (p ^ e) = ∑' n, f n` (and similar for completely multiplicative `f` in terms of `(1 - f p)⁻¹`). At the same time, I have reworked the proofs to some extent (in particular removing a few slow `convert`s). I also added a bunch of local instances that speed up instance synthesis by a factor of 2 (from 1.4 to 0.7 seconds on my laptop). Unfortunately, this means that the diff is fairly large. See [here](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/L-series/near/432666616) and [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Infinite.20products/near/431508883) on Zulip. Co-authored-by: Michael Stoll <99838730+MichaelStollBayreuth@users.noreply.github.com>
…12161) This adds versions of the various Euler product statements in terms of the new topological products, namely `HasProd (fun p : Primes ↦ ∑' e, f (p ^ e)) (∑' n, f n)` and `∏' p : Primes, ∑' e, f (p ^ e) = ∑' n, f n` (and similar for completely multiplicative `f` in terms of `(1 - f p)⁻¹`). At the same time, I have reworked the proofs to some extent (in particular removing a few slow `convert`s). I also added a bunch of local instances that speed up instance synthesis by a factor of 2 (from 1.4 to 0.7 seconds on my laptop). Unfortunately, this means that the diff is fairly large. See [here](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/L-series/near/432666616) and [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Infinite.20products/near/431508883) on Zulip. Co-authored-by: Michael Stoll <99838730+MichaelStollBayreuth@users.noreply.github.com>
…t and L-series (#12809) This is a follow-up to [#12161](#12161). It adds `HasProd` and `tsum` versions of the Euler Product statements for the Riemann zeta function and Dirichlet L-series (in the latter case, also replacing the explicit infinite sum by `L ↗χ s`). See [this Zulip thread](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/L-series/near/438037266).
This adds versions of the various Euler product statements in terms of the new topological products, namely
HasProd (fun p : Primes ↦ ∑' e, f (p ^ e)) (∑' n, f n)
and∏' p : Primes, ∑' e, f (p ^ e) = ∑' n, f n
(and similar for completely multiplicativef
in terms of(1 - f p)⁻¹
).At the same time, I have reworked the proofs to some extent (in particular removing a few slow
convert
s). I also added a bunch of local instances that speed up instance synthesis by a factor of 2 (from 1.4 to 0.7 seconds on my laptop).Unfortunately, this means that the diff is fairly large.
See here and here on Zulip.