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: add BitVec multiplication simp lemmas #6718

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

vlad902
Copy link
Contributor

@vlad902 vlad902 commented Jan 20, 2025

This PR adds BitVec lemmas required to cancel multiplicative negatives, and plumb support through to bv_normalize to make use of this result in the normalized twos-complement form.

I include some bmod lemmas I found useful to prove this result, the two helper lemmas I add use the same naming/proofs as their emod equivalents.

@vlad902
Copy link
Contributor Author

vlad902 commented Jan 20, 2025

This is rows 181/182 of the spreadsheet.

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jan 20, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Jan 20, 2025

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 1d03cd6a6b9e2cab387692f5ec0d0013b9a9867d --onto ac6a29ee834ba7fd30e9372e51493d7741e9c657. (2025-01-20 22:10:39)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 1d03cd6a6b9e2cab387692f5ec0d0013b9a9867d --onto f9e904af5022a57adb6105cda65d1569449346c2. (2025-01-21 19:43:51)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 3aea0fd810f404f930aa95f9666cf60940bcf64e --onto 69a73a18fbfa1fc045bfbf1c4cf93b155d4c9387. (2025-01-27 15:04:10)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 3aea0fd810f404f930aa95f9666cf60940bcf64e --onto 20c616503abe5ce4253c56dbcd7766a91c675ba0. (2025-01-28 12:49:20)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase e7d8948fa6d57e291efb8afd531a6ff6bc2d2318 --onto a35bf7ee4c4d900475d88886825a5337f389bd0f. (2025-01-30 08:28:20)

@hargoniX hargoniX requested a review from kim-em January 27, 2025 16:06
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Jan 28, 2025
@hargoniX hargoniX added changelog-language Language features, tactics, and metaprograms and removed changelog-language Language features, tactics, and metaprograms labels Jan 29, 2025
@hargoniX
Copy link
Contributor

@vlad902 if you fix the merge conflict we can merge this.

This PR adds BitVec lemmas required to cancel multiplicative negatives,
and plumb support through to bv_normalize to make use of this result in
the normalized twos-complement form.

I include some bmod lemmas I found useful to prove this result, the two
helper lemmas I add use the same naming/proofs as their emod
equivalents.
@hargoniX hargoniX enabled auto-merge January 30, 2025 08:19
@hargoniX hargoniX added this pull request to the merge queue Jan 30, 2025
Merged via the queue into leanprover:master with commit dc445d7 Jan 30, 2025
14 checks passed
vlad902 added a commit to vlad902/lean4 that referenced this pull request Jan 30, 2025
As a follow-up to leanprover#6718, refactor a few bmod proofs to be shorter and
exactly match their emod* equivalents for uniformity.
vlad902 added a commit to vlad902/lean4 that referenced this pull request Jan 30, 2025
As a follow-up to leanprover#6718, refactor a few bmod proofs to be shorter and
exactly match their emod* equivalents for uniformity.
github-merge-queue bot pushed a commit that referenced this pull request Jan 31, 2025
As a follow-up to #6718, refactor a few bmod proofs to be shorter and
exactly match their emod* equivalents for uniformity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-language Language features, tactics, and metaprograms P-medium We may work on this issue if we find the time 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.

5 participants