Skip to content

[Merged by Bors] - refactor(Data/Rat/NNRat): move module and algebra instances - #9951

Closed
eric-wieser wants to merge 7 commits into
masterfrom
eric-wieser/move-nnrat-module
Closed

eric-wieser wants to merge 7 commits into
masterfrom
eric-wieser/move-nnrat-module

Conversation

@eric-wieser

@eric-wieser eric-wieser commented Jan 24, 2024 •

Copy link
Copy Markdown
Member

As with #9950, this is motivated by:

  • Getting NNRat closed to norm_num
  • Being able to put an nnrat_cast field in DivisionSemirings

This brings down the number of dependencies of NNRat by around 600.


Open in Gitpod

The graph is still a monster:

nnrat

We already have the instances for `ℕ`, `ℤ`, and `ℚ` in this file, so adding `NNRat` doesn't feel that out of place.
@eric-wieser eric-wieser added awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. labels Jan 24, 2024
@ghost ghost added blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) and removed blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) labels Jan 24, 2024
Authors: Yaël Dillies, Bhavik Mehta
-/
import Mathlib.Algebra.Algebra.Basic
import Mathlib.Algebra.Function.Indicator

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removing this would remove another 30 or so dependencies, but I'm declaring that a problem for a follow-up. I think further reduction probably entails splitting this file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note that I already reduced the dependencies of Algebra.Function.Indicator by quite a lot because of this.

@eric-wieser eric-wieser added awaiting-review and removed awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. labels Jan 24, 2024
@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jan 25, 2024
@YaelDillies

Copy link
Copy Markdown
Contributor

I just noticed that Algebra.Order.Archimedean depends on LinearAlgebra.Basic through NNRat 😱

maintainer merge

@github-actions

github-actions Bot commented Feb 1, 2024

Copy link
Copy Markdown

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

@eric-wieser

Copy link
Copy Markdown
Member Author

I just noticed that Algebra.Order.Archimedean depends on LinearAlgebra.Basic through NNRat 😱

Only before this PR though, right?

@jcommelin jcommelin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Feb 1, 2024
@YaelDillies

Copy link
Copy Markdown
Contributor

I just noticed that Algebra.Order.Archimedean depends on LinearAlgebra.Basic through NNRat 😱

Only before this PR though, right?

Actually, this spurious dependency was introduced in #9950.

mathlib-bors Bot pushed a commit that referenced this pull request Feb 1, 2024
As with #9950, this is motivated by:
* Getting `NNRat` closed to `norm_num`
* Being able to put an `nnrat_cast` field in `DivisionSemiring`s

This brings down the number of dependencies of `NNRat` by around 600.
@mathlib-bors

mathlib-bors Bot commented Feb 1, 2024

Copy link
Copy Markdown
Contributor

Build failed (retrying...):

mathlib-bors Bot pushed a commit that referenced this pull request Feb 1, 2024
As with #9950, this is motivated by:
* Getting `NNRat` closed to `norm_num`
* Being able to put an `nnrat_cast` field in `DivisionSemiring`s

This brings down the number of dependencies of `NNRat` by around 600.
@mathlib-bors

mathlib-bors Bot commented Feb 1, 2024

Copy link
Copy Markdown
Contributor

Build failed (retrying...):

  • Build

mathlib-bors Bot pushed a commit that referenced this pull request Feb 1, 2024
As with #9950, this is motivated by:
* Getting `NNRat` closed to `norm_num`
* Being able to put an `nnrat_cast` field in `DivisionSemiring`s

This brings down the number of dependencies of `NNRat` by around 600.
@mathlib-bors

mathlib-bors Bot commented Feb 1, 2024

Copy link
Copy Markdown
Contributor

Build failed:

@eric-wieser

Copy link
Copy Markdown
Member Author

@ocfnash, it seems your #10086 broke this; are you happy for me to move those lemmas to a new file?

@ocfnash

ocfnash commented Feb 1, 2024

Copy link
Copy Markdown
Contributor

@ocfnash, it seems your #10086 broke this; are you happy for me to move those lemmas to a new file?

Yes of course. Do you need any help? Which lemmas would you like to move?

@ghost ghost added blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) and removed blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) labels Feb 1, 2024
@ghost

ghost commented Feb 1, 2024

Copy link
Copy Markdown

@eric-wieser

Copy link
Copy Markdown
Member Author

bors merge

mathlib-bors Bot pushed a commit that referenced this pull request Feb 1, 2024
As with #9950, this is motivated by:
* Getting `NNRat` closed to `norm_num`
* Being able to put an `nnrat_cast` field in `DivisionSemiring`s

This brings down the number of dependencies of `NNRat` by around 600.
@mathlib-bors

mathlib-bors Bot commented Feb 1, 2024

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title refactor(Data/Rat/NNRat): move module and algebra instances [Merged by Bors] - refactor(Data/Rat/NNRat): move module and algebra instances Feb 1, 2024
@mathlib-bors mathlib-bors Bot closed this Feb 1, 2024
@mathlib-bors
mathlib-bors Bot deleted the eric-wieser/move-nnrat-module branch February 1, 2024 22:25
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.

4 participants