Lean Kernel Arena / bugs/unit-rec-rule

Test "bugs/unit-rec-rule"

Expected: ✋ reject · Size: 3.0 KB · Lines: 54 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration

Proof of False via a wrong recursor rule for a constructor without fields.

The export declares PUnit as the prelude does, but the computation rule of PUnit.rec for PUnit.unit returns PUnit.unit instead of the minor premise:

fun motive unit => PUnit.unit      -- instead of fun motive unit => unit

With this rule, PUnit.rec (motive := fun _ => Prop) EmptyProp PUnit.unit reduces to PUnit.unit, so

theorem badR : PUnit.rec (motive := fun _ => Prop) EmptyProp PUnit.unit := PUnit.unit
theorem boom : EmptyProp := badR

is a closed proof of an empty proposition, with no axioms. A checker must derive the rule itself and reject an export whose rule differs from it, as the official kernel does.

Sokonanoda accepted this export; it rejects bugs/nat-rec-rules, whose wrong rule is for a constructor with fields. Found by a differential run of Pestka against other checkers.

Checker Result ⏱️ 🧠
logos-kernel ✋ 0.401 ms 3.3 MB
nano-lean ✋ 0.533 ms 21.9 MB
sokonanoda ✋ 0.735 ms 25.7 MB
pestka ✋ 0.733 ms 10.6 MB
kefir ✋ 0.450 ms 5.8 MB
nanoclo ✋ 0.720 ms 41.6 MB
kefir-wasm ✋ 104 ms 81.7 MB
con-ron ✋ 22.1 ms 38.0 MB
con-agua ✋ 18.0 ms 10.9 MB
nanoda ✋ 0.616 ms 3.0 MB
lazylean ✋ 1.11 ms 21.2 MB
con-leche ✋ 3.98 ms 21.0 MB
pestka-wasm ✋ 78.9 ms 92.0 MB
tenet-jvm ✋ 107 ms 64.7 MB
eink0rn ✋ 1.33 ms 11.4 MB
official ✋ 27.9 ms 67.3 MB
ind-models ✋ 100 ms 109.1 MB
lean4lean ✋ 73.7 ms 104.8 MB
tenet ✋ 132 ms 44.6 MB
tenet-hs ✋ 1.17 ms 8.1 MB
ocaml4lean ✋ 13.4 ms 23.4 MB
lean4cobol ✋ 2.48 ms 13.8 MB
evmlean ✋ 1.09 s 252.9 MB
overfull ✋ 5.29 s 45.8 MB
vow-lean-kernel ✋ 119 ms 14.3 MB
mini ✋ 34.0 ms 74.4 MB
canonical-min 🚫 387 ms 1.1 GB
kiota ✋ 0.661 ms 9.2 MB
metalean-slow ✋ 29.9 ms 70.0 MB
nanobruijn ✋ 0.645 ms 5.5 MB
metalean-fast ✋ 29.9 ms 74.4 MB
nanoclo-fortran 👍 0.759 ms 4.3 MB
rpylean ✋ 0.496 ms 4.0 MB
mathgraph 👍 0.633 ms 33.5 MB
parse-only 👍 27.5 ms 66.0 MB