Lean Kernel Arena (Preview) / perf/args-before-unfold

Test "perf/args-before-unfold"

Expected: 馃憤 accept 路 Size: 44.7鈥疜B 路 Lines: 1.2鈥痥 路 lean4export: 3.2.0 路 Lean: 4.38.0-nightly-2026-12-03 路 Timeout: 40.0鈥痵 路 馃搫 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 鈴憋笍 馃
gruszka 馃憤 3.29鈥痬s (梅15) 90.5鈥疢B (-21%)
nano-lean 馃憤 1.43鈥痬s (梅35) 29.9鈥疢B (梅3.9)
pestka 馃憤 5.29鈥痬s (梅9.3) 20.2鈥疢B (梅5.7)
con-leche 馃憤 10.2鈥痬s (梅4.8) 25.6鈥疢B (梅4.5)
con-ron 馃憤 32.7鈥痬s (-34%) 43.3鈥疢B (梅2.7)
nucleus 馃憤 1.59鈥痵 (脳32) 20.1鈥疢B (梅5.7)
official 馃憤 49.4鈥痬s 115.1鈥疢B