Test "nat-rec-rules"
Expected: ✋ reject · Size: 8.2 KB · Lines: 128 · lean4export: 3.1.0 · Lean: 4.29.0-rc1 · 📄 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 | ⏱️ | 🧠 | ||
|---|---|---|---|---|---|
| nanoda | ✋ | 2 ms | 3.0 MB | ||
| nanobruijn | ✋ | 4 ms | 7.4 MB | ||
| official-nightly | ✋ | 34 ms | 57.2 MB | ||
| official | ✋ | 34 ms | 66.5 MB | ||
| official-v4.28.0 | ✋ | 40 ms | 71.3 MB | ||
| lean4lean | 🚫 | 26 ms | 13.0 MB | ||
| mini | ✋ | 38 ms | 70.3 MB | ||
| always-decline | 🚫 | 1 ms | 2.8 MB | ||
| always-reject | ✋ | 1 ms | 2.8 MB | ||
| rpylean | 👍 | 2 ms | 6.5 MB | ||
| parse-only | 👍 | 38 ms | 70.0 MB | ||
| always-accept | 👍 | 1 ms | 2.8 MB |