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

Open
wants to merge 29 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, corrects a non-terminal simp in BitVec.getLsbD_replicate and simplifies the proof of BitVec.getElem_replicate using the cases tactic.

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)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase edeae18f5eb98159df4371154eb491c07eccabd0 --onto 9b74c07767dc50645efa00356a7724e7f7176227. (2025-01-22 11:49:22)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase edeae18f5eb98159df4371154eb491c07eccabd0 --onto 69a73a18fbfa1fc045bfbf1c4cf93b155d4c9387. (2025-01-28 09:11:38)

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

@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
@github-actions github-actions bot removed the stale label Jan 22, 2025
src/Init/Data/BitVec/Lemmas.lean Outdated Show resolved Hide resolved
src/Init/Data/BitVec/Lemmas.lean Outdated Show resolved Hide resolved
Co-authored-by: Alex Keizer <[email protected]>
@luisacicolini luisacicolini marked this pull request as ready for review January 22, 2025 11:47
@luisacicolini
Copy link
Contributor Author

awaiting-review

@github-actions github-actions bot added awaiting-review Waiting for someone to review the PR and removed awaiting-author Waiting for PR author to address issues labels Jan 22, 2025
@kim-em kim-em added awaiting-author Waiting for PR author to address issues and removed awaiting-review Waiting for someone to review the PR labels Jan 28, 2025
@luisacicolini
Copy link
Contributor Author

awaiting-review

@github-actions github-actions bot added awaiting-review Waiting for someone to review the PR and removed awaiting-author Waiting for PR author to address issues labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review Waiting for someone to review the PR builds-mathlib CI has verified that Mathlib builds against this PR 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.

5 participants