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

chore: change BitVec.intMin/Max from abbrev to def #5252

Merged
merged 1 commit into from
Sep 4, 2024
Merged

Conversation

kim-em
Copy link
Collaborator

@kim-em kim-em commented Sep 4, 2024

I don't think we gain anything from having them as abbrev here, and the simpNF linter complains:

-- Init.Data.BitVec.Lemmas
#check @BitVec.toNat_intMin /- simp can prove this:
  by simp only [BitVec.toNat_twoPow]
One of the lemmas above could be a duplicate.
If that's not the case try reordering lemmas or adding @[priority].
 -/
#check @BitVec.toNat_intMax /- Left-hand side simplifies from
  (BitVec.intMax w).toNat
to
  (2 ^ w - 1 % 2 ^ w + 2 ^ (w - 1)) % 2 ^ w
using
  simp only [@BitVec.toNat_sub, @BitVec.ofNat_eq_ofNat, BitVec.toNat_ofNat, BitVec.toNat_twoPow, Nat.add_mod_mod]
Try to change the left-hand side to the simplified term!
 -/

@kim-em
Copy link
Collaborator Author

kim-em commented Sep 4, 2024

@tobiasgrosser?

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc September 4, 2024 04:04 Inactive
@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 4, 2024
@leanprover-community-mathlib4-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 c219303270c8db12c7f84e6ccc6e8b0b03f54216 --onto 66688e10ceef553f48b935a74d9bbd096edf96f5. (2024-09-04 04:13:18)

@kim-em kim-em added this pull request to the merge queue Sep 4, 2024
Merged via the queue into master with commit a926d0c Sep 4, 2024
14 checks passed
@kim-em kim-em deleted the intMin_def branch September 4, 2024 06:13
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.

3 participants