Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

MichaelStollBayreuth
Copy link
Collaborator

@MichaelStollBayreuth MichaelStollBayreuth commented Apr 15, 2024

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 converts). 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.


Open in Gitpod

@MichaelStollBayreuth MichaelStollBayreuth added awaiting-review The author would like community review of the PR awaiting-CI t-number-theory Number theory (also use t-algebra or t-analysis to specialize) t-analysis Analysis (normed *, calculus) labels Apr 15, 2024
@MichaelStollBayreuth
Copy link
Collaborator Author

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 33b2a2b.
There were no significant changes against commit bec5207.

@MichaelStollBayreuth
Copy link
Collaborator Author

MichaelStollBayreuth commented Apr 16, 2024

Mathlib.NumberTheory.EulerProduct.Basic instructions: 12,643 Mrd. -1,52 Mrd. -12,023 % 11,123 Mrd.
(Mrd. = 10⁹)

@loefflerd loefflerd self-assigned this Apr 16, 2024
Copy link
Collaborator

@loefflerd loefflerd left a 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.

Mathlib/NumberTheory/EulerProduct/Basic.lean Outdated Show resolved Hide resolved
Mathlib/NumberTheory/EulerProduct/Basic.lean Outdated Show resolved Hide resolved
Mathlib/NumberTheory/EulerProduct/Basic.lean Outdated Show resolved Hide resolved
Mathlib/NumberTheory/EulerProduct/Basic.lean Outdated Show resolved Hide resolved
Mathlib/NumberTheory/EulerProduct/Basic.lean Outdated Show resolved Hide resolved
Mathlib/NumberTheory/EulerProduct/Basic.lean Show resolved Hide resolved
Mathlib/NumberTheory/EulerProduct/Basic.lean Outdated Show resolved Hide resolved
Mathlib/NumberTheory/EulerProduct/Basic.lean Show resolved Hide resolved
Mathlib/NumberTheory/EulerProduct/Basic.lean Outdated Show resolved Hide resolved
Mathlib/NumberTheory/EulerProduct/Basic.lean Show resolved Hide resolved
@loefflerd loefflerd added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Apr 16, 2024
Co-authored-by: David Loeffler <d.loeffler.01@cantab.net>
Copy link
Collaborator

@loefflerd loefflerd left a 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

Copy link

🚀 Pull request has been placed on the maintainer queue by loefflerd.

@MichaelStollBayreuth MichaelStollBayreuth added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Apr 17, 2024
@riccardobrasca
Copy link
Member

Thanks!

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Apr 18, 2024
mathlib-bors bot pushed a commit that referenced this pull request Apr 18, 2024
…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>
@mathlib-bors
Copy link

mathlib-bors bot commented Apr 18, 2024

Build failed (retrying...):

@urkud
Copy link
Member

urkud commented Apr 18, 2024

Re-adding to the queue:
bors r-

@mathlib-bors
Copy link

mathlib-bors bot commented Apr 18, 2024

Canceled.

@urkud
Copy link
Member

urkud commented Apr 18, 2024

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Apr 18, 2024
…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>
@mathlib-bors
Copy link

mathlib-bors bot commented Apr 18, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Apr 18, 2024
…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>
@mathlib-bors
Copy link

mathlib-bors bot commented Apr 18, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(NumberTheory/EulerProduct/Basic): use infinite products, golf [Merged by Bors] - feat(NumberTheory/EulerProduct/Basic): use infinite products, golf Apr 18, 2024
@mathlib-bors mathlib-bors bot closed this Apr 18, 2024
@mathlib-bors mathlib-bors bot deleted the MS_LSeries_EulerProducts_tprod branch April 18, 2024 04:28
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
…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>
callesonne pushed a commit that referenced this pull request Apr 22, 2024
…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>
Jun2M pushed a commit that referenced this pull request Apr 24, 2024
…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>
mathlib-bors bot pushed a commit that referenced this pull request May 17, 2024
…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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer-merge ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus) t-number-theory Number theory (also use t-algebra or t-analysis to specialize)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants