-
Notifications
You must be signed in to change notification settings - Fork 534
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: characterize BitVec.toInt
in terms of BitVec.msb
#4200
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awaiting-review |
Mathlib CI status (docs):
|
leodemoura
approved these changes
May 20, 2024
kim-em
reviewed
May 21, 2024
Co-authored-by: Kim Morrison <[email protected]>
I've addressed the comment, so this should be ready to merge now. |
JovanGerb
pushed a commit
to JovanGerb/lean4
that referenced
this pull request
May 22, 2024
…r#4200) This PR extracts `msb_eq_false_iff_two_mul_lt` and `msb_eq_true_iff_two_mul_ge` from leanprover#4179, and uses them to prove a theorem that characterizes `BitVec.toInt` in terms of `BitVec.msb`. This lemma will be useful to prove a bit-blasting theorem for `BitVec.slt` and `BitVec.sle`. Also cleans up an existing proof (`toInt_eq_toNat_cond `), which turns out to be provable by `rfl`. --------- Co-authored-by: Kim Morrison <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 23, 2024
Prove theorems that relate `BitVec.slt` and `sle` to `carry`, so that these signed comparisons may be bitblasted in LeanSAT. This PR is stacked on top of #4200. For the diff without changes from that PR, see: opencompl/lean4@opencompl:lean4:bitvec-toInt-iff-msb...bitvec-slt-blast --------- Co-authored-by: Kim Morrison <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
will-merge-soon
…unless someone speaks up
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR extracts
msb_eq_false_iff_two_mul_lt
andmsb_eq_true_iff_two_mul_ge
from #4179, and uses them to prove a theorem that characterizesBitVec.toInt
in terms ofBitVec.msb
. This lemma will be useful to prove a bit-blasting theorem forBitVec.slt
andBitVec.sle
.Also cleans up an existing proof (
toInt_eq_toNat_cond
), which turns out to be provable byrfl
.