-
Notifications
You must be signed in to change notification settings - Fork 297
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
feat(data/{finsupp,dfinsupp}/basic): Scalar actions with zero #12880
Conversation
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.
Is it worth copying these to monoid_algebra
, add_monoid_algebra
, polynomial
, and mv_polynomial
?
This all feels a bit unpleasant to me - either:
I would lean towards option 2 for now, since adding yet another typeclass in the action hierarchy is hard to justify without motivating examples. |
This is all happening at a level somewhat below the one where I am comfortable: I always try to stay away from explicitly working with If this PR means that when I reach for I am sorry if this review is vague, but as I said, I feel that I never would like to worry about |
@adomani, can you remind us what the original motivation for |
I originally wanted The idea was to combine this with the fact that multiplication by non-zero elements is injective (and hence the Possibly, by now, there are better ways to deal with this? |
Maybe the simple answer is just " That's enough to convince me that my option 3 above is a bad idea |
This PR/issue depends on: |
A version of this made it to master. |
Add a few scalar instances on
finsupp
anddfinsupp
assumingsmul_with_zero
and stronger rather thandistrib_mul_action
.distrib_smul
andsmul_zero_class
#16123 to allow us to not duplicate those instances.