Lean Kernel Arena (Preview) / corner-cases/nested-redex-aux

Test "corner-cases/nested-redex-aux"

Expected: 🤷 either · Size: 43.5 KB · Lines: 755 · lean4export: 3.2.0 · Lean: 4.38.0-nightly-2026-12-03 · 📄 Declaration · 🔗 Source

A nested inductive whose two nested occurrences differ only by a beta-redex:

| a : List ((fun _ : Bool => NestedRedex) true) → NestedRedex
| b : List NestedRedex → NestedRedex

Finding nested occurrences syntactically makes these two auxiliary types, so the exported NestedRedex.rec has three motives; the theorem reduces a recursor application that goes through both, and a checker that finds nested occurrences syntactically accepts it.

A checker that normalises constructor types before it collects nested occurrences merges the two into one auxiliary type, derives a recursor with two motives and rejects the theorem. Whether such a field is a nested occurrence at all is debatable: the elaborator never writes one, and the answer of a syntactic test follows from that test rather than from the type theory (see sokonanoda issue #12).

Checker Result ⏱️ 🧠
gruszka 👍 2.21 ms 104.1 MB
nano-lean 👍 0.830 ms 27.9 MB
pestka 👍 3.33 ms 18.6 MB
con-leche 👍 6.02 ms 23.4 MB
con-ron 👍 29.8 ms 41.6 MB
nucleus 🚫 33.3 ms 13.7 MB
official 👍 45.6 ms 112.7 MB