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] - fix(NumberTheory/FermatPsp): Update definition and theorem names #6371

Closed
wants to merge 4 commits into from

Conversation

osbourn
Copy link
Collaborator

@osbourn osbourn commented Aug 4, 2023

Fix some definition and theorem names in NumberTheory/FermatPsp. Most of these definitions were previously under the FermatPsp namespace. This PR removes the FermatPsp namespace and places all the definitions under the Nat namespace.

The following are the main changes made to names:

  • FermatPsp.ProbablePrime -> Nat.ProbablePrime
  • FermatPsp -> Nat.FermatPsp
  • FermatPsp.coprime_of_probablePrime -> Nat.coprime_of_probablePrime
  • FermatPsp.probablePrime_iff_modEq -> Nat.probablePrime_iff_modEq
  • FermatPsp.coprime_of_fermatPsp -> Nat.coprime_of_fermatPsp
  • FermatPsp.base_one -> Nat.fermatPsp_base_one
  • FermatPsp.exists_infinite_pseudoprimes -> Nat.exists_infinite_pseudoprimes
  • FermatPsp.frequently_atTop_fermatPsp -> Nat.frequently_atTop_fermatPsp
  • FermatPsp.infinite_setOf_prime_modeq_one -> Nat.infinite_setOf_pseudoprimes

The last name was originally a mistake that came from the proof I used as reference.

This PR additionally contains a few fixes for the proofs that were needed because they are now in the Nat namespace. It also removes the Mathlib.Data.Nat.Prime import because it is transitively included in the Mathlib.FieldTheory.Finite.Basic import.


I made the FermatPsp file when I was newer to Lean, and I think the new names are a bit closer to the rest of the naming convention in Mathlib. I am still new to the Lean 4 naming conventions so please let me know if I made any mistakes.

In the future, I might make the definition of Nat.ProbablePrime rely on modular arithmetic rather than divisibility.

Open in Gitpod

@semorrison
Copy link
Contributor

(Just a reminder that on the mathlib4 repo, if authors don't self-label with awaiting-review, PRs don't appear on the #queue and might never be noticed. :-)

@osbourn osbourn added the awaiting-review The author would like community review of the PR label Aug 6, 2023
@semorrison semorrison added the t-number-theory Number theory (also use t-algebra or t-analysis to specialize) label Aug 6, 2023
Copy link
Member

@kbuzzard kbuzzard left a comment

Choose a reason for hiding this comment

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

Modulo the rw [mul_comm] issue which I flag, this looks fine to me.

Mathlib/NumberTheory/FermatPsp.lean Outdated Show resolved Hide resolved
@kbuzzard kbuzzard added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Aug 9, 2023
This helps remove two "rw" statements
@osbourn osbourn added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Aug 10, 2023
@kbuzzard
Copy link
Member

Thanks!

maintainer merge

@github-actions
Copy link

🚀 Pull request has been placed on the maintainer queue by kbuzzard.

@ocfnash
Copy link
Contributor

ocfnash commented Aug 10, 2023

Thanks!

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 Aug 10, 2023
bors bot pushed a commit that referenced this pull request Aug 10, 2023
Fix some definition and theorem names in NumberTheory/FermatPsp. Most of these definitions were previously under the `FermatPsp` namespace. This PR removes the `FermatPsp` namespace and places all the definitions under the `Nat` namespace.

The following are the main changes made to names:
- `FermatPsp.ProbablePrime` -> `Nat.ProbablePrime`
- `FermatPsp` -> `Nat.FermatPsp`
- `FermatPsp.coprime_of_probablePrime` -> `Nat.coprime_of_probablePrime`
- `FermatPsp.probablePrime_iff_modEq` -> `Nat.probablePrime_iff_modEq`
- `FermatPsp.coprime_of_fermatPsp` -> `Nat.coprime_of_fermatPsp`
- `FermatPsp.base_one` -> `Nat.fermatPsp_base_one`
- `FermatPsp.exists_infinite_pseudoprimes` -> `Nat.exists_infinite_pseudoprimes`
- `FermatPsp.frequently_atTop_fermatPsp` -> `Nat.frequently_atTop_fermatPsp`
- `FermatPsp.infinite_setOf_prime_modeq_one` -> `Nat.infinite_setOf_pseudoprimes`

The last name was originally a mistake that came from the proof I used as reference.

This PR additionally contains a few fixes for the proofs that were needed because they are now in the `Nat` namespace. It also removes the `Mathlib.Data.Nat.Prime` import because it is transitively included in the `Mathlib.FieldTheory.Finite.Basic` import.
@bors
Copy link

bors bot commented Aug 10, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title fix(NumberTheory/FermatPsp): Update definition and theorem names [Merged by Bors] - fix(NumberTheory/FermatPsp): Update definition and theorem names Aug 10, 2023
@bors bors bot closed this Aug 10, 2023
@bors bors bot deleted the fermat_psp_names branch August 10, 2023 11:36
semorrison pushed a commit that referenced this pull request Aug 14, 2023
Fix some definition and theorem names in NumberTheory/FermatPsp. Most of these definitions were previously under the `FermatPsp` namespace. This PR removes the `FermatPsp` namespace and places all the definitions under the `Nat` namespace.

The following are the main changes made to names:
- `FermatPsp.ProbablePrime` -> `Nat.ProbablePrime`
- `FermatPsp` -> `Nat.FermatPsp`
- `FermatPsp.coprime_of_probablePrime` -> `Nat.coprime_of_probablePrime`
- `FermatPsp.probablePrime_iff_modEq` -> `Nat.probablePrime_iff_modEq`
- `FermatPsp.coprime_of_fermatPsp` -> `Nat.coprime_of_fermatPsp`
- `FermatPsp.base_one` -> `Nat.fermatPsp_base_one`
- `FermatPsp.exists_infinite_pseudoprimes` -> `Nat.exists_infinite_pseudoprimes`
- `FermatPsp.frequently_atTop_fermatPsp` -> `Nat.frequently_atTop_fermatPsp`
- `FermatPsp.infinite_setOf_prime_modeq_one` -> `Nat.infinite_setOf_pseudoprimes`

The last name was originally a mistake that came from the proof I used as reference.

This PR additionally contains a few fixes for the proofs that were needed because they are now in the `Nat` namespace. It also removes the `Mathlib.Data.Nat.Prime` import because it is transitively included in the `Mathlib.FieldTheory.Finite.Basic` import.
semorrison pushed a commit that referenced this pull request Aug 15, 2023
Fix some definition and theorem names in NumberTheory/FermatPsp. Most of these definitions were previously under the `FermatPsp` namespace. This PR removes the `FermatPsp` namespace and places all the definitions under the `Nat` namespace.

The following are the main changes made to names:
- `FermatPsp.ProbablePrime` -> `Nat.ProbablePrime`
- `FermatPsp` -> `Nat.FermatPsp`
- `FermatPsp.coprime_of_probablePrime` -> `Nat.coprime_of_probablePrime`
- `FermatPsp.probablePrime_iff_modEq` -> `Nat.probablePrime_iff_modEq`
- `FermatPsp.coprime_of_fermatPsp` -> `Nat.coprime_of_fermatPsp`
- `FermatPsp.base_one` -> `Nat.fermatPsp_base_one`
- `FermatPsp.exists_infinite_pseudoprimes` -> `Nat.exists_infinite_pseudoprimes`
- `FermatPsp.frequently_atTop_fermatPsp` -> `Nat.frequently_atTop_fermatPsp`
- `FermatPsp.infinite_setOf_prime_modeq_one` -> `Nat.infinite_setOf_pseudoprimes`

The last name was originally a mistake that came from the proof I used as reference.

This PR additionally contains a few fixes for the proofs that were needed because they are now in the `Nat` namespace. It also removes the `Mathlib.Data.Nat.Prime` import because it is transitively included in the `Mathlib.FieldTheory.Finite.Basic` import.
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

4 participants