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(data/nat/gcd): add coprime_prod_left and coprime_prod_right #12268
Conversation
nomeata
commented
Feb 24, 2022
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.
LGTM, let's see if any other reviewers can think of a better home
Any other reviewers with an opionion? |
|
||
open_locale big_operators | ||
|
||
lemma coprime_prod_left |
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.
Should we not prove these for unique_factorization_monoid
s rather than just ℕ
?
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.
They are specializions from these: https://leanprover-community.github.io/mathlib_docs/ring_theory/coprime/lemmas.html#is_coprime.prod_left because it's hard to use them at N. Having a single notion of coprime and a single set of lemmas that works everywhere would be great.
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.
Oh I see, how unfortunate that nat.coprime
has its own weird definition :-/
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.
(Even worse, nat.coprime
is actually in the Lean library itself.)
Thanks for these. I think worth adding a reference to the more general versions https://leanprover-community.github.io/mathlib_docs/ring_theory/coprime/lemmas.html#is_coprime.prod_left (and right) in the doc strings but otherwise great. bors d+ |
✌️ nomeata can now approve this pull request. To approve and merge a pull request, simply reply with |
Bors merge |
Pull request successfully merged into master. Build succeeded: |