Lean Kernel Arena / bugs/proj-of-param-prop

Test "bugs/proj-of-param-prop"

Expected: ✋ reject · Size: 11.9 KB · Lines: 206 · lean4export: 3.1.0 · Lean: 4.36.0 · 📄 Declaration · 🔗 Source

Proof of False by projecting a non-propositional field out of a parameterized Prop-valued structure.

The export declares a parameterized single-constructor inductive in Prop:

inductive PBox (α : Type) : Prop where
  | mk (val : α) : PBox α

Its type ∀ (α : Type), Prop is a ForAll whose terminal result sort is Prop, so PBox Bool is a proposition and PBox.mk true and PBox.mk false are definitionally equal by proof irrelevance. The definition obs (x : PBox Bool) : Bool := x.0 illegally projects the Type-valued field out of PBox Bool, and transporting along eq_p : PBox.mk true = PBox.mk false derives inconsistent : False without axioms.

A sound kernel must check the terminal sort of the inductive's type (peeling all parameter ForAll binders, or inferring the type of the applied structure type, rather than checking whether the outer type node is Sort 0) when rejecting non-propositional projections out of a Prop structure.

rpylean accepted this export (reported as Julian/rpylean#37) because projection type inference checked whether the outer node of ind.type was a Sort rather than peeling parameter binders to the terminal sort.

Checker Result ⏱️ 🧠
nano-lean ✋ 0.614 ms 28.0 MB
gruszka ✋ 1.89 ms 92.1 MB
mathgraph ✋ 1.13 ms 27.9 MB
sokonanoda ✋ 0.957 ms 27.6 MB
pestka ✋ 2.28 ms 17.0 MB
kefir ✋ 0.829 ms 6.3 MB
kefir-wasm ✋ 121 ms 86.0 MB
con-ron ✋ 29.1 ms 41.6 MB
con-ron-stream ✋ 29.7 ms 45.1 MB
con-agua ✋ 20.3 ms 12.2 MB
nanobruijn ✋ 1.19 ms 11.7 MB
nanoda ✋ 0.815 ms 3.2 MB
con-leche ✋ 4.20 ms 23.2 MB
pestka-wasm ✋ 512 ms 312.3 MB
official-nightly ✋ 33.9 ms 98.6 MB
eink0rn ✋ 1.73 ms 12.2 MB
official ✋ 32.7 ms 102.5 MB
ind-models ✋ 101 ms 109.9 MB
kiota ✋ 0.944 ms 11.4 MB
tenet ✋ 141 ms 45.9 MB
tenet-hs ✋ 1.62 ms 9.4 MB
logos-kernel ✋ 0.469 ms 4.6 MB
evmlean ✋ 1.65 s 274.4 MB
mini ✋ 34.7 ms 74.3 MB
overfull ✋ 25.3 s 46.6 MB
lean4lean ✋ 30.5 ms 101.7 MB
lean4cobol ✋ 6.20 ms 13.6 MB
tenet-jvm ✋ 121 ms 76.7 MB
nanoclo ✋ 0.868 ms 55.5 MB
vow-lean-kernel ✋ 182 ms 14.2 MB
canonical-min 🚫 387 ms 1.1 GB
lazylean ✋ 1.26 ms 21.2 MB
rpylean 👍 0.952 ms 10.6 MB
metalean-slow ✋ 30.7 ms 73.4 MB
metalean-fast ✋ 30.8 ms 74.4 MB
nanoclo-fortran ✋ 1.17 ms 4.7 MB