Lean Kernel Arena (Preview) / bugs/rec-rule-wrong-arg

Test "bugs/rec-rule-wrong-arg"

Expected: ✋ reject · Size: 21.0 KB · Lines: 363 · lean4export: 3.2.0 · Lean: 4.38.0-nightly-2026-12-03 · 📄 Declaration · 🔗 Source

Proof of False via a recursor rule that applies the minor premise to the wrong argument.

The export declares the structure W with a single field b : Bool, but the rule of W.rec ignores the field:

fun motive mk b => mk true      -- instead of fun motive mk b => mk b

With this rule, W.rec (motive := fun w => {c : Bool // c = w.b}) (fun b => ⟨b, rfl⟩) (W.mk false), of type {c // c = false}, reduces to ⟨true, rfl⟩, whose second component proves true = false. A checker must derive the rule itself and reject an export whose rule differs from it; checking that the right-hand side of a rule is headed by the minor premise for its constructor is not enough.

Checker Result ⏱️ 🧠
gruszka ✋ 1.99 ms 108.1 MB
nano-lean ✋ 0.686 ms 21.9 MB
pestka ✋ 2.42 ms 18.9 MB
con-leche ✋ 4.58 ms 25.4 MB
con-ron ✋ 28.8 ms 41.8 MB
nucleus 🚫 28.3 ms 13.6 MB
official ✋ 43.9 ms 114.5 MB