Skip to content
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: teach bv_normalize that (x >> x) = 0 #6818

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

vlad902
Copy link
Contributor

@vlad902 vlad902 commented Jan 28, 2025

This PR adds a BitVec lemma that (x >> x) = 0 and plumbs it through to bv_normalize. I also move some theorems I found useful to the top of the ushiftRight section.

This PRs adds a BitVec lemma that `(x >> x) = 0` and plumbs it through
to bv_normalize. I also move some theorems I found useful to the top of
the ushiftRight section.
@vlad902
Copy link
Contributor Author

vlad902 commented Jan 28, 2025

changelog-library

@github-actions github-actions bot added changelog-library Library toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN labels Jan 28, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase e4364e747f8a5570f1bfca92ee6185b98a18e5ae --onto 20c616503abe5ce4253c56dbcd7766a91c675ba0. (2025-01-28 13:25:34)

Copy link
Contributor

@hargoniX hargoniX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to account for the simp normal form.

@vlad902 vlad902 requested a review from hargoniX January 28, 2025 20:35
@hargoniX hargoniX added this pull request to the merge queue Jan 28, 2025
Merged via the queue into leanprover:master with commit 1d94397 Jan 28, 2025
14 checks passed
vlad902 added a commit to vlad902/lean4 that referenced this pull request Feb 3, 2025
In leanprover#6818, I removed this small section of reductions from BitVec to Nat
since it seemed unnecessary. Since then, I saw that there are equivalent
sections for shiftLeft/sshiftRight that are more substantial and that I
should have not made this change.
@vlad902 vlad902 mentioned this pull request Feb 3, 2025
github-merge-queue bot pushed a commit that referenced this pull request Feb 3, 2025
In #6818, I removed this small section of reductions from BitVec to Nat
since it seemed unnecessary. Since then, I saw that there are equivalent
sections for shiftLeft/sshiftRight that are more substantial and that I
should have not made this change.
luisacicolini pushed a commit to opencompl/lean4 that referenced this pull request Feb 24, 2025
This PR adds a BitVec lemma that `(x >> x) = 0` and plumbs it through to
bv_normalize. I also move some theorems I found useful to the top of the
ushiftRight section.
luisacicolini pushed a commit to opencompl/lean4 that referenced this pull request Feb 24, 2025
In leanprover#6818, I removed this small section of reductions from BitVec to Nat
since it seemed unnecessary. Since then, I saw that there are equivalent
sections for shiftLeft/sshiftRight that are more substantial and that I
should have not made this change.
luisacicolini pushed a commit to opencompl/lean4 that referenced this pull request Feb 25, 2025
This PR adds a BitVec lemma that `(x >> x) = 0` and plumbs it through to
bv_normalize. I also move some theorems I found useful to the top of the
ushiftRight section.
luisacicolini pushed a commit to opencompl/lean4 that referenced this pull request Feb 25, 2025
In leanprover#6818, I removed this small section of reductions from BitVec to Nat
since it seemed unnecessary. Since then, I saw that there are equivalent
sections for shiftLeft/sshiftRight that are more substantial and that I
should have not made this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-library Library toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants