Lean Kernel Arena (Preview) / bugs/nested-name-capture

Test "bugs/nested-name-capture"

Expected: ✋ reject · Size: 26.6 KB · Lines: 433 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration

Proof of False via a later declaration that takes the name of a temporary constant made while checking a nested inductive type.

Checking the nested inductive Shadow (its constructor holds a Cov Shadow) makes temporary declarations _nested.Cov_1, _nested.Cov_1.mk and _nested.Cov_1.rec, which are gone once the block is admitted. The exported rule of Shadow.rec for its nested constructor calls _nested.Cov_1.rec; while the block is checked that is the temporary recursor, and the rule reduces to the one the kernel derives. Later in the file an ordinary definition takes the name _nested.Cov_1.rec, and the admitted rule now calls it.

Through that definition, Shadow.rec returns ⟨B.zero, True.intro⟩ where its type promises a dependent pair whose second component has type False when the first is B.zero. The second projection is a proof of False, and the file ends in theorem boom : False, without axioms.

A checker must not let an admitted rule refer to a constant that existed only while the block was checked, for instance by choosing temporary names that no declaration in the file uses.

Nanoda, nanoclo, nanobruijn and sokonanoda accepted this export. Found by a differential run of Pestka against other checkers.

Checker Result ⏱️ 🧠
gruszka ✋ 2.03 ms 108.1 MB
nano-lean ✋ 0.789 ms 28.0 MB
pestka ✋ 2.70 ms 18.6 MB
con-leche ✋ 5.03 ms 24.7 MB
con-ron ✋ 29.2 ms 39.6 MB
nucleus 🚫 28.2 ms 13.8 MB
official ✋ 44.1 ms 114.2 MB