Lean Kernel Arena (Preview) / bugs/nat-rec-rules

Test "bugs/nat-rec-rules"

Expected: ✋ reject · Size: 8.4 KB · Lines: 128 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Proof of False via incorrect recursor rule validation.

When processing an inductive type declaration, a correct kernel must verify that the generated recursor rules match the ones provided in the export data. A checker that accidentally compares the imported rules against themselves (instead of against independently constructed rules) will accept arbitrary recursor reduction behavior.

This test defines Nat with a wrong Nat.rec succ rule that always returns hzero (ignoring the induction hypothesis). Combined with a nat literal extension that hardcodes correct arithmetic for concrete nat literals but falls back to the wrong Nat.rec rules for symbolic arguments, this creates an inconsistency that yields a proof of False.

Nanoda incorrectly accepted this proof until it was fixed.

Checker Result ⏱️ 🧠
gruszka ✋ 1.97 ms 70.2 MB
nano-lean ✋ 0.665 ms 22.0 MB
pestka ✋ 2.09 ms 14.4 MB
con-leche ✋ 4.08 ms 22.7 MB
con-ron ✋ 28.0 ms 41.8 MB
nucleus 🚫 24.7 ms 13.7 MB
official ✋ 44.0 ms 114.6 MB