Lean Kernel Arena / perf/beta-ladder

Test "perf/beta-ladder"

Expected: 👍 accept · Size: 450.2 KB · Lines: 10.4 k · lean4export: 3.1.0 · Lean: 4.29.1 · Timeout: 50.0 s · 📄 Declaration · 🔗 Source

The declaration to check reduces

(fun x₁ => … (fun xₙ => x₁ + (x₂ + (… + (xₙ + 0)))) 0 …) 0

to 0, through n beta redexes over a body that reads every binder.

Reducing the ladder takes n beta steps whatever a checker does, so the test is what one step costs. Substituting into the body on entry to binder k copies the n − k redexes still below it, and those copies sum to Θ(n²). Carrying the substitution in an environment leaves the body untouched, for Θ(n).

N=2000 in the Lean source.

Checker Result ⏱️ 🧠
mathgraph 👍 8.4 s (×5.0) 1.4 GB (×2.8)
sokonanoda 👍 8.4 s (×5.0) 1.4 GB (×2.8)
nanoclo 👍 6 ms (÷263) 69.6 MB (÷7.2)
con-ron 👍 3.0 s (+77%) 1.3 GB (×2.6)
lazylean 👍 668 ms (÷2.5) 46.6 MB (÷11)
nanoda 👍 1.3 s (-25%) 607.2 MB (+21%)
nanobruijn 👍 1.6 s (-6%) 825.0 MB (+64%)
con-leche 👍 2.5 s (+49%) 865.5 MB (+73%)
eink0rn 👍 686 ms (÷2.4) 95.1 MB (÷5.3)
ind-models 👍 1.7 s (+3%) 535.0 MB (+7%)
official 👍 1.7 s (0%) 501.6 MB (0%)
lean4lean 👍 1.7 s (0%) 529.2 MB (+5%)
tenet 👍 2.2 s (+34%) 573.9 MB (+14%)
nanoclo-fortran 👍 23 ms (÷73) 13.7 MB (÷37)
lean4cobol 👍 30.9 s (×18) 796.7 MB (+59%)
evmlean 🚫 7.2 s 288.3 MB
mini 👍 946 ms (-44%) 210.6 MB (÷2.4)
overfull 💥 1.8 m 48.9 MB
kiota 👍 582 ms (÷2.9) 538.2 MB (+7%)
canonical-min 🚫 1.2 s 1.1 GB
rpylean 👍 2.7 s (+60%) 1.4 GB (×2.9)
vow-lean-kernel 💥 19.8 s 525.3 MB
official-v4.28.0 👍 1.8 s (+10%) 506.6 MB (+1%)
still-nanoda 👍 1.1 s (-32%) 607.6 MB (+21%)
nyaya 💥 4.3 s 718.1 MB
parse-only 👍 52 ms (÷32) 67.2 MB (÷7.5)