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 ⏱️ 🧠
logos-kernel ✋ 0.573 ms 4.4 MB
nano-lean ✋ 0.777 ms 32.0 MB
sokonanoda ✋ 1.22 ms 31.9 MB
pestka ✋ 1.29 ms 10.8 MB
kefir ✋ 1.70 ms 6.4 MB
nanoclo ✋ 1.16 ms 51.7 MB
kefir-wasm ✋ 203 ms 107.9 MB
con-ron ✋ 23.1 ms 37.9 MB
con-agua ✋ 19.2 ms 12.8 MB
nanoda ✋ 1.26 ms 3.3 MB
lazylean ✋ 1.17 ms 21.2 MB
con-leche ✋ 5.59 ms 20.8 MB
pestka-wasm ✋ 108 ms 103.8 MB
tenet-jvm ✋ 145 ms 66.2 MB
eink0rn ✋ 2.66 ms 14.5 MB
official ✋ 29.8 ms 67.0 MB
ind-models ✋ 102 ms 111.0 MB
lean4lean ✋ 77.5 ms 106.1 MB
tenet ✋ 139 ms 44.9 MB
tenet-hs ✋ 2.42 ms 11.3 MB
ocaml4lean ✋ 14.5 ms 25.9 MB
lean4cobol ✋ 15.2 ms 13.8 MB
evmlean ✋ 3.33 s 275.4 MB
overfull ✋ 67.1 s 48.1 MB
vow-lean-kernel ✋ 275 ms 14.4 MB
mini 🚫 35.3 ms 74.4 MB
canonical-min 🚫 389 ms 1.1 GB
kiota ✋ 1.76 ms 11.1 MB
metalean-slow 👍 32.9 ms 73.8 MB
nanobruijn 👍 1.99 ms 13.8 MB
metalean-fast 👍 32.3 ms 76.9 MB
nanoclo-fortran 👍 2.11 ms 4.4 MB
rpylean 👍 0.946 ms 4.9 MB
mathgraph 👍 1.02 ms 39.6 MB
parse-only 👍 28.7 ms 65.4 MB