Lean Kernel Arena (Preview) / perf/proj-cheap-struct

Test "perf/proj-cheap-struct"

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

The declaration to check compares

(S u).re      and      (S ()).re

where u is a definition that unfolds to (), and reducing S _ to a constructor takes 螛(N) steps (it is a foldr over List.range N, with N = 2^17).

.re is a projection function, so both sides unfold to a primitive projection of S u and S (). A checker that reduces the structure of a projection during definitional equality only with whnf_core (no delta) compares the two stuck projections by their structures, and finds those equal by comparing the arguments of S. That is five unfoldings in all. A checker that fully reduces the structure of the projection to find a constructor evaluates S on both sides: 螛(N) steps, which runs into a step budget smaller than N.

Distilled from a Palomar submission, where the structure is a Finset.sum over Finset.range (2^17) under Complex.re.

Checker Result 鈴憋笍 馃
gruszka 馃憤 2.59鈥痬s (梅19) 118.1鈥疢B (+5%)
nano-lean 馃憤 1.13鈥痬s (梅43) 37.2鈥疢B (梅3.0)
pestka 馃憤 4.13鈥痬s (梅12) 21.0鈥疢B (梅5.4)
con-leche 馃憤 7.93鈥痬s (梅6.1) 25.4鈥疢B (梅4.5)
con-ron 馃憤 31.4鈥痬s (-35%) 45.7鈥疢B (梅2.5)
nucleus 馃憤 298鈥痬s (脳6.1) 14.0鈥疢B (梅8.1)
official 馃憤 48.6鈥痬s 112.8鈥疢B