-
Notifications
You must be signed in to change notification settings - Fork 356
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(Algebra/Polynomial/Basic): define nsmul/zsmul for Polynomial #19095
Conversation
The goal of this PR is to make the ring instances on `Polynomial` independent of the module structure. This will be useful in an upcoming PR that splits this entire file. But since adding definitions while splitting files is very annoying to review, let's do it in multiple steps.
PR summary 4318efebfeImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
maintainer merge
🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde. |
Thanks! bors merge |
…#19095) The goal of this PR is to make the ring instances on `Polynomial` independent of the module structure. This is currently somewhat useless and will only be useful in an upcoming PR that splits this entire file `Polynomial/Basic.lean`. But since adding definitions while splitting files is very annoying to review, let's do it in multiple steps.
Why is this desirable? The |
Pull request successfully merged into master. Build succeeded: |
Ouch, the bot was slightly too fast for your review :( Anyway, the |
Right; I guess my claim is that |
Oh, the second PR that I merged and I already did something controversial... 🤦 |
In the comments of #19095 we discussed that `MonoidAlgebra` and `Polynomial` need scalar multiplication by `Nat` or `Int` early on, to define a `Semiring` or `Ring` structure. We can define a generic `SMulWithZero` instance and then specialize it to get `nsmul` and `zsmul`, but only if that instance is available early on for `Finsupp`. So: split this off from `Finsupp/Basic.lean` into a higher-up file. This PR used Damiano's `upstreamableDecls` linter to find out which results could move together with the definitions for free.
In the comments of #19095 we discussed that `MonoidAlgebra` and `Polynomial` need scalar multiplication by `Nat` or `Int` early on, to define a `Semiring` or `Ring` structure. We can define a generic `SMulWithZero` instance and then specialize it to get `nsmul` and `zsmul`, but only if that instance is available early on for `Finsupp`. So: split this off from `Finsupp/Basic.lean` into a higher-up file. This PR used Damiano's `upstreamableDecls` linter to find out which results could move together with the definitions for free.
…#19095) The goal of this PR is to make the ring instances on `Polynomial` independent of the module structure. This is currently somewhat useless and will only be useful in an upcoming PR that splits this entire file `Polynomial/Basic.lean`. But since adding definitions while splitting files is very annoying to review, let's do it in multiple steps.
In the comments of #19095 we discussed that `MonoidAlgebra` and `Polynomial` need scalar multiplication by `Nat` or `Int` early on, to define a `Semiring` or `Ring` structure. We can define a generic `SMulWithZero` instance and then specialize it to get `nsmul` and `zsmul`, but only if that instance is available early on for `Finsupp`. So: split this off from `Finsupp/Basic.lean` into a higher-up file. This PR used Damiano's `upstreamableDecls` linter to find out which results could move together with the definitions for free.
In the comments of #19095 we discussed that `MonoidAlgebra` and `Polynomial` need scalar multiplication by `Nat` or `Int` early on, to define a `Semiring` or `Ring` structure. We can define a generic `SMulWithZero` instance and then specialize it to get `nsmul` and `zsmul`, but only if that instance is available early on for `Finsupp`. So: split this off from `Finsupp/Basic.lean` into a higher-up file. This PR used Damiano's `upstreamableDecls` linter to find out which results could move together with the definitions for free.
In the comments of #19095 we discussed that `MonoidAlgebra` and `Polynomial` need scalar multiplication by `Nat` or `Int` early on, to define a `Semiring` or `Ring` structure. We can define a generic `SMulWithZero` instance and then specialize it to get `nsmul` and `zsmul`, but only if that instance is available early on for `Finsupp`. So: split this off from `Finsupp/Basic.lean` into a higher-up file. This PR used Damiano's `upstreamableDecls` linter to find out which results could move together with the definitions for free.
The goal of this PR is to make the ring instances on
Polynomial
independent of the module structure. This is currently somewhat useless and will only be useful in an upcoming PR that splits this entire filePolynomial/Basic.lean
. But since adding definitions while splitting files is very annoying to review, let's do it in multiple steps.