[Merged by Bors] - feat: introduce IsRelPrime and DecompositionMonoid and refactor#10327
Closed
alreadydone wants to merge 39 commits intomasterfrom
Closed
[Merged by Bors] - feat: introduce IsRelPrime and DecompositionMonoid and refactor#10327alreadydone wants to merge 39 commits intomasterfrom
IsRelPrime and DecompositionMonoid and refactor#10327alreadydone wants to merge 39 commits intomasterfrom
Conversation
Contributor
Author
|
bors r+ |
mathlib-bors bot
pushed a commit
that referenced
this pull request
Feb 12, 2024
…10327) + Introduce typeclass `DecompositionMonoid`, which says every element in the monoid is primal, i.e., whenever an element divides a product `b * c`, it can be factored into a product such that the factors divides `b` and `c` respectively. A domain is called pre-Schreier if its multiplicative monoid is a decomposition monoid, and these are more general than GCD domains. + Show that any `GCDMonoid` is a `DecompositionMonoid`. In order for lemmas about `DecompositionMonoid`s to automatically apply to `UniqueFactorizationMonoid`s, we add instances from `UniqueFactorizationMonoid α` to `Nonempty (NormalizedGCDMonoid α)` to `Nonempty (GCDMonoid α)` to `DecompositionMonoid α`. ([Zulip](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/non-normalizable.20gcd_monoid/near/316895209)) See the bottom of message for an updated diagram of classes and instances. + Introduce binary predicate `IsRelPrime` which says that the only common divisors of the two elements are units. Replace previous occurrences in mathlib by this predicate. + Duplicate all lemmas about `IsCoprime` in Coprime/Basic (except three lemmas about smul) to `IsRelPrime`. Due to import constraints, they are spread into three files Algebra/Divisibility/Units (including key lemmas assuming DecompositionMonoid), GroupWithZero/Divisibility, and Coprime/Basic. + Show `IsCoprime` always imply `IsRelPrime` and is equivalent to it in Bezout rings. To reduce duplication, the definition of Bezout rings and the GCDMonoid instance are moved from RingTheory/Bezout to RingTheory/PrincipalIdealDomain, and some results in PrincipalIdealDomain are generalized to Bezout rings. + Remove the recently added file Squarefree/UniqueFactorizationMonoid and place the results appropriately within Squarefree/Basic. All results are generalized to DecompositionMonoid or weaker except the last one. [Zulip](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/Coprime.20if.20product.20is.20squarefree/near/419334520) With this PR, all the following instances (indicated by arrows) now work; this PR fills the central part. ``` EuclideanDomain (bundled) ↙ ↖ IsPrincipalIdealRing ← Field (bundled) ↓ ↓ NormalizationMonoid ← NormalizedGCDMonoid → GCDMonoid IsBezout ← ValuationRing ← DiscreteValuationRing ↓ ↓ ↘ ↙ Nonempty NormalizationMonoid ← Nonempty NormalizedGCDMonoid → Nonempty GCDMonoid → IsIntegrallyClosed ↑ ↓ WfDvdMonoid ← UniqueFactorizationMonoid → DecompositionMonoid ↑ IsPrincipalIdealRing ``` Co-authored-by: Junyan Xu <junyanxu.math@gmail.com> Co-authored-by: Oliver Nash <github@olivernash.org>
Contributor
|
Pull request successfully merged into master. Build succeeded: |
IsRelPrime and DecompositionMonoid and refactorIsRelPrime and DecompositionMonoid and refactor
dagurtomas
pushed a commit
that referenced
this pull request
Mar 22, 2024
…10327) + Introduce typeclass `DecompositionMonoid`, which says every element in the monoid is primal, i.e., whenever an element divides a product `b * c`, it can be factored into a product such that the factors divides `b` and `c` respectively. A domain is called pre-Schreier if its multiplicative monoid is a decomposition monoid, and these are more general than GCD domains. + Show that any `GCDMonoid` is a `DecompositionMonoid`. In order for lemmas about `DecompositionMonoid`s to automatically apply to `UniqueFactorizationMonoid`s, we add instances from `UniqueFactorizationMonoid α` to `Nonempty (NormalizedGCDMonoid α)` to `Nonempty (GCDMonoid α)` to `DecompositionMonoid α`. ([Zulip](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/non-normalizable.20gcd_monoid/near/316895209)) See the bottom of message for an updated diagram of classes and instances. + Introduce binary predicate `IsRelPrime` which says that the only common divisors of the two elements are units. Replace previous occurrences in mathlib by this predicate. + Duplicate all lemmas about `IsCoprime` in Coprime/Basic (except three lemmas about smul) to `IsRelPrime`. Due to import constraints, they are spread into three files Algebra/Divisibility/Units (including key lemmas assuming DecompositionMonoid), GroupWithZero/Divisibility, and Coprime/Basic. + Show `IsCoprime` always imply `IsRelPrime` and is equivalent to it in Bezout rings. To reduce duplication, the definition of Bezout rings and the GCDMonoid instance are moved from RingTheory/Bezout to RingTheory/PrincipalIdealDomain, and some results in PrincipalIdealDomain are generalized to Bezout rings. + Remove the recently added file Squarefree/UniqueFactorizationMonoid and place the results appropriately within Squarefree/Basic. All results are generalized to DecompositionMonoid or weaker except the last one. [Zulip](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/Coprime.20if.20product.20is.20squarefree/near/419334520) With this PR, all the following instances (indicated by arrows) now work; this PR fills the central part. ``` EuclideanDomain (bundled) ↙ ↖ IsPrincipalIdealRing ← Field (bundled) ↓ ↓ NormalizationMonoid ← NormalizedGCDMonoid → GCDMonoid IsBezout ← ValuationRing ← DiscreteValuationRing ↓ ↓ ↘ ↙ Nonempty NormalizationMonoid ← Nonempty NormalizedGCDMonoid → Nonempty GCDMonoid → IsIntegrallyClosed ↑ ↓ WfDvdMonoid ← UniqueFactorizationMonoid → DecompositionMonoid ↑ IsPrincipalIdealRing ``` Co-authored-by: Junyan Xu <junyanxu.math@gmail.com> Co-authored-by: Oliver Nash <github@olivernash.org>
YaelDillies
added a commit
that referenced
this pull request
Jan 14, 2025
See #10327 for the new copyright header
2 tasks
YaelDillies
added a commit
that referenced
this pull request
Jan 14, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 15, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 15, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 15, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 15, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 15, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 15, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 15, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 15, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 17, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 19, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 20, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 21, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 22, 2025
See #10327 for the new copyright header
YaelDillies
added a commit
that referenced
this pull request
Jan 25, 2025
See #10327 for the new copyright header
mathlib-bors bot
pushed a commit
that referenced
this pull request
Jan 31, 2025
See #10327 for the new copyright header
jt496
pushed a commit
that referenced
this pull request
Feb 3, 2025
See #10327 for the new copyright header
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce typeclass
DecompositionMonoid, which says every element in the monoid is primal, i.e., whenever an element divides a productb * c, it can be factored into a product such that the factors dividesbandcrespectively. A domain is called pre-Schreier if its multiplicative monoid is a decomposition monoid, and these are more general than GCD domains.Show that any
GCDMonoidis aDecompositionMonoid. In order for lemmas aboutDecompositionMonoids to automatically apply toUniqueFactorizationMonoids, we add instances fromUniqueFactorizationMonoid αtoNonempty (NormalizedGCDMonoid α)toNonempty (GCDMonoid α)toDecompositionMonoid α. (Zulip) See the bottom of message for an updated diagram of classes and instances.Introduce binary predicate
IsRelPrimewhich says that the only common divisors of the two elements are units. Replace previous occurrences in mathlib by this predicate.Duplicate all lemmas about
IsCoprimein Coprime/Basic (except three lemmas about smul) toIsRelPrime. Due to import constraints, they are spread into three files Algebra/Divisibility/Units (including key lemmas assuming DecompositionMonoid), GroupWithZero/Divisibility, and Coprime/Basic.Show
IsCoprimealways implyIsRelPrimeand is equivalent to it in Bezout rings. To reduce duplication, the definition of Bezout rings and the GCDMonoid instance are moved from RingTheory/Bezout to RingTheory/PrincipalIdealDomain, and some results in PrincipalIdealDomain are generalized to Bezout rings.Remove the recently added file Squarefree/UniqueFactorizationMonoid and place the results appropriately within Squarefree/Basic. All results are generalized to DecompositionMonoid or weaker except the last one.
Zulip
With this PR, all the following instances (indicated by arrows) now work; this PR fills the central part.