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.[toNat|toInt|toFin|getLsbD|getMsbD|getElem|msb]_fill #6177

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tobiasgrosser
Copy link
Contributor

This PR implements BitVec.*_fill.

@tobiasgrosser
Copy link
Contributor Author

changelog-library

@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 Nov 22, 2024
@leanprover-community-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 5145030ff4bed884213f584f8b2402be82e96d45 --onto 72e952eadc6a171310f1d8e9d6e78acf98421494. (2024-11-22 22:09:01)

Comment on lines +2252 to +2253
theorem fill_eq {w : Nat} {v : Bool} : fill w v = if v = true then allOnes w else 0#w := by
by_cases h : v <;> (simp only [h] ; ext ; simp)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we have two simp lemmas fill_true and fill_false?

@kim-em
Copy link
Collaborator

kim-em commented Nov 23, 2024

An alternative approch here might be to deprecate/delete fill. Do you know why we have it in the first place?

@kim-em kim-em added the awaiting-author Waiting for PR author to address issues label Nov 26, 2024
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 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.

3 participants