Lean Kernel Arena (Preview) / perf/repeated-subproblem

Test "perf/repeated-subproblem"

Expected: 👍 accept · Size: 11.6 KB · Lines: 214 · lean4export: 3.2.0 · Lean: 4.38.0-nightly-2026-12-03 · Timeout: 40.0 s · 📄 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 ⏱️ 🧠
gruszka 👍 1.99 ms (÷22) 78.2 MB (-31%)
nano-lean 👍 0.608 ms (÷70) 23.7 MB (÷4.8)
pestka 👍 2.30 ms (÷19) 17.0 MB (÷6.6)
con-leche 👍 4.36 ms (÷9.8) 25.4 MB (÷4.4)
con-ron 👍 28.6 ms (-33%) 41.8 MB (÷2.7)
nucleus 👍 561 ms (×13) 13.6 MB (÷8.3)
official 👍 42.9 ms 112.6 MB