This PR changes `bv_decide`'s configuration from lots of `set_option` to an elaborated config like `simp` or `omega`. The notable exception is `sat.solver` which is still a `set_option` such that users can configure a custom SAT solver globally for an entire project or file. Additionally it introduces the ability to set `maxSteps` for the simp preprocessing run through the new config. The latter feature was requested by people using `bv_decide` on SMTLIB which has ginormous terms that exceed the default.
23 lines
865 B
Text
23 lines
865 B
Text
import Std.Tactic.BVDecide
|
|
|
|
open BitVec
|
|
|
|
/--
|
|
error: The SAT solver timed out while solving the problem.
|
|
Consider increasing the timeout with the `timeout` config option.
|
|
If solving your problem relies inherently on using associativity or commutativity, consider enabling the `acNf` config option.
|
|
-/
|
|
#guard_msgs in
|
|
theorem timeout (x y z : BitVec 1024) : x - (y + z) = x - y - z := by
|
|
bv_decide (config := { timeout := 1 })
|
|
|
|
/--
|
|
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.
|
|
-/
|
|
#guard_msgs in
|
|
theorem no_hyps (x y : Nat) : x * y = y * x := by
|
|
bv_decide
|