Lean Kernel Arena / bugs/nested-name-capture

Test "bugs/nested-name-capture"

Expected: ✋ reject · Size: 26.1 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. The official kernel rejects the file.

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

Checker Result ⏱️ 🧠
nano-lean ✋ 0.784 ms 26.3 MB
logos-kernel ✋ 0.573 ms 4.5 MB
gruszka ✋ 2.00 ms 39.7 MB
sokonanoda ✋ 1.22 ms 31.9 MB
pestka ✋ 2.51 ms 13.9 MB
kefir ✋ 1.70 ms 6.5 MB
palladium ✋ 0.900 ms 18.9 MB
kefir-wasm ✋ 203 ms 107.4 MB
con-ron ✋ 30.5 ms 39.2 MB
con-agua ✋ 21.5 ms 16.0 MB
nanobruijn ✋ 2.00 ms 15.9 MB
nanoda ✋ 1.26 ms 3.3 MB
con-leche ✋ 5.05 ms 21.8 MB
pestka-wasm ✋ 103 ms 116.2 MB
tenet-jvm ✋ 144 ms 65.5 MB
official-nightly ✋ 35.1 ms 108.9 MB
eink0rn ✋ 2.67 ms 14.4 MB
official ✋ 34.1 ms 102.8 MB
ind-models ✋ 102 ms 106.9 MB
lean4lean ✋ 77.5 ms 104.7 MB
tenet ✋ 139 ms 45.2 MB
tenet-hs ✋ 2.42 ms 11.0 MB
ocaml4lean ✋ 14.5 ms 26.0 MB
lean4cobol ✋ 15.2 ms 13.9 MB
evmlean ✋ 3.36 s 275.5 MB
mini 🚫 35.3 ms 73.2 MB
overfull ✋ 67.1 s 48.3 MB
kiota ✋ 1.76 ms 11.2 MB
canonical-min 🚫 389 ms 1.1 GB
nanoclo ✋ 1.16 ms 51.6 MB
vow-lean-kernel ✋ 275 ms 14.4 MB
lazylean ✋ 1.18 ms 21.1 MB
metalean-slow 👍 32.9 ms 73.4 MB
metalean-fast 👍 32.3 ms 74.3 MB
nanoclo-fortran 👍 2.10 ms 4.8 MB
mathgraph 👍 1.02 ms 39.7 MB
rpylean 👍 0.949 ms 4.9 MB