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.29.1 · 📄 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 ⏱️ 🧠
mathgraph ✋ 1 ms 33.8 MB
sokonanoda ✋ 1 ms 33.8 MB
nanoclo 👍 1 ms 47.6 MB
con-ron 👍 26 ms 56.9 MB
lazylean 👍 1 ms 21.2 MB
nanoda 👍 1 ms 2.8 MB
nanobruijn 👍 1 ms 11.0 MB
con-leche 👍 9 ms 27.4 MB
eink0rn 👍 2 ms 12.9 MB
ind-models 👍 74 ms 108.2 MB
official ✋ 28 ms 66.6 MB
lean4lean 👍 28 ms 97.2 MB
tenet ✋ 130 ms 44.0 MB
nanoclo-fortran 👍 1 ms 4.4 MB
lean4cobol 👍 6 ms 13.5 MB
evmlean 👍 1.4 s 133.6 MB
mini 🚫 35 ms 73.8 MB
overfull 👍 21.3 s 46.4 MB
kiota 👍 1 ms 7.0 MB
canonical-min 🚫 389 ms 1.1 GB
rpylean 👍 1 ms 4.3 MB
vow-lean-kernel 👍 101 ms 8.3 MB
official-v4.28.0 👍 35 ms 73.5 MB
still-nanoda 👍 1 ms 3.1 MB
nyaya 👍 3 ms 9.6 MB
parse-only 👍 28 ms 65.8 MB