Lean Kernel Arena / perf/fueled-chain

Test "perf/fueled-chain"

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

Distilled from con-leche's fuel-bridge (_datF) lemmas, the declarations on which nanobruijn times out on the con-leche test.

Fueled α packages a fuel-indexed family p : Nat → Except Unit α with a proof whose type mentions p twice under binders. A _datF lemma states that running a monadic function in Fueled and extracting at fuel F equals running it in Except Unit, proved by unfolding and rewriting with the atF lemmas for bind/pure/throw/ite. What is left for the kernel is a definitional equality between two monadic programs that differ only in the monad instance, under one binder per bind and a do-notation join point per unless … throw guard.

chainN (N = 6, 9, 12) has N binds, each followed by a guard. A checker that recognises the unfolded and the literal program as equal outright is fast (nanoda: 2 ms, 18 ms, 32 ms); one that compares them structurally unfolds bind to Subtype.mk p h and, through proof irrelevance on the hs, re-compares the rest of the program twice per guard (nanobruijn: 19 ms, 4.1 s, 256 s). Without the guards it is cheap for both.

Checker Result ⏱️ 🧠
mathgraph 👍 9 ms (÷11) 97.8 MB (+29%)
sokonanoda 👍 10 ms (÷11) 138.0 MB (+82%)
nanoclo 👍 22 ms (÷4.7) 81.9 MB (+8%)
con-ron 👍 56 ms (-44%) 99.1 MB (+31%)
lazylean 👍 111 ms (+10%) 26.0 MB (÷2.9)
nanoda 👍 143 ms (+41%) 13.4 MB (÷5.6)
nanobruijn 👍 49 ms (÷2.1) 27.5 MB (÷2.8)
con-leche 👍 77 ms (-24%) 38.3 MB (-49%)
eink0rn 👍 11.6 s (×114) 742.6 MB (×9.8)
ind-models 👍 183 ms (+80%) 110.9 MB (+46%)
official 👍 101 ms (0%) 75.8 MB (0%)
lean4lean 👍 134 ms (+32%) 101.3 MB (+34%)
tenet 👍 279 ms (×2.7) 67.5 MB (-11%)
nanoclo-fortran 👍 49 ms (÷2.1) 16.4 MB (÷4.6)
lean4cobol 👍 881 ms (×8.7) 19.3 MB (÷3.9)
evmlean ⌛ 0 ms 0 B
mini 💥 1.3 m 77.3 MB
overfull 💥 1.6 m 49.1 MB
kiota 👍 56 ms (-45%) 31.2 MB (÷2.4)
canonical-min 🚫 433 ms 1.1 GB
rpylean 👍 4.9 s (×49) 1.1 GB (×14)
vow-lean-kernel 👍 3.4 s (×33) 23.1 MB (÷3.3)
official-v4.28.0 👍 125 ms (+23%) 78.7 MB (+4%)
still-nanoda 👍 156 ms (+54%) 15.3 MB (÷5.0)
nyaya 👍 1.9 s (×19) 32.4 MB (÷2.3)
parse-only 👍 53 ms (-47%) 66.9 MB (-12%)