Lean Kernel Arena / bugs/nat-rec-rules

Test "bugs/nat-rec-rules"

Expected: ✋ reject · Size: 8.1 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 ⏱️ 🧠
sokonanoda ✋ 1 ms 38.2 MB
mathgraph ✋ 1 ms 31.9 MB
nanoclo ✋ 1 ms 51.9 MB
con-ron ✋ 1 ms 11.6 MB
nanobruijn ✋ 1 ms 7.8 MB
nanoda ✋ 1 ms 3.5 MB
lazylean ✋ 1 ms 22.0 MB
con-leche ✋ 3 ms 20.3 MB
tenet-jvm ✋ 113 ms 65.4 MB
eink0rn ✋ 2 ms 12.3 MB
official ✋ 30 ms 68.0 MB
ind-models ✋ 102 ms 111.2 MB
lean4lean ✋ 28 ms 98.0 MB
tenet ✋ 142 ms 45.4 MB
tenet-hs ✋ 1 ms 8.7 MB
lean4cobol ✋ 4 ms 13.6 MB
evmlean ✋ 1.4 s 275.8 MB
mini ✋ 35 ms 74.3 MB
overfull ✋ 14.3 s 46.7 MB
metalean-slow 🚫 30 ms 69.2 MB
nanoclo-fortran ✋ 1 ms 4.6 MB
kiota ✋ 1 ms 7.5 MB
metalean-fast ✋ 31 ms 72.4 MB
canonical-min ✋ 387 ms 1.1 GB
rpylean ✋ 1 ms 4.4 MB
vow-lean-kernel ✋ 92 ms 8.3 MB
parse-only 👍 28 ms 65.7 MB