-
Notifications
You must be signed in to change notification settings - Fork 608
feat: BitVec.msb_sdiv #8178
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: BitVec.msb_sdiv #8178
Conversation
In this PR, we add lemmas for `msb_sdiv`. This needs quite a bit of analysis on `Int.tdiv`, and we develop the theory of `Int.tdiv` to enable proving `msb_sdiv`. The salient points are as follows: - First, sdiv equals tdiv.
Mathlib CI status (docs):
|
Co-authored-by: Luisa Cicolini <48860705+luisacicolini@users.noreply.github.com>
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.
lgtm!
changelog-library |
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.
Thank you @bollu. Modulo the last comments, this looks good to me.
changelog-library |
@tobiasgrosser all comments addressed. |
This PR provides a compact formula for the MSB of the sdiv. Most of the work in the PR involves handling the corner cases of division overflowing (e.g. `intMin / -1 = intMin`) --------- Co-authored-by: Luisa Cicolini <48860705+luisacicolini@users.noreply.github.com> Co-authored-by: Tobias Grosser <github@grosser.es>
This PR provides a compact formula for the MSB of the sdiv. Most of the work in the PR involves handling the corner cases of division overflowing (e.g.
intMin / -1 = intMin
)