Lean Kernel Arena (Preview) / bugs/unit-rec-rule

Test "bugs/unit-rec-rule"

Expected: ✋ reject · Size: 3.2 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.

Sokonanoda accepted this export; it rejected 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 ⏱️ 🧠
gruszka ✋ 1.80 ms 76.2 MB
nano-lean ✋ 0.537 ms 21.8 MB
pestka ✋ 2.01 ms 14.6 MB
con-leche ✋ 4.01 ms 22.7 MB
con-ron ✋ 28.4 ms 41.4 MB
nucleus 🚫 23.7 ms 13.6 MB
official ✋ 42.3 ms 114.1 MB