leanprover / leanprover/lean4

`bv_decide`: support for shifting by a natural number

Open
#5,327 3 comments 0 reactions 1 assignee View on GitHub

@bollu is already working on this.

Since Oct 10, 2024.

bug feature P-medium
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

The following example is not currently supported by bv_decide

import Std.Tactic.BVDecide

theorem ushiftRight_symbolic_shift (x : BitVec 64) (n : Nat) (h : n < 64) :
  x >>> n = (BitVec.extractLsb 63 n x).zeroExtend 64 := by
  bv_decide

It produces the error message.

error: None of the hypotheses are in the supported BitVec fragment.
There are two potential fixes for this:
1. If you are using custom BitVec constructs simplify them to built-in ones.
2. If your problem is using only built-in ones it might currently be out of reach.
   Consider expressing it in terms of different operations that are better supported.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.