Lean Kernel Arena / corner-cases/nested-nonuniform-param

Test "corner-cases/nested-nonuniform-param"

Expected: 🤷 either · Size: 9.2 KB · Lines: 142 · lean4export: 3.1.0 · Lean: 4.36.0 · 📄 Declaration · 🔗 Source

Checks that a parameter supplied to a nested inductive occurrence really acts as the datatype's parameter, i.e. that it is the parameter itself and does not change between recursive occurrences (as is already enforced for non-nested occurrences).

The inductive E : W → Type has constructor E.mk : (w : W) → L (E ⟨false⟩) → E w, where L (α : Type) is nested. The occurrence E ⟨false⟩ inside the nested L uses the constant ⟨false⟩ in the position of E's parameter, instead of the actual parameter w. That argument is type-correct, so it is not caught by merely type-checking the nested application (leanprover/lean4#14577); a correct checker must also verify that it is the expected parameter.

This particular declaration is not known to yield a proof of False: here L stores no value of type α, so the nested occurrence is phantom and E w is isomorphic to Unit for every w. The variant where L actually stores an α (so recursion would descend into an E ⟨false⟩ while the motive is fixed at E w) is already rejected by the kernel's positivity check ("non valid occurrence"). Since it is not a demonstrated unsoundness, it is not settled whether a checker should accept or reject it, so the expected outcome is either and the test does not count towards completeness or soundness.

Origin: raised by @arthur-adjedj on leanprover/lean4#14577 (https://github.com/leanprover/lean4/pull/14577#issuecomment-5101819377) as a case not covered by that PR's fix; related to leanprover/lean4#14576.

Checker Result ⏱️ 🧠
nano-lean 👍 0.568 ms 21.8 MB
gruszka 👍 1.87 ms 78.1 MB
mathgraph ✋ 0.805 ms 17.8 MB
sokonanoda ✋ 0.800 ms 17.6 MB
pestka ✋ 2.12 ms 14.2 MB
kefir ✋ 0.626 ms 6.0 MB
kefir-wasm ✋ 113 ms 83.5 MB
con-ron ✋ 29.1 ms 41.7 MB
con-ron-stream ✋ 29.7 ms 45.0 MB
con-agua ✋ 20.3 ms 12.1 MB
nanobruijn 👍 1.01 ms 9.9 MB
nanoda 👍 0.737 ms 3.1 MB
con-leche ✋ 4.18 ms 23.1 MB
pestka-wasm ✋ 513 ms 312.4 MB
official-nightly ✋ 33.6 ms 108.0 MB
eink0rn 👍 1.90 ms 12.6 MB
official ✋ 32.4 ms 93.0 MB
ind-models ✋ 100 ms 95.3 MB
kiota ✋ 0.837 ms 11.2 MB
tenet ✋ 134 ms 45.3 MB
tenet-hs ✋ 1.39 ms 8.8 MB
logos-kernel 👍 0.475 ms 3.3 MB
evmlean 👍 1.87 s 274.6 MB
mini 🚫 34.4 ms 73.7 MB
overfull 👍 21.3 s 46.7 MB
lean4lean 👍 30.2 ms 89.8 MB
lean4cobol 👍 6.23 ms 13.6 MB
tenet-jvm 👍 106 ms 76.7 MB
nanoclo 👍 0.810 ms 49.4 MB
vow-lean-kernel 👍 175 ms 14.7 MB
canonical-min 🚫 389 ms 1.1 GB
lazylean 👍 1.27 ms 20.9 MB
rpylean ✋ 0.972 ms 10.2 MB
metalean-slow 👍 30.3 ms 66.5 MB
metalean-fast 👍 30.3 ms 72.0 MB
nanoclo-fortran 👍 1.19 ms 4.6 MB