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) 147.8 MB (+95%)
nanoclo 👍 22 ms (÷4.6) 89.9 MB (+19%)
nanoda 👍 143 ms (+41%) 13.3 MB (÷5.7)
con-ron 👍 74 ms (-27%) 40.7 MB (-46%)
nanobruijn 👍 49 ms (÷2.1) 26.0 MB (÷2.9)
con-leche 👍 77 ms (-24%) 38.8 MB (-49%)
eink0rn 👍 11.6 s (×114) 744.7 MB (×9.8)
ind-models 👍 183 ms (+80%) 110.4 MB (+46%)
official 👍 101 ms (0%) 75.7 MB (0%)
lean4lean 👍 134 ms (+32%) 100.7 MB (+33%)
tenet 👍 279 ms (×2.7) 67.5 MB (-11%)
nanoclo-fortran 👍 49 ms (÷2.1) 16.3 MB (÷4.6)
lean4cobol 👍 881 ms (×8.7) 19.3 MB (÷3.9)
evmlean 0 ms 0 B
mini 💥 1.3 m 76.6 MB
overfull 💥 1.5 m 49.0 MB
kiota 👍 56 ms (-45%) 31.3 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.3 MB (÷3.2)
official-v4.28.0 👍 125 ms (+23%) 79.6 MB (+5%)
still-nanoda 👍 156 ms (+54%) 15.6 MB (÷4.8)
nyaya 👍 1.9 s (×19) 32.5 MB (÷2.3)
parse-only 👍 53 ms (-47%) 68.0 MB (-10%)