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] - refactor: Unify spelling of "prime factors" #8164

Closed
wants to merge 6 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Nov 3, 2023

mathlib can't make up its mind on whether to spell "the prime factors of n" as n.factors.toFinset or n.factorization.support, even though those two are defeq. This PR proposes to unify everything to a new definition Nat.primeFactors, and streamline the existing scattered API about n.factors.toFinset and n.factorization.support to Nat.primeFactors. We also get to write a bit more API that didn't make sense before, eg primeFactors_mono.


Open in Gitpod

mathlib can't make up its mind on whether to spell "the prime factors of `n`" as `n.factors.toFinset` or `n.factorization.support`, even though those two are defeq. This PR proposes to unify everything to a new definition `Nat.primeFactors`, and stream the existing scattered API about `n.factors.toFinset` and `n.factorization.support` to `Nat.primeFactors`. We also get to write a bit more API that didn't make sense before, eg `primeFactors_mono`.
@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR t-number-theory Number theory (also use t-algebra or t-analysis to specialize) labels Nov 10, 2023
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 Nov 10, 2023
mathlib-bors bot pushed a commit that referenced this pull request Nov 10, 2023
mathlib can't make up its mind on whether to spell "the prime factors of `n`" as `n.factors.toFinset` or `n.factorization.support`, even though those two are defeq. This PR proposes to unify everything to a new definition `Nat.primeFactors`, and streamline the existing scattered API about `n.factors.toFinset` and `n.factorization.support` to `Nat.primeFactors`. We also get to write a bit more API that didn't make sense before, eg `primeFactors_mono`.
@mathlib-bors
Copy link

mathlib-bors bot commented Nov 10, 2023

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor: Unify spelling of "prime factors" [Merged by Bors] - refactor: Unify spelling of "prime factors" Nov 10, 2023
@mathlib-bors mathlib-bors bot closed this Nov 10, 2023
@mathlib-bors mathlib-bors bot deleted the prime_factors branch November 10, 2023 10:07
mathlib-bors bot pushed a commit that referenced this pull request Nov 12, 2023
@**Yaël Dillies**'s recent proof at #8164 uses `aesop` in a way that relies on `simp` using `decide := true` by default, which we have now disabled, and hence this breaks on `nightly-testing`.

I propose we add `@[aesop safe destruct]` to `Nat.not_prime_one` (and `Nat.not_prime_zero` while we're there).

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
alexkeizer pushed a commit that referenced this pull request Nov 17, 2023
@**Yaël Dillies**'s recent proof at #8164 uses `aesop` in a way that relies on `simp` using `decide := true` by default, which we have now disabled, and hence this breaks on `nightly-testing`.

I propose we add `@[aesop safe destruct]` to `Nat.not_prime_one` (and `Nat.not_prime_zero` while we're there).

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
alexkeizer pushed a commit that referenced this pull request Nov 21, 2023
@**Yaël Dillies**'s recent proof at #8164 uses `aesop` in a way that relies on `simp` using `decide := true` by default, which we have now disabled, and hence this breaks on `nightly-testing`.

I propose we add `@[aesop safe destruct]` to `Nat.not_prime_one` (and `Nat.not_prime_zero` while we're there).

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
grunweg pushed a commit that referenced this pull request Dec 15, 2023
mathlib can't make up its mind on whether to spell "the prime factors of `n`" as `n.factors.toFinset` or `n.factorization.support`, even though those two are defeq. This PR proposes to unify everything to a new definition `Nat.primeFactors`, and streamline the existing scattered API about `n.factors.toFinset` and `n.factorization.support` to `Nat.primeFactors`. We also get to write a bit more API that didn't make sense before, eg `primeFactors_mono`.
grunweg pushed a commit that referenced this pull request Dec 15, 2023
@**Yaël Dillies**'s recent proof at #8164 uses `aesop` in a way that relies on `simp` using `decide := true` by default, which we have now disabled, and hence this breaks on `nightly-testing`.

I propose we add `@[aesop safe destruct]` to `Nat.not_prime_one` (and `Nat.not_prime_zero` while we're there).

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
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-number-theory Number theory (also use t-algebra or t-analysis to specialize)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants