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.(shiftLeft_add_distrib, shiftLeft_ushiftRight) #5478

Merged
merged 12 commits into from
Sep 26, 2024

Conversation

luisacicolini
Copy link
Contributor

@luisacicolini luisacicolini commented Sep 26, 2024

Moved some Nat theorems from Mathlib

@luisacicolini luisacicolini marked this pull request as draft September 26, 2024 07:31
@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 Sep 26, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

leanprover-community-mathlib4-bot commented Sep 26, 2024

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 0196bca784f82f90b4efd2a85a400daf4ab767f8 --onto 7845a05cf1094f24a5c4a51c32dd84bf4ff31a54. (2024-09-26 07:53:16)
  • ❗ Batteries CI can not be attempted yet, as the nightly-testing-2024-09-26 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Batteries CI should run now. (2024-09-26 08:52:32)
  • ❗ Mathlib CI can not be attempted yet, as the nightly-testing-2024-09-26 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Mathlib CI should run now. (2024-09-26 15:26:26)

@luisacicolini luisacicolini marked this pull request as ready for review September 26, 2024 08:00
Copy link
Contributor

@tobiasgrosser tobiasgrosser left a comment

Choose a reason for hiding this comment

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

This looks good to me.

src/Init/Data/BitVec/Lemmas.lean Outdated Show resolved Hide resolved
src/Init/Data/BitVec/Lemmas.lean Outdated Show resolved Hide resolved
src/Init/Data/BitVec/Lemmas.lean Outdated Show resolved Hide resolved
src/Init/Data/BitVec/Lemmas.lean Outdated Show resolved Hide resolved
src/Init/Data/BitVec/Lemmas.lean Outdated Show resolved Hide resolved
src/Init/Data/Nat/Lemmas.lean Outdated Show resolved Hide resolved
@hargoniX hargoniX changed the title feat: add BitVec.(shiftLeft_add_distrib, shiftLeft_shiftRight) feat: add BitVec.(shiftLeft_add_distrib, shiftLeft_ushiftRight) Sep 26, 2024
@hargoniX hargoniX added this pull request to the merge queue Sep 26, 2024
@@ -1512,6 +1512,21 @@ theorem shiftRight_add {w : Nat} (x : BitVec w) (n m : Nat) :
ext i
simp [Nat.add_assoc n m i]

theorem shiftLeft_ushiftRight {x : BitVec w} {n : Nat}:
Copy link
Contributor

@bollu bollu Sep 26, 2024

Choose a reason for hiding this comment

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

Suggested change
theorem shiftLeft_ushiftRight {x : BitVec w} {n : Nat}:
theorem shiftLeft_ushiftRight {x : BitVec w} {n : Nat} :

Merged via the queue into leanprover:master with commit 1fb75b6 Sep 26, 2024
14 checks passed
@kim-em
Copy link
Collaborator

kim-em commented Sep 28, 2024

Nat.lt_one_iff was in Mathlib with @[simp], and was moved here without simp.

  • probably that shouldn't have happened
  • but this shouldn't have been merged without a builds-mathlib label at all. :-(

@tobiasgrosser
Copy link
Contributor

Nat.lt_one_iff was in Mathlib with @[simp], and was moved here without simp.

  • probably that shouldn't have happened
  • but this shouldn't have been merged without a builds-mathlib label at all. :-(

Uh, sorry for this. I guess all builds that move theorems from Mathlib should have this label, no?

github-merge-queue bot pushed a commit that referenced this pull request Sep 28, 2024
This was upstreamed from Mathlib in #5478, but leaving off the `@[simp]`
attribute, thereby breaking Mathlib. (We could of course add the simp
attribute back in Mathlib, but wherever it lives it should have been in
place at the time we merged -- this way I have to add it temporarily in
Mathlib and then remove it again once it is redundant.)
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.

6 participants