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.(getMsbD, msb)_replicate, replicate_one #6326

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

luisacicolini
Copy link
Contributor

@luisacicolini luisacicolini commented Dec 6, 2024

This PR adds BitVec.(getMsbD, msb)_replicate, replicate_one theorems. It also moves BitVec.(getLsbD, getElem)_replicate to put them closer toBitVec.getMsbD_replicate, which depends on reverse theorems.

Co-authored with @bollu.

@luisacicolini luisacicolini changed the title feat: add BitVec.(getMSbD, msb)_replicate and necessary theorems feat: add BitVec.(getMSbD, msb)_replicate, replicate_append_replicate_eq and support theorems Dec 6, 2024
@tobiasgrosser
Copy link
Contributor

@alexkeizer, can you do a round of reviews?

@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 Dec 6, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Dec 6, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 6, 2024
@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Dec 6, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Dec 6, 2024

Mathlib CI status (docs):

  • ✅ Mathlib branch lean-pr-testing-6326 has successfully built against this PR. (2024-12-06 12:04:30) View Log
  • ✅ Mathlib branch lean-pr-testing-6326 has successfully built against this PR. (2024-12-09 18:12:46) View Log
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase edeae18f5eb98159df4371154eb491c07eccabd0 --onto f9e904af5022a57adb6105cda65d1569449346c2. (2025-01-21 12:26:58)

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/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
@luisacicolini
Copy link
Contributor Author

thanks @alexkeizer for the review. I refactored the proof with cases and fixed all non terminal simps.

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Dec 9, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 9, 2024
@kim-em kim-em self-assigned this Dec 10, 2024
@luisacicolini
Copy link
Contributor Author

After the merging of #6476 I updated the proof of getMsbD_replicate and updated the description (some theorems seem new in the diff, but it's because I had to move them under the *_reverse theorems).

@luisacicolini
Copy link
Contributor Author

changelog-library

@github-actions github-actions bot added the changelog-library Library label Jan 21, 2025
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
@tobiasgrosser
Copy link
Contributor

@luisacicolini, the PR title still needs updating.

@luisacicolini luisacicolini changed the title feat: add BitVec.(getMSbD, msb)_replicate, replicate_append_replicate_eq and support theorems feat: add BitVec.(getMsbD, msb)_replicate, replicate_one Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author Waiting for PR author to address issues builds-mathlib CI has verified that Mathlib builds against this PR changelog-library Library stale 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