Lean Kernel Arena / perf/proj-stuck-struct

Test "perf/proj-stuck-struct"

Expected: 👍 accept · Size: 50.1 KB · Lines: 916 · lean4export: 3.1.0 · Lean: 4.34.1 · Timeout: 50.0 s · 📄 Declaration · 🔗 Source

A definitional equality under a projection whose structure argument is stuck, distilled from a fuel-bridge lemma of con-leche's own proof library, on which con-leche ran out of memory.

step c n x : Nat × Nat recurses structurally on the fuel n; for a variable x each level is stuck on match x, and each branch reads .1 of two recursive calls. stepN checks (step (id c) N x).1 = (step c N x).1 by rfl, the sides differing only in id c vs c.

A checker that leaves a stuck projection's structure argument alone (as the reference kernel's whnf_core does when reduce_proj fails) compares step (id c) N x =?= step c N x, tries the arguments first, and is done at once. A checker that replaces it by its weak head normal form has lost the step head and unrolls the recursion tree on both sides: exponential in N (con-leche before the fix: 0.2 s, 2 s, 17 s and 73 MB, 0.4 GB, 2.6 GB for N = 12, 16, 20; official, nanoda, lean4lean: ~0.02 s at every N).

Checker Result ⏱️ 🧠
sokonanoda 👍 1 ms (÷30) 39.8 MB (-40%)
mathgraph 👍 1 ms (÷27) 41.6 MB (-37%)
nanoclo 👍 2 ms (÷20) 51.2 MB (-23%)
con-ron 👍 25 ms (-20%) 56.8 MB (-14%)
nanobruijn 👍 3 ms (÷9.2) 13.6 MB (÷4.9)
nanoda 👍 2 ms (÷16) 3.1 MB (÷21)
lazylean 👍 2 ms (÷15) 21.9 MB (÷3.0)
con-leche 👍 7 ms (÷4.4) 22.5 MB (÷2.9)
eink0rn 👍 3 ms (÷9.3) 16.2 MB (÷4.1)
official 👍 32 ms (0%) 66.3 MB (0%)
ind-models 👍 114 ms (×3.6) 107.5 MB (+62%)
lean4lean 👍 32 ms (+2%) 95.4 MB (+44%)
tenet 👍 145 ms (×4.6) 45.9 MB (-31%)
tenet-hs 👍 4 ms (÷8.4) 14.7 MB (÷4.5)
lean4cobol 👍 34 ms (+7%) 13.9 MB (÷4.8)
evmlean 👍 21.8 s (×687) 324.1 MB (×4.9)
mini 🚫 37 ms 73.9 MB
overfull ⌛ 0 ms 0 B
metalean-slow 🚫 39 ms 75.1 MB
tenet-jvm 👍 159 ms (×5.0) 68.1 MB (+3%)
nanoclo-fortran 👍 3 ms (÷9.4) 4.4 MB (÷15)
kiota 👍 2 ms (÷14) 9.1 MB (÷7.2)
metalean-fast 👍 36 ms (+15%) 82.2 MB (+24%)
canonical-min ✋ 392 ms 1.1 GB
rpylean 👍 2 ms (÷16) 7.0 MB (÷9.5)
vow-lean-kernel ⌛ 0 ms 0 B
parse-only 👍 30 ms (-5%) 66.0 MB (0%)