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

feat(number_theory/divisors): add divisors_mul #17041

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Oct 18, 2022

Extracted from this Zulip message.

Also fixes some bad indentation in nearby lemmas

Co-authored-by: Bhavik Mehta bhavikmehta8@gmail.com


Open in Gitpod

Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR awaiting-CI The author would like to see what CI has to say before doing more work. t-number-theory Number theory (also use t-algebra or t-analysis to specialize) labels Oct 18, 2022
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Oct 18, 2022
@b-mehta
Copy link
Collaborator

b-mehta commented Oct 19, 2022

I already have an open PR to change divisors to be a mul_hom, which gives this result as a consequence of map_mul, in #16917.

@eric-wieser
Copy link
Member Author

Do you have the dvd_mul lemma that I added here?

@b-mehta
Copy link
Collaborator

b-mehta commented Oct 20, 2022

No, since it's just a direct consequence of prod_dvd_and_dvd_of_dvd_prod. But perhaps it's still worth adding alone

@mathlib-dependent-issues-bot mathlib-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Oct 23, 2022
@mathlib-dependent-issues-bot mathlib-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Nov 10, 2022
@mathlib-dependent-issues-bot
Copy link
Collaborator

This PR/issue depends on:

Copy link
Collaborator

@tb65536 tb65536 left a comment

Choose a reason for hiding this comment

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

Here's a golf

Comment on lines +166 to +172
rcases m.eq_zero_or_pos with rfl | hm,
{ simp },
rcases n.eq_zero_or_pos with rfl | hn,
{ simp },
ext i,
simp only [hm.ne', hn.ne', finset.mem_mul, mem_divisors, ne.def, nat.mul_eq_zero, or_self,
not_false_iff, and_true, dvd_mul],
Copy link
Collaborator

@tb65536 tb65536 Nov 11, 2022

Choose a reason for hiding this comment

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

Suggested change
rcases m.eq_zero_or_pos with rfl | hm,
{ simp },
rcases n.eq_zero_or_pos with rfl | hn,
{ simp },
ext i,
simp only [hm.ne', hn.ne', finset.mem_mul, mem_divisors, ne.def, nat.mul_eq_zero, or_self,
not_false_iff, and_true, dvd_mul],
simp_rw [ext_iff, mem_mul, mem_divisors, dvd_mul, ←exists_and_distrib_right, mul_ne_zero_iff],
exact λ x, exists_congr (λ m, exists_congr (λ n, by tauto)),

@tb65536 tb65536 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 Nov 12, 2022
@semorrison semorrison added the too-late This PR was ready too late for inclusion in mathlib3 label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author A reviewer has asked the author a question or requested changes t-number-theory Number theory (also use t-algebra or t-analysis to specialize) too-late This PR was ready too late for inclusion in mathlib3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants