Lean Kernel Arena / perf/repeated-subproblem

Test "perf/repeated-subproblem"

Expected: 👍 accept · Size: 11.4 KB · Lines: 214 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

perfect #n leaf      and      perfect #(n-1) (node leaf leaf)

where perfect #k t builds the perfect binary tree of depth k with leaves t, in k steps that each duplicate the tree so far into both arguments of Tr.node.

Both sides reduce to the perfect tree of depth n. Descending them meets Tr.node u u against Tr.node v v at every level, where both argument positions pose the same subproblem, so the recursion reaches 2^n pairs of nodes of which n are distinct. The test asks whether a checker records the pairs it has proved convertible: Θ(n) if it does, Θ(2ⁿ) if not.

N=20 in the Lean source, stepped up by one rather than doubled. From Courant and Leroy, POPL 2026, §10.

Checker Result ⏱️ 🧠
mathgraph 👍 1 ms (÷35) 33.9 MB (-46%)
ind-models 👍 185 ms (×6.5) 106.6 MB (+71%)
official-nightly 👍 29 ms (+1%) 65.8 MB (+5%)
evmlean 👍 12.7 m (×26789) 177.3 MB (×2.8)
nanoda 👍 1 ms (÷34) 3.2 MB (÷20)
mini 💥 1.5 m 266.0 MB
lean4lean 👍 29 ms (+1%) 91.9 MB (+47%)
sokonanoda 👍 1 ms (÷35) 33.6 MB (-46%)
zignodamus 👍 1 ms (÷40) 5.0 MB (÷12)
nanoclo 👍 1 ms (÷25) 47.4 MB (-24%)
nanobruijn 👍 1 ms (÷23) 10.0 MB (÷6.2)
kiota 👍 1 ms (÷27) 9.0 MB (÷6.9)
official 👍 28 ms (0%) 62.4 MB (0%)
vow-lean-kernel 👍 101 ms (×3.5) 8.0 MB (÷7.8)
rpylean 👍 21 ms (-25%) 8.5 MB (÷7.3)
official-v4.28.0 👍 35 ms (+24%) 73.2 MB (+17%)
still-nanoda 👍 1 ms (÷34) 3.2 MB (÷20)
nyaya 👍 7.2 s (×255) 13.9 MB (÷4.5)
parse-only 👍 28 ms (-3%) 60.4 MB (-3%)