We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Nat.reduceAnd
Please put an X between the brackets as you perform the following steps:
The builtin simproc Nat.reduceAnd doesn't work. This is because of a typo in the definition:
builtin_dsimproc [simp, seval] reduceAnd ((_ &&& _ : Nat)) := reduceBin ``HOr.hOr 6 (· &&& ·) -- should be builtin_dsimproc [simp, seval] reduceAnd ((_ &&& _ : Nat)) := reduceBin ``HAnd.hAnd 6 (· &&& ·)
While there is a test for bitwise and reduction, it actually unintentionally uses lemmas other than Nat.reduceAnd:
#check_simp (3 : Nat) &&& (1 : Nat) ~> 1 -- uses Nat.and_one_is_mod, Nat.reduceMod
/-- error: simp made no progress -/ #guard_msgs in example : 42 &&& 69 = 0 := by simp
This bug was introduced in v4.13.0-rc2 (the same version bitwise and reduction was introduced in).
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered:
Sounds plausible, thanks for the analysis. Do you want to prepare a PR? Including a regression test?
Sorry, something went wrong.
Yeah, on it.
fix: fix builtin simproc Nat.reduceAnd (#6773)
e8bbba0
This PR fixes a typo that prevented `Nat.reduceAnd` from working correctly. Closes #6772
Successfully merging a pull request may close this issue.
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
The builtin simproc
Nat.reduceAnd
doesn't work. This is because of a typo in the definition:While there is a test for bitwise and reduction, it actually unintentionally uses lemmas other than
Nat.reduceAnd
:Example
Versions
This bug was introduced in v4.13.0-rc2 (the same version bitwise and reduction was introduced in).
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: