-- Kernel check off: a false "theorem" that skips the kernel check, for teaching only. -- It adds `False`, "proved" by `True.intro`, while the option `debug.skipKernelTC` -- tells Lean not to send the declaration to the kernel type checker. -- `lake build` accepts this file and `#print axioms` reports no axioms. -- `leanchecker` replays the declaration through the kernel and rejects it. import Lean open Lean Elab Command set_option debug.skipKernelTC true in run_cmd liftCoreM <| addDecl (Declaration.thmDecl { name := `Demo.unchecked, levelParams := [], type := mkConst ``False, value := mkConst ``True.intro }) #print axioms Demo.unchecked -- Anything follows from `False`, so this "proves" a plainly wrong equation. theorem Demo.wrong : 2 + 2 = 5 := Demo.unchecked.elim #print axioms Demo.wrong