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: define prodPrimeFactors as an ArithmeticFunction #6662

Closed
wants to merge 13 commits into from

Conversation

FLDutchmann
Copy link
Collaborator

Define the arithmetic function $n \mapsto \prod_{p \mid n} f(p)$. This PR further proves that it's multiplicative and relates it to Dirichlet convolution. Finally it proves two identities that can be applied in a context where you're not working exclusively with ArithmeticFunctions

This construction was mentioned on zulip


prodToFinsetFactors_add_of_squarefree uses Nat division, as discussed earlier in #6344. To summarise why I think it is helpful:
On the LHS we have a product over the distinct factors of n, which is expanded to a product over the subsets of factors n.
On the RHS we have Dirichlet convolution. The natural thing to try is to write it as a sum over divisorsAntidiagonal, but relating that to subsets of factors n is difficult. Instead I write it as a sum over divisors, introducing Nat division, so that I can apply the existing (nontrivial!) theorem Nat.sum_divisors_filter_squarefree, which perfectly lines up the sums along the powerset.

Avoiding Nat division here would mean re-proving Nat.sum_divisors_filter_squarefree for divisorsAntidiagonal (likely only for squarefree n, since you can't filter by Squarefree). I claim it's easier to have a six-line lemma about Nat division instead.

Open in Gitpod

@FLDutchmann FLDutchmann added awaiting-review t-number-theory Number theory (also use t-algebra or t-analysis to specialize) t-analysis Analysis (normed *, calculus) t-algebra Algebra (groups, rings, fields, etc) labels Aug 18, 2023
| `(∏ᵖ $f) => `(prodToFinsetFactors $f)

@[simp]
theorem prodToFinsetFactors_apply [CommMonoidWithZero R] {f: ℕ → R} {n : ℕ} [hn : NeZero n] :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a mis-use of NeZero to me

Copy link
Collaborator Author

@FLDutchmann FLDutchmann Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose to do this based on a suggestion by @kbuzzard, and it does come in handy for IsMultiplicative.prodToFinsetFactors in that (a) it works with simp_rw and (b) it automatically deduces NeZero (x*y)

@alreadydone
Copy link
Contributor

alreadydone commented Aug 23, 2023

Define the arithmetic function $n \mapsto \prod_{p \mid n} f(p)$.

For f = id this is the radical of n and can be used to state the abc conjecture, now that we have #6508 ... How easy is the equivalence with Szpiro's conjecture?

Zulip

scoped macro_rules (kind := bigproddvd)
| `(∏ᵖ $x:ident ∣ $n, $r) => `(prodToFinsetFactors (fun $x ↦ $r) $n)

/-- `∏ᵖ f` is custom notation for `prodToFinsetFactors f` -/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this notation is a good idea - it could also refer to the product over primes (rather than prime divisors of a fixed number)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a fair concern. It was only used in one place so I've removed it.

It does make me think about other possible notations for the bare arithmetic function. Something like ∏ᵖ p ∣ _, f p or ∏ᵖ p ∣ ·, f p comes to mind but they obviously interfere with much more fundamental notation.

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ToFinsetFactors occurs in a lot of places. I think that's a sign that we should define the prime divisors of a number as a finset, and give it a name. Could be factorsSet or factors'. Or maybe we have a quick poll on zulip about a good name.

@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review labels Sep 14, 2023
@bors bors bot changed the base branch from master to ScottCarnahan/BinomialRing2 September 17, 2023 03:26
@kim-em kim-em changed the base branch from ScottCarnahan/BinomialRing2 to master September 17, 2023 12:12
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 25, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Dec 22, 2023
@FLDutchmann FLDutchmann added awaiting-review awaiting-CI and removed awaiting-author A reviewer has asked the author a question or requested changes labels Dec 22, 2023
@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review labels Dec 26, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Dec 26, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Dec 27, 2023
@FLDutchmann FLDutchmann changed the title Define prodToFinsetFactors as an ArithmeticFunction feat: define prodPrimeFactors as an ArithmeticFunction Dec 27, 2023
@FLDutchmann FLDutchmann added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes labels Dec 27, 2023
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🎉

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Dec 27, 2023
mathlib-bors bot pushed a commit that referenced this pull request Dec 27, 2023
Define the arithmetic function $n \mapsto \prod_{p \mid n} f(p)$. This PR further proves that it's multiplicative and relates it to Dirichlet convolution. Finally it proves two identities that can be applied in a context where you're not working exclusively with `ArithmeticFunction`s

This construction was mentioned on [zulip](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/finite.20product.20of.20infinite.20sums/near/379577022)



Co-authored-by: Arend Mellendijk <[email protected]>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Dec 27, 2023

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: define prodPrimeFactors as an ArithmeticFunction [Merged by Bors] - feat: define prodPrimeFactors as an ArithmeticFunction Dec 27, 2023
@mathlib-bors mathlib-bors bot closed this Dec 27, 2023
@mathlib-bors mathlib-bors bot deleted the arend/prodDistinctFactors branch December 27, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc) 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.

6 participants