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

bv_decide throws an unknown free variable error if there is an hypothesis b.toNat > 0 in the context #5674

Closed
3 tasks done
alexkeizer opened this issue Oct 10, 2024 · 0 comments · Fixed by #5675
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@alexkeizer
Copy link
Contributor

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

In the following MWE, bv_decide complains about an unknown free variable.
If we remove the hypothesis h, bv_decide will correctly come up with a counterexample,
or if we rephrase h in term of bitvector le, (i.e., b > 0), bv_decide correctly comes up with a proof, so it seems the presence of toNat is problematic.

import Std.Tactic.BVDecide

example
    (b : BitVec 64)
    (h : b.toNat > 0) :
    b > 0 := by
  bv_decide -- unknown free variable '_fvar.394'

Context

Minimized from LNSym

Steps to Reproduce

  1. Load the MWE

Expected behavior: I expect bv_decide to either come up with a proof, a counterexample, or a meaningful error to explain why it couldn't do either.

Actual behavior: I get "unknown fvar"

Versions

nightly-2024-10-09 on MacOS

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant