Skip to content

Commit c1a43f2

Browse files
committed
Make Thm.SPEC use lazy_beta_conv instead of beta_conv
The former, unlike the latter, avoids traversing the entire term, which can take exponentially long in certain degenerate conditions observed while replaying certain Z3 proof certificates. Unfortunately, this only fixes the issue for the standard kernel. The experimental kernel does not seem to be amenable to such a straightforward fix, as it does not seem to support closures in the underlying term representation. Partially fixes #1300
1 parent 7bf55e0 commit c1a43f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/thm/std-thm.ML

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ fun SPEC t th =
563563
Assert (Name="!" andalso Thy="bool")
564564
"SPEC" "Theorem not universally quantified";
565565
make_thm Count.Spec
566-
(tag th, hypset th, beta_conv(mk_comb(Rand, t)))
566+
(tag th, hypset th, lazy_beta_conv(mk_comb(Rand, t)))
567567
handle HOL_ERR _ =>
568568
raise thm_err "SPEC"
569569
"Term argument's type not equal to bound variable's"

0 commit comments

Comments
 (0)