Skip to content

[Merged by Bors] - refactor: golf only FactorisationProperties#38204

Closed
yuanyi-350 wants to merge 2 commits intoleanprover-community:masterfrom
yuanyi-350:golf_69
Closed

[Merged by Bors] - refactor: golf only FactorisationProperties#38204
yuanyi-350 wants to merge 2 commits intoleanprover-community:masterfrom
yuanyi-350:golf_69

Conversation

@yuanyi-350
Copy link
Copy Markdown
Collaborator

This PR selectively ports part of #38144 and only migrates the changes in:

  • Mathlib/NumberTheory/FactorisationProperties.lean

Concretely, this PR:

  • rewrites Prime.not_pseudoperfect to use Prime.properDivisors and Finset.sum_le_sum_of_subset directly, instead of analyzing the powerset of proper divisors by cases
  • shortens Prime.not_perfect to the direct consequence of Prime.not_pseudoperfect
  • refactors Prime.deficient_pow to reuse properDivisors_prime_pow and a simple mapped-sum identity, instead of reproving the structure of the proper divisors of a prime power inline

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 18, 2026

PR summary 0e6b5bebd4

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added the t-number-theory Number theory (also use t-algebra or t-analysis to specialize) label Apr 18, 2026
Comment thread Mathlib/NumberTheory/FactorisationProperties.lean Outdated
@MichaelStollBayreuth MichaelStollBayreuth added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 19, 2026
Co-authored-by: Michael Stoll <99838730+MichaelStollBayreuth@users.noreply.github.com>
@yuanyi-350 yuanyi-350 removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 19, 2026
@MichaelStollBayreuth
Copy link
Copy Markdown
Contributor

maintainer merge

@github-actions
Copy link
Copy Markdown

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

@mathlib-triage mathlib-triage bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Apr 19, 2026
@riccardobrasca
Copy link
Copy Markdown
Member

Thanks!

bors merge

@mathlib-triage mathlib-triage bot added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Apr 19, 2026
mathlib-bors bot pushed a commit that referenced this pull request Apr 19, 2026
This PR selectively ports part of #38144 and only migrates the changes in:

- `Mathlib/NumberTheory/FactorisationProperties.lean`

Concretely, this PR:

- rewrites `Prime.not_pseudoperfect` to use `Prime.properDivisors` and `Finset.sum_le_sum_of_subset` directly, instead of analyzing the powerset of proper divisors by cases
- shortens `Prime.not_perfect` to the direct consequence of `Prime.not_pseudoperfect`
- refactors `Prime.deficient_pow` to reuse `properDivisors_prime_pow` and a simple mapped-sum identity, instead of reproving the structure of the proper divisors of a prime power inline
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Apr 19, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor: golf only FactorisationProperties [Merged by Bors] - refactor: golf only FactorisationProperties Apr 19, 2026
@mathlib-bors mathlib-bors bot closed this Apr 19, 2026
@yuanyi-350 yuanyi-350 deleted the golf_69 branch April 19, 2026 11:53
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.

3 participants