Lean Kernel Arena / perf/args-before-unfold

Test "perf/args-before-unfold"

Expected: 👍 accept · Size: 44.5 KB · Lines: 1.2 k · lean4export: 3.1.0 · Lean: 4.36.0 · Timeout: 40.0 s · 📄 Declaration · 🔗 Source

The declaration to check compares

count #n      and      count (N.add #(n-1) #1)

where #k is the numeral with k successors, and count #k evaluates to #k in Θ(k²) reductions.

N.add #(n-1) #1 reduces to #n in n steps, so the two arguments agree for Θ(n), and the applications agree with them without count ever being unfolded. Evaluating both applications costs Θ(n²). The test asks whether a checker tries the arguments of a shared head constant before unfolding it.

N=1000 in the Lean source. From Courant and Leroy, POPL 2026, §10.

Checker Result ⏱️ 🧠
nano-lean 👍 1.44 ms (÷28) 30.1 MB (÷3.1)
gruszka 👍 3.28 ms (÷12) 88.4 MB (-4%)
mathgraph 👍 1.80 ms (÷22) 34.3 MB (÷2.7)
sokonanoda 👍 1.71 ms (÷24) 34.2 MB (÷2.7)
pestka 👍 5.30 ms (÷7.6) 24.7 MB (÷3.7)
kefir 👍 2.88 ms (÷14) 8.5 MB (÷11)
kefir-wasm 👍 163 ms (×4.0) 95.1 MB (+3%)
con-ron 👍 33.3 ms (-18%) 43.1 MB (÷2.1)
con-ron-stream 👍 33.9 ms (-16%) 44.8 MB (÷2.1)
con-agua 👍 24.6 ms (-39%) 16.2 MB (÷5.7)
nanobruijn 👍 4.69 ms (÷8.6) 12.8 MB (÷7.2)
nanoda 👍 4.67 ms (÷8.6) 3.9 MB (÷23)
con-leche 👍 10.4 ms (÷3.9) 27.4 MB (÷3.4)
pestka-wasm 👍 557 ms (×14) 334.5 MB (×3.6)
official-nightly 👍 40.5 ms (0%) 97.0 MB (+5%)
eink0rn 👍 4.26 ms (÷9.5) 15.9 MB (÷5.8)
official 👍 40.3 ms 92.2 MB
ind-models 👍 112 ms (×2.8) 109.3 MB (+19%)
kiota 👍 5.04 ms (÷8.0) 18.8 MB (÷4.9)
tenet 👍 151 ms (×3.7) 48.3 MB (-48%)
tenet-hs 👍 8.69 ms (÷4.6) 21.7 MB (÷4.3)
logos-kernel 👍 1.55 ms (÷26) 5.8 MB (÷16)
evmlean 🚫 2.16 s 284.1 MB
mini ⌛ — —
overfull ⌛ — —
lean4lean 👍 44.2 ms (+10%) 89.9 MB (-2%)
lean4cobol 👍 118 ms (×2.9) 21.1 MB (÷4.4)
tenet-jvm 👍 274 ms (×6.8) 86.1 MB (-7%)
nanoclo 👍 2.66 ms (÷15) 52.5 MB (-43%)
vow-lean-kernel ⌛ — —
canonical-min 🚫 390 ms 1.0 GB
lazylean 👍 5.48 ms (÷7.4) 24.4 MB (÷3.8)
rpylean 👍 1.64 ms (÷25) 10.4 MB (÷8.8)
metalean-slow 👍 2.27 s (×56) 1.6 GB (×18)
metalean-fast 👍 43.6 ms (+8%) 80.8 MB (-12%)
nanoclo-fortran 👍 6.79 ms (÷5.9) 7.3 MB (÷13)