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] - chore: reduce proof dependencies for Nat.factors_count_eq #12105

Closed
wants to merge 2 commits into from

Conversation

Ruben-VandeVelde
Copy link
Collaborator

@Ruben-VandeVelde Ruben-VandeVelde commented Apr 13, 2024

This is a bit longer, partially duplicating the argument from UniqueFactorizationMonoid.multiplicity_eq_count_normalizedFactors, but it means we no longer need to depend on RingTheory.Int.Basic at this point.

The other added lemmas seem useful regardless.


Open in Gitpod

This is a bit longer, partially duplicating the argument from UniqueFactorizationMonoid.multiplicity_eq_count_normalizedFactors, but it means we no longer need to depend on UFDs at this point.

The other added lemmas seem useful regardless.
@Ruben-VandeVelde Ruben-VandeVelde added awaiting-review The author would like community review of the PR awaiting-CI labels Apr 13, 2024
Copy link
Collaborator

@MichaelStollBayreuth MichaelStollBayreuth left a comment

Choose a reason for hiding this comment

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

LGTM

@eric-wieser
Copy link
Member

I don't understand why depending on UFDs for nat factorization is a bad thing; why make the generalization if we're then going to re-derive the results without it anyway?

Are UFDs an overly-heavy import? Can we reduce that dependency tree instead?

@Ruben-VandeVelde
Copy link
Collaborator Author

Not sure why I wrote UFDs there - it's more than just the definition, but the instance for Nat is in RingTheory.Int.Basic, which pulls in a bunch of theory besides - PIDs, Euclidean domains, ideals... It's a trade-off, but I think I lean towards this change being a net positive. Happy to defer to the maintainers, though.

For UFDs in particular, we can lighten a bit by moving IsNoetherianRing.wfDvdMonoid and Ideal.IsPrime.exists_mem_prime_of_ne_bot. This might be a good idea in any case.

@semorrison
Copy link
Contributor

bors merge

@github-actions github-actions 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 Apr 28, 2024
mathlib-bors bot pushed a commit that referenced this pull request Apr 28, 2024
This is a bit longer, partially duplicating the argument from UniqueFactorizationMonoid.multiplicity_eq_count_normalizedFactors, but it means we no longer need to depend on `RingTheory.Int.Basic` at this point.

The other added lemmas seem useful regardless.
@mathlib-bors
Copy link

mathlib-bors bot commented Apr 28, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: reduce proof dependencies for Nat.factors_count_eq [Merged by Bors] - chore: reduce proof dependencies for Nat.factors_count_eq Apr 28, 2024
@mathlib-bors mathlib-bors bot closed this Apr 28, 2024
@mathlib-bors mathlib-bors bot deleted the factors_count_eq branch April 28, 2024 08:16
apnelson1 pushed a commit that referenced this pull request May 12, 2024
This is a bit longer, partially duplicating the argument from UniqueFactorizationMonoid.multiplicity_eq_count_normalizedFactors, but it means we no longer need to depend on `RingTheory.Int.Basic` at this point.

The other added lemmas seem useful regardless.
callesonne pushed a commit that referenced this pull request May 16, 2024
This is a bit longer, partially duplicating the argument from UniqueFactorizationMonoid.multiplicity_eq_count_normalizedFactors, but it means we no longer need to depend on `RingTheory.Int.Basic` at this point.

The other added lemmas seem useful regardless.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants