Lean Kernel Arena (Preview) / perf/discarded-argument

Test "perf/discarded-argument"

Expected: 馃憤 accept 路 Size: 16.0鈥疜B 路 Lines: 367 路 lean4export: 3.2.0 路 Lean: 4.38.0-nightly-2026-12-03 路 Timeout: 40.0鈥痵 路 馃搫 Declaration 路 馃敆 Source

The declaration to check compares

dropArg (count #n)      and      dropArg (count #(n+1))

where count #k evaluates to the numeral #k in 螛(k虏) reductions, and dropArg maps every numeral to N.O.

Unfolding dropArg leaves N.O against N.O, for 螛(1). Comparing the arguments first evaluates two numerals of different value, for 螛(n虏), and then throws that answer away. The test asks whether a checker unfolds a constant before looking at an argument the constant never uses.

N=200 in the Lean source. From Courant and Leroy, POPL 2026, 搂10.

Checker Result 鈴憋笍 馃
gruszka 馃憤 2.25鈥痬s (梅380) 94.3鈥疢B (-16%)
nano-lean 馃憤 0.601鈥痬s (梅1424) 21.9鈥疢B (梅5.1)
pestka 馃憤 2.26鈥痬s (梅379) 17.2鈥疢B (梅6.6)
con-leche 馃憤 12.6鈥痬s (梅68) 25.6鈥疢B (梅4.4)
con-ron 馃憤 33.2鈥痬s (梅26) 42.0鈥疢B (梅2.7)
nucleus 馃憤 63.9鈥痬s (梅13) 13.6鈥疢B (梅8.3)
official 馃憤 855鈥痬s 112.7鈥疢B