Performance discrepancy between let
and let_fun
in bv_decide
.
#6454
Labels
bug
Something isn't working
let
and let_fun
in bv_decide
.
#6454
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”) (not applicable,
bv_decide
doesn't run there)Description
This issue concerns a proof extracted from SMTLIB:
smt/non-incremental/QF_BV/sage/app8/bench_1804.smt2
:applying
bv_decide
to this hangs in the kernel, however if we applybv_normalize
and manually extract the goal state afterwards:Is instantly solvable with
bv_decide
. Furthermore if we replacelet_fun
withlet
:This is also perfectly solvable with
bv_decide
.Based on this data it seems that:
let
orlet_fun
is used so the pass that removes lets is likely at fault, this is the code here: https://github.com/leanprover/lean4/blob/master/src/Lean/Elab/Tactic/BVDecide/Frontend/Normalize.lean#L193-L212. In particular given that we have recently done work onlet_fun
insimp
it is likely thatsimp
is at fault.Expected behavior:
let_fun
andlet
should behave the same performance wise in this situation. In generallet_fun
should of course be faster.Actual behavior: The
let_fun
version hangs,let
doesn't.Versions
Lean master at commit 37b53b7. In particular this is after fixing #6043 which also exposed issues while typechecking in the kernel.
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: