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: define rotateLeft/Right with modulo #4229

Merged
merged 2 commits into from
May 21, 2024

Conversation

bollu
Copy link
Contributor

@bollu bollu commented May 20, 2024

This ensures that rotateLeft/Right behave correctly even when the rotation amount is larger than the bitwidth.

This shall be followed up with getLsb theorems for rotations for LeanSAT.

We choose to write aux definitions since it is cleaner to reason about the aux theorems with the assumption that rotation-amount < bit-width, followed by auxiliary lemmas that link the behavior of rotation to the canonical case when rotation-amount < bit-width.

Proof strategy we will execute based on these definitions: Link to proof of getLsb_rotateLeft

This ensures that rotateLeft/Right behave correctly
even when the rotation amount is larger than the bitwidth.
@bollu bollu marked this pull request as ready for review May 20, 2024 14:56
@bollu bollu requested a review from semorrison as a code owner May 20, 2024 14:56
@bollu
Copy link
Contributor Author

bollu commented May 20, 2024

awaiting-review

@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 May 20, 2024
@leanprover-community-mathlib4-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 b278f9dd3096a6f183812b6f9129fc79f8675f00 --onto f53b778c0d4a474383eab709d67db5e12357f39d. (2024-05-20 15:13:59)

@semorrison semorrison added this pull request to the merge queue May 21, 2024
Merged via the queue into leanprover:master with commit 097a4d5 May 21, 2024
11 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants