Test "perf/repeated-subproblem"
Expected: 👍 accept · Size: 11.4 KB · Lines: 214 · lean4export: 3.1.0 · Lean: 4.36.0 · 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 | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| nano-lean | 👍 | 0.607 ms | (÷54) | 23.8 MB | (÷3.9) | |
| gruszka | 👍 | 1.91 ms | (÷17) | 87.8 MB | (-5%) | |
| mathgraph | 👍 | 1.09 ms | (÷30) | 27.6 MB | (÷3.3) | |
| sokonanoda | 👍 | 0.951 ms | (÷35) | 27.5 MB | (÷3.4) | |
| pestka | 👍 | 2.30 ms | (÷14) | 16.8 MB | (÷5.5) | |
| kefir | 👍 | 0.848 ms | (÷39) | 6.0 MB | (÷15) | |
| kefir-wasm | 👍 | 123 ms | (×3.7) | 85.9 MB | (-7%) | |
| con-ron | 👍 | 29.3 ms | (-11%) | 41.6 MB | (÷2.2) | |
| con-ron-stream | 👍 | 29.8 ms | (-9%) | 45.2 MB | (÷2.0) | |
| con-agua | 👍 | 20.5 ms | (-38%) | 12.8 MB | (÷7.2) | |
| nanobruijn | 👍 | 1.16 ms | (÷28) | 10.3 MB | (÷9.0) | |
| nanoda | 👍 | 0.843 ms | (÷39) | 3.1 MB | (÷29) | |
| con-leche | 👍 | 4.42 ms | (÷7.4) | 27.2 MB | (÷3.4) | |
| pestka-wasm | 👍 | 518 ms | (×16) | 313.9 MB | (×3.4) | |
| official-nightly | 👍 | 33.9 ms | (+3%) | 97.2 MB | (+5%) | |
| eink0rn | 👍 | 2.76 ms | (÷12) | 12.0 MB | (÷7.7) | |
| official | 👍 | 32.8 ms | 92.2 MB | |||
| ind-models | 👍 | 193 ms | (×5.9) | 114.0 MB | (+24%) | |
| kiota | 👍 | 1.12 ms | (÷29) | 11.2 MB | (÷8.3) | |
| tenet | 👍 | 138 ms | (×4.2) | 44.2 MB | (÷2.1) | |
| tenet-hs | 👍 | 1.77 ms | (÷19) | 9.5 MB | (÷9.7) | |
| logos-kernel | 👍 | 0.502 ms | (÷65) | 4.3 MB | (÷21) | |
| evmlean | 👍 | 4.03 s | (×123) | 275.8 MB | (×3.0) | |
| mini | ⌛ | — | — | |||
| overfull | 👍 | 41.7 s | (×1270) | 47.1 MB | (-49%) | |
| lean4lean | 👍 | 30.5 ms | (-7%) | 89.7 MB | (-3%) | |
| lean4cobol | 👍 | 9.65 ms | (÷3.4) | 13.7 MB | (÷6.7) | |
| tenet-jvm | 👍 | 115 ms | (×3.5) | 76.4 MB | (-17%) | |
| nanoclo | 👍 | 0.936 ms | (÷35) | 39.6 MB | (÷2.3) | |
| vow-lean-kernel | 👍 | 174 ms | (×5.3) | 14.2 MB | (÷6.5) | |
| canonical-min | 🚫 | 387 ms | 1.0 GB | |||
| lazylean | 👍 | 1.37 ms | (÷24) | 21.1 MB | (÷4.4) | |
| rpylean | 👍 | 0.972 ms | (÷34) | 10.0 MB | (÷9.2) | |
| metalean-slow | 👍 | 4.90 s | (×149) | 61.2 MB | (-34%) | |
| metalean-fast | 👍 | 31.0 ms | (-6%) | 69.8 MB | (-24%) | |
| nanoclo-fortran | 👍 | 1.55 ms | (÷21) | 4.4 MB | (÷21) |