-
Notifications
You must be signed in to change notification settings - Fork 451
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
chore: introduce BitVec.setWidth to unify zeroExtend and truncate #5358
Conversation
Mathlib CI status (docs):
|
This works, but for some reason, the simprocs for setWidth and family do not fire. |
ca8f554
to
725c23f
Compare
It required a stage-0 update. Now everything works. |
52a453b
to
d489ac8
Compare
@alexkeizer, @bollu, @TwoFX, any thoughts on this? I like this (indeed, suggested it!) as we've been accumulating inconsistently duplicated API for Moreover, we can further (I think, but we'll experiment in a later PR) replace |
c2fcf86
to
476c740
Compare
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.
I like it! I've also been a bit bothered with the API duplication, picking a more neutrally named simp normal form makes a lot of sense
I do have my reservation about this, won't it lose information? For example, could the following still work with such a redefinition?
|
2a919a3
to
23c883f
Compare
incomplete deprecations chore: complete deprecations
We always simplify to setWidth to minimize the API surface.