Skip to content

[Merged by Bors] - chore(Data/Nat): refactor import of Nat/Prime by Nat/Factors#14357

Closed
rwst wants to merge 1 commit intomasterfrom
rwst/primesplit2
Closed

[Merged by Bors] - chore(Data/Nat): refactor import of Nat/Prime by Nat/Factors#14357
rwst wants to merge 1 commit intomasterfrom
rwst/primesplit2

Conversation

@rwst
Copy link
Copy Markdown
Collaborator

@rwst rwst commented Jul 2, 2024

Further reduce imports of full Prime.lean. Here, Data.Nat.Factors now imports only Prime/Defs.
For this, four lemmas had to be added to Prime/Defs from Prime/Basic. Many modules import
Data.Nat.Factors, so their dependencies on Prime theorems are now uncovered. Still, this
change will reduce the amount of what is imported, in general.

Motivation is a circular dependency that would prevent me from adding a lemma to Prime/Basic.


Open in Gitpod

@rwst rwst added the WIP Work in progress label Jul 2, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 2, 2024

PR summary 81018ad08b

Import changes

Dependency changes

File Base Count Head Count Change
Mathlib.Data.Nat.Factors 454 448 -6 (-1.32%)

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/no_lost_declarations.sh short <optional_commit>

## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>

@rwst rwst added awaiting-review and removed WIP Work in progress labels Jul 2, 2024
@rwst
Copy link
Copy Markdown
Collaborator Author

rwst commented Jul 3, 2024

!bench

@rwst
Copy link
Copy Markdown
Collaborator Author

rwst commented Jul 3, 2024

@tb65536 this PR would be necessary to be able to add #14049 to Data/Nat/Prime/Basic instead of Archive. You stated an interest in #14049. Could you please review?

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 81018ad.
There were no significant changes against commit d88652e.

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Jul 3, 2024

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Jul 3, 2024
mathlib-bors bot pushed a commit that referenced this pull request Jul 3, 2024
)

Further reduce imports of full `Prime.lean`. Here, `Data.Nat.Factors` now imports only `Prime/Defs`.
For this, four lemmas had to be added to `Prime/Defs` from `Prime/Basic`. Many modules import
`Data.Nat.Factors`, so their dependencies on `Prime` theorems are now uncovered. Still, this
change will reduce the amount of what is imported, in general.

Motivation is a circular dependency that would prevent me from adding a lemma to `Prime/Basic`.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jul 3, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore(Data/Nat): refactor import of Nat/Prime by Nat/Factors [Merged by Bors] - chore(Data/Nat): refactor import of Nat/Prime by Nat/Factors Jul 3, 2024
@mathlib-bors mathlib-bors bot closed this Jul 3, 2024
@mathlib-bors mathlib-bors bot deleted the rwst/primesplit2 branch July 3, 2024 09:27
@adomani adomani mentioned this pull request Aug 1, 2024
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.

3 participants