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.[toInt_inj|toInt_ne] #4075

Merged
merged 5 commits into from
May 10, 2024
Merged

Conversation

tobiasgrosser
Copy link
Contributor

No description provided.

@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 6, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

leanprover-community-mathlib4-bot commented May 6, 2024

Mathlib CI status (docs):

  • ❗ Std/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase e0c1afd12d4fc6b0e520774959aed06bf122aba9 --onto e362b50fa95d6823e59dd706803a93c25e888535. (2024-05-06 08:41:28)
  • ❗ Std/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase e0c1afd12d4fc6b0e520774959aed06bf122aba9 --onto 883a3e752d78cf0d30628817379a6001252b5595. (2024-05-08 00:12:27)

@semorrison semorrison added the awaiting-author Waiting for PR author to address issues label May 7, 2024
@semorrison semorrison self-assigned this May 7, 2024
@tobiasgrosser
Copy link
Contributor Author

I addressed all comments. This now leads to an inconsistency with:

@[bv_toNat] theorem toNat_eq (x y : BitVec n) : x = y ↔ x.toNat = y.toNat :=
  Iff.intro (congrArg BitVec.toNat) eq_of_toNat_eq

@[bv_toNat] theorem toNat_ne (x y : BitVec n) : x ≠ y ↔ x.toNat ≠ y.toNat := by
  rw [Ne, toNat_eq]

would you like me to write a follow-up PR to address this inconsistency?

@tobiasgrosser tobiasgrosser changed the title feat: add BitVec.[toInt_eq|toInt_ne] feat: add BitVec.[toInt_inj|toInt_ne] May 8, 2024
@semorrison
Copy link
Collaborator

I addressed all comments. This now leads to an inconsistency with:

@[bv_toNat] theorem toNat_eq (x y : BitVec n) : x = y ↔ x.toNat = y.toNat :=
  Iff.intro (congrArg BitVec.toNat) eq_of_toNat_eq

@[bv_toNat] theorem toNat_ne (x y : BitVec n) : x ≠ y ↔ x.toNat ≠ y.toNat := by
  rw [Ne, toNat_eq]

would you like me to write a follow-up PR to address this inconsistency?

Oops, thanks for noticing that! Yes, such a PR would be great.

@semorrison semorrison added this pull request to the merge queue May 10, 2024
Merged via the queue into leanprover:master with commit 368adaf May 10, 2024
12 checks passed
@tobiasgrosser tobiasgrosser deleted the toInt_eq branch May 10, 2024 02:05
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 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

3 participants