lean4-htt/tests/lean/run/skipKernelTC.lean
Leonardo de Moura d8e719f9ab feat: add set_option debug.skipKernelTC true
The new option `set_option debug.skipKernelTC true` is meant for
temporarily working around kernel performance issues.
It compromises soundness because a buggy tactic may produce an invalid
proof, and the kernel will not catch it if the new option is set to true.
2024-06-28 00:55:47 +02:00

24 lines
564 B
Text

import Lean
open Lean Meta Elab Tactic in
elab "my_tac" : tactic =>
liftMetaTactic1 fun mvarId => do
mvarId.assign (mkConst ``True.intro)
return none
example : True := by
my_tac -- should work
/--
error: (kernel) declaration type mismatch, '_example' has type
True
but it is expected to have type
1 = 2
-/
#guard_msgs in
example : 1 = 2 := by
my_tac -- generates invalid proof that is rejected by the kernel
set_option debug.skipKernelTC true in
example : 1 = 2 := by
my_tac -- generates invalid proof that is **not** checked by the kernel