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: add lemma exists_squarefree_dvd_pow_of_ne_zero #10241

Closed
wants to merge 4 commits into from

Conversation

ocfnash
Copy link
Contributor

@ocfnash ocfnash commented Feb 4, 2024


Open in Gitpod

@ocfnash ocfnash added awaiting-review The author would like community review of the PR easy < 20s of review time. See the lifecycle page for guidelines. t-algebra Algebra (groups, rings, fields etc) labels Feb 4, 2024
Copy link
Collaborator

@adomani adomani left a comment

Choose a reason for hiding this comment

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

LGTM

My only comment is adding a symmetrical doc-string.

Mathlib/Algebra/Associated.lean Outdated Show resolved Hide resolved
@ocfnash ocfnash added awaiting-CI and removed easy < 20s of review time. See the lifecycle page for guidelines. labels Feb 5, 2024
Mathlib/Algebra/Associated.lean Show resolved Hide resolved
Comment on lines 98 to 99
lemma exists_squarefree_dvd_pow_of_ne_zero (hx : x ≠ 0) :
∃ (y : R) (n : ℕ), Squarefree y ∧ x ∣ y ^ n := by
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be strengthened to require that y divides x.

I started the DecompositionMonoid refactoring in that branch, and I think every lemma in this file can be generalized to DceompositionMonoid (and two only require CancelCommMonoidWithZero as you can see). However this new lemma can't be generalized, since (assuming DecompositionMonoid) it implies factorizability into squarefree elements, which is the subject of Proposition 3.4 in the paper. Note that DecompositionMonoid + factorizability into irreducibles would imply UFM right away.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This can be strengthened to require that y divides x.

Good point, I will add this.

I started the DecompositionMonoid refactoring in that branch ...

Great, thanks for taking this on. As an aside, I would argue that your proposed IsRelPrime should really get the label IsCoprime and what is currently called IsCoprime should either be dropped or renamed something like ExistsBezout or IsBezoutPair or something.

Copy link
Contributor

Choose a reason for hiding this comment

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

Having Bezout in the name is nice; IsCoprime is equivalent to IsRelPrime in Bezout rings (IsBezout), and most results in Mathlib.RingTheory.PrincipalIdealDomain can be generalized to Bezout rings (but maybe the correct approach is to replace IsCoprime by IsRelPrime and use the equivalence when necessary ...). There is IsBezout.gcd but maybe it's better to allow a separate GCDMonoid instance and use that gcd so the lemmas won't just apply to the particular choice of gcd/generators.

Indeed most lemmas about IsRelPrime has coprime in their names instead. I think we have to use a new name (and IsRelPrime) is my choice, since IsCoprime is widely used and we'd like to deprecate it rather than renaming it right away. I won't rename the lemmas so that they have the right names when we later rename IsRelPrime back to IsCoprime. (But do we need to deprecate IsRelPrime then? Maybe it's better to rename IsCoprime right now ...)

I still think IsComaximal is a reasonable name, since IsCoprime x y is equivalent to the comaximality (currently with the unintuitive name Codisjoint) of the ideals they generate, and also to the comaximality of the basic opens in the spectrum.

Proof stolen from branch#DecompositionMonoid

Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
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 The author would like community review of the PR labels Feb 5, 2024
@mathlib-bors
Copy link

mathlib-bors bot commented Feb 5, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: add lemma exists_squarefree_dvd_pow_of_ne_zero [Merged by Bors] - feat: add lemma exists_squarefree_dvd_pow_of_ne_zero Feb 5, 2024
@mathlib-bors mathlib-bors bot closed this Feb 5, 2024
@mathlib-bors mathlib-bors bot deleted the ocfnash/squarefree_dvd branch February 5, 2024 14:11
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants